/* Global Mobile Styles for Lost Dutchman Concepts */
/* Mobile First Approach with Progressive Enhancement */

/* =================================
   MOBILE BREAKPOINTS
   ================================= */
/* Small Mobile: 320px - 480px */
/* Large Mobile: 481px - 768px */
/* Tablet: 769px - 1024px */
/* Desktop: 1025px+ */

/* =================================
   BASE MOBILE STYLES (320px - 768px)
   ================================= */
@media (max-width: 768px) {
    /* Container and Layout */
    .container {
        padding: 0 1rem !important;
        max-width: 100% !important;
    }

    /* Typography */
    h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    h3 {
        font-size: 1.3rem !important;
        line-height: 1.3 !important;
    }

    h4 {
        font-size: 1.1rem !important;
    }

    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* Hero Sections */
    .hero,
    [class*="hero-"] {
        min-height: auto !important;
        padding: 3rem 1rem !important;
    }

    .hero-content {
        padding: 2rem 1rem !important;
        text-align: center !important;
    }

    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .hero-left,
    .hero-right {
        width: 100% !important;
        padding: 1rem !important;
    }

    /* Grid Layouts */
    [style*="grid-template-columns: repeat(4"],
    [style*="grid-template-columns: repeat(3"],
    [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    [style*="display: grid"] {
        gap: 1.5rem !important;
    }

    /* Flexbox Layouts */
    [style*="display: flex"]:not(.nav-container):not(.nav-logo) {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    /* Cards and Boxes */
    .card,
    [class*="card-"],
    [style*="border-radius"][style*="padding"] {
        padding: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    /* Images */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    [style*="width: 500px"],
    [style*="width: 600px"],
    [style*="width: 700px"],
    [style*="width: 800px"] {
        width: 100% !important;
    }

    .grid-item img {
        height: 250px !important;
    }

    /* Buttons and CTAs */
    .btn,
    button,
    [class*="btn-"] {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .button-group,
    [style*="display: flex"][style*="gap"] button {
        flex-direction: column !important;
    }

    /* Forms */
    input,
    textarea,
    select {
        width: 100% !important;
        padding: 0.75rem !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    form > div {
        margin-bottom: 1rem !important;
    }

    /* Tables - Make them scrollable */
    table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    /* Sections */
    section {
        padding: 3rem 0 !important;
    }

    /* Pricing and Feature Grids */
    .pricing-tiers,
    .feature-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tab Navigation */
    .tab-navigation,
    .tab-nav {
        flex-wrap: wrap !important;
    }

    .tab-navigation button,
    .tab-nav button {
        flex: 1 0 45% !important;
        margin: 0.25rem !important;
    }

    /* FAQ Accordions */
    .faq-item {
        margin-bottom: 1rem !important;
    }

    .faq-question {
        font-size: 1rem !important;
        padding: 1rem !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .footer-section {
        text-align: center !important;
    }

    .social-links {
        justify-content: center !important;
    }

    /* Modals and Overlays */
    .modal,
    [class*="overlay"] {
        padding: 1rem !important;
    }

    /* Hide Desktop-Only Elements */
    .desktop-only {
        display: none !important;
    }

    /* Overflow Prevention */
    body {
        overflow-x: hidden !important;
    }

    * {
        max-width: 100vw !important;
    }

    /* Inline Styles Override for Problematic Elements */
    [style*="width: 1200px"],
    [style*="width: 1100px"],
    [style*="width: 1000px"],
    [style*="max-width: 1200px"],
    [style*="max-width: 1100px"],
    [style*="max-width: 1000px"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    [style*="padding: 80px"],
    [style*="padding: 60px"],
    [style*="padding: 40px"] {
        padding: 2rem 1rem !important;
    }

    [style*="margin: 0 auto"] {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Gallery Specific */
    .gallery-section .image-grid {
        grid-template-columns: 1fr !important;
    }

    .gallery-item {
        margin-bottom: 1rem !important;
    }

    /* Timeline Widget */
    .timeline-container {
        padding: 1rem !important;
    }

    .timeline-item {
        flex-direction: column !important;
        text-align: center !important;
    }
}

/* =================================
   SMALL MOBILE (320px - 480px)
   ================================= */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.3rem !important;
    }

    h3 {
        font-size: 1.15rem !important;
    }

    .hero {
        padding: 2rem 0.75rem !important;
    }

    .tab-navigation button,
    .tab-nav button {
        flex: 1 0 100% !important;
    }

    /* Even smaller padding on mobile */
    .card,
    [class*="card-"] {
        padding: 1rem !important;
    }
}

/* =================================
   TABLET STYLES (768px - 1024px)
   ================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem !important;
    }

    /* 2-column grid on tablets */
    [style*="grid-template-columns: repeat(4"],
    [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hero-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* =================================
   UTILITY CLASSES
   ================================= */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }

    .mobile-block {
        display: block !important;
    }

    .mobile-center {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    .mobile-padding {
        padding: 1rem !important;
    }

    .mobile-margin-bottom {
        margin-bottom: 1rem !important;
    }
}

/* =================================
   TOUCH TARGETS
   ================================= */
@media (hover: none) and (pointer: coarse) {
    /* Ensure touch targets are at least 44x44px for accessibility */
    a,
    button,
    input,
    select,
    textarea,
    [role="button"],
    [onclick] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Increase tap target spacing */
    .nav-link {
        padding: 1rem !important;
    }
}

/* =================================
   LANDSCAPE MOBILE
   ================================= */
@media (max-width: 812px) and (orientation: landscape) {
    .hero {
        min-height: auto !important;
        padding: 2rem 1rem !important;
    }

    .nav-menu {
        height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
    }
}

/* =================================
   HIGH DPI SCREENS
   ================================= */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Ensure text remains crisp */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* =================================
   WHY-CHOOSE-US PAGE HERO FIXES
   ================================= */
@media (max-width: 1024px) {
    /* Fix why-choose-us hero main container */
    .why-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-2xl) !important;
        text-align: center !important;
    }

    .why-hero-section .hero-content {
        padding-right: 0 !important;
    }

    .why-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"] {
        height: 400px !important;
    }
}

@media (max-width: 768px) {
    /* Mobile why-choose-us hero layout - EXACT match to home page structure */
    .why-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-2xl) !important;
        text-align: center !important;
    }

    .why-hero-section .hero-title {
        font-size: var(--text-4xl) !important;
    }

    .why-hero-section .hero-stats {
        justify-content: center !important;
    }

    .why-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"] {
        height: 300px !important;
        gap: var(--space-sm) !important;
    }
}

