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

:root {
    --blue: #1d4ed8;
    --blue-dark: #1e3a8a;
    --blue-deep: #0f172a;
    --blue-soft: #eff6ff;
    --gold: #d97706;
    --gold-light: #fef3c7;
    --gold-bright: #f59e0b;
    --green: #16a34a;
    --green-light: #f0fdf4;
    --purple: #7c3aed;
    --purple-light: #f5f3ff;
    --white: #ffffff;
    --surface: #f8fafc;
    --muted: #475569;
    --border: #e2e8f0;
    --font-base: 16px;
}

/* ── SENIOR LARGE TEXT ACCESSIBILITY MODE ── */
body.large-text {
    --font-base: 18px;
}

body.large-text .hero-title {
    font-size: clamp(32px, calc(3.8 * var(--ds-vw, 1vw)), 46px) !important;
    line-height: 1.18 !important;
    margin-bottom: 16px !important;
}

body.large-text .hero-desc {
    font-size: clamp(15.5px, calc(1.2 * var(--ds-vw, 1vw)), 17.5px) !important;
    line-height: 1.65 !important;
    margin-bottom: 22px !important;
}

body.large-text .section-title {
    font-size: clamp(28px, calc(3.2 * var(--ds-vw, 1vw)), 42px) !important;
}

body.large-text .section-subtitle {
    font-size: clamp(16px, calc(1.15 * var(--ds-vw, 1vw)), 18px) !important;
    line-height: 1.7 !important;
}

body.large-text .feature-title,
body.large-text .step-title {
    font-size: clamp(19px, calc(1.3 * var(--ds-vw, 1vw)), 22px) !important;
}

body.large-text .feature-desc,
body.large-text .step-desc {
    font-size: clamp(15px, calc(1.05 * var(--ds-vw, 1vw)), 16.5px) !important;
    line-height: 1.7 !important;
}

body.large-text .about-list li {
    font-size: 17px !important;
}

body.large-text .lesson-title {
    font-size: 18px !important;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

/* Kapag naka-zoom ang desktop (lumiliit ang vertical height), pinalalambot ang magnet para hindi maipit ang screen */
@media (max-height: 760px) {
    html {
        scroll-snap-type: y proximity;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-base);
    background: var(--white);
    color: var(--blue-deep);
    line-height: 1.65;
    overflow-x: hidden;
    transition: font-size 0.2s ease;
}

/* ── NAVBAR ── */
nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1.5px solid var(--border);
    padding: 0 24px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

nav.tour-highlight {
    box-shadow: 0 0 0 3.5px #3b82f6, 0 10px 32px rgba(29, 78, 216, 0.28) !important;
    background: #f0f7ff !important;
}

.nav-cta.pointing-active {
    animation: spotlightPulse 1.1s infinite alternate !important;
    transform: scale(1.05);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.nav-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
}

.nav-brand-text {
    font-size: 22px;
    font-weight: 900;
    color: var(--blue-deep);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.nav-brand-text .blue {
    color: var(--blue);
}

.nav-brand-text .gold {
    color: var(--gold-bright);
}

.nav-brand-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.2px;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover {
    color: var(--blue);
    background: var(--blue-soft);
}

.nav-icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

.nav-links a:hover .nav-icon {
    transform: scale(1.12);
    color: var(--blue);
}

.mobile-drawer a .nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.nav-cta {
    background: var(--blue) !important;
    color: white !important;
    padding: 11px 22px !important;
    border-radius: 12px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-cta:hover {
    background: var(--blue-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.35);
}

/* Mobile Hamburger Toggle */
.mobile-menu-btn {
    display: none;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--blue-deep);
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
}

.mobile-menu-btn:hover {
    background: #e2e8f0;
}

/* Mobile Navigation Overlay Drawer */
.mobile-drawer {
    display: none;
    position: fixed;
    top: 110px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 2px solid var(--border);
    padding: 20px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    z-index: 998;
    flex-direction: column;
    gap: 12px;
    animation: drawerSlide 0.25s ease-out;
}

/* Opened by toggleMobileMenu(): see ".mobile-drawer.open" in MOBILE OVERHAUL */

@keyframes drawerSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.mobile-drawer a {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--blue-deep);
    text-decoration: none;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-drawer a:hover {
    background: #eff6ff;
    color: var(--blue);
}

/* ── HERO ── */
.hero {
    min-height: calc(100 * var(--ds-dvh, 1dvh));
    /* dynamic viewport height para sakto kahit sa mobile */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* pantay ang agwat mula nav hanggang stats */
    padding: clamp(1rem, calc(2 * var(--ds-vh, 1vh)), 2.5rem) clamp(1rem, calc(4 * var(--ds-vw, 1vw)), 4rem);
    box-sizing: border-box;
    background: linear-gradient(160deg, #eff6ff 0%, #fef3c7 50%, #eff6ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, calc(3 * var(--ds-vw, 1vw)), 48px);
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold-light);
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 16px;
    border: 1px solid rgba(217, 119, 6, 0.3);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.1);
    max-width: fit-content;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, calc(3.2 * var(--ds-vw, 1vw)), 3rem);
    line-height: 1.15;
    margin-bottom: clamp(0.5rem, calc(1.5 * var(--ds-vh, 1vh)), 1rem);
    font-weight: 900;
    color: var(--blue-deep);
}

