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

:root {
    --red: #C8102E;
    --red-dark: #A00C24;
    --green: #1BA74A;
    --black: #111111;
    --white: #FFFFFF;
    --off-white: #F5F5F5;
    --grey: #6B6B6B;
    --light-grey: #E8E8E8;
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --font-condensed: 'Montserrat', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--black);
    background: var(--white);
    overflow-x: hidden;
}

/* ── TOP BANNER ── */
.top-banner {
    background: #323232e1;
    color: rgba(245,245,245,0.85);
    font-family: var(--font-condensed);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0 5%;
    height: 30px;
    display: flex;
    align-items: center;
    z-index: 1200;
    position: relative;
  }
  
  .top-banner-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .top-banner-left {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  
  .top-banner-left a {
    color: rgba(245,245,245,0.75);
    font-size: 13px;
    transition: color 0.2s;
    text-decoration: none;
  }
  
  .top-banner-left a:hover { color: var(--red); }
  
  .top-banner-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  .top-banner-right span,
  .top-banner-right a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(245,245,245,0.75);
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
  }
  
  .top-banner-right a:hover { color: var(--red); }
  
  .top-banner-right i { color: var(--green); font-size: 11px; }
  
  @media (max-width: 768px) {
    .top-banner { height: auto; padding: 5px 5%; }
    .top-banner-inner { flex-direction: row; gap: 8px; align-items: flex-start; }
    .top-banner-right { gap: 12px; }
    .top-banner-right span:first-child { display: none; } /* hide address on mobile */
  }
/* ── NAVBAR ── */
nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
    padding: 0 28px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 50px;
    width: 98%;
    max-width: 1600px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-circle {
    width: 46px;
    height: 46px;
    background: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 1px;
    flex-shrink: 0;
    border: 2px solid var(--green);
}

.logo-text {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo-text .logo-green { color: var(--green); }
.logo-text .logo-red { color: var(--red); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-condensed);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--black);
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--red); }

.btn-login {
    background: var(--red);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-login:hover { background: var(--red-dark) !important; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--black);
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 100px; left: 5%; right: 5%;
    border-radius: 16px;
    background: white;
    padding: 20px 5%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 999;
    flex-direction: column;
    gap: 16px;
}

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

.mobile-menu a {
    font-family: var(--font-condensed);
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--black);
    padding: 8px 0;
    border-bottom: 1px solid var(--light-grey);
}

/* ── HERO ── */
#hero {
    margin-top: 0;
    position: relative;
    height: 100vh;
    min-height: 550px;
    max-height: 900px;
    overflow: hidden;
    background: #1a1a1a;
}

.hero-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.7;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.78) 45%, rgba(0,0,0,0.15) 100%);
}

.hero-content {
    position: absolute;
    top: 110px;     
    left: 6%;
    right: 6%;
    max-width: 600px;
}

.hero-eyebrow {
    font-family: var(--font-condensed);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    margin-bottom: 12px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.02;
    color: var(--white);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-subtitle {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
    max-width: 520px;
    margin-bottom: 22px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--red);
    color: white;
    padding: 14px 28px;
    border-radius: 4px;
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    display: inline-block;
}

.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    color: white;
    padding: 13px 28px;
    border-radius: 4px;
    border: 2px solid rgba(255,255,255,0.7);
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.1); transform: translateY(-2px); }

/* ── SECTIONS SHARED ── */
section { padding: 80px 5%; }

.section-label {
    font-family: var(--font-condensed);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(35px, 4vw, 46px);
    line-height: 1;
    text-transform: uppercase;
    color: var(--black);
    margin-bottom: 20px;
}

.section-title span { color: var(--red); }

.section-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--grey);
    max-width: 600px;
}

/* ── WELCOME ── */
#welcome {
    background: var(--white);
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 160px;
    gap: 12px;
}

