/* Homepage layout variants. Classic keeps the original look.
   All colors come from --school-primary / --school-primary-rgb. */

/* ----- Section order ----- */
body.hp-order-rankings .page-content,
body.hp-order-about-first .page-content {
    display: flex;
    flex-direction: column;
}
body.hp-order-rankings .hero { order: 1; }
body.hp-order-rankings .stats-bar { order: 2; }
body.hp-order-rankings .ranking-section { order: 3; }
body.hp-order-rankings #about { order: 4; }
body.hp-order-rankings #admins { order: 5; }
body.hp-order-rankings #teachers { order: 6; }
body.hp-order-rankings #contact { order: 7; }
body.hp-order-rankings .footer { order: 8; }

body.hp-order-about-first .hero { order: 1; }
body.hp-order-about-first #about { order: 2; }
body.hp-order-about-first .stats-bar { order: 3; }
body.hp-order-about-first .ranking-section { order: 4; }
body.hp-order-about-first #admins { order: 5; }
body.hp-order-about-first #teachers { order: 6; }
body.hp-order-about-first #contact { order: 7; }
body.hp-order-about-first .footer { order: 8; }

/* ----- Page tone ----- */
body.hp-tone-cream { background: #f7f1e8; }
body.hp-tone-cream .section { background: #f7f1e8; }
body.hp-tone-cream .ranking-section,
body.hp-tone-cream .contact-section { background: #efe6d8; }
body.hp-tone-mist { background: #eef3f8; }
body.hp-tone-mist .ranking-section,
body.hp-tone-mist .contact-section { background: #e4ecf4; }
body.hp-tone-ink { background: #0f1923; color: #e8eef5; }
body.hp-tone-ink .section-heading,
body.hp-tone-ink .staff-subheading,
body.hp-tone-ink .about-text,
body.hp-tone-ink .section-desc { color: #e8eef5; }
body.hp-tone-ink .ranking-section,
body.hp-tone-ink .contact-section { background: #16202b; }
body.hp-tone-ink .teacher-card-v2,
body.hp-tone-ink .contact-form,
body.hp-tone-ink .student-rank-card { background: #1c2836; color: #e8eef5; }
body.hp-tone-ink .teacher-card-v2 h4,
body.hp-tone-ink .student-name { color: #fff; }

/* ----- Nav: solid school color ----- */
body.hp-nav-solid .navbar {
    background: var(--school-primary);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.16);
}
body.hp-nav-solid .navbar.scrolled {
    background: var(--school-primary);
}
body.hp-nav-solid .nav-brand-text,
body.hp-nav-solid .navbar.scrolled .nav-brand-text,
body.hp-nav-solid .nav-links a,
body.hp-nav-solid .navbar.scrolled .nav-links a {
    color: #fff;
}
body.hp-nav-solid .nav-links a:hover,
body.hp-nav-solid .navbar.scrolled .nav-links a:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
body.hp-nav-solid .mobile-toggle span,
body.hp-nav-solid .navbar.scrolled .mobile-toggle span { background: #fff; }
body.hp-nav-solid .login-btn,
body.hp-nav-solid .navbar.scrolled .login-btn {
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff !important;
}

/* ----- Nav: light from the start ----- */
body.hp-nav-light .navbar,
body.hp-nav-light .navbar.scrolled {
    background: #fff;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.08);
}
body.hp-nav-light .nav-brand-text,
body.hp-nav-light .navbar.scrolled .nav-brand-text { color: var(--school-primary); }
body.hp-nav-light .nav-links a,
body.hp-nav-light .navbar.scrolled .nav-links a { color: #334155; }
body.hp-nav-light .nav-links a:hover,
body.hp-nav-light .navbar.scrolled .nav-links a:hover {
    background: var(--school-primary);
    color: #fff;
}
body.hp-nav-light .mobile-toggle span,
body.hp-nav-light .navbar.scrolled .mobile-toggle span { background: #1a1a2e; }
body.hp-nav-light .login-btn,
body.hp-nav-light .navbar.scrolled .login-btn {
    background: var(--school-primary) !important;
    color: #fff !important;
    border-color: var(--school-primary);
}

/* ----- Hero: centered overlay ----- */
body.hp-hero-full-center .hero-content {
    margin: 0 auto;
    text-align: center;
    max-width: 780px;
}
body.hp-hero-full-center .hero-motto { margin-left: auto; margin-right: auto; }
body.hp-hero-full-center .hero-btns { justify-content: center; }

/* ----- Hero: compact ----- */
body.hp-hero-compact .hero { min-height: 68vh; }
body.hp-hero-compact .hero-content { padding: 110px 0 48px; }

/* ----- Hero: banner ----- */
body.hp-hero-banner .hero { min-height: 46vh; }
body.hp-hero-banner .hero-content { padding: 120px 0 40px; max-width: 760px; }
body.hp-hero-banner .hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }

/* ----- Hero: split (photo right) ----- */
body.hp-hero-split-right .hero,
body.hp-hero-split-left .hero,
body.hp-hero-split-color .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    align-items: stretch;
}
body.hp-hero-split-right .hero-slider,
body.hp-hero-split-left .hero-slider,
body.hp-hero-split-color .hero-slider {
    position: relative;
    min-height: 100vh;
    height: 100%;
    overflow: hidden;
    grid-column: 2;
    grid-row: 1;
}
body.hp-hero-split-left .hero-slider { grid-column: 1; }
body.hp-hero-split-right .hero-slide,
body.hp-hero-split-left .hero-slide,
body.hp-hero-split-color .hero-slide,
body.hp-hero-rail .hero-slide,
body.hp-hero-split-right .hero-slide img,
body.hp-hero-split-left .hero-slide img,
body.hp-hero-split-color .hero-slide img,
body.hp-hero-rail .hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
body.hp-hero-split-right .hero-slide img,
body.hp-hero-split-left .hero-slide img,
body.hp-hero-split-color .hero-slide img,
body.hp-hero-rail .hero-slide img { object-fit: cover; }
body.hp-hero-split-right .hero-overlay,
body.hp-hero-split-left .hero-overlay {
    display: none;
}
body.hp-hero-split-color .hero-overlay { display: none; }
body.hp-hero-split-right .hero > .container,
body.hp-hero-split-left .hero > .container,
body.hp-hero-split-color .hero > .container {
    grid-row: 1;
    display: flex;
    align-items: center;
    max-width: none;
    width: 100%;
    position: relative;
    z-index: 2;
}
body.hp-hero-split-right .hero > .container,
body.hp-hero-split-left .hero > .container {
    grid-column: 1;
    background: #fff;
}
body.hp-hero-split-left .hero > .container { grid-column: 2; }
body.hp-hero-split-color .hero > .container {
    grid-column: 1;
    background: var(--school-primary);
}
body.hp-hero-split-color .hero h1,
body.hp-hero-split-color .hero-motto,
body.hp-hero-split-color .hero-content,
body.hp-hero-split-color .btn-outline-custom {
    color: #fff;
}
body.hp-hero-split-color .btn-outline-custom { border-color: #fff; }
body.hp-hero-split-color .btn-primary-custom {
    background: #fff;
    color: var(--school-primary);
    box-shadow: none;
}
body.hp-hero-split-color .hero-badge {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: transparent;
}
body.hp-hero-split-right .hero-content,
body.hp-hero-split-left .hero-content {
    color: #1a1a2e;
    padding: 48px 8%;
    max-width: none;
}
body.hp-hero-split-right .hero h1,
body.hp-hero-split-left .hero h1 { color: var(--school-primary); }
body.hp-hero-split-right .hero-motto,
body.hp-hero-split-left .hero-motto { color: #475569; }
body.hp-hero-split-right .hero-badge,
body.hp-hero-split-left .hero-badge {
    background: rgba(var(--school-primary-rgb), 0.1);
    color: var(--school-primary);
    border-color: transparent;
}
body.hp-hero-split-right .btn-outline-custom,
body.hp-hero-split-left .btn-outline-custom {
    color: var(--school-primary);
    border-color: var(--school-primary);
}
body.hp-hero-split-color .hero-content { color: #fff; padding: 48px 8%; }
body.hp-hero-split-right .hero-indicators,
body.hp-hero-split-left .hero-indicators,
body.hp-hero-split-color .hero-indicators {
    left: 75%;
    bottom: 24px;
}
body.hp-hero-split-left .hero-indicators { left: 25%; }

/* ----- Hero: floating panel ----- */
body.hp-hero-panel .hero-content {
    background: rgba(255, 255, 255, 0.94);
    color: #1a1a2e;
    padding: 36px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
}
body.hp-hero-panel .hero h1 { color: var(--school-primary); }
body.hp-hero-panel .hero-motto { color: #475569; }
body.hp-hero-panel .hero-badge {
    background: rgba(var(--school-primary-rgb), 0.1);
    color: var(--school-primary);
    border: 0;
}
body.hp-hero-panel .btn-outline-custom {
    color: var(--school-primary);
    border-color: var(--school-primary);
}
body.hp-layout-aurora .hero-content {
    background: rgba(var(--school-primary-rgb), 0.28);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
}
body.hp-layout-aurora .hero h1,
body.hp-layout-aurora .hero-motto { color: #fff; }
body.hp-layout-aurora .hero-badge {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

/* ----- Hero: framed ----- */
body.hp-hero-framed {
    background: rgba(var(--school-primary-rgb), 0.08);
}
body.hp-hero-framed .hero {
    display: block;
    min-height: auto;
    height: auto;
    padding: 108px 28px 28px;
    overflow: visible;
}
body.hp-hero-framed .hero-slider {
    position: relative;
    width: 100%;
    height: 58vh;
    min-height: 320px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    z-index: 0;
}
body.hp-hero-framed .hero-slide,
body.hp-hero-framed .hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
body.hp-hero-framed .hero-slide img { object-fit: cover; }
body.hp-hero-framed .hero-overlay {
    position: absolute;
    top: 108px;
    left: 28px;
    right: 28px;
    height: 58vh;
    min-height: 320px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55));
    pointer-events: none;
}
body.hp-hero-framed .hero > .container {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    z-index: 3;
}
body.hp-hero-framed .hero-content {
    padding: 20px 24px 12px;
    max-width: 720px;
}
body.hp-hero-framed .hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    margin-bottom: 10px;
}
body.hp-hero-framed .hero-indicators { bottom: 18px; }

/* ----- Hero: stacked ----- */
body.hp-hero-stacked .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    background: #fff;
}
body.hp-hero-stacked .hero-slider {
    position: relative;
    width: 100%;
    height: 46vh;
    min-height: 280px;
    flex: 0 0 auto;
    overflow: hidden;
}
body.hp-hero-stacked .hero-slide,
body.hp-hero-stacked .hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
body.hp-hero-stacked .hero-slide img { object-fit: cover; }
body.hp-hero-stacked .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 46vh;
    min-height: 280px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.25));
    pointer-events: none;
}
body.hp-hero-stacked .hero > .container {
    position: relative;
    z-index: 2;
    background: #fff;
}
body.hp-hero-stacked .hero-content {
    color: #1a1a2e;
    padding: 40px 0 24px;
    max-width: none;
}
body.hp-hero-stacked .hero h1 { color: var(--school-primary); }
body.hp-hero-stacked .hero-motto { color: #475569; }
body.hp-hero-stacked .hero-badge {
    background: rgba(var(--school-primary-rgb), 0.1);
    color: var(--school-primary);
    border: 0;
}
body.hp-hero-stacked .btn-outline-custom {
    color: var(--school-primary);
    border-color: var(--school-primary);
}
body.hp-hero-stacked .hero-indicators { top: calc(46vh - 36px); bottom: auto; }

/* ----- Hero: vertical color rail ----- */
body.hp-hero-rail .hero {
    display: grid;
    grid-template-columns: minmax(280px, 34%) 1fr;
    min-height: 100vh;
}
body.hp-hero-rail .hero-slider {
    position: relative;
    min-height: 100vh;
    height: 100%;
    overflow: hidden;
    grid-column: 2;
    grid-row: 1;
}
body.hp-hero-rail .hero-overlay { display: none; }
body.hp-hero-rail .hero > .container {
    grid-column: 1;
    grid-row: 1;
    background: var(--school-primary);
    max-width: none;
    width: 100%;
    display: flex;
    align-items: flex-end;
    position: relative;
    z-index: 2;
}
body.hp-hero-rail .hero-content {
    color: #fff;
    padding: 48px 32px 64px;
    max-width: none;
}
body.hp-hero-rail .hero-indicators { left: 72%; }

/* ----- Stats: cards ----- */
body.hp-stats-cards .stats-bar {
    background: transparent;
    padding: 0 20px 10px;
}
body.hp-stats-cards .stats-grid {
    gap: 16px;
    padding: 0 0 8px;
}
body.hp-stats-cards .stat-item {
    background: #fff;
    color: #1a1a2e;
    border-right: 0;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 25, 35, 0.08);
    border-top: 4px solid var(--school-primary);
}
body.hp-stats-cards .stat-number { color: var(--school-primary); }
body.hp-tone-ink.hp-stats-cards .stat-item { background: #1c2836; color: #e8eef5; }

/* ----- Stats: overlay on hero ----- */
body.hp-stats-overlay .hero { padding-bottom: 0; }
body.hp-stats-overlay .stats-bar {
    background: transparent;
    margin-top: -72px;
    position: relative;
    z-index: 4;
    padding: 0 20px;
}
body.hp-stats-overlay .stats-grid { gap: 12px; }
body.hp-stats-overlay .stat-item {
    background: rgba(15, 25, 35, 0.78);
    backdrop-filter: blur(12px);
    border-right: 0;
    border-radius: 16px;
    color: #fff;
}
body.hp-stats-overlay .stat-number { color: #fff; }

/* ----- Stats: pills ----- */
body.hp-stats-pills .stats-bar {
    background: #fff;
    padding: 28px 0;
}
body.hp-stats-pills .stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
body.hp-stats-pills .stat-item {
    border: 0;
    background: rgba(var(--school-primary-rgb), 0.1);
    color: var(--school-primary);
    border-radius: 999px;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
body.hp-stats-pills .stat-number { font-size: 1.1rem; }
body.hp-stats-pills .stat-label { margin: 0; opacity: 1; font-weight: 600; }

/* ----- Stats: bento ----- */
body.hp-stats-bento .stats-bar {
    background: transparent;
    margin-top: -64px;
    position: relative;
    z-index: 4;
    padding: 0 20px 20px;
}
body.hp-stats-bento .stats-grid { gap: 16px; }
body.hp-stats-bento .stat-item {
    background: #fff;
    color: #1a1a2e;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(15, 25, 35, 0.12);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
body.hp-stats-bento .stat-item:first-child {
    background: var(--school-primary);
    color: #fff;
}
body.hp-stats-bento .stat-number { color: inherit; }

/* ----- About variants ----- */
body.hp-about-right .about-grid { direction: rtl; }
body.hp-about-right .about-grid > * { direction: ltr; }
body.hp-about-stacked .about-grid {
    grid-template-columns: 1fr;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}
body.hp-about-stacked .about-image-wrapper img { height: 320px; }
body.hp-about-stacked .about-text { text-align: left; }
body.hp-about-bleed .about-grid { grid-template-columns: 1.15fr 0.85fr; gap: 36px; }
body.hp-about-bleed .about-image-wrapper img {
    height: 460px;
    border-radius: 8px;
}

/* ----- Staff grid ----- */
body.hp-staff-grid .teachers-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    overflow: visible;
    cursor: default;
}
body.hp-staff-grid .teacher-card-v2 { flex: none; width: auto; }
body.hp-staff-grid .scroll-btn { display: none !important; }

/* ----- Vector: sharp ----- */
body.hp-layout-vector .hero,
body.hp-layout-vector .stat-item,
body.hp-layout-vector .teacher-card-v2,
body.hp-layout-vector .contact-form,
body.hp-layout-vector .student-rank-card,
body.hp-layout-vector .about-image-wrapper img,
body.hp-layout-vector .nav-brand img,
body.hp-layout-vector .btn-primary-custom,
body.hp-layout-vector .btn-outline-custom {
    border-radius: 0;
}
body.hp-layout-vector .section-tag { border-radius: 0; }

/* ----- Legacy: serif formality ----- */
body.hp-layout-legacy .hero h1,
body.hp-layout-legacy .section-heading {
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
}
body.hp-layout-legacy .stats-bar {
    background: var(--school-primary-dark, var(--school-primary));
}
body.hp-layout-legacy .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55));
}

/* ----- Monolith ----- */
body.hp-layout-monolith .stats-bar { background: var(--school-primary); }
body.hp-layout-monolith .footer { background: #070b10; }
body.hp-layout-monolith .btn-primary-custom {
    background: #fff;
    color: var(--school-primary);
}
body.hp-layout-monolith .section-tag {
    background: var(--school-primary);
    color: #fff;
}

/* ----- Quartz editorial ----- */
body.hp-layout-quartz .section-heading { font-weight: 700; }
body.hp-layout-quartz .about-accent { border-radius: 4px; }

/* ----- Responsive splits ----- */
@media (max-width: 900px) {
    body.hp-hero-split-right .hero,
    body.hp-hero-split-left .hero,
    body.hp-hero-split-color .hero,
    body.hp-hero-rail .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    body.hp-hero-split-right .hero-slider,
    body.hp-hero-split-left .hero-slider,
    body.hp-hero-split-color .hero-slider,
    body.hp-hero-rail .hero-slider {
        grid-column: 1;
        grid-row: 1;
        min-height: 42vh;
        height: 42vh;
    }
    body.hp-hero-split-right .hero > .container,
    body.hp-hero-split-left .hero > .container,
    body.hp-hero-split-color .hero > .container,
    body.hp-hero-rail .hero > .container {
        grid-column: 1;
        grid-row: 2;
    }
    body.hp-hero-split-right .hero-indicators,
    body.hp-hero-split-left .hero-indicators,
    body.hp-hero-split-color .hero-indicators,
    body.hp-hero-rail .hero-indicators { left: 50%; top: 36vh; bottom: auto; }
    body.hp-hero-framed .hero { padding: 92px 16px 16px; }
    body.hp-hero-framed .hero-slider,
    body.hp-hero-framed .hero-overlay {
        height: 42vh;
        min-height: 240px;
    }
    body.hp-hero-framed .hero-overlay { top: 92px; left: 16px; right: 16px; }
}