.hero-desc {
    font-size: clamp(0.9rem, calc(1.1 * var(--ds-vw, 1vw)), 1.1rem);
    line-height: 1.4;
    margin-bottom: clamp(0.8rem, calc(2 * var(--ds-vh, 1vh)), 1.5rem);
    max-width: 550px;
    color: var(--muted);
}

.hero-title .accent {
    color: var(--blue);
}

.hero-title .gold-text {
    color: var(--gold);
}



.hero-desc strong {
    color: var(--blue-deep);
    font-weight: 700;
}

.hero-ctas,
.hero-buttons {
    display: flex;
    gap: clamp(0.5rem, calc(1 * var(--ds-vw, 1vw)), 1rem);
    flex-wrap: wrap;
    /* lilipat sa bagong linya kung sobrang kitid */
    margin-bottom: clamp(1rem, calc(2 * var(--ds-vh, 1vh)), 2rem);
}

.hero-ctas .btn,
.hero-buttons .btn {
    padding: clamp(0.6rem, calc(1.2 * var(--ds-vh, 1vh)), 0.9rem) clamp(1rem, calc(1.5 * var(--ds-vw, 1vw)), 1.5rem);
    font-size: clamp(0.85rem, calc(1 * var(--ds-vw, 1vw)), 1rem);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    min-height: 50px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--blue);
    color: white !important;
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.32);
}

.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(29, 78, 216, 0.42);
}

.enter-class-guide-wrap {
    position: relative;
    display: inline-flex;
}

/* ── ANIMATED POINTER FOR "PUMASOK SA KLASE" ── */
.cta-pointing-guide {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 8px;
    background: #fef08a;
    color: #854d0e;
    border: 2px solid #eab308;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(202, 138, 4, 0.35);
    z-index: 100;
    animation: bouncePointingHand 0.8s infinite ease-in-out alternate;
    pointer-events: none;
}

.cta-pointing-guide.active {
    display: inline-flex;
}

.cta-pointing-guide .pointer-hand {
    font-size: 22px;
    line-height: 1;
    display: inline-block;
    animation: pointHandWave 0.8s infinite ease-in-out alternate;
}

.cta-pointing-guide::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #eab308 transparent transparent transparent;
}

@keyframes bouncePointingHand {
    0% {
        transform: translate(-50%, 0) scale(1);
    }

    100% {
        transform: translate(-50%, -8px) scale(1.04);
    }
}

@keyframes pointHandWave {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(5px);
    }
}

.btn-primary.pointing-active,
.btn-gold.pointing-active {
    animation: spotlightPulse 1.1s infinite alternate !important;
    transform: scale(1.05) !important;
}

.cta-pointing-guide.praise-confirmed {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #14532d !important;
    box-shadow: 0 10px 32px rgba(34, 197, 94, 0.48) !important;
    animation: bouncePointingHand 0.55s infinite ease-in-out alternate !important;
}

.cta-pointing-guide.praise-confirmed::after {
    border-color: #22c55e transparent transparent transparent !important;
}

@keyframes spotlightPulse {
    0% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.4), 0 6px 18px rgba(29, 78, 216, 0.4);
    }

    100% {
        box-shadow: 0 0 0 12px rgba(234, 179, 8, 0.75), 0 10px 32px rgba(202, 138, 4, 0.65);
    }
}

.btn-outline {
    background: white;
    color: var(--blue-deep);
    border: 2px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-weight: 700;
}

.btn-outline:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-soft);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(29, 78, 216, 0.15);
}

