/**
 * Mobile Fix CSS - Industry Standard Specifications
 * Based on Google Material Design, Apple HIG, and WordPress best practices
 */

/* Global Mobile Fixes */
html {
    overflow-x: hidden;
    max-width: 100vw;
    font-size: 16px; /* Base font size - industry standard */
}

body {
    overflow-x: hidden;
    max-width: 100vw;
    font-size: 16px; /* Body text - WCAG compliant */
    line-height: 1.5; /* Optimal readability */
}

* {
    box-sizing: border-box;
}

/* Container Fixes */
.container,
.property-container,
.site-main {
    max-width: 100%;
    overflow-x: hidden;
}

/* Global Image Stretch Rule */
img {
    max-width: 100%;
    height: auto;
}

.location-image,
.hero-background img,
.property-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Prevent Text Overflow */
h1, h2, h3, h4, h5, h6, p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Mobile Specific Fixes - Aggressive Optimization */
@media (max-width: 767px) {
    /* Container padding - Compact for mobile */
    .container {
        padding-left: 0.75rem !important; /* 12px - Compact */
        padding-right: 0.75rem !important;
        max-width: 100vw !important;
    }
    
    /* Fix property cards */
    .property-card {
        max-width: 100%;
        border-radius: 0.75rem; /* 12px - Standard card radius */
    }
    
    /* Fix property layout */
    .property-layout {
        max-width: 100%;
        padding: 0;
    }
    
    /* Fix gallery */
    .property-gallery,
    .main-image,
    .thumbnail-grid {
        max-width: 100%;
    }
    
    /* Fix info cards */
    .property-info-card,
    .property-map-card,
    .contact-card {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 1rem !important; /* 16px standard */
        border-radius: 0.75rem !important; /* 12px */
    }
    
    /* Fix header */
    .property-header {
        max-width: 100%;
    }
    
    /* Property Title - Balanced for mobile (like Airbnb/Zillow) */
    .property-title-large {
        font-size: 1.25rem !important; /* 20px - Balanced, readable */
        line-height: 1.3;
        word-break: break-word;
        max-width: 100%;
    }
    
    /* Price - Prominent but not huge */
    .price-amount-large {
        font-size: 1.375rem !important; /* 22px - Prominent */
    }
    
    /* Stats - Compact */
    .quick-stats {
        gap: 0.5rem !important; /* 8px - Compact */
        padding: 0.5rem 0 !important; /* 8px */
    }
    
    .stat-icon {
        width: 1rem !important; /* 16px - Small icon */
        height: 1rem !important;
    }
    
    .stat-value {
        font-size: 0.8125rem !important; /* 13px - Compact */
    }
    
    .stat-label {
        font-size: 0.6875rem !important; /* 11px - Small label */
    }
    
    /* Amenities - Compact grid */
    .amenities-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.375rem !important; /* 6px - Compact */
    }
    
    .amenity-item {
        font-size: 0.75rem !important; /* 12px - Compact */
    }
    
    .amenity-icon {
        width: 1.125rem !important; /* 18px - Small */
        height: 1.125rem !important;
    }
    
    .amenity-icon svg {
        width: 0.75rem !important; /* 12px - Small icon */
        height: 0.75rem !important;
    }
    
    /* Description - Standard readable */
    .description-content {
        font-size: 0.875rem !important; /* 14px - Standard body */
        line-height: 1.6;
    }
    
    /* Section Headings - Balanced */
    .section-heading {
        font-size: 1.125rem !important; /* 18px - Clear heading */
        margin-bottom: 0.625rem !important; /* 10px */
    }
    
    /* Badges - Very small */
    .badge {
        font-size: 0.625rem !important; /* 10px - Very small */
        padding: 0.1875rem 0.375rem !important; /* 3px 6px */
        border-radius: 0.1875rem !important; /* 3px */
    }
    
    /* Thumbnails - Compact */
    .thumbnail {
        height: 3.5rem !important; /* 56px - Compact thumbnail */
    }
    
    /* Map - ULTRA LARGE SIZE FOR MOBILE TILE LOADING (V115) */
    .property-map {
        height: 32rem !important; /* 512px - ULTRA LARGE for guaranteed tile loading */
        min-height: 32rem !important;
        max-height: 32rem !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        z-index: 1 !important;
        background: #e8e8e8 !important;
        display: block !important;
        overflow: hidden !important;
        border-radius: 0.75rem !important;
    }
    
    #property-map {
        height: 32rem !important;
        min-height: 32rem !important;
        max-height: 32rem !important;
        width: 100% !important;
        display: block !important;
    }
    
    /* Ensure Leaflet tiles render properly on mobile */
    .property-map .leaflet-container {
        height: 100% !important;
        width: 100% !important;
        z-index: 1 !important;
    }
    
    .property-map .leaflet-tile-pane {
        z-index: 2 !important;
    }
    
    .property-map .leaflet-marker-pane {
        z-index: 6 !important;
    }
    
    /* Force tile images to load and be visible */
    .property-map .leaflet-tile {
        max-width: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure tile container is visible */
    .property-map .leaflet-tile-container {
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Contact Form - Compact */
    .contact-form input,
    .contact-form textarea {
        font-size: 0.875rem !important; /* 14px - Compact */
        padding: 0.5rem !important; /* 8px - Compact */
        min-height: 2.5rem; /* 40px - Compact but usable */
    }
    
    /* Buttons - Balanced (Instagram/Twitter standard) */
    .btn {
        font-size: 0.875rem !important; /* 14px - Standard button */
        padding: 0.625rem 1rem !important; /* 10px 16px */
        min-height: 2.5rem; /* 40px - Touch-friendly */
    }
    
    /* Back link - Compact */
    .back-link {
        font-size: 0.8125rem !important; /* 13px */
        margin-bottom: 0.625rem !important; /* 10px */
    }
    
    /* Property main - Compact spacing */
    .property-main {
        gap: 0.625rem !important; /* 10px - Compact */
    }
    
    /* Property header - Compact spacing */
    .property-header {
        gap: 0.625rem !important; /* 10px */
        margin-bottom: 0.75rem !important; /* 12px */
    }
    
    /* Location - Compact */
    .property-location-large {
        font-size: 0.75rem !important; /* 12px */
    }
    
    .location-icon-gold {
        width: 0.875rem !important; /* 14px - Small icon */
        height: 0.875rem !important;
    }
    
    /* Property Cards - Balanced sizing (Airbnb standard) */
    .property-title {
        font-size: 0.875rem !important; /* 14px - Standard card title */
        line-height: 1.4;
    }
    
    .property-location {
        font-size: 0.8125rem !important; /* 13px - Readable */
    }
    
    .property-stats {
        font-size: 0.8125rem !important; /* 13px - Readable */
        gap: 0.625rem !important; /* 10px */
    }
    
    .price-amount {
        font-size: 1.0625rem !important; /* 17px - Prominent card price */
    }
    
    .price-period {
        font-size: 0.75rem !important; /* 12px */
    }
    
    /* Property card images - Balanced (Zillow standard) */
    .property-image {
        height: 10rem !important; /* 160px - Balanced */
    }
    
    /* Property card content - Balanced padding */
    .property-content {
        padding: 0.75rem !important; /* 12px - Standard */
    }
    
    /* Main image - Balanced */
    .main-image {
        height: 12rem !important; /* 192px - Adequate preview */
    }
    
    /* Gallery grid - Compact */
    .thumbnail-grid {
        gap: 0.25rem !important; /* 4px - Very compact */
    }
    
    /* Info card - Compact padding */
    .property-info-card {
        padding: 0.75rem !important; /* 12px */
    }
    
    /* Map card - Compact padding */
    .property-map-card {
        padding: 0.75rem !important; /* 12px */
    }
    
    /* Contact card - Compact padding */
    .contact-card {
        padding: 0.75rem !important; /* 12px */
    }
}

/* Extra Small Mobile (iPhone SE, older devices) */
@media (max-width: 374px) {
    /* Slightly reduce for very small screens */
    .property-title-large {
        font-size: 1.375rem !important; /* 22px - Still readable */
    }
    
    .price-amount-large {
        font-size: 1.375rem !important; /* 22px */
    }
    
    .section-heading {
        font-size: 1.125rem !important; /* 18px - H3 size */
    }
    
    .description-content {
        font-size: 0.875rem !important; /* 14px - Maintain readability */
    }
    
    .amenity-item {
        font-size: 0.8125rem !important; /* 13px */
    }
    
    .sticky-contact-btn {
        font-size: 0.6875rem !important; /* 11px - Minimum */
        padding: 0.5rem 0.25rem !important;
    }
    
    .sticky-contact-btn svg {
        width: 18px !important; /* Maintain touch target */
        height: 18px !important;
    }
    
    .container {
        padding-left: 0.75rem !important; /* 12px for very small screens */
        padding-right: 0.75rem !important;
    }
}

/* Sticky Bar Mobile Optimization - Touch Standards */
@media (max-width: 1023px) {
    body {
        padding-bottom: 4rem; /* Space for sticky bar */
    }
    
    .mobile-sticky-contact {
        display: flex !important;
        min-height: 3.5rem; /* 56px - iOS standard bar height */
    }
    
    .sticky-contact-btn {
        min-height: 2.75rem; /* 44px - iOS touch target */
        min-width: 2.75rem; /* 44px */
        font-size: 0.875rem !important; /* 14px - Button text standard */
    }
    
    .sticky-contact-btn svg {
        width: 1.25rem !important; /* 20px - Medium icon */
        height: 1.25rem !important;
    }
}

/* Tablet Adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Slightly larger for tablets */
    .property-title-large {
        font-size: 1.75rem !important; /* 28px */
    }
    
    .price-amount-large {
        font-size: 1.75rem !important; /* 28px */
    }
    
    .section-heading {
        font-size: 1.375rem !important; /* 22px */
    }
    
    .description-content {
        font-size: 1rem !important; /* 16px */
    }
    
    .container {
        padding-left: 1.5rem !important; /* 24px for tablets */
        padding-right: 1.5rem !important;
    }
}

