/* ==========================================
   INTERRIZE - COMPREHENSIVE MOBILE RESPONSIVE
   Overrides inline styles across all pages
   ========================================== */

/* ==========================================
   DESKTOP: Nav link colors for purple navbar
   (Replaces removed inline style="color:#fff")
   ========================================== */
.navbar[style*="background"] .nav-menu a {
    color: #ffffff;
}

.navbar[style*="background"] .nav-menu a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.navbar[style*="background"] .nav-menu a::after {
    background: rgba(255, 255, 255, 0.6);
}

.navbar[style*="background"] .dropdown-content a {
    color: var(--color-dark, #111214);
}

.navbar[style*="background"] .dropdown-content a:hover {
    color: var(--color-primary, #a100ff);
}

/* ==========================================
   TABLET BREAKPOINT (max-width: 992px)
   ========================================== */
@media (max-width: 992px) {

    /* ---- Hero Section Inline Grids (Service Pages) ---- */
    .hero [style*="grid-template-columns: 1.1fr"],
    .hero [style*="grid-template-columns: 1fr 1fr"],
    .hero [style*="grid-template-columns: 0.9fr"],
    section [style*="grid-template-columns: 1.1fr 0.9fr"],
    section [style*="grid-template-columns: 1.1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* ---- Service Page Hero Right Column (Visual) ---- */
    .hero [style*="height: 550px"],
    section [style*="height: 550px"] {
        height: auto !important;
        min-height: 200px !important;
    }

    /* ---- Hero heading sizes ---- */
    .hero h1[style*="font-size: 3.6rem"],
    .hero h1[style*="font-size: 3.5rem"],
    section h1[style*="font-size: 3.6rem"],
    section h1[style*="font-size: 3.5rem"] {
        font-size: 2.5rem !important;
    }

    /* ---- Inline Footer Grid (Legal/Service Pages) ---- */
    footer [style*="grid-template-columns: 1.5fr repeat(4, 1fr)"],
    footer [style*="grid-template-columns: 1.5fr repeat(4"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
    }

    /* ---- Footer Brand Column: Full Width ---- */
    footer [style*="grid-template-columns: 1.5fr repeat(4, 1fr)"] > div:first-child,
    footer [style*="grid-template-columns: 1.5fr repeat(4"] > div:first-child {
        grid-column: 1 / -1 !important;
    }

    /* ---- Stats Grids ---- */
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }

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

    /* ---- Section padding overrides ---- */
    section[style*="padding: 9rem 0 7rem"],
    section[style*="padding: 8rem 0 4rem"] {
        padding: 7rem 0 4rem !important;
    }

    section[style*="padding: 7rem 0"],
    section[style*="padding: 6rem 0"] {
        padding: 4rem 0 !important;
    }

    /* ---- CTA Section heading ---- */
    section [style*="font-size: 2.5rem"][style*="font-weight: 800"][style*="color: #ffffff"],
    section [style*="font-size: 2.5rem"][style*="font-weight: 900"] {
        font-size: 2rem !important;
    }

    /* ---- About page 5rem heading ---- */
    h1[style*="font-size: 5rem"],
    section h1[style*="font-size: 5rem"] {
        font-size: 3.5rem !important;
    }

    /* ---- Fixed pixel font size headings ---- */
    [style*="font-size: 72px"],
    [style*="font-size: 56px"] {
        font-size: 2.5rem !important;
    }

    [style*="font-size: 48px"] {
        font-size: 2rem !important;
    }

    /* ---- 4rem stat numbers ---- */
    [style*="font-size: 4rem"] {
        font-size: 2.5rem !important;
    }

    /* ---- About page 1fr 1fr content grid ---- */
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* ---- 3rem headings ---- */
    h2[style*="font-size: 3rem"],
    [style*="font-size: 3.5rem"] {
        font-size: 2.25rem !important;
    }
}

/* ==========================================
   MOBILE BREAKPOINT (max-width: 768px)
   ========================================== */
@media (max-width: 768px) {

    /* ---- LEGAL PAGE HERO: Font Size Overrides ---- */
    .hero h1[style*="font-size: 4.5rem"],
    section.hero h1[style*="font-size: 4.5rem"],
    section h1[style*="font-size: 4.5rem"] {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    .hero h1[style*="font-size: 3.6rem"],
    section h1[style*="font-size: 3.6rem"],
    .hero h1[style*="font-size: 3.5rem"],
    section h1[style*="font-size: 3.5rem"] {
        font-size: 2.25rem !important;
        line-height: 1.2 !important;
    }

    /* ---- About page 5rem heading ---- */
    h1[style*="font-size: 5rem"],
    section h1[style*="font-size: 5rem"] {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    /* ---- Fixed pixel font sizes ---- */
    [style*="font-size: 72px"],
    [style*="font-size: 56px"] {
        font-size: 2rem !important;
    }

    [style*="font-size: 48px"] {
        font-size: 1.75rem !important;
    }

    /* ---- 4rem stat numbers ---- */
    [style*="font-size: 4rem"] {
        font-size: 2rem !important;
    }

    /* ---- 3rem / 3.5rem headings ---- */
    h2[style*="font-size: 3rem"],
    [style*="font-size: 3.5rem"] {
        font-size: 1.75rem !important;
    }

    /* ---- Legal Hero min-height ---- */
    .hero[style*="min-height: 75vh"],
    section.hero[style*="min-height: 75vh"],
    section[style*="min-height: 75vh"] {
        min-height: 60vh !important;
    }

    /* Hero container min-height */
    .hero .container[style*="min-height: 75vh"],
    section .container[style*="min-height: 75vh"] {
        min-height: 60vh !important;
    }

    /* ---- Legal Hero Subheadline ---- */
    .hero p[style*="font-size: 1.35rem"],
    section p[style*="font-size: 1.35rem"] {
        font-size: 1.1rem !important;
        margin-bottom: 2rem !important;
    }

    /* ---- Legal Hero Badge ---- */
    .hero [style*="padding: 0.75rem 2rem"][style*="backdrop-filter"],
    section [style*="padding: 0.75rem 2rem"][style*="backdrop-filter"] {
        padding: 0.5rem 1.25rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* ---- Legal Content Section Headings ---- */
    h2[style*="font-size: 2rem"][style*="border-bottom: 3px solid #a100ff"],
    h2[style*="font-size: 1.75rem"][style*="border-bottom"] {
        font-size: 1.5rem !important;
    }

    /* ---- Scroll indicator margin ---- */
    [style*="margin-top: 4rem"][style*="animation: bounce"] {
        margin-top: 2rem !important;
    }

    /* ---- Service Page Hero Grid ---- */
    .hero [style*="grid-template-columns: 1.1fr 0.9fr"],
    section [style*="grid-template-columns: 1.1fr 0.9fr"],
    .hero [style*="grid-template-columns: 1.1fr"],
    section [style*="grid-template-columns: 1.1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Service page hero left column padding */
    .hero [style*="padding-right: 2rem"],
    section [style*="padding-right: 2rem"] > div[style*="padding-right: 2rem"] {
        padding-right: 0 !important;
    }

    /* ---- Service Page Hero Visual Element ---- */
    .hero [style*="height: 550px"],
    section [style*="height: 550px"] {
        height: auto !important;
        min-height: 200px !important;
        display: none !important;
    }

    /* ---- Service Page Section Padding ---- */
    section[style*="padding: 9rem 0 7rem"] {
        padding: 6rem 0 3rem !important;
    }

    section[style*="padding: 7rem 0"] {
        padding: 4rem 0 !important;
    }

    section[style*="padding: 6rem 0"] {
        padding: 3.5rem 0 !important;
    }

    section[style*="padding: 5rem 0"] {
        padding: 3rem 0 !important;
    }

    /* ---- ALL Inline Grid Overrides ---- */
    /* 4-column grids → 2 columns */
    [style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    /* 3-column grids → 1 column */
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* 2-column grids → 1 column */
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

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

    footer [style*="grid-template-columns: 1.5fr repeat(4, 1fr)"] > div:first-child,
    footer [style*="grid-template-columns: 1.5fr repeat(4"] > div:first-child {
        grid-column: 1 / -1 !important;
        text-align: center !important;
    }

    /* Footer social links center */
    footer [style*="display: flex; gap: 0.75rem"] {
        justify-content: center !important;
    }

    /* Footer brand link center */
    footer [style*="display: flex; align-items: center; gap: 12px"] {
        justify-content: center !important;
    }

    /* Footer bottom bar */
    footer [style*="display: flex; justify-content: space-between"] {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
    }

    footer [style*="display: flex; gap: 2rem"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
        align-items: center !important;
    }

    /* ---- Stat Numbers (Service Pages) ---- */
    [style*="font-size: 3rem"][style*="font-weight: 800"][style*="color: #560591"],
    [style*="font-size: 2.1rem"][style*="font-weight: 900"] {
        font-size: 1.75rem !important;
    }

    /* ---- Section headings (Service Pages) ---- */
    [style*="font-size: 2.5rem"][style*="font-weight: 800"],
    [style*="font-size: 2.5rem"][style*="font-weight: 900"] {
        font-size: 1.75rem !important;
    }

    [style*="font-size: 2rem"][style*="font-weight: 700"] {
        font-size: 1.5rem !important;
    }

    /* ---- CTA section heading override ---- */
    section [style*="font-size: 2.5rem"][style*="color: #ffffff"] {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    /* ---- CTA buttons stack ---- */
    [style*="display: flex; gap: 1rem; flex-wrap: wrap"],
    [style*="display: flex; gap: 1rem; justify-content: center"] {
        flex-direction: column !important;
        width: 100% !important;
    }

    [style*="display: flex; gap: 1rem; flex-wrap: wrap"] > a,
    [style*="display: flex; gap: 1rem; justify-content: center"] > a {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    /* ---- Capability Cards (flex inside) ---- */
    [style*="display: flex; gap: 1.5rem"] {
        flex-direction: column !important;
    }

    /* ---- Padding Overrides ---- */
    [style*="padding: 3rem 2.5rem"] {
        padding: 2rem 1.5rem !important;
    }

    [style*="padding: 2.5rem"] {
        padding: 1.75rem !important;
    }

    /* ---- Gap Overrides for large gaps ---- */
    [style*="gap: 5rem"] {
        gap: 2rem !important;
    }

    [style*="gap: 3rem"] {
        gap: 2rem !important;
    }

    /* ---- Max-width overrides for centered content ---- */
    [style*="max-width: 1300px"],
    [style*="max-width: 1200px"],
    [style*="max-width: 1000px"] {
        max-width: 100% !important;
    }

    /* ============================================
       PREMIUM MOBILE NAVIGATION - BULLETPROOF FIX
       ============================================ */

    /* ---- Navbar base for mobile ---- */
    .navbar {
        height: auto !important;
        min-height: 70px !important;
        z-index: 1000 !important;
    }

    .nav-container {
        height: auto !important;
        min-height: 70px !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* ---- Hamburger: Always visible ---- */
    .hamburger {
        display: flex !important;
        z-index: 1002 !important;
    }

    .hamburger span {
        background-color: currentColor !important;
    }

    /* ============================================
       MOBILE MENU PANEL - Premium Slide-in
       ============================================ */
    .nav-menu,
    .nav-menu[id],
    ul.nav-menu,
    #navMenu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 85% !important;
        max-width: 380px !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: linear-gradient(180deg, #ffffff 0%, #fafbff 40%, #f5f0ff 100%) !important;
        flex-direction: column !important;
        padding: 100px 1.75rem 2rem 1.75rem !important;
        transform: translateX(-100%) !important;
        transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1) !important;
        box-shadow: none !important;
        overflow-y: auto !important;
        z-index: 999 !important;
        margin-left: 0 !important;
        gap: 0.25rem !important;
        border-right: 1px solid rgba(161, 0, 255, 0.1) !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .nav-menu.active,
    #navMenu.active {
        transform: translateX(0) !important;
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.15),
                    4px 0 20px rgba(161, 0, 255, 0.08) !important;
    }

    /* ---- Overlay when menu is open ---- */
    .nav-menu.active::before {
        content: '' !important;
        position: fixed !important;
        top: 0 !important;
        left: 100% !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.4) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
    }

    /* ============================================
       NAV LINKS - Force Dark Text (Override Inline)
       ============================================ */

    /* NUCLEAR OPTION: Override ALL link colors in nav-menu
       This covers inline style="color: #ffffff" etc. */
    .nav-menu li a,
    .nav-menu li > a,
    .nav-menu > li > a,
    .nav-menu a[style],
    .nav-menu a[style*="color"],
    .nav-menu a[style*="#fff"],
    .nav-menu a[style*="white"],
    .nav-menu .dropdown > a,
    .nav-menu .dropdown > a[style],
    #navMenu a,
    #navMenu a[style],
    #navMenu li a[style*="color"] {
        color: #1a1a2e !important;
        -webkit-text-fill-color: #1a1a2e !important;
    }

    .nav-menu li {
        margin-bottom: 0.125rem !important;
        border-radius: 12px !important;
    }

    .nav-menu > li > a,
    .nav-menu li > a,
    .nav-menu a {
        display: flex !important;
        align-items: center !important;
        padding: 1rem 1.25rem !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        min-height: 48px !important;
        color: #1a1a2e !important;
        -webkit-text-fill-color: #1a1a2e !important;
        transition: all 0.25s ease !important;
        position: relative !important;
        letter-spacing: -0.01em !important;
    }

    .nav-menu a:hover,
    .nav-menu a:active {
        background: linear-gradient(135deg, rgba(161, 0, 255, 0.08) 0%, rgba(86, 5, 145, 0.05) 100%) !important;
        color: #560591 !important;
        -webkit-text-fill-color: #560591 !important;
        transform: translateX(4px) !important;
    }

    .nav-menu a:active {
        transform: translateX(4px) scale(0.98) !important;
    }

    /* ---- Purple left accent on hover ---- */
    .nav-menu > li > a::before {
        content: '' !important;
        position: absolute !important;
        left: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) scaleY(0) !important;
        width: 3px !important;
        height: 60% !important;
        background: linear-gradient(180deg, #a100ff, #560591) !important;
        border-radius: 0 4px 4px 0 !important;
        transition: transform 0.25s ease !important;
    }

    .nav-menu > li > a:hover::before {
        transform: translateY(-50%) scaleY(1) !important;
    }

    /* ---- Underline animation removed for mobile ---- */
    .nav-menu a::after {
        display: none !important;
    }

    /* ============================================
       DROPDOWN SUBMENU - Mobile
       ============================================ */
    .dropdown-content {
        position: static !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-left: 0.75rem !important;
        padding: 0.25rem 0 0.5rem 0.75rem !important;
        background: transparent !important;
        border-left: 2px solid rgba(161, 0, 255, 0.15) !important;
    }

    .dropdown-content a,
    .dropdown-content a[style],
    .dropdown-content a[style*="color"] {
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        padding: 0.6rem 1rem !important;
        color: #475569 !important;
        -webkit-text-fill-color: #475569 !important;
        border-radius: 8px !important;
        min-height: 40px !important;
    }

    .dropdown-content a:hover {
        color: #560591 !important;
        -webkit-text-fill-color: #560591 !important;
        background: rgba(161, 0, 255, 0.06) !important;
    }

    /* ============================================
       NAV ACTIONS - Mobile
       ============================================ */
    .nav-actions .btn,
    .nav-actions .btn-primary,
    .nav-actions a.btn {
        display: none !important;
    }

    .nav-actions .search-btn,
    .nav-actions .btn-icon {
        display: flex !important;
        min-width: 44px !important;
        min-height: 44px !important;
        z-index: 1002 !important;
    }

    /* Hamburger white color override for purple navbars */
    .navbar[style*="background"] .hamburger span {
        background-color: #ffffff !important;
    }

    .navbar[style*="background"] .search-btn {
        color: #ffffff !important;
    }

    /* Nav logo sizing for mobile */
    .nav-logo img[style*="height: 45px"],
    .logo-image[style*="height: 45px"] {
        height: 36px !important;
        width: 36px !important;
    }

    .nav-logo [style*="font-size: 1.1rem"] {
        font-size: 0.95rem !important;
    }

    /* ---- Contact page form ---- */
    .contact-grid,
    [style*="grid-template-columns"][style*="1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }


}

/* ==========================================
   SMALL MOBILE BREAKPOINT (max-width: 480px)
   ========================================== */
@media (max-width: 480px) {

    /* ---- Extra Small Hero ---- */
    .hero h1[style*="font-size: 4.5rem"],
    section.hero h1[style*="font-size: 4.5rem"],
    section h1[style*="font-size: 4.5rem"] {
        font-size: 2rem !important;
    }

    .hero h1[style*="font-size: 3.6rem"],
    section h1[style*="font-size: 3.6rem"],
    .hero h1[style*="font-size: 3.5rem"],
    section h1[style*="font-size: 3.5rem"] {
        font-size: 1.75rem !important;
    }

    /* ---- About page 5rem heading ---- */
    h1[style*="font-size: 5rem"],
    section h1[style*="font-size: 5rem"] {
        font-size: 1.75rem !important;
    }

    /* ---- Fixed pixel font sizes ---- */
    [style*="font-size: 72px"],
    [style*="font-size: 56px"] {
        font-size: 1.5rem !important;
    }

    [style*="font-size: 48px"] {
        font-size: 1.35rem !important;
    }

    /* ---- 4rem stat numbers ---- */
    [style*="font-size: 4rem"] {
        font-size: 1.5rem !important;
    }

    /* ---- 3rem / 3.5rem headings ---- */
    h2[style*="font-size: 3rem"],
    [style*="font-size: 3.5rem"] {
        font-size: 1.35rem !important;
    }

    /* ---- Hero min-height ---- */
    .hero[style*="min-height: 75vh"],
    section.hero[style*="min-height: 75vh"],
    section[style*="min-height: 75vh"] {
        min-height: 50vh !important;
    }

    .hero .container[style*="min-height: 75vh"],
    section .container[style*="min-height: 75vh"] {
        min-height: 50vh !important;
    }

    /* ---- Subheadlines ---- */
    .hero p[style*="font-size: 1.35rem"],
    section p[style*="font-size: 1.35rem"] {
        font-size: 1rem !important;
    }

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

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

    /* ---- Section Headings ---- */
    [style*="font-size: 2.5rem"] {
        font-size: 1.5rem !important;
    }

    [style*="font-size: 2rem"][style*="font-weight: 700"],
    [style*="font-size: 2rem"][style*="font-weight: 800"] {
        font-size: 1.35rem !important;
    }

    /* ---- Stat numbers ---- */
    [style*="font-size: 3rem"][style*="font-weight: 800"] {
        font-size: 1.5rem !important;
    }

    [style*="font-size: 2.1rem"][style*="font-weight: 900"] {
        font-size: 1.5rem !important;
    }

    /* ---- CTA heading ---- */
    section [style*="font-size: 2.5rem"][style*="color: #ffffff"] {
        font-size: 1.5rem !important;
    }

    /* ---- Content padding ---- */
    [style*="padding: 2.5rem"] {
        padding: 1.25rem !important;
    }

    [style*="padding: 2rem"] {
        padding: 1rem !important;
    }

    /* ---- Badge sizing ---- */
    .hero [style*="margin-bottom: 2.5rem"][style*="backdrop-filter"] {
        margin-bottom: 1.25rem !important;
    }

    /* ---- Legal content font ---- */
    p[style*="font-size: 1.125rem"] {
        font-size: 1rem !important;
    }

    /* ---- Footer margin/padding adjustments ---- */
    footer[style*="padding: 5rem 0 2rem"] {
        padding: 3rem 0 1.5rem !important;
    }

    footer [style*="margin-bottom: 4rem"] {
        margin-bottom: 2rem !important;
    }

    footer [style*="padding-bottom: 3rem"] {
        padding-bottom: 1.5rem !important;
    }

    /* ---- Hero section padding ---- */
    section[style*="padding: 9rem 0 7rem"] {
        padding: 5rem 0 2.5rem !important;
    }

    section[style*="padding: 8rem 0 4rem"] {
        padding: 5rem 0 2rem !important;
    }
}

/* ==========================================
   GENERAL RESPONSIVE UTILITIES
   ========================================== */

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Make all images responsive */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* Touch-friendly targets */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
    }

    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent zoom on input focus */
    input, textarea, select {
        font-size: 16px !important;
    }
}


/* ============================================================
   Reduced Motion Support (Accessibility)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .hero-particles canvas {
        display: none !important;
    }
}