.btn-audio-hero {
    background: var(--green-light);
    color: var(--green);
    border: 2px solid #86efac;
    font-size: 15px;
    padding: 14px 22px;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-audio-hero:hover {
    background: #dcfce7;
    border-color: var(--green);
    transform: translateY(-2px);
}

.btn-audio-hero.speaking {
    background: #bbf7d0;
    border-color: var(--green);
    animation: pulseAudio 1.2s infinite alternate;
}

@keyframes pulseAudio {
    from {
        box-shadow: 0 0 0 rgba(22, 163, 74, 0.2);
    }

    to {
        box-shadow: 0 0 18px rgba(22, 163, 74, 0.4);
    }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: clamp(1rem, calc(2 * var(--ds-vw, 1vw)), 2.5rem);
    padding-top: clamp(0.5rem, calc(1.5 * var(--ds-vh, 1vh)), 1.5rem);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.hero-stat {
    text-align: left;
}

.hero-stat-num {
    font-size: clamp(24px, calc(2.2 * var(--ds-vw, 1vw)), 30px);
    font-weight: 800;
    color: var(--blue);
    display: block;
    line-height: 1.1;
}

.hero-stat-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.hero-stage {
    position: relative;
    width: 100%;
    max-width: 530px;
    height: clamp(380px, calc(44 * var(--ds-vh, 1vh)), 460px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ambient Glow and Tech Rings */
.hero-stage-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(29, 78, 216, 0.12) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    z-index: 1;
    pointer-events: none;
}

.hero-stage-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.hero-stage-ring.ring-1 {
    width: 320px;
    height: 320px;
    border: 1.5px dashed rgba(29, 78, 216, 0.2);
    animation: rotateRing 32s linear infinite;
}

.hero-stage-ring.ring-2 {
    width: 420px;
    height: 420px;
    border: 1.5px dotted rgba(217, 119, 6, 0.22);
    animation: rotateRingRev 48s linear infinite;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateRingRev {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Centerpiece Logo */
.hero-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hero-logo-bg {
    width: clamp(200px, calc(19 * var(--ds-vw, 1vw)), 250px);
    height: clamp(200px, calc(19 * var(--ds-vw, 1vw)), 250px);
    background: radial-gradient(circle, #ffffff 50%, #eff6ff 100%);
    border-radius: 50%;
    box-shadow: 0 18px 45px rgba(29, 78, 216, 0.16), 0 0 0 8px rgba(255, 255, 255, 0.8), 0 0 0 12px rgba(29, 78, 216, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 3px solid rgba(29, 78, 216, 0.12);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero-logo-wrap:hover .hero-logo-bg {
    transform: scale(1.02);
    box-shadow: 0 24px 60px rgba(29, 78, 216, 0.22), 0 0 0 8px rgba(255, 255, 255, 0.9), 0 0 0 14px rgba(245, 158, 11, 0.2);
}

.hero-logo-bg img {
    width: 82%;
    height: 82%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.06));
}

.hero-hub-badge {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    color: var(--blue-deep);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.9);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
    z-index: 4;
}

.hub-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulseGreenDot 1.8s infinite;
}

@keyframes pulseGreenDot {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ── GADGET SHOWCASE CARDS ── */
.gadget-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 7px 13px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 4;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.gadget-card:hover {
    transform: translateY(-5px) scale(1.04) !important;
    box-shadow: 0 18px 36px rgba(29, 78, 216, 0.16);
    border-color: rgba(37, 99, 235, 0.4);
    background: #ffffff;
}

.gadget-img-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 5px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.3s ease;
}

.gadget-card:hover .gadget-img-wrap {
    transform: scale(1.08) rotate(3deg);
}

.gadget-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gadget-img-wrap.college-bg {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.gadget-img-wrap.internet-bg {
    background: #fefce8;
    border-color: #fde047;
}

.gadget-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.gadget-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.gadget-tag.gold-tag {
    color: #b45309;
}

.gadget-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--blue-deep);
    margin-top: 1px;
}

.gadget-desc {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

/* Staggered Positions & Natural Bobbing Animations */
.gadget-monitor {
    top: 12px;
    left: -4px;
    animation: floatG1 4.2s ease-in-out infinite;
}

.gadget-college {
    top: 10px;
    right: -6px;
    animation: floatG2 4.6s ease-in-out infinite -1.2s;
}

.gadget-mouse {
    top: 48%;
    right: -24px;
    transform: translateY(-50%);
    animation: floatG3 3.8s ease-in-out infinite -2.4s;
}

.gadget-keyboard {
    bottom: 12px;
    right: -2px;
    animation: floatG4 4.4s ease-in-out infinite -1.8s;
}

.gadget-internet {
    bottom: 14px;
    left: -10px;
    animation: floatG5 4.8s ease-in-out infinite -3s;
}

@keyframes floatG1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes floatG2 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@keyframes floatG3 {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(calc(-50% - 6px)) translateX(2px); }
}

@keyframes floatG4 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes floatG5 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* ── SECTION BASE STYLES NA MAY MAGNET SNAP (KADA SECTION ISANG SCREEN) ── */
.hero,
section {
    min-height: calc(calc(100 * var(--ds-dvh, 1dvh)) - 74px);
    padding: clamp(24px, calc(4 * var(--ds-vh, 1vh)), 48px) clamp(16px, calc(3.5 * var(--ds-vw, 1vw)), 36px);
    scroll-margin-top: 74px;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
}

.hero {
    min-height: calc(calc(100 * var(--ds-dvh, 1dvh)) - 74px);
    justify-content: space-between;
    padding: clamp(1rem, calc(2 * var(--ds-vh, 1vh)), 2.5rem) clamp(1rem, calc(4 * var(--ds-vw, 1vw)), 4rem);
}

footer {
    scroll-snap-align: end;
    /* kakapit din nang maayos pagdating sa pinakaibaba */
}

.section-inner {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
}

.section-tag {
    display: inline-block;
    font-size: clamp(13px, calc(0.9 * var(--ds-vw, 1vw)), 14.5px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--blue);
    margin-bottom: clamp(10px, calc(1.4 * var(--ds-vh, 1vh)), 14px);
    background: var(--blue-soft);
    padding: 5px 18px;
    border-radius: 100px;
}

.section-header {
    margin-bottom: clamp(22px, calc(3.2 * var(--ds-vh, 1vh)), 36px);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, calc(2.8 * var(--ds-vw, 1vw)), 40px);
    font-weight: 700;
    color: var(--blue-deep);
    margin-bottom: clamp(8px, calc(1.2 * var(--ds-vh, 1vh)), 12px);
    line-height: 1.22;
}

.section-subtitle {
    font-size: clamp(15px, calc(1.05 * var(--ds-vw, 1vw)), 17px);
    color: var(--muted);
    max-width: 700px;
    line-height: 1.65;
}

.section-header.center {
    text-align: center;
}

.section-header.center .section-subtitle {
    margin: 0 auto;
}

/* ── FEATURES SECTION ── */
.features {
    background: var(--surface);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(16px, calc(1.8 * var(--ds-vw, 1vw)), 24px);
    align-items: stretch;
    width: 100%;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: clamp(24px, calc(3.2 * var(--ds-vh, 1vh)), 36px) clamp(18px, calc(1.6 * var(--ds-vw, 1vw)), 24px);
    border: 2px solid var(--border);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: clamp(240px, calc(28 * var(--ds-vh, 1vh)), 310px);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(29, 78, 216, 0.12);
    border-color: rgba(29, 78, 216, 0.35);
}

.feature-icon {
    width: clamp(54px, calc(4.2 * var(--ds-vw, 1vw)), 64px);
    height: clamp(54px, calc(4.2 * var(--ds-vw, 1vw)), 64px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(14px, calc(2 * var(--ds-vh, 1vh)), 20px);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.feature-icon svg {
    width: clamp(28px, calc(2.2 * var(--ds-vw, 1vw)), 34px) !important;
    height: clamp(28px, calc(2.2 * var(--ds-vw, 1vw)), 34px) !important;
}

.feature-icon.blue {
    background: #eff6ff;
}

.feature-icon.gold {
    background: var(--gold-light);
}

.feature-icon.green {
    background: #f0fdf4;
}

.feature-icon.purple {
    background: #f5f3ff;
}

.feature-title {
    font-size: clamp(18px, calc(1.25 * var(--ds-vw, 1vw)), 21px);
    font-weight: 700;
    color: var(--blue-deep);
    margin-bottom: clamp(8px, calc(1.2 * var(--ds-vh, 1vh)), 12px);
    line-height: 1.3;
}

.feature-desc {
    font-size: clamp(13.5px, calc(0.95 * var(--ds-vw, 1vw)), 15px);
    color: #4b5563;
    line-height: 1.6;
}

/* ── HOW IT WORKS SECTION ── */
.how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(14px, calc(1.6 * var(--ds-vw, 1vw)), 22px);
    align-items: stretch;
    position: relative;
    width: 100%;
}

.step-card {
    text-align: center;
    padding: clamp(22px, calc(2.8 * var(--ds-vh, 1vh)), 34px) clamp(16px, calc(1.4 * var(--ds-vw, 1vw)), 22px);
    position: relative;
    background: white;
    border-radius: 20px;
    border: 2px solid var(--border);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: clamp(230px, calc(27 * var(--ds-vh, 1vh)), 290px);
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: rgba(29, 78, 216, 0.35);
    box-shadow: 0 14px 32px rgba(29, 78, 216, 0.1);
}

.step-num {
    width: clamp(50px, calc(4.2 * var(--ds-vw, 1vw)), 60px);
    height: clamp(50px, calc(4.2 * var(--ds-vw, 1vw)), 60px);
    border-radius: 50%;
    background: var(--blue);
    color: white;
    font-size: clamp(19px, calc(1.7 * var(--ds-vw, 1vw)), 23px);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(12px, calc(1.6 * var(--ds-vh, 1vh)), 16px);
    border: 3.5px solid white;
    box-shadow: 0 6px 18px rgba(29, 78, 216, 0.22);
    flex-shrink: 0;
}

.step-card:nth-child(2) .step-num {
    background: #2563eb;
}

.step-card:nth-child(3) .step-num {
    background: var(--gold);
}

.step-card:nth-child(4) .step-num {
    background: var(--green);
}

.step-title {
    font-size: clamp(17px, calc(1.2 * var(--ds-vw, 1vw)), 19.5px);
    font-weight: 700;
    color: var(--blue-deep);
    margin-bottom: clamp(6px, calc(1 * var(--ds-vh, 1vh)), 10px);
    line-height: 1.3;
}

.step-desc {
    font-size: clamp(13px, calc(0.9 * var(--ds-vw, 1vw)), 14.5px);
    color: var(--muted);
    line-height: 1.6;
}

/* ── LESSONS CURRICULUM SECTION ── */
.lessons {
    background: var(--blue-deep);
    color: white;
}

.lessons .section-tag {
    color: var(--gold-bright);
    background: rgba(245, 158, 11, 0.15);
}

.lessons .section-title {
    color: white;
}

.lessons .section-subtitle {
    color: #94a3b8;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(12px, calc(1.4 * var(--ds-vw, 1vw)), 18px);
    width: 100%;
}

.lesson-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: clamp(14px, calc(1.6 * var(--ds-vh, 1vh)), 18px) clamp(14px, calc(1.4 * var(--ds-vw, 1vw)), 18px);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.lesson-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-3px);
}

.lesson-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.lesson-num {
    font-size: 12px;
    font-weight: 800;
    color: var(--gold-bright);
    letter-spacing: 1px;
}

.lesson-level-pill {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
}

.pill-lvl1 {
    background: rgba(22, 163, 74, 0.2);
    color: #86efac;
    border: 1px solid rgba(134, 239, 172, 0.4);
}

.pill-lvl2 {
    background: rgba(217, 119, 6, 0.25);
    color: #fde68a;
    border: 1px solid rgba(253, 230, 138, 0.4);
}

.pill-lvl3 {
    background: rgba(59, 130, 246, 0.25);
    color: #bfdbfe;
    border: 1px solid rgba(191, 219, 254, 0.4);
}

.lesson-title {
    font-size: clamp(14.5px, calc(1 * var(--ds-vw, 1vw)), 16px);
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    line-height: 1.3;
}

.lesson-desc-text {
    font-size: clamp(11.5px, calc(0.8 * var(--ds-vw, 1vw)), 12.5px);
    color: #94a3b8;
    line-height: 1.45;
}

/* ── ABOUT PROGRAM SECTION ── */
.about-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, calc(3 * var(--ds-vw, 1vw)), 40px);
    align-items: center;
}