.welcome-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.welcome-images .img-big {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.welcome-images .img-top-right {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.welcome-images .img-bottom {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
}

.welcome-text .btn-primary { margin-top: 28px; }
/* ── WHY / MONTESSORI C'S ── */
#why {
    background: linear-gradient(135deg, #f8faf8, #f5f5f5);
}

.why-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
}

.why-intro {
    margin: 0 auto;
}

.why-rows {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.why-row {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.why-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid rgba(27,167,74,0.7);
}

.why-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.why-expand {
    flex-basis: 0;
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
    text-decoration: none;
    cursor: default;
    will-change: flex-grow, transform;
    transform: translateZ(0);
    transition:
        flex-grow 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.why-row .why-expand:hover,
.why-row .why-expand:focus,
.why-row .why-expand:focus-within {
    flex-grow: 2.25;
}

.why-row .why-expand:focus-visible {
    outline: 3px solid rgba(200, 16, 46, 0.35);
    outline-offset: 3px;
}

.why-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.why-card-body {
    padding: 16px;
    text-align: center;
}

.why-card-body h4 {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--black);
}

.why-desc {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--grey);
    text-align: left;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(6px);
    will-change: opacity, transform, max-height;
    transition:
        max-height 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 220ms ease,
        transform 220ms ease;
    transition-delay: 80ms;
}

.why-row .why-expand:hover .why-desc,
.why-row .why-expand:focus .why-desc,
.why-row .why-expand:focus-within .why-desc {
    max-height: 260px;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 120ms;
}

@media (prefers-reduced-motion: reduce) {
    .why-expand,
    .why-desc {
        transition: none !important;
    }
}

/* ── QUICK LINKS ── */
#quicklinks {
    background: white;
}

.ql-header {
    max-width: 1200px;
    margin: 0 auto 40px;
}

.ql-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.ql-card {
    background: var(--red);
    color: white;
    border-radius: 8px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    display: block;
}

.ql-card:hover {
    background: var(--red-dark);
    transform: translateY(-4px);
}

.ql-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ql-icon svg { width: 22px; height: 22px; fill: white; }

.ql-card h4 {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* ── PROGRAMMES ── */
#programmes {
    background: var(--off-white);
}

.prog-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.prog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.prog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.prog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.prog-card-body { padding: 24px; }

.prog-card-body h3 {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 20px;
    text-transform: uppercase;
    color: var(--black);
    margin-bottom: 10px;
}

.prog-card-body p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--grey);
}
/* ── TESTIMONIALS ── */
#testimonials {
    background: var(--off-white);
}

.test-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
}

.test-card {
    background: white;
    border-radius: 8px;
    padding: 36px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 4px 30px rgba(0,0,0,0.07);
    position: relative;
}

.test-carousel {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 14px;
}

.test-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.9);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
    color: var(--black);
}

.test-nav-btn:hover {
    border-color: rgba(0,0,0,0.18);
    background: white;
}


.test-nav-btn:focus-visible {
    outline: 3px solid rgba(200, 16, 46, 0.28);
    outline-offset: 2px;
}

.test-quote {
    font-size: 60px;
    color: var(--red);
    font-family: Georgia, serif;
    line-height: 0.5;
    margin-bottom: 20px;
}

.test-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--grey);
    margin-bottom: 24px;
}

.test-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.test-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--light-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--grey);
}

.test-name {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 15px;
    color: var(--black);
    text-transform: uppercase;
}

.test-role {
    font-size: 13px;
    color: var(--grey);
}