/* Landscape Mobile */
@media (min-width: 480px) and (max-width: 767px) and (orientation: landscape) {
    /* Optimize for landscape viewing */
    .property-title-large {
        font-size: 1.375rem !important; /* 22px */
    }
    
    .main-image {
        height: 10rem !important; /* 160px - Shorter for landscape */
    }
    
    .property-map {
        height: 32rem !important; /* 512px - ULTRA LARGE for tile loading */
        min-height: 32rem !important;
        max-height: 32rem !important;
    }
    
    #property-map {
        height: 32rem !important;
        min-height: 32rem !important;
        max-height: 32rem !important;
    }
}


/* Front Page Mobile Optimizations - Mobile First */
@media (max-width: 767px) {
    /* Hero section - Compact & Clean */
    .hero-section {
        min-height: auto !important;
        padding-bottom: 1.5rem !important;
    }
    
    .hero-content {
        padding: 5rem 1rem 1.5rem !important;
    }
    
    .hero-title {
        font-size: 1.875rem !important; /* 30px - Bold & Clear */
        margin-bottom: 1rem !important;
        margin-top: 0 !important;
        line-height: 1.2 !important;
        letter-spacing: -0.01em !important;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem !important; /* 15px - Readable */
        margin-bottom: 2rem !important;
        line-height: 1.5 !important;
        padding: 0 0.5rem !important;
    }
    
    .location-marquee {
        margin-bottom: 1.5rem !important;
    }
    
    .search-bar-wrapper {
        padding: 0 0.75rem !important;
    }
}
    
    /* Search bar - Compact */
    .hero-search {
        padding: 1rem !important;
        border-radius: 0.75rem !important;
    }
    
    .hero-search input,
    .hero-search select {
        font-size: 0.875rem !important;
        padding: 0.5rem !important;
        min-height: 2.5rem !important;
    }
    
    .hero-search button {
        font-size: 0.875rem !important;
        padding: 0.5rem 1rem !important;
        min-height: 2.5rem !important;
    }
    
    /* Location marquee - Compact */
    .location-card {
        min-width: 8rem !important; /* 128px */
        height: 6rem !important; /* 96px */
    }
    
    .location-card h3 {
        font-size: 0.875rem !important;
    }
    
    .location-card p {
        font-size: 0.75rem !important;
    }
    
    /* Category rail - Compact */
    .category-card {
        padding: 0.75rem !important;
    }
    
    .category-card h3 {
        font-size: 0.875rem !important;
    }
    
    .category-card p {
        font-size: 0.75rem !important;
    }
    
    /* Featured properties - Compact grid */
    .properties-grid {
        gap: 0.75rem !important;
        grid-template-columns: 1fr !important;
    }
    
    /* Section titles - Compact */
    .section-title {
        font-size: 1.25rem !important; /* 20px */
        margin-bottom: 0.75rem !important;
    }
    
    .section-subtitle {
        font-size: 0.875rem !important;
    }