.about-card {
    background: linear-gradient(135deg, #eff6ff, #fef3c7);
    border-radius: 18px;
    padding: clamp(16px, calc(2 * var(--ds-vh, 1vh)), 26px) clamp(16px, calc(2 * var(--ds-vw, 1vw)), 24px);
    border: 1.5px solid rgba(29, 78, 216, 0.12);
    text-align: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
}

.about-card-logo {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, calc(3.2 * var(--ds-vw, 1vw)), 42px);
    font-weight: 900;
    color: var(--blue);
    margin-bottom: 6px;
}

.about-card p {
    font-size: clamp(12.5px, calc(0.9 * var(--ds-vw, 1vw)), 14px);
    color: var(--muted);
    line-height: 1.5;
}

.highlight-box {
    background: var(--blue);
    color: white;
    border-radius: 12px;
    padding: clamp(10px, calc(1.2 * var(--ds-vh, 1vh)), 14px) clamp(12px, calc(1.4 * var(--ds-vw, 1vw)), 16px);
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.22);
}

.highlight-box .hb-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.highlight-box .hb-text {
    font-size: clamp(12px, calc(0.85 * var(--ds-vw, 1vw)), 13px);
    font-weight: 600;
    line-height: 1.4;
}

.about-list {
    list-style: none;
}

