/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — National Academy of STEAM Education
   Breakpoints: 1199 · 991 · 767 · 575 · 374
═══════════════════════════════════════════════════════════════ */

/* ── Large Desktop (1400px+) ──────────────────────────────────────────────── */
@media (min-width: 1400px) {
    .container { max-width: 1400px; }
}

/* ── Desktop (1200–1399px) ────────────────────────────────────────────────── */
@media (max-width: 1399px) {
    .container { max-width: 1140px; }
    h2 { font-size: clamp(36px, 4.5vw, 60px); }
}

/* ── Laptop (992–1199px) ──────────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .container { max-width: 960px; padding: 0 30px; }
    h2 { font-size: clamp(30px, 4vw, 52px); }

    .programs-grid,
    .projects-grid,
    .instructors-grid,
    .facilities-grid,
    .blog-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Tablet (768–991px) ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
    :root {
        --section-padding: 70px 0;
        --container-padding: 0 24px;
    }

    .container { max-width: 720px; }

    h2 { font-size: clamp(26px, 4vw, 44px); }
    .section-header h2 { font-size: clamp(26px, 4vw, 40px); }
    .section-description { font-size: 16px; }

    .programs-grid,
    .projects-grid,
    .instructors-grid,
    .facilities-grid,
    .blog-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* About */
    .divisions-grid { grid-template-columns: 1fr; gap: 24px; }
    .division-card  { padding: 28px 24px; }
    .about-mission  { padding: 32px 28px; }
    .mission-text h3 { font-size: 24px; }

    /* Contact */
    .contact-wrapper { grid-template-columns: 1fr; gap: 32px; }

    /* Hero stats: keep 2×2 */
    .hero-stats-panel { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile Landscape (576–767px) ────────────────────────────────────────── */
@media (max-width: 767px) {
    :root {
        --section-padding: 52px 0;
        --container-padding: 0 16px;
    }

    .container {
        max-width: 100%;
        padding: 0 16px;
    }

    h2 { font-size: clamp(22px, 6vw, 34px); }
    .section-header h2   { font-size: clamp(22px, 6vw, 32px); }
    .section-header      { margin-bottom: 32px; }
    .section-description { font-size: 14px; line-height: 1.65; }
    .section-tag         { font-size: 11px; letter-spacing: 2px; }

    /* About */
    .about-mission  { padding: 24px 18px 20px; }
    .mission-text h3 { font-size: 20px; }
    .mission-text p  { font-size: 14px; }
    .divisions-grid  { grid-template-columns: 1fr; gap: 16px; }
    .division-card   { padding: 22px 18px; }
    .division-card h3 { font-size: 18px; }
    .division-icon span { width: 56px; height: 56px; font-size: 32px; }

    /* Programs marquee: show fewer items */
    .programs-carousel-container { padding: 12px 0; margin: 24px 0 32px; }
    .programs-carousel .program-card { min-width: 240px; max-width: 240px; }

    /* Grids → 1 column */
    .programs-grid,
    .projects-grid,
    .instructors-grid,
    .facilities-grid,
    .blog-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Stats grid */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    /* Hero stats: keep 2×2 on landscape mobile */
    .hero-stats-panel { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    /* Buttons */
    .btn { padding: 12px 22px; font-size: 14px; }
    .hero-buttons { gap: 10px; }
    .btn-hero-primary,
    .btn-hero-secondary { width: 100%; justify-content: center; }

    /* Footer */
    .footer-content { flex-direction: column; gap: 32px; text-align: center; }
    .footer-links   { flex-direction: column; gap: 24px; }
    .social-links   { justify-content: center; }

    /* Back to top */
    .back-to-top { bottom: 16px; right: 16px; width: 38px; height: 38px; font-size: 15px; }

    /* WhatsApp float: keep visible but move away from bottom-right overlap */
    .whatsapp-float { bottom: 20px; right: 16px; width: 48px; height: 48px; }

    /* Shop buttons */
    .shop-btn-row   { flex-direction: column; gap: 8px; }
    .shop-btn       { width: 100%; justify-content: center; }

    /* Enroll form */
    .form-row-2     { grid-template-columns: 1fr; gap: 12px; }

    /* Inner-page hero */
    .inner-hero h1,
    .page-hero-title { font-size: clamp(24px, 7vw, 36px); }
    .inner-hero-desc { font-size: 14px; }
}

/* ── Mobile Portrait (375–575px) ─────────────────────────────────────────── */
@media (max-width: 575px) {
    :root { --section-padding: 44px 0; }

    .container { padding: 0 14px; }

    h2 { font-size: clamp(20px, 6.5vw, 28px); }
    .section-header h2 { font-size: clamp(20px, 6.5vw, 26px); }

    /* About */
    .about-mission   { padding: 20px 14px 18px; border-radius: 16px; }
    .mission-text h3 { font-size: 18px; }
    .division-card   { padding: 18px 14px; }

    /* Stats */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* Form rows */
    .form-row        { grid-template-columns: 1fr; gap: 12px; }
    .form-row-2      { grid-template-columns: 1fr; }
    .info-card       { padding: 18px 14px; }

    /* Cards */
    .project-card,
    .instructor,
    .facility-card,
    .testimonial-card,
    .blog-post { padding: 18px 16px; }

    /* Program cards in carousel */
    .programs-carousel .program-card { min-width: 200px; max-width: 200px; }
    .curriculum-card { min-width: 240px; max-width: 240px; }

    /* Enroll page program grid */
    .program-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

    /* Shop */
    .kit-grid,
    .shop-grid { grid-template-columns: 1fr !important; }

    /* Inner page */
    .inner-hero h1,
    .page-hero-title { font-size: clamp(20px, 7vw, 28px); }
}

/* ── Small Mobile (< 374px) ──────────────────────────────────────────────── */
@media (max-width: 374px) {
    .container { padding: 0 12px; }

    h2 { font-size: 20px; }
    .section-header h2 { font-size: 18px; }

    .btn { padding: 10px 18px; font-size: 13px; }

    .stats-grid { grid-template-columns: 1fr; }

    /* Program grid in enroll */
    .program-grid { grid-template-columns: 1fr !important; }
}

/* ── Foldable / tiny (< 280px) ───────────────────────────────────────────── */
@media (max-width: 280px) {
    .container { padding: 0 10px; }
    h2 { font-size: 18px; }
    .btn { padding: 9px 14px; font-size: 12px; }
}

/* ── Print ───────────────────────────────────────────────────────────────── */
@media print {
    .bg-grid, .glow-orb, .scroll-indicator,
    .back-to-top, .game-section, #robot-game,
    nav, footer, .music-toggle, .whatsapp-float,
    .nepal-innovation-badge { display: none !important; }

    body { background: white; color: black; }
    .container { max-width: 100%; padding: 20px; }
    a { text-decoration: none; color: black; }
    section { padding: 20px 0; page-break-inside: avoid; }
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@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;
    }
}

/* ── Touch devices ───────────────────────────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
    .pillar:hover,
    .btn:hover,
    .nav-link:hover { transform: none; }

    .pillar:active,
    .btn:active,
    .nav-link:active { transform: scale(0.97); }
}

/* ── Landscape phone (height < 500px) ───────────────────────────────────── */
@media (orientation: landscape) and (max-height: 500px) {
    .nsa-hero { min-height: auto; padding: 90px 0 60px; }
    .nav-menu { padding: 14px; }
    .mobile-menu-toggle { display: flex; }
}

/* ── 4K ──────────────────────────────────────────────────────────────────── */
@media (min-width: 2560px) {
    :root { --section-padding: 160px 0; }
    .container { max-width: 1800px; }
    h2 { font-size: 80px; }
    html { font-size: 18px; }
    .programs-grid { grid-template-columns: repeat(3, 1fr); }
}
