/**
 * Tech Spartan — responsive.css v5 (Complete Mobile & Multi-Resolution Master)
 * Zero Horizontal Overflow · Flawless Mobile Drawer · Touch-Optimized
 * Breakpoints: 1200px → 1024px → 768px → 640px → 480px → 360px
 */

/* ── Global Zero Overflow & Layout Reset ── */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* ══════════════════════════════════════════
   1. LAPTOP SCREENS (1141px to 1320px)
   ══════════════════════════════════════════ */
@media (max-width: 1320px) and (min-width: 1141px) {
    .site-header > .container { padding: 0 16px; }
    .navbar { gap: 10px; }
    .brand { gap: 8px; }
    .brand-name { font-size: 1.15rem; }
    .nav-list { gap: 2px; }
    .nav-link { padding: 7px 9px; font-size: .81rem; }
    .btn-quote { padding: 7px 14px; font-size: .78rem; }
    .mega-drop { min-width: 660px; }
    .mega-drop.mega-drop-lg { min-width: 760px; }
    .footer-6cols-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

/* ══════════════════════════════════════════
   2. TABLET LANDSCAPE & MENU COLLAPSE (max-width: 1140px)
   ══════════════════════════════════════════ */
@media (max-width: 1140px) {
    :root {
        --section-y: 60px;
        --section-y-sm: 40px;
    }

    /* Hide Desktop Topbar on Tablet/Mobile */
    .topbar { display: none !important; }

    /* Sticky Navbar Sizing */
    .site-header {
        height: 66px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
    }
    .navbar {
        height: 66px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        width: 100% !important;
    }

    /* Brand Logo Scaling */
    .brand {
        gap: 8px !important;
        flex-shrink: 0 !important;
        min-width: 0 !important;
    }
    .brand-img { height: 38px !important; width: auto !important; flex-shrink: 0 !important; }
    .brand-name { font-size: 1.18rem !important; white-space: nowrap !important; }
    .brand-sub { display: none !important; }

    /* Nav CTA on Tablet */
    .nav-cta {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }
    .nav-cta .btn-quote {
        display: inline-flex !important;
        padding: 7px 14px !important;
        font-size: .8rem !important;
    }

    /* Hamburger Toggle Button */
    .hamburger {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 8px !important;
        background: var(--bg-soft) !important;
        border: 1.5px solid var(--border) !important;
        font-size: 1.25rem !important;
        color: var(--text-head) !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
    }

    /* Mobile Drawer */
    .main-nav { position: static !important; }
    .nav-list {
        position: fixed !important;
        top: 66px !important;
        left: -100% !important;
        width: 100% !important;
        max-width: 100% !important;
        height: calc(100vh - 66px) !important;
        background: #ffffff !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 10px 0 60px 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0 !important;
        transition: left 0.3s cubic-bezier(.4, 0, .2, 1) !important;
        z-index: 9999 !important;
        border-top: 1.5px solid var(--border) !important;
        box-shadow: 6px 0 40px rgba(15,23,42,0.18) !important;
    }
    .nav-list.open { left: 0 !important; }

    /* Mobile Portal Items in Drawer */
    .mobile-portal-item {
        display: block !important;
        margin: 8px 16px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        border-bottom: none !important;
    }
    .mobile-portal-item .nav-link {
        padding: 12px 16px !important;
        font-size: .92rem !important;
        font-weight: 800 !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .mobile-portal-req {
        background: #fffbeb !important;
        color: #92400e !important;
        border: 1.5px solid #fde68a !important;
    }
    .mobile-portal-crm {
        background: #eff6ff !important;
        color: var(--primary) !important;
        border: 1.5px solid #bfdbfe !important;
    }

    /* Nav Item Accordions in Mobile Drawer */
    .nav-item {
        width: 100% !important;
        border-bottom: 1px solid var(--bg-muted) !important;
    }
    .nav-link {
        padding: 14px 20px !important;
        font-size: 1rem !important;
        font-weight: 800 !important;
        border-radius: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        color: var(--text-head) !important;
    }
    .nav-link:hover, .nav-item.active .nav-link {
        background: var(--bg-soft) !important;
        color: var(--primary) !important;
    }
    .nav-item::after { display: none !important; }

    /* Collapsible Mega & Simple Dropdowns in Mobile */
    .mega-drop, .simple-drop {
        position: static !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        background: #f8fafc !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 18px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        display: none !important;
    }
    .nav-item.open .mega-drop, .nav-item.open .simple-drop {
        display: block !important;
    }
    .mega-grid, .mega-g-3, .mega-g-2 {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .mega-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
        padding-bottom: 10px !important;
        margin-bottom: 12px !important;
    }
    .mega-link {
        padding: 8px 10px !important;
        border-radius: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .mega-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        text-align: center !important;
    }

    /* Grids & Cards */
    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        text-align: center !important;
    }
    .hero-btns, .hero-stats { justify-content: center !important; }
    .hero-stats { flex-wrap: wrap !important; gap: 16px !important; }
    .hero-p { margin-inline: auto !important; }
    .pillar-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
    .g-4, .g-3 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ══════════════════════════════════════════
   3. TABLET PORTRAIT & MOBILE (max-width: 768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
    :root {
        --section-y: 48px;
        --section-y-sm: 34px;
        --gutter: 16px;
    }

    /* Typography Clamp for Mobile */
    h1 {
        font-size: clamp(1.85rem, 6.4vw, 2.4rem) !important;
        line-height: 1.22 !important;
        word-break: break-word !important;
    }
    h2 {
        font-size: clamp(1.45rem, 5vw, 1.95rem) !important;
        line-height: 1.28 !important;
        word-break: break-word !important;
    }
    h3 { font-size: 1.2rem !important; }

    /* Single Column Layouts */
    .g-4, .g-3, .g-2, .g-auto-3, .g-auto-4, .grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .pillar-grid { grid-template-columns: 1fr !important; gap: 18px !important; }
    .pillar-box-img-wrap { height: 190px !important; }

    /* Header Nav CTA on Mobile */
    .nav-cta {
        gap: 8px !important;
    }
    .nav-cta .btn-quote {
        display: inline-flex !important;
        padding: 6px 13px !important;
        font-size: .78rem !important;
    }

    /* Hero Section on Mobile */
    .hero-inner { padding: 40px 0 35px !important; }
    .page-hero { padding: 42px 0 32px !important; }
    .hero-badge { font-size: .76rem !important; padding: 5px 12px !important; }
    .hero-h1 { margin-bottom: 12px !important; }
    .hero-p { font-size: .95rem !important; margin-bottom: 22px !important; }

    /* Hero Buttons Full-Width Stack */
    .hero-btns {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .hero-btns .btn {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        font-size: .95rem !important;
        padding: 13px 20px !important;
    }

    /* Hero Stats Grid on Mobile */
    .hero-stats {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
        padding-top: 18px !important;
    }
    .hstat {
        padding: 10px 8px !important;
        text-align: center !important;
        background: #ffffff !important;
        border: 1px solid var(--border) !important;
        border-radius: var(--r-md) !important;
    }
    .hstat-num { font-size: 1.45rem !important; }
    .hstat-lbl { font-size: .72rem !important; }

    /* Hero Visual Card */
    .hero-visual { width: 100% !important; max-width: 100% !important; overflow: hidden !important; }
    .hero-card { width: 100% !important; border-radius: 16px !important; overflow: hidden !important; }
    .hero-slide img { height: 210px !important; width: 100% !important; object-fit: cover !important; }
    .hero-slide-title { font-size: .95rem !important; padding: 10px 14px 2px !important; }
    .hero-slide-sub { font-size: .76rem !important; padding: 0 14px 12px !important; }
    .hero-slide-nav { gap: 5px !important; padding: 6px !important; flex-wrap: wrap !important; }
    .hdot { width: 9px !important; height: 9px !important; }

    /* Marquee on Mobile */
    .marquee-wrap { width: 100% !important; max-width: 100% !important; overflow: hidden !important; padding: 10px 0 !important; }
    .marquee-item { padding: 6px 14px !important; font-size: .82rem !important; }

    /* Metrics Grid */
    .metrics-section { padding: 36px 0 !important; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .metric-card { padding: 20px 14px !important; }
    .metric-num { font-size: 1.75rem !important; }

    /* CTA Box */
    .cta-box { padding: 30px 18px !important; border-radius: 18px !important; }
    .cta-h2 { font-size: 1.35rem !important; }
    .cta-sub { font-size: .88rem !important; }
    .cta-btns {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .cta-btns .btn {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
    }

    /* Footer on Mobile */
    .footer-6cols-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 24px !important; }
    .footer-offices-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
    .footer-bottom-row {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
    }

    /* Floating Action Buttons */
    .wa-float {
        bottom: 16px !important;
        right: 16px !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 1.5rem !important;
        z-index: 9999 !important;
    }
    .back-to-top {
        bottom: 74px !important;
        right: 16px !important;
        width: 38px !important;
        height: 38px !important;
        font-size: .9rem !important;
        z-index: 9998 !important;
    }

    /* Modal on Mobile */
    .modal-box {
        width: calc(100% - 24px) !important;
        max-width: 520px !important;
        margin: 16px auto !important;
        padding: 22px 16px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    /* Inner Page Elements Responsive Polish */
    .card { padding: 20px 16px !important; }
    .kotak-callout { padding: 16px 14px !important; flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }
    .unit-matrix-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
    .persona-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .pain-card { padding: 14px 16px !important; }
    .crm-mockup { border-radius: var(--r-md) !important; }
    .crm-mockup-body { padding: 14px !important; }
}

/* ══════════════════════════════════════════
   4. COMPACT MOBILE SCREENS (max-width: 480px)
   ══════════════════════════════════════════ */
@media (max-width: 480px) {
    :root {
        --gutter: 14px;
    }

    /* Brand Logo on Narrow Phones */
    .brand { gap: 6px !important; }
    .brand-img { height: 32px !important; width: auto !important; }
    .brand-name { font-size: 1.05rem !important; }

    /* Compact Quote Nav Button - Zero Crowding */
    .nav-cta { gap: 6px !important; }
    .nav-cta .btn-quote {
        padding: 6px 10px !important;
        font-size: .74rem !important;
    }
    .btn-quote-txt {
        display: none !important;
    }
    .btn-quote::after {
        content: 'Quote';
        font-weight: 800;
    }

    /* Single Column Stacks */
    .metrics-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
    .footer-6cols-grid { grid-template-columns: 1fr !important; gap: 20px !important; }

    /* Form Elements Full-Width */
    .form-control { font-size: .92rem !important; padding: 10px 12px !important; }
    .btn-lg { padding: 12px 20px !important; font-size: .94rem !important; }
    .btn-xl { padding: 13px 22px !important; font-size: .98rem !important; }

    /* Hero Slide Image */
    .hero-slide img { height: 185px !important; }
}

/* ══════════════════════════════════════════
   5. ULTRA COMPACT PHONES (max-width: 360px)
   ══════════════════════════════════════════ */
@media (max-width: 360px) {
    .brand-img { height: 28px !important; }
    .brand-name { font-size: .98rem !important; }
    .nav-cta { gap: 5px !important; }
    .nav-cta .btn-quote { padding: 5px 8px !important; font-size: .70rem !important; }
    .hamburger { width: 35px !important; height: 35px !important; font-size: 1.05rem !important; }
}