.about-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: clamp(8px, calc(1 * var(--ds-vh, 1vh)), 12px) 0;
    border-bottom: 1px solid var(--border);
    font-size: clamp(13.5px, calc(0.95 * var(--ds-vw, 1vw)), 15px);
    color: var(--blue-deep);
    line-height: 1.55;
}

.about-list li:last-child {
    border-bottom: none;
}

.about-list li .check {
    width: 24px;
    height: 24px;
    background: #eff6ff;
    color: var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 2px;
    border: 1.5px solid #bfdbfe;
}

/* ── CTA BANNER ── */
.cta-banner {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    padding: clamp(36px, calc(5 * var(--ds-vh, 1vh)), 64px) clamp(16px, calc(3 * var(--ds-vw, 1vw)), 32px);
    text-align: center;
    position: relative;
    overflow: hidden;
    color: white;
    scroll-margin-top: 74px;
    align-items: center;
    justify-content: center;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-banner h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, calc(2.6 * var(--ds-vw, 1vw)), 34px);
    font-weight: 900;
    color: white;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.cta-banner p {
    font-size: clamp(13px, calc(0.95 * var(--ds-vw, 1vw)), 15px);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: clamp(18px, calc(2.5 * var(--ds-vh, 1vh)), 26px);
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.cta-banner-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn-gold {
    background: var(--gold-bright);
    color: var(--blue-deep);
    font-size: 17px !important;
    padding: 18px 36px !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
    font-weight: 800 !important;
}

.btn-gold:hover {
    background: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.5);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px);
    font-weight: 700;
}

.btn-ghost:hover {
    background: #ffffff !important;
    color: var(--blue-dark) !important;
    border-color: #ffffff !important;
    transform: translateY(-2px);
}

/* ── FOOTER ── */
footer {
    background: var(--blue-deep);
    color: white;
    padding: 56px 24px 32px;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 380px;
}

.footer-logo-text {
    font-size: 26px;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.footer-logo-text .blue {
    color: #60a5fa;
}

.footer-logo-text .gold {
    color: var(--gold-bright);
}

.footer-brand p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.75;
}

