
/* ══════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE STYLES
   Breakpoints:
   XL  : 1400px+   (Large desktops)
   LG  : 1200px    (Desktops / laptops)
   MD  : 992px     (Tablets landscape)
   SM  : 768px     (Tablets portrait / large phones)
   XS  : 480px     (Mobile phones)
   XXS : 360px     (Small phones)
══════════════════════════════════════════════════════ */

/* ─── GLOBAL OVERFLOW FIX (all screen sizes) ────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative;
}

/* Every section & container — never wider than screen */
section, main, footer, .container, .hero, .hero-container {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* GSAP smooth wrapper — must stay within viewport */
#smooth-wrapper, #smooth-content {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Header stays inside viewport */
header {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    /* NOTE: No overflow:hidden here — it clips the mobile menu */
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Hamburger sits inside container — no overflow */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.nav-close-btn {
    display: none;
}

/* ─── LARGE DESKTOP (≤ 1400px) ──────────────────────── */
@media (max-width: 1400px) {
    .container { max-width: 1200px; }

    .hero-content h1 { font-size: clamp(3rem, 5vw, 5.5rem); }

    .services-left { width: 42%; }
    .services-right { width: 58%; }

    .nf-body { grid-template-columns: 1.8fr 1fr 1fr 1.4fr; }
}

/* ─── DESKTOP (≤ 1200px) ─────────────────────────────── */
@media (max-width: 1200px) {
    .container { max-width: 960px; padding-left: 2rem; padding-right: 2rem; }

    /* Header */
    header nav ul { gap: 1.5rem; }

    /* Hero */
    .hero-split { flex-direction: column; gap: 3rem; }
    .hero-content { max-width: 100%; text-align: center; }
    .hero-visual  { width: 100%; max-width: 560px; margin: 0 auto; }
    .hero-cta     { justify-content: center; }
    .hero-stats   { justify-content: center; }

    /* Services */
    .services-split-layout { flex-direction: column; padding: 5rem 2rem; }
    .services-left  { width: 100%; padding-right: 0; margin-bottom: 3rem; }
    .services-right { width: 100%; height: 480px; }
    .service-card   { height: 480px; padding: 3rem 2.5rem; }

    /* Stacked cards */
    .stacked-card { min-height: auto; }

    /* Footer */
    .nf-body { grid-template-columns: 1fr 1fr; gap: 3rem; }
    .nf-brand { grid-column: 1 / -1; }

    /* About section */
    .about-grid { grid-template-columns: 1fr; }
    .about-visual { display: none; }

    /* ATM kiosk zigzag */
    .product-zigzag { flex-direction: column !important; gap: 2rem; }
    .product-zigzag .product-image-side,
    .product-zigzag .product-content-side { width: 100% !important; }
}

/* ─── TABLET LANDSCAPE (≤ 992px) ────────────────────── */
@media (max-width: 992px) {
    /* Header Fixed on Mobile */
    header {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: auto;
        overflow: visible !important; /* CRITICAL: Allow menu to show outside header */
        z-index: 1000000 !important;
        background: rgba(5,7,10,0.9);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    /* Show hamburger, hide desktop nav + CTA button */
    .hamburger { display: flex !important; }
    header .btn-primary { display: none !important; }
    header nav { display: none; }

    /* Fullscreen nav overlay — Super Aggressive Fix */
    nav.nav-open {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: #05070a !important; 
        background: rgba(5,7,10,0.99) !important;
        backdrop-filter: blur(30px) !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 9999999 !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: hidden !important;
    }

    nav.nav-open ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        text-align: center !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    nav.nav-open ul li {
        opacity: 0;
        transform: translateY(20px);
        animation: slideInMenu 0.4s forwards;
    }

    nav.nav-open ul li:nth-child(1) { animation-delay: 0.1s; }
    nav.nav-open ul li:nth-child(2) { animation-delay: 0.2s; }
    nav.nav-open ul li:nth-child(3) { animation-delay: 0.3s; }
    nav.nav-open ul li:nth-child(4) { animation-delay: 0.4s; }
    nav.nav-open ul li:nth-child(5) { animation-delay: 0.5s; }

    @keyframes slideInMenu {
        to { opacity: 1; transform: translateY(0); }
    }

    nav.nav-open ul a {
        font-size: 1.8rem !important;
        font-weight: 700 !important;
        color: #fff !important;
        text-decoration: none !important;
        letter-spacing: 1px !important;
        font-family: var(--font-heading) !important;
        transition: color 0.3s ease !important;
    }

    nav.nav-open ul a:hover {
        color: var(--primary-color) !important;
    }

    .nav-close-btn {
        display: block !important;
        position: absolute;
        top: 2rem;
        right: 2rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 100000;
        transition: all 0.3s ease;
    }

    .nav-close-btn:hover {
        background: var(--primary-color);
        transform: rotate(90deg);
    }


    /* Hero */
    .hero-content h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
    .hero-stats .stat-item h3 { font-size: 2.5rem; }

    /* Section titles */
    .section-title { font-size: clamp(2rem, 4.5vw, 3rem); }

    /* ── Index Page Contact Section (Get In Touch) ── */
    .contact-section-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    .contact-section-right {
        padding: 2.5rem 1.5rem !important;
    }

    .contact-section-left {
        text-align: center;
    }

    .contact-section-left p {
        margin: 1.5rem auto !important;
    }

    .contact-section-left .nf-contact-info {
        align-items: center;
        text-align: center;
    }

    .contact-section-left .nf-contact-info li {
        justify-content: center;
    }

    .nf-form-row {
        grid-template-columns: 1fr !important;
    }

    /* Services pinned section — disable pin, show normally */
    .services-split-layout { min-height: auto; flex-direction: column; padding: 4rem 1.5rem; }
    .services-right { height: auto; overflow: visible; }
    .services-container { position: static; display: flex; flex-direction: column; gap: 1.5rem; }
    .service-card { position: static; transform: none !important; height: auto; padding: 2.5rem 2rem; width: 100%; box-sizing: border-box; }

    /* ── Stacked Cards (Case Studies) — proper mobile layout ── */
    .stacked-card {
        flex-direction: column !important;
        height: auto !important;
        padding: 0 !important;
        margin-bottom: 2rem !important;
        border-radius: 20px;
        overflow: hidden;
    }

    /* Image block — sits on TOP, fixed height */
    .stacked-card-img {
        position: relative !important;
        width: 100% !important;
        height: 220px !important;
        top: auto !important; right: auto !important;
        border-left: none !important;
        border-bottom: 1px solid var(--border-color);
        mask-image: none !important;
        -webkit-mask-image: none !important;
        background-size: cover;
        background-position: center;
        flex-shrink: 0;
    }

    /* Text content — sits BELOW image, solid dark bg */
    .stacked-card-content {
        width: 100% !important;
        padding: 2rem 1.75rem !important;
        background: rgba(15, 20, 30, 0.98);
        position: relative;
        z-index: 2;
    }

    .stacked-card-content h2 { font-size: 1.4rem; margin: 0.75rem 0 1rem; }
    .stacked-card-content p  { font-size: 0.9rem; color: rgba(255,255,255,0.7); line-height: 1.6; }


    /* Footer */
    .nf-body { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .nf-cta-row { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .nf-form-inline { flex-direction: column; }
    .nf-form-inline input { width: 100%; }

    /* Hero visual floating cards */
    .card-floating-1, .card-floating-2 { display: none; }

    /* Marquee */
    .marquee-content img { height: 28px; }

    /* ── Contact page — tablet/mobile fix ── */
    .main-contact-card {
        flex-direction: column !important;
        border-radius: 20px !important;
    }

    .contact-info-panel,
    .contact-form-panel {
        width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
    }

    .contact-info-panel {
        padding: 3rem 2rem !important;
        min-height: auto !important;
    }

    .contact-form-panel {
        padding: 3rem 2rem !important;
    }

    .map-wrapper {
        height: 300px !important;
        border-radius: 20px !important;
        margin-top: 2rem !important;
    }
}

/* ─── TABLET PORTRAIT / LARGE PHONES (≤ 768px) ────────── */
@media (max-width: 768px) {
    /* Global */
    body { font-size: 15px; }
    .container { padding-left: 1.25rem; padding-right: 1.25rem; }
    section { padding-top: 4rem !important; padding-bottom: 4rem !important; }

    /* Header */
    header { padding: 1rem 0; }
    header .container { padding: 0 1.25rem; }
    header .logo img { height: 56px; }

    /* Hero Sections — increased padding to clear fixed header */
    .hero, .hero-section, main section:first-of-type, #smooth-content > section:first-child { 
        padding-top: 140px !important; 
        padding-bottom: 4rem !important; 
        min-height: auto !important; 
    }
    
    .hero-content h1 { font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1.2; }
    .hero-content p  { font-size: 1rem; }
    .hero-cta { flex-direction: column; align-items: center; gap: 1rem; width: 100%; }
    .hero-cta a { width: 100%; max-width: 320px; text-align: center; }
    .hero-stats { flex-direction: column; gap: 2rem; align-items: center; }
    .hero-stats .stat-divider { display: none; }
    .hero-stats .stat-item h3 { font-size: 2.8rem; }
    .hero-visual { display: none; }

    /* Section headers */
    .section-title { font-size: clamp(1.8rem, 6vw, 2.8rem); }
    .section-desc  { font-size: 0.95rem; }

    /* Services section */
    .scroll-indicator { display: none; }
    .services-left h2 { font-size: clamp(2rem, 6vw, 3rem); }

    /* Marquee */
    .marquee-container { padding: 1.5rem 0; }
    .marquee-content { gap: 3rem; }
    .marquee-content img { height: 24px; }

    /* About / Why Wavegroove */
    .about-premium-section { padding: 4rem 0; }
    .ww-cards-grid { grid-template-columns: 1fr; }
    .ww-process-grid { grid-template-columns: 1fr; }
    .ww-process-arrow { display: none; }
    .feature-stats-row { flex-direction: column; gap: 2rem; align-items: center; }

    /* Footer */
    .nf-body { grid-template-columns: 1fr; gap: 2.5rem; }
    .nf-brand { max-width: 100%; }
    .nf-brand img { height: 70px !important; }
    .nf-watermark { font-size: clamp(4rem, 18vw, 10rem); }
    .nf-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }

    /* Contact page — already handled in 992px block */


    /* ATM Kiosk page */
    .products-hero h1 { font-size: clamp(2rem, 7vw, 3rem); }
    .kiosk-specs-grid { grid-template-columns: 1fr 1fr; }

    /* Loader */
    #site-loader {
        height: 100vh !important;
        width: 100vw !important;
    }
    .loader-inner {
        gap: 1.25rem !important;
        transform: scale(0.9);
    }
    .loader-logo-wrap img { height: 50px !important; }
    .loader-brand { font-size: 0.6rem; letter-spacing: 6px; }
    .loader-bar-wrap { width: 180px !important; }
    .loader-percent { font-size: 0.65rem; }
}

/* ─── MOBILE (≤ 480px) ───────────────────────────────── */
@media (max-width: 480px) {
    /* Global */
    .container { padding-left: 1rem; padding-right: 1rem; }

    /* Header */
    header .logo img { height: 48px; }

    /* Hero */
    .hero-content h1 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
    .hero-stats .stat-item h3 { font-size: 2.4rem; }
    .btn-primary, .btn-glass { padding: 0.8rem 1.5rem; font-size: 0.85rem; }

    /* Section */
    .section-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
    .section-subtitle { font-size: 0.7rem; letter-spacing: 3px; }

    /* Service cards */
    .service-card { padding: 2rem 1.5rem; border-radius: 20px; }
    .service-num { font-size: 5rem; }

    /* Footer */
    .nf-watermark { font-size: clamp(3rem, 16vw, 7rem); }
    .nf-body { padding: 3rem 1rem; }

    /* About stats */
    .about-stats-row { flex-direction: column; }
    .about-stat-item { min-width: 100%; text-align: center; }

    /* Kiosk specs */
    .kiosk-specs-grid { grid-template-columns: 1fr; }

    /* Case study cards */
    .cs-card-unique { padding: 2rem 1.25rem; }
    .grid-2 { grid-template-columns: 1fr !important; }
}

/* ─── SMALL PHONES (≤ 360px) ────────────────────────── */
@media (max-width: 360px) {
    .hero-content h1 { font-size: 1.7rem; }
    .section-title   { font-size: 1.5rem; }
    .btn-primary, .btn-glass { font-size: 0.8rem; padding: 0.7rem 1.2rem; }
    .nf-watermark { font-size: 3rem; }
    header .logo img { height: 42px; }
}

/* ─── EXTRA LARGE (≥ 1600px) — max-width cap ─────────── */
@media (min-width: 1600px) {
    .container { max-width: 1400px; }
    .hero-content h1 { font-size: 6.5rem; }
    .section-title { font-size: 4rem; }
    .service-card { padding: 4.5rem 3.5rem; }
}

/* ─── HAMBURGER MENU JS HELPER ─────────────────────────── */
/* Hidden by default on large screens */
.hamburger { display: none; }

@media (max-width: 992px) {
    .hamburger { display: flex; }
}