.test-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.test-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--light-grey);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.test-dot.active {
    background: var(--red);
    transform: scale(1.2);
}
/* ── GALLERY ── */
#gallery {
    padding: 80px 5%;
    background: var(--off-white);
  }
  
  .gallery-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
  }
  
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .gallery-card {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.14);
  }
  
  .gallery-card:focus {
    outline: 3px solid var(--red);
    outline-offset: 3px;
  }
  
  .gallery-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #111;
    overflow: hidden;
  }
  
  .gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: transform 0.5s ease;
  }
  
  .gallery-card:hover .gallery-video {
    transform: scale(1.04);
  }
  
  .gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .gallery-card:hover .gallery-overlay,
  .gallery-card:focus .gallery-overlay {
    opacity: 1;
  }
  
  .gallery-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
  }
  
  .gallery-play-btn svg {
    width: 26px;
    height: 26px;
    margin-left: 3px;
  }
  
  .gallery-card:hover .gallery-play-btn {
    transform: scale(1.1);
  }
  
  .gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
    color: white;
    font-family: var(--font-condensed);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  /* ── LIGHTBOX ── */
  .lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    align-items: center;
    justify-content: center;
  }
  
  .lightbox-overlay.active {
    display: flex;
  }
  
  .lightbox-inner {
    width: 90%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  
  .lightbox-video {
    width: 100%;
    border-radius: 10px;
    max-height: 75vh;
    background: #000;
  }
  
  .lightbox-caption {
    color: rgba(255,255,255,0.7);
    font-family: var(--font-condensed);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  .lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
  }
  
  .lightbox-close:hover { opacity: 1; }
  
  .lightbox-prev,
  .lightbox-next {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  
  .lightbox-prev:hover,
  .lightbox-next:hover { background: var(--red); border-color: var(--red); }
  
  @media (max-width: 768px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .lightbox-prev, .lightbox-next { display: none; }
  }
  
  @media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
  }
/* ── CTA BANNER ── */
#cta {
    background: var(--black);
    padding: 80px 5%;
    position: relative;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 6px;
    opacity: 0.15;
    flex-wrap: wrap;
    overflow: hidden;
}

.cta-bg img {
    width: calc(20% - 6px);
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cta-content .section-label { color: rgba(27, 167, 74, 0.8); }

.cta-content .section-title {
    color: var(--off-white);
    font-size: clamp(40px, 6vw, 72px);
}

.cta-content .section-title span { color: var(--green); }

.cta-content p {
    color: rgba(245,245,245,0.7);
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
/* ── FOOTER ── */
footer {
    background: rgba(27, 167, 74, 0.8);
    /* color: rgba(245,245,245,0.78); */
    color: white;
    padding: 60px 5% 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 50px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 16px;
    max-width: 260px;
}

.footer-brand .logo-circle {
    width: 64px;
    height: 64px;
}

/* Footer uses a green background, so the "Flourished Minds" (logo-green) needs cream */
.footer-brand .logo-green {
    color: var(--off-white);
}

.footer-col h5 {
    font-family: var(--font-condensed);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--off-white);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: rgba(245,245,245,0.6);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-col a:hover { color: var(--green); }

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.footer-social a:hover { background: var(--green); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}

/* ── ANIMATIONS ── */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .why-row { flex-wrap: wrap; }
    .why-expand { flex: 1 1 calc(50% - 10px); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }

    section { padding: 60px 5%; }

    #hero {
        height: 400px;
        min-height: 520px;
    }

    .hero-content {
        top: 100px;
        left: 6%;
        right: 6%;
    }

    .welcome-grid { grid-template-columns: 1fr; gap: 36px; }
    .welcome-images { grid-template-rows: 180px 120px; }

    .why-row { flex-direction: column; }
    .why-expand { flex: 1 1 auto; }
    .why-desc {
        max-height: none;
        opacity: 1;
        transform: none;
    }
    .ql-grid { grid-template-columns: repeat(2, 1fr); }
    .prog-grid { grid-template-columns: repeat(2, 1fr); }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }

    .test-carousel {
        grid-template-columns: 1fr;
        gap: 12px;
        position: relative;
        padding-inline: 54px; /* space for side arrows */
    }

    .test-nav-btn {
        width: 42px;
        height: 42px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }

    #testPrev { left: 10px; }
    #testNext { right: 10px; }
}

@media (max-width: 600px) {
    .why-row { flex-direction: column; }
}

@media (max-width: 480px) {
    .ql-grid { grid-template-columns: 1fr; }
}

.scroll-top-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 10px 30px rgba(0,0,0,0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    z-index: 999;
}

.scroll-top-btn:hover {
    background: white;
    border-color: rgba(0,0,0,0.18);
    transform: translateY(8px);
}

.scroll-top-btn:active { transform: translateY(10px); }

.scroll-top-btn:focus-visible {
    outline: 3px solid rgba(200, 16, 46, 0.28);
    outline-offset: 2px;
}

.scroll-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}