.footer-links h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    font-size: 14.5px;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: 13.5px;
    color: #64748b;
}

/* ── SCROLL REVEAL ANIMATIONS ── */
.reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.visible {
    opacity: 1 !important;
    transform: none !important;
}

/* ── RESPONSIVE DESIGN (TABLETS & MOBILE) ── */
@media (max-width: 900px) {
    nav {
        height: 70px;
        padding: 0 16px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* .hero-inner is a grid: one column here (text first, then the logo and cards).
       flex-direction alone left it in two columns, so the logo was cut off on phones. */
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-inner,
    .hero-content-wrapper {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-logo-bg img,
    .hero-image-container img {
        max-height: calc(25 * var(--ds-vh, 1vh));
    }

    .hero-ctas,
    .hero-buttons {
        justify-content: center;
    }

    .hero-badge {
        margin: 0 auto 16px;
    }

    .hero-desc {
        margin: 0 auto 24px;
    }

    .hero-ctas {
        justify-content: center;
        margin-bottom: 24px;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        padding: 10px 0 20px;
        width: 100%;
    }

    .hero-stage {
        max-width: 440px;
        height: 350px;
        margin: 0 auto;
    }

    .hero-logo-wrap {
        margin: 0 auto;
    }

    .hero-logo-bg {
        width: 190px;
        height: 190px;
    }

    .hero-stage-ring.ring-1 {
        width: 250px;
        height: 250px;
    }

    .hero-stage-ring.ring-2 {
        width: 340px;
        height: 340px;
    }

    .gadget-card {
        padding: 6px 10px;
        gap: 7px;
        border-radius: 12px;
    }

    .gadget-img-wrap {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        padding: 3px;
    }

    .gadget-name {
        font-size: 11.5px;
    }

    .gadget-desc {
        display: none;
    }

    .gadget-monitor { top: 6px; left: -8px; }
    .gadget-college { top: 6px; right: -8px; }
    .gadget-mouse { right: -16px; }
    .gadget-internet { bottom: 8px; left: -8px; }
    .gadget-keyboard { bottom: 8px; right: -8px; }

    .hero,
    section {
        min-height: auto;
        padding: 44px 18px;
    }

    .features-grid,
    .how-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .about-wrap {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 620px) {
    .features-grid,
    .how-grid,
    .lessons-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px !important;
    }

    .hero-stage {
        max-width: 320px;
        height: 290px;
    }

    .hero-logo-bg {
        width: 145px;
        height: 145px;
    }

    .hero-stage-ring.ring-2 {
        display: none;
    }

    .hero-hub-badge {
        font-size: 9.5px;
        padding: 3px 10px;
        bottom: -10px;
    }

    .gadget-mouse {
        display: none;
    }

    .gadget-card {
        padding: 5px 8px;
    }

    .gadget-img-wrap {
        width: 28px;
        height: 28px;
    }

    .gadget-name {
        font-size: 10.5px;
    }

    .gadget-tag {
        font-size: 8.5px;
    }

    .gadget-monitor { top: 0px; left: -6px; }
    .gadget-college { top: 0px; right: -6px; }
    .gadget-internet { bottom: 2px; left: -6px; }
    .gadget-keyboard { bottom: 2px; right: -6px; }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .hero-ctas .enter-class-guide-wrap,
    .hero-ctas .btn {
        width: 100%;
    }
}

/* ── SIDE MAGNET DOTS INDICATOR ── */
.side-scroll-nav {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 990;
}

.side-scroll-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.25);
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    text-decoration: none;
}

.side-scroll-dot:hover,
.side-scroll-dot.active {
    background: var(--blue);
    transform: scale(1.35);
}

@media (max-width: 768px) {
    .side-scroll-nav {
        display: none;
        /* itago sa mobile para hindi makasagabal sa text */
    }
}