/* =================================
   KITCHEN-HOODS PAGE HERO FIXES
   ================================= */
@media (max-width: 1024px) {
    /* Fix kitchen-hoods hero main container */
    .product-hero-section .container .product-grid[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-2xl) !important;
        text-align: center !important;
    }

    .product-hero-section .hero-content {
        padding-right: 0 !important;
    }

    .product-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"] {
        height: 400px !important;
    }
}

@media (max-width: 768px) {
    /* Mobile kitchen-hoods hero layout - EXACT match to home page structure */
    .product-hero-section .container .product-grid[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-2xl) !important;
        text-align: center !important;
    }

    .product-hero-section .hero-title {
        font-size: var(--text-4xl) !important;
    }

    .product-hero-section .hero-stats {
        justify-content: center !important;
    }

    .product-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"] {
        height: 300px !important;
        gap: var(--space-sm) !important;
    }
}

/* =================================
   CONTACT PAGE HERO FIXES
   ================================= */
@media (max-width: 1024px) {
    /* Fix contact hero main container */
    .contact-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-2xl) !important;
        text-align: center !important;
    }

    .contact-hero-section .hero-content {
        padding-right: 0 !important;
    }

    .contact-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"] {
        height: 400px !important;
    }
}

@media (max-width: 768px) {
    /* Mobile contact hero layout - EXACT match to home page structure */
    .contact-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-2xl) !important;
        text-align: center !important;
    }

    .contact-hero-section .hero-title {
        font-size: var(--text-4xl) !important;
    }

    .contact-hero-section .hero-stats {
        justify-content: center !important;
    }

    .contact-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"] {
        height: 300px !important;
        gap: var(--space-sm) !important;
    }
}

/* =================================
   LOCATION PAGES HERO FIXES
   ================================= */
@media (max-width: 1024px) {
    /* Fix location pages hero main containers */
    .phoenix-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"],
    .scottsdale-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"],
    .tempe-mesa-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"],
    .national-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"],
    .national-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-2xl) !important;
        text-align: center !important;
    }

    .phoenix-hero-section .hero-content,
    .scottsdale-hero-section .hero-content,
    .tempe-mesa-hero-section .hero-content,
    .national-hero-section .hero-content {
        padding-right: 0 !important;
    }

    .phoenix-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"],
    .scottsdale-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"],
    .tempe-mesa-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"],
    .national-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"] {
        height: 400px !important;
    }
}

@media (max-width: 768px) {
    /* Mobile location pages hero layout - EXACT match to home page structure */
    .phoenix-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"],
    .scottsdale-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"],
    .tempe-mesa-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"],
    .national-hero-section .container > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-2xl) !important;
        text-align: center !important;
    }

    .phoenix-hero-section .hero-title,
    .scottsdale-hero-section .hero-title,
    .tempe-mesa-hero-section .hero-title,
    .national-hero-section .hero-title {
        font-size: var(--text-4xl) !important;
    }

    .phoenix-hero-section .hero-stats,
    .scottsdale-hero-section .hero-stats,
    .tempe-mesa-hero-section .hero-stats,
    .national-hero-section .hero-stats {
        justify-content: center !important;
    }

    .phoenix-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"],
    .scottsdale-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"],
    .tempe-mesa-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"],
    .national-hero-section .hero-images div[style*="grid-template-columns: 1fr 1fr"] {
        height: 300px !important;
        gap: var(--space-sm) !important;
    }
}

/* =================================
   PRINT STYLES
   ================================= */
@media print {
    .nav,
    .nav-toggle,
    .footer,
    .cta-section {
        display: none !important;
    }
}