/* Aggressive Overflow Prevention */
@media (max-width: 767px) {
    /* Force everything to fit */
    * {
        max-width: 100% !important;
    }
    
    /* Specific overflow fixes */
    .property-layout,
    .property-main,
    .property-sidebar,
    .property-gallery,
    .property-info-card,
    .property-map-card,
    .contact-card {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Images must not overflow */
    img,
    .main-image,
    .property-img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Text must wrap */
    h1, h2, h3, h4, h5, h6, p, span, div {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    
    /* No horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    /* Container must not overflow */
    .container,
    .property-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

/* Icon Size Fixes - Make all icons smaller */
@media (max-width: 767px) {
    /* All Lucide icons */
    [data-lucide] {
        width: 1rem !important; /* 16px */
        height: 1rem !important;
    }
    
    /* SVG icons */
    svg {
        max-width: 1rem !important;
        max-height: 1rem !important;
    }
    
    /* Icon in buttons */
    .btn svg,
    button svg,
    a svg {
        width: 0.875rem !important; /* 14px */
        height: 0.875rem !important;
    }
    
    /* Stat icons */
    .stat-icon svg,
    .amenity-icon svg,
    .location-icon svg {
        width: 0.75rem !important; /* 12px */
        height: 0.75rem !important;
    }
}

/* Button Size Fixes - Balanced & touch-friendly */
@media (max-width: 767px) {
    /* All buttons - Standard mobile size */
    button,
    .btn,
    input[type="submit"],
    input[type="button"] {
        font-size: 0.875rem !important; /* 14px - Standard */
        padding: 0.625rem 1rem !important; /* 10px 16px */
        min-height: 2.5rem !important; /* 40px - Touch-friendly */
        border-radius: 0.5rem !important; /* 8px */
    }
    
    /* Primary buttons - Slightly more padding */
    .btn-primary {
        padding: 0.625rem 1.25rem !important;
    }
    
    /* Outline buttons - Standard */
    .btn-outline {
        padding: 0.5625rem 1rem !important;
    }
    
    /* Small buttons - Compact but usable */
    .btn-sm {
        font-size: 0.8125rem !important;
        padding: 0.5rem 0.75rem !important;
        min-height: 2.25rem !important;
    }
}

/* Archive/Listing Page Optimizations */
@media (max-width: 767px) {
    /* Archive header */
    .archive-header {
        padding: 0.75rem !important;
    }
    
    .archive-title {
        font-size: 1.125rem !important; /* 18px */
    }
    
    /* Filter bar */
    .filter-bar {
        padding: 0.5rem !important;
        gap: 0.5rem !important;
    }
    
    .filter-bar select,
    .filter-bar input {
        font-size: 0.8125rem !important;
        padding: 0.375rem !important;
        min-height: 2.25rem !important;
    }
    
    /* Properties grid */
    .properties-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        padding: 0.75rem !important;
    }
}

/* Footer Optimizations */
@media (max-width: 767px) {
    .site-footer {
        padding: 1.5rem 0.75rem !important;
    }
    
    .footer-widget {
        margin-bottom: 1rem !important;
    }
    
    .footer-widget h3 {
        font-size: 0.9375rem !important; /* 15px */
        margin-bottom: 0.5rem !important;
    }
    
    .footer-widget ul li {
        font-size: 0.8125rem !important;
        margin-bottom: 0.375rem !important;
    }
    
    .footer-bottom {
        font-size: 0.75rem !important;
        padding: 0.75rem 0 !important;
    }
}

/* Header/Navigation Optimizations */
@media (max-width: 767px) {
    .site-header {
        padding: 0.5rem 0.75rem !important;
    }
    
    .site-logo img {
        max-height: 2rem !important; /* 32px */
    }
    
    .main-navigation a {
        font-size: 0.875rem !important;
        padding: 0.5rem !important;
    }
    
    .mobile-menu-toggle {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}


/* ==========================================================================
   GLOBAL ICON SIZE FIXES - ALL DEVICES
   ========================================================================== */

/* Fix ALL Lucide icons globally - not just mobile */
[data-lucide] {
    width: 1.25rem !important; /* 20px - Reasonable size */
    height: 1.25rem !important;
}

/* All SVG icons - reasonable size */
svg {
    max-width: 1.25rem !important;
    max-height: 1.25rem !important;
}

/* Icons in buttons */
.btn svg,
button svg,
a svg {
    width: 1rem !important; /* 16px */
    height: 1rem !important;
}

/* Small icons */
.icon-sm,
.icon-sm svg {
    width: 0.875rem !important; /* 14px */
    height: 0.875rem !important;
}

/* Medium icons */
.icon-md,
.icon-md svg {
    width: 1.125rem !important; /* 18px */
    height: 1.125rem !important;
}

/* Large icons - but not too large */
.icon-lg,
.icon-lg svg {
    width: 1.5rem !important; /* 24px - max */
    height: 1.5rem !important;
}

/* ==========================================================================
   FRONT PAGE SPECIFIC FIXES - ALL DEVICES
   ========================================================================== */

/* Hero section icons */
.hero-section svg,
.hero-section [data-lucide] {
    width: 1.125rem !important; /* 18px */
    height: 1.125rem !important;
}

/* Search bar icons */
.hero-search svg,
.search-bar svg {
    width: 1rem !important; /* 16px */
    height: 1rem !important;
}

/* Location marquee cards */
.location-card {
    min-width: 10rem !important; /* 160px */
    height: 8rem !important; /* 128px */
}

.location-card svg {
    width: 1.5rem !important; /* 24px */
    height: 1.5rem !important;
}

/* Category cards */
.category-card {
    padding: 1rem !important;
}

.category-card svg {
    width: 1.5rem !important; /* 24px */
    height: 1.5rem !important;
}

/* Featured property cards on front page */
.featured-properties .property-card {
    max-width: 100%;
}

/* ==========================================================================
   DESKTOP OPTIMIZATIONS - Prevent huge icons
   ========================================================================== */

@media (min-width: 1024px) {
    /* Desktop icons should be reasonable, not huge */
    [data-lucide] {
        width: 1.25rem !important; /* 20px - reasonable */
        height: 1.25rem !important;
    }
    
    svg {
        max-width: 1.25rem !important;
        max-height: 1.25rem !important;
    }
    
    /* Button icons on desktop */
    .btn svg,
    button svg {
        width: 1.125rem !important; /* 18px */
        height: 1.125rem !important;
    }
    
    /* Stat icons */
    .stat-icon,
    .stat-icon svg {
        width: 1.25rem !important; /* 20px */
        height: 1.25rem !important;
    }
    
    /* Amenity icons */
    .amenity-icon {
        width: 1.5rem !important; /* 24px max */
        height: 1.5rem !important;
    }
    
    .amenity-icon svg {
        width: 1rem !important; /* 16px */
        height: 1rem !important;
    }
    
    /* Location icons */
    .location-icon,
    .location-icon svg {
        width: 1rem !important; /* 16px */
        height: 1rem !important;
    }
    
    /* Navigation icons */
    .main-navigation svg {
        width: 1.125rem !important; /* 18px */
        height: 1.125rem !important;
    }
}

/* ==========================================================================
   PROPERTY CARD FIXES - ALL DEVICES
   ========================================================================== */

/* Property card icons - consistent across all devices */
.property-card svg,
.property-card [data-lucide] {
    width: 1rem !important; /* 16px */
    height: 1rem !important;
}

/* Directions button icon */
.directions-btn svg {
    width: 1.125rem !important; /* 18px */
    height: 1.125rem !important;
}

/* Gallery indicator icon */
.gallery-indicator svg {
    width: 1rem !important; /* 16px */
    height: 1rem !important;
}

/* Badge icons */
.badge svg {
    width: 0.75rem !important; /* 12px */
    height: 0.75rem !important;
}

/* ==========================================================================
   TABLET OPTIMIZATIONS
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1023px) {
    /* Tablet - balanced sizes */
    [data-lucide] {
        width: 1.125rem !important; /* 18px */
        height: 1.125rem !important;
    }
    
    svg {
        max-width: 1.125rem !important;
        max-height: 1.125rem !important;
    }
    
    .property-card {
        max-width: 100%;
    }
    
    .location-card {
        min-width: 12rem !important; /* 192px */
        height: 9rem !important; /* 144px */
    }
}

/* ==========================================================================
   ADDITIONAL MOBILE FIXES
   ========================================================================== */

@media (max-width: 767px) {
    /* Override any large icons on mobile */
    [data-lucide] {
        width: 1rem !important; /* 16px on mobile */
        height: 1rem !important;
    }
    
    svg {
        max-width: 1rem !important;
        max-height: 1rem !important;
    }
    
    /* Front page hero */
    .hero-section {
        padding: 1rem 0.75rem !important;
    }
    
    .hero-title {
        font-size: 1.5rem !important; /* 24px */
    }
    
    .hero-subtitle {
        font-size: 0.875rem !important; /* 14px */
    }
    
    /* Location cards - compact */
    .location-card {
        min-width: 9rem !important; /* 144px */
        height: 7rem !important; /* 112px */
    }
    
    .location-card h3 {
        font-size: 0.875rem !important; /* 14px */
    }
    
    .location-card p {
        font-size: 0.75rem !important; /* 12px */
    }
    
    .location-card svg {
        width: 1.25rem !important; /* 20px */
        height: 1.25rem !important;
    }
    
    /* Category cards - compact */
    .category-card {
        padding: 0.75rem !important;
    }
    
    .category-card h3 {
        font-size: 0.875rem !important; /* 14px */
    }
    
    .category-card p {
        font-size: 0.75rem !important; /* 12px */
    }
    
    .category-card svg {
        width: 1.25rem !important; /* 20px */
        height: 1.25rem !important;
    }
    
    /* Property cards - ensure they're compact */
    .property-card {
        border-radius: 0.75rem !important; /* 12px */
    }
    
    .property-image {
        height: 10rem !important; /* 160px */
        border-radius: 0.75rem 0.75rem 0 0 !important;
    }
    
    .property-content {
        padding: 0.75rem !important; /* 12px */
    }
    
    .property-title {
        font-size: 0.875rem !important; /* 14px */
        margin-bottom: 0.375rem !important;
    }
    
    .property-location {
        font-size: 0.75rem !important; /* 12px */
        margin-bottom: 0.5rem !important;
    }
    
    .property-stats {
        font-size: 0.75rem !important; /* 12px */
        gap: 0.5rem !important;
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .property-stats svg {
        width: 0.875rem !important; /* 14px */
        height: 0.875rem !important;
    }
    
    .price-amount {
        font-size: 1rem !important; /* 16px */
    }
    
    .price-period {
        font-size: 0.6875rem !important; /* 11px */
    }
    
    /* Section titles */
    .section-title,
    h2.section-title {
        font-size: 1.25rem !important; /* 20px */
        margin-bottom: 0.75rem !important;
    }
    
    .section-subtitle {
        font-size: 0.875rem !important; /* 14px */
    }
    
    /* Properties grid */
    .properties-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}


/* ==========================================================================
   SINGLE PROPERTY PAGE - PRICE & CONTACT BUTTONS LAYOUT
   ========================================================================== */

/* Price moved to left side below title */
@media (max-width: 767px) {
    .property-header {
        margin-bottom: 1rem !important;
    }
    
    .property-header-left {
        width: 100%;
    }
    
    .property-price-inline {
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid hsl(var(--border) / 0.5);
    }
    
    .price-amount-large {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    .price-period-small {
        font-size: 0.875rem !important;
    }
    
    /* Contact buttons styling */
    .property-contact-buttons {
        display: flex;
        gap: 0.625rem;
        margin-top: 1rem;
        width: 100%;
    }
    
    .btn-contact {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        min-height: 2.75rem;
        border-radius: 0.5rem;
        font-weight: 600;
    }
    
    .btn-contact svg {
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0;
    }
    
    .btn-contact span {
        white-space: nowrap;
    }
    
    /* WhatsApp button styling */
    .btn-whatsapp {
        background: #25d366 !important;
        color: white !important;
        border: none;
    }
    
    .btn-whatsapp:hover,
    .btn-whatsapp:active {
        background: #1da851 !important;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .property-price-inline {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid hsl(var(--border) / 0.5);
    }
    
    .price-amount-large {
        font-size: 2.25rem !important;
    }
    
    .property-contact-buttons {
        margin-top: 1.25rem;
        gap: 1rem;
    }
    
    .btn-contact {
        flex: 0 1 auto;
        min-width: 160px;
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    .btn-contact svg {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Desktop - keep buttons visible */
@media (min-width: 1024px) {
    .property-price-inline {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid hsl(var(--border) / 0.5);
    }
    
    .property-contact-buttons {
        margin-top: 1.5rem;
        gap: 1rem;
    }
    
    .btn-contact {
        flex: 0 1 auto;
        min-width: 180px;
        padding: 1rem 1.75rem !important;
        font-size: 1rem !important;
    }
    
    .btn-contact svg {
        width: 20px !important;
        height: 20px !important;
    }
}


/* ==========================================================================
   MOBILE HEADER OPTIMIZATION - COMPACT & WHITE
   ========================================================================== */

/* Force white background on mobile - no transparency */
@media (max-width: 767px) {
    .site-header {
        background: white !important;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06) !important;
        padding: 0.25rem 0 !important;
        backdrop-filter: none !important;
    }
    
    .site-header.transparent {
        background: white !important;
    }
    
    /* ULTRA compact logo - hide it completely, show only text */
    .site-logo {
        height: 1.25rem !important;
        max-height: 1.25rem !important;
    }
    
    .logo-icon {
        width: 1.25rem !important;
        height: 1.25rem !important;
        border-radius: 0.1875rem !important;
    }
    
    .logo-icon span {
        font-size: 0.625rem !important;
    }
    
    /* Compact text */
    .site-title {
        font-size: 0.75rem !important;
        line-height: 1.1;
        font-weight: 600 !important;
    }
    
    .site-tagline {
        display: none !important;
    }
    
    /* Compact menu toggle */
    .mobile-menu-toggle {
        padding: 0.1875rem !important;
    }
    
    .mobile-menu-toggle svg {
        width: 1rem !important;
        height: 1rem !important;
    }
    
    /* Always dark text on mobile */
    .site-header .site-title,
    .site-header .site-tagline,
    .site-header .mobile-menu-toggle {
        color: hsl(210 22% 12%) !important;
    }
    
    .site-header.transparent .site-title,
    .site-header.transparent .site-tagline,
    .site-header.transparent .mobile-menu-toggle {
        color: hsl(210 22% 12%) !important;
    }
    
    /* Compact logo link */
    .logo-link {
        gap: 0.25rem !important;
    }
    
    /* Container padding */
    .site-header .container {
        padding-left: 0.625rem !important;
        padding-right: 0.625rem !important;
    }
    
    /* Header inner */
    .header-inner {
        min-height: 2rem !important;
    }
}

/* Slightly larger on small tablets */
@media (min-width: 640px) and (max-width: 767px) {
    .site-logo {
        height: 1.75rem !important;
    }
    
    .logo-icon {
        width: 1.75rem !important;
        height: 1.75rem !important;
    }
    
    .site-title {
        font-size: 0.9375rem !important;
    }
    
    .site-tagline {
        display: block !important;
        font-size: 0.625rem !important;
    }
    
    .mobile-menu-toggle svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}

/* ==========================================================================
   LOCATION MARQUEE - INSTAGRAM STYLE (SQUARE-ISH)
   ========================================================================== */

/* Thumbnail size - 9:16 ratio - Full width edge-to-edge */
@media (max-width: 767px) {
    /* Hero section - full coverage */
    .hero-section {
        position: relative !important;
        overflow: hidden !important;
        min-height: 100vh !important;
    }
    
    .hero-background {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 0 !important;
    }
    
    .hero-background img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
    }
    
    /* Marquee - edge to edge - AGGRESSIVE */
    .location-marquee-wrapper {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        padding: 1.5rem 0 !important;
        overflow: hidden !important;
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Cards - 9:16 ratio enforced - AGGRESSIVE */
    .location-card {
        width: 7rem !important;
        height: 12.5rem !important;
        min-width: 7rem !important;
        min-height: 12.5rem !important;
        max-width: 7rem !important;
        max-height: 12.5rem !important;
        flex-shrink: 0 !important;
        border-radius: 0.75rem !important;
        overflow: hidden !important;
    }
    
    .location-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
    }
    
    .marquee-row {
        gap: 0.625rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: flex !important;
    }
    
    .location-name {
        font-size: 0.75rem !important;
    }
    
    .location-overlay {
        padding: 0.75rem !important;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    .location-card {
        width: 8rem !important;
        height: 14.25rem !important;
    }
    
    .location-name {
        font-size: 0.875rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .location-marquee-wrapper {
        padding: 2rem 0 !important;
    }
    
    .location-card {
        width: 9rem !important;
        height: 16rem !important;
        border-radius: 1rem !important;
    }
    
    .marquee-row {
        gap: 0.75rem !important;
    }
    
    .location-name {
        font-size: 0.9375rem !important;
    }
    
    .location-overlay {
        padding: 1rem !important;
    }
}

@media (min-width: 1024px) {
    .location-card {
        width: 10rem !important;
        height: 17.75rem !important;
    }
    
    .location-name {
        font-size: 1rem !important;
    }
}

/* Hero section - background only till search bar */
@media (max-width: 767px) {
    .hero-section {
        min-height: auto !important;
        padding-bottom: 2rem !important;
    }
    
    .hero-background {
        position: absolute !important;
        height: 100% !important;
    }
    
    .hero-content {
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* Better search bar on mobile */
    .search-bar {
        border-radius: 1rem !important;
        padding: 1rem !important;
        box-shadow: 0 4px 24px rgba(0, 78, 152, 0.15) !important;
    }
    
    .search-select,
    .search-input {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.8125rem !important;
        min-height: 2.5rem !important;
    }
    
    .search-input {
        padding-left: 2.5rem !important;
    }
    
    .input-icon {
        left: 0.75rem !important;
        width: 1rem !important;
        height: 1rem !important;
    }
}


/* ==========================================================================
   CATEGORY RAIL - MOBILE FRIENDLY ICONS
   ========================================================================== */

/* Make category icons smaller and more compact on mobile */
@media (max-width: 767px) {
    .category-rail-section {
        padding: 2rem 0 !important;
    }
    
    .category-rail-title {
        font-size: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .category-rail {
        gap: 0.625rem !important;
        padding-bottom: 0.75rem !important;
    }
    
    .category-card {
        min-width: 80px !important;
        padding: 0.75rem 0.625rem !important;
        gap: 0.5rem !important;
        border-radius: 1rem !important;
        border: 1px solid hsl(var(--border) / 0.5) !important;
    }
    
    .category-icon {
        width: 2.25rem !important;
        height: 2.25rem !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }
    
    .category-icon svg {
        width: 1.125rem !important;
        height: 1.125rem !important;
    }
    
    .category-label {
        font-size: 0.6875rem !important;
        line-height: 1.2;
        font-weight: 600 !important;
    }
}

/* Extra small mobile */
@media (max-width: 374px) {
    .category-card {
        min-width: 75px !important;
        padding: 0.625rem 0.5rem !important;
    }
    
    .category-icon {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    .category-icon svg {
        width: 1rem !important;
        height: 1rem !important;
    }
    
    .category-label {
        font-size: 0.625rem !important;
    }
}

/* Tablet adjustments */
@media (min-width: 640px) and (max-width: 1023px) {
    .category-rail-title {
        font-size: 1.5rem !important;
    }
    
    .category-card {
        min-width: 95px !important;
        padding: 0.875rem 0.75rem !important;
    }
    
    .category-icon {
        width: 2.75rem !important;
        height: 2.75rem !important;
        border-radius: 50% !important;
    }
    
    .category-icon svg {
        width: 1.375rem !important;
        height: 1.375rem !important;
    }
    
    .category-label {
        font-size: 0.75rem !important;
    }
}

/* ==========================================================================
   CRITICAL FIX: Mobile Touch Targets - Minimum 44px × 44px
   ========================================================================== */

/* Filter Checkboxes - Expand clickable area */
.checkbox-label {
    min-height: 44px !important;
    padding: 12px 8px !important;
    display: flex !important;
    align-items: center !important;
}

.checkbox-label input[type="checkbox"] {
    min-width: 20px !important;
    min-height: 20px !important;
    margin-right: 12px !important;
}

/* Pagination Numbers */
@media (max-width: 640px) {
    .pagination .page-numbers {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 12px 8px !important;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 10px !important;
}

/* Filter Close Button */
.filter-close-btn {
    min-width: 44px !important;
    min-height: 44px !important;
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    min-height: 44px !important;
    padding: 12px 16px !important;
}

/* All Buttons Minimum Touch Target */
@media (max-width: 767px) {
    .btn,
    button,
    .property-card .btn,
    .search-btn,
    .filter-btn {
        min-height: 44px !important;
        padding: 12px 16px !important;
    }
}

/* Form Inputs - Prevent iOS Zoom */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="search"],
    select,
    textarea,
    .form-group input,
    .form-group select,
    .form-group textarea,
    .concierge-form input,
    .newsletter-form input,
    .search-input {
        font-size: 16px !important;
        min-height: 44px !important;
        padding: 12px !important;
    }
}

/* Category Cards - Adequate Touch Area */
@media (max-width: 767px) {
    .category-card {
        min-width: 100px !important;
        min-height: 100px !important;
        padding: 12px !important;
    }
}

/* Mobile Menu Items */
.mobile-menu-item {
    min-height: 48px !important;
    padding: 14px 20px !important;
}

/* Property Card Buttons */
@media (max-width: 767px) {
    .property-card .property-actions .btn {
        min-height: 44px !important;
        padding: 10px 14px !important;
        font-size: 14px !important;
    }
}

/* Sort Dropdown */
@media (max-width: 767px) {
    .sort-select {
        min-height: 44px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
}

/* Back to Top Button */
.back-to-top {
    min-width: 48px !important;
    min-height: 48px !important;
}

/* ==========================================================================
   CRITICAL FIX: Icon Fallback System - Text labels if icons don't load
   ========================================================================== */

/* Add text content as fallback for icons */
[data-lucide="mail"]::before {
    content: "✉";
    font-size: 16px;
}

[data-lucide="newspaper"]::before {
    content: "📄";
    font-size: 16px;
}

[data-lucide="bell"]::before {
    content: "🔔";
    font-size: 16px;
}

[data-lucide="phone"]::before {
    content: "☎";
    font-size: 16px;
}

[data-lucide="home"]::before {
    content: "🏠";
    font-size: 16px;
}

[data-lucide="message-circle"]::before {
    content: "💬";
    font-size: 16px;
}

[data-lucide="menu"]::before {
    content: "☰";
    font-size: 20px;
}

[data-lucide="x"]::before {
    content: "✕";
    font-size: 20px;
}

[data-lucide="sliders-horizontal"]::before {
    content: "⚙";
    font-size: 16px;
}

[data-lucide="chevron-left"]::before {
    content: "‹";
    font-size: 24px;
}

[data-lucide="chevron-right"]::before {
    content: "›";
    font-size: 24px;
}

[data-lucide="arrow-right"]::before {
    content: "→";
    font-size: 16px;
}

[data-lucide="arrow-up"]::before {
    content: "↑";
    font-size: 20px;
}

[data-lucide="plus-circle"]::before {
    content: "+";
    font-size: 18px;
}

[data-lucide="facebook"]::before {
    content: "f";
    font-weight: bold;
}

[data-lucide="instagram"]::before {
    content: "📷";
}

[data-lucide="twitter"]::before {
    content: "🐦";
}

[data-lucide="linkedin"]::before {
    content: "in";
    font-weight: bold;
}

[data-lucide="map-pin"]::before {
    content: "📍";
}

[data-lucide="building-2"]::before,
[data-lucide="building"]::before {
    content: "🏢";
}

[data-lucide="users"]::before {
    content: "👥";
}

[data-lucide="tree-pine"]::before {
    content: "🌲";
}

[data-lucide="calendar"]::before {
    content: "📅";
}

[data-lucide="layout-grid"]::before {
    content: "⊞";
    font-size: 18px;
}

[data-lucide="map"]::before {
    content: "🗺";
}

/* When Lucide loads, hide the fallback */
[data-lucide] svg {
    display: block;
}

[data-lucide]:not(:empty)::before {
    display: none;
}

/* Filter Badge for Active Filters */
.mobile-filter-toggle {
    position: relative;
}

.filter-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: hsl(var(--brand-blue));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(0, 78, 152, 0.3);
    animation: badgePulse 0.3s ease-out;
}

@keyframes badgePulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Active Filter Indicator in Sidebar */
.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: hsl(var(--brand-blue));
}

.checkbox-label input[type="checkbox"]:checked {
    accent-color: hsl(var(--brand-blue));
}