/* ── AUTOMATIC ADAPTATION PARA SA DESKTOP ZOOM / SHORT VIEWPORT (125% - 175% ZOOM) ── */
@media screen and (min-width: 901px) and (max-height: 800px) {
    nav {
        height: 64px;
    }

    .hero,
    section {
        scroll-margin-top: 64px;
        min-height: calc(calc(100 * var(--ds-dvh, 1dvh)) - 64px);
        padding-top: clamp(14px, calc(2.2 * var(--ds-vh, 1vh)), 24px);
        padding-bottom: clamp(14px, calc(2.2 * var(--ds-vh, 1vh)), 24px);
    }

    /* Hero adjustments para sa maikling screen height */
    .hero-logo-bg {
        width: clamp(170px, calc(20 * var(--ds-vh, 1vh)), 210px);
        height: clamp(170px, calc(20 * var(--ds-vh, 1vh)), 210px);
    }

    .hero-logo-bg img {
        max-height: calc(16 * var(--ds-vh, 1vh));
    }

    .hero-title {
        font-size: clamp(1.6rem, calc(2.2 * var(--ds-vw, 1vw)), 2.3rem);
        margin-bottom: 8px;
    }

    .hero-desc {
        font-size: 0.9rem;
        line-height: 1.45;
        margin-bottom: 14px;
    }

    .hero-ctas,
    .hero-buttons {
        margin-bottom: 14px;
    }

    .hero-ctas .btn {
        min-height: 44px;
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .hero-stats {
        padding-top: 10px;
    }

    .hero-stat-num {
        font-size: 22px;
    }

    .hero-stat-label {
        font-size: 12px;
    }

    /* Seksyon at cards - pinapanatiling malaki at madaling basahin para sa senior */
    .section-header {
        margin-bottom: clamp(14px, calc(2.2 * var(--ds-vh, 1vh)), 22px);
    }

    .section-title {
        font-size: clamp(22px, calc(2.2 * var(--ds-vw, 1vw)), 28px);
        margin-bottom: 6px;
    }

    .section-subtitle {
        font-size: clamp(13.5px, calc(0.95 * var(--ds-vw, 1vw)), 15px);
        line-height: 1.5;
    }

    .feature-card,
    .step-card {
        padding: clamp(18px, calc(2.4 * var(--ds-vh, 1vh)), 26px) clamp(14px, calc(1.3 * var(--ds-vw, 1vw)), 20px);
        min-height: clamp(210px, calc(25 * var(--ds-vh, 1vh)), 260px);
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 10px;
    }

    .feature-icon svg {
        width: 26px !important;
        height: 26px !important;
    }

    .feature-title,
    .step-title {
        font-size: clamp(16px, calc(1.1 * var(--ds-vw, 1vw)), 18px);
        margin-bottom: 6px;
    }

    .feature-desc,
    .step-desc {
        font-size: clamp(12.5px, calc(0.85 * var(--ds-vw, 1vw)), 13.5px);
        line-height: 1.5;
    }
}

/* Karagdagang proteksyon para sa extreme zoom (200% zoom o higit pa) */
@media screen and (max-height: 580px) {
    .hero {
        min-height: auto;
        /* inaalis ang pilit na calc(100 * var(--ds-dvh, 1dvh)) para natural na makapag-scroll pababa */
    }

    .float-card,
    .gadget-card {
        display: none;
        /* pansamantalang itinatago ang floating badges upang walang matakpang teksto */
    }
}
    
/* ══════════════════════════════════════════════════════════════════════
   MOBILE OVERHAUL (phones 320–480px, tablets ≤ 900px)
   Kept last so it refines the rules above.
   ══════════════════════════════════════════════════════════════════════ */

/* One navbar height for everything that sits under it (drawer, anchor jumps) */
:root { --nav-h: 74px; }
nav { height: var(--nav-h); }
.hero, section { scroll-margin-top: var(--nav-h); }

@media (max-width: 900px) { :root { --nav-h: 70px; } }
@media (max-width: 480px) { :root { --nav-h: 64px; } }
@media screen and (min-width: 901px) and (max-height: 800px) { :root { --nav-h: 64px; } }

/* ── Mobile drawer: opens with .open (the class toggleMobileMenu() sets) ──
   Starts right under the navbar, scrolls if the screen is short, never shows on desktop. */
.mobile-drawer {
    top: var(--nav-h);
    max-height: calc(calc(100 * var(--ds-dvh, 1dvh)) - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

.mobile-drawer.open {
    display: flex;
}

.mobile-drawer a {
    min-height: 52px;              /* large, easy tap targets for seniors */
}

.mobile-drawer a:focus-visible,
.mobile-menu-btn:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.mobile-menu-btn {
    min-height: 44px;
}

.mobile-menu-btn[aria-expanded="true"] {
    background: var(--blue-soft, #eff6ff);
    border-color: var(--blue);
    color: var(--blue);
}

/* Up to 1000px (phones turned sideways, small tablets) the top links would wrap onto
   two lines each, so the ☰ Menu takes over there too */
@media (min-width: 901px) and (max-width: 1000px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (min-width: 1001px) {
    .mobile-drawer,
    .mobile-drawer.open {
        display: none !important;
    }
}

/* The section dots on the right edge sat on top of the hero cards below 1100px */
@media (max-width: 1100px) {
    .side-scroll-nav {
        display: none;
    }
}

/* ── Scrolling on phones and tablets ──
   Mandatory snapping fights the address bar that shows and hides while scrolling and
   can cut off sections taller than the screen. Touch screens scroll freely instead. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
    html {
        scroll-snap-type: none;
    }

    .hero,
    section,
    footer {
        scroll-snap-align: none;
    }

    .hero,
    section {
        min-height: auto;
    }
}

/* ── Phones (≤ 480px) ── */
@media (max-width: 480px) {
    nav {
        padding: 0 12px;
    }

    .nav-brand {
        gap: 8px;
        min-width: 0;
    }

    .nav-brand img {
        width: 38px;
        height: 38px;
    }

    .nav-brand-text {
        font-size: 19px;
    }

    .nav-brand-sub {
        font-size: 10.5px;
    }

    .mobile-menu-btn {
        padding: 8px 10px;
        flex-shrink: 0;
    }

    .mobile-drawer {
        padding: 14px 12px 18px;
        gap: 8px;
    }

    .mobile-drawer a {
        font-size: 15.5px;
        padding: 12px 14px;
    }

    .hero,
    section {
        padding: 32px 16px 36px;
    }

    .hero-title {
        font-size: clamp(24px, calc(7.4 * var(--ds-vw, 1vw)), 30px) !important;
        line-height: 1.2;
        overflow-wrap: break-word;
    }

    .hero-desc {
        font-size: 15.5px;
        line-height: 1.55;
        margin-bottom: 18px;
    }

    /* Buttons: full width, long Tagalog labels wrap instead of overflowing */
    .btn {
        white-space: normal;
        text-align: center;
        min-height: 52px;
        padding: 13px 18px;
    }

    .hero-ctas {
        margin-bottom: 18px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 12px 18px;
    }

    .hero-stat-num {
        font-size: 22px;
    }

    .hero-stat-label {
        font-size: 12.5px;
    }

    /* Hero visual: logo on top, the gadget cards in a tidy 2 × 2 grid below it
       (no floating cards over the logo, nothing wider than the screen) */
    .hero-visual {
        padding: 6px 0 4px;
    }

    .hero-stage {
        height: auto;
        max-width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-content: flex-start;
        gap: 10px;
        padding: 8px 0 0;
    }

    .hero-stage-glow,
    .hero-stage-ring {
        display: none;
    }

    .hero-logo-wrap {
        flex: 0 0 100%;
        margin-bottom: 24px;       /* room for the hub badge below the logo */
    }

    .hero-logo-bg {
        width: clamp(128px, calc(40 * var(--ds-vw, 1vw)), 160px);
        height: clamp(128px, calc(40 * var(--ds-vw, 1vw)), 160px);
    }

    .hero-hub-badge {
        max-width: calc(calc(100 * var(--ds-vw, 1vw)) - 48px);
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }

    .gadget-card {
        position: static;
        animation: none;
        flex: 0 1 calc(50% - 5px);
        min-width: 0;
        box-sizing: border-box;
        white-space: normal;
        padding: 8px 10px;
    }

    .gadget-card:hover {
        transform: none !important;
    }

    .gadget-info {
        min-width: 0;
    }

    .gadget-name {
        font-size: 12px;
        line-height: 1.25;
        overflow-wrap: break-word;
    }

    .gadget-tag:empty {
        display: none;
    }

    /* Sections: readable titles, comfortable cards */
    .section-title {
        font-size: clamp(22px, calc(6.4 * var(--ds-vw, 1vw)), 28px);
        line-height: 1.25;
    }

    .section-subtitle {
        font-size: 15px;
        line-height: 1.55;
    }

    .features-grid,
    .how-grid,
    .lessons-grid {
        gap: 12px;
    }

    .feature-card,
    .step-card {
        min-height: 0;
        padding: 20px 16px;
    }

    .lesson-card {
        padding: 14px;
    }

    .lesson-card:hover,
    .feature-card:hover,
    .step-card:hover {
        transform: none;
    }

    .about-wrap {
        gap: 24px;
    }
}

/* ── Very small phones (≤ 360px) ── */
@media (max-width: 360px) {
    .nav-brand-sub {
        display: none;
    }

    .nav-brand-text {
        font-size: 18px;
    }

    .gadget-card {
        flex-basis: 100%;
    }

    .hero-stat {
        flex: 1 1 40%;
    }
}

/* ── "I-download ang App": a QR code the elder scans with their phone ── */
.btn-app-qr { min-height: 60px; }

.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(12, 31, 74, 0.72);
}

.qr-modal[hidden] { display: none; }

.qr-modal-box {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(calc(100 * var(--ds-vh, 1vh)) - 32px);
    overflow-y: auto;
    padding: 28px 24px 24px;
    border-radius: 28px;
    background: #ffffff;
    border-top: 8px solid var(--gold);
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.45);
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.qr-modal-box h2 {
    margin: 0 0 16px;
    padding: 0 52px;       /* clear of the close button */
    font-size: 24px;
    line-height: 1.25;
    font-weight: 800;
    color: var(--blue-deep);
}

.qr-modal-code {
    width: min(260px, calc(72 * var(--ds-vw, 1vw)));
    aspect-ratio: 1;
    margin: 0 auto 16px;
    padding: 12px;
    border-radius: 22px;
    border: 4px solid var(--blue);
    background: #ffffff;
}

.qr-modal-code svg { width: 100%; height: 100%; display: block; }

.qr-modal-hint {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
    color: #334155;
}

.qr-modal-warn {
    margin: -8px 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #b45309;
}

.qr-modal-box .btn { width: 100%; min-height: 60px; font-size: 18px; }

.qr-modal-x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 56px;
    height: 56px;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    background: #ffffff;
    color: #334155;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.qr-modal-x:focus-visible,
.qr-modal-box .btn:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
