/*
 * Compact interior-page system
 * Loaded after page-specific styles to keep navigation destinations aligned.
 */

/* Primary navigation destinations */
.prog-hero {
    min-height: 400px;
    padding: 0;
}

.prog-hero__img {
    object-position: center;
}

.prog-hero__overlay {
    background:
        linear-gradient(90deg, rgba(10, 27, 48, 0.96) 0%, rgba(15, 39, 68, 0.88) 40%, rgba(20, 48, 80, 0.42) 72%, rgba(20, 48, 80, 0.16) 100%);
}

.prog-hero__inner {
    max-width: 610px;
    padding: 3rem 0;
}

.prog-hero__badge {
    gap: 0.4rem;
    margin-bottom: 0.8rem;
    padding: 0.38rem 0.72rem;
    border-radius: 6px;
    font-size: 0.72rem;
}

.prog-hero__badge svg {
    width: 14px;
    height: 14px;
}

.prog-hero__title {
    margin-bottom: 0.65rem;
}

.prog-hero__title-zh {
    margin-bottom: 0.3rem;
    font-size: clamp(2.1rem, 3.4vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-shadow: none;
}

html[lang="zh"] .prog-hero__title-zh {
    letter-spacing: 0.025em;
}

.prog-hero__title-en {
    font-size: 0.74rem;
    letter-spacing: 0.15em;
}

.prog-hero__title > .prog-hero__title-en:only-child {
    font-size: clamp(2.1rem, 3.4vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
    text-transform: none;
    opacity: 1;
}

.prog-hero__sub {
    max-width: 580px;
    margin-bottom: 1.35rem;
    font-size: 0.94rem;
    line-height: 1.6;
    letter-spacing: 0.025em;
}

.prog-hero__actions {
    gap: 0.65rem;
}

.prog-btn {
    min-height: 42px;
    padding: 0.65rem 1.05rem;
    border-radius: 6px;
    font-size: 0.8rem;
    box-shadow: none;
}

.prog-btn svg {
    width: 15px;
    height: 15px;
}

.prog-hero__geo {
    opacity: 0.55;
}

.about-page .prog-hero {
    min-height: 400px;
}

.about-page .prog-hero__inner {
    padding: 3rem 0;
}

/* Event destination uses a dedicated component but follows the same scale. */
.evt-hero {
    min-height: 400px;
    padding: 0;
    display: flex;
    align-items: center;
}

.evt-hero__inner {
    max-width: 610px;
    padding: 3rem 0;
}

.evt-hero__badge {
    margin-bottom: 0.8rem;
    padding: 0.38rem 0.72rem;
    border-radius: 6px;
    font-size: 0.72rem;
}

.evt-hero__title {
    margin-bottom: 0.65rem;
}

.evt-hero__title-zh {
    font-size: clamp(2.1rem, 3.4vw, 2.75rem);
    line-height: 1.12;
}

.evt-hero__title-en {
    font-size: 0.74rem;
}

.evt-hero__sub {
    margin-bottom: 1.35rem;
    font-size: 0.94rem;
}

.evt-hero__nav {
    gap: 0.65rem;
}

.evt-hero__navlink {
    min-height: 42px;
    padding: 0.65rem 1.05rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* Child destinations */
.page-hero-v2 {
    height: 250px;
    min-height: 250px;
    max-height: 250px;
    justify-content: flex-start;
}

.page-hero-v2__background {
    background-position: center;
}

.page-hero-v2__overlay {
    background:
        linear-gradient(90deg, rgba(10, 27, 48, 0.94) 0%, rgba(15, 39, 68, 0.78) 46%, rgba(15, 39, 68, 0.3) 78%, rgba(15, 39, 68, 0.12) 100%);
}

.page-hero-v2__content {
    width: min(calc(100% - 48px), 1200px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    text-align: left;
}

.page-hero-v2__badge {
    margin-bottom: 0.65rem;
    padding: 0.32rem 0.65rem;
    border-radius: 5px;
    font-size: 0.7rem;
}

.page-hero-v2__badge svg {
    width: 13px;
    height: 13px;
}

.page-hero-v2__title-zh {
    max-width: 720px;
    margin-bottom: 0.28rem;
    font-size: clamp(1.8rem, 2.8vw, 2.3rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-shadow: none;
}

html[lang="zh"] .page-hero-v2__title-zh {
    letter-spacing: 0.02em;
}

.page-hero-v2__title-en {
    max-width: 720px;
    margin-bottom: 0.45rem;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
}

.page-hero-v2__subtitle {
    max-width: 660px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
}

.section-content {
    padding: 2.75rem 0;
}

.page-layout {
    grid-template-columns: minmax(210px, 235px) minmax(0, 1fr);
    gap: 1.5rem;
}

.sidebar-card {
    top: 104px;
    padding: 1rem;
    border: 1px solid #e2e7ec;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 39, 68, 0.06);
}

.sidebar-title {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.side-nav ul {
    gap: 0.28rem;
}

.side-nav-link {
    min-height: 42px;
    padding: 0.58rem 0.72rem;
    border-radius: 7px;
    border-color: transparent;
    background: transparent;
    font-size: 0.82rem;
    line-height: 1.35;
}

.side-nav-link:hover {
    color: #0f2744;
    border-color: #dce3ea;
    background: #f4f6f8;
    box-shadow: none;
    transform: none;
}

.side-nav-link.active {
    color: #fff;
    border-color: #0f2744;
    background: #0f2744;
    box-shadow: inset 3px 0 0 #c8102e;
}

.content-card {
    padding: 1.75rem;
    border: 1px solid #e2e7ec;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 39, 68, 0.05);
}

.content-header {
    margin-bottom: 1.4rem;
    padding-bottom: 1.1rem;
}

.section-eyebrow {
    margin-bottom: 0.55rem;
    padding: 0.28rem 0.6rem;
    border-radius: 5px;
    color: #a90f29;
    background: #f9ecef;
    font-size: 0.7rem;
}

.content-header .lead {
    font-size: 1rem;
    line-height: 1.65;
}

.page-content.prose {
    font-size: 1rem;
    line-height: 1.75;
}

.content-body h2 {
    margin: 2rem 0 0.8rem;
    padding-top: 0.5rem;
    font-size: 1.55rem;
}

.content-body h3 {
    margin: 1.6rem 0 0.65rem;
    font-size: 1.22rem;
}

.content-body p {
    margin-bottom: 1rem;
}

/* Gallery list destinations use the same compact image-led child hero. */
.page-gallery-list .page-hero--compact {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
    justify-content: flex-start;
}

.page-gallery-list .page-hero__overlay {
    background:
        linear-gradient(90deg, rgba(10, 27, 48, 0.94) 0%, rgba(15, 39, 68, 0.78) 46%, rgba(15, 39, 68, 0.3) 78%, rgba(15, 39, 68, 0.12) 100%);
}

.page-gallery-list .page-hero__content {
    width: min(calc(100% - 48px), 1200px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    text-align: left;
}

.page-gallery-list .page-hero__title-zh,
.page-gallery-list .page-hero__title-en {
    max-width: 720px;
    margin-bottom: 0.4rem;
    font-size: clamp(1.8rem, 2.8vw, 2.3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-transform: none;
    text-shadow: none;
}

.page-gallery-list .page-hero__subtitle {
    max-width: 660px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    letter-spacing: 0;
}

.page-gallery-list .main-content > .section {
    padding: 3.5rem 0;
}

/* School landing page */
.school-stats {
    padding: 2rem 0;
}

.school-stats .stats-grid {
    gap: 1rem;
}

.school-stats .stat-item {
    padding: 0.55rem;
}

.school-stats .stat-number {
    font-size: 2rem;
}

.school-leadership-preview {
    padding: 3rem 0;
}

.school-leadership-preview .container {
    grid-template-columns: 180px minmax(0, 1fr) 150px;
    gap: 2rem;
}

.school-content {
    padding: 3rem 0;
}

.school-layout {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 1.5rem;
}

.school-content .sidebar-nav {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 39, 68, 0.06);
}

.school-content .sidebar-link {
    padding: 0.62rem 0.72rem;
    font-size: 0.84rem;
}

.school-main {
    gap: 1.25rem;
}

.section-card {
    padding: 1.75rem;
    border: 1px solid #e2e7ec;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 39, 68, 0.05);
}

.section-card:hover {
    border-color: #d4dce5;
    box-shadow: 0 10px 28px rgba(15, 39, 68, 0.08);
    transform: translateY(-2px);
}

.section-intro {
    margin-bottom: 1.35rem;
    font-size: 1rem;
}

.course-list {
    gap: 0.65rem;
}

.course-item {
    gap: 0.75rem;
    padding: 0.9rem;
    border-radius: 8px;
}

/* Club and post-list landing pages */
.page-chess-club .section,
.page-badminton-club .section,
.page-post-list #posts.section {
    padding: 4rem 0;
}

.chess-stats,
.badminton-stats {
    padding: 1.5rem 0;
}

.badminton-stat__number {
    font-size: 2rem;
}

.chess-intro__grid,
.badminton-intro__grid {
    gap: 2.75rem;
}

.chess-intro__grid {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.badminton-intro__grid {
    grid-template-columns: 320px minmax(0, 1fr);
}

.chess-board-decoration,
.badminton-court {
    max-width: 320px;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(15, 39, 68, 0.16);
}

.page-post-list .post-card {
    border-radius: 10px;
}

.page-post-list .post-card:hover {
    transform: translateY(-2px);
}

.page-post-list .post-card-content {
    padding: 1.1rem;
}

/* Contact destination */
.contact-page .page-hero {
    min-height: 400px;
}

.contact-page .page-hero__background {
    background-position: center;
}

.contact-page .page-hero__overlay {
    background:
        linear-gradient(90deg, rgba(10, 27, 48, 0.96) 0%, rgba(15, 39, 68, 0.86) 40%, rgba(20, 48, 80, 0.38) 72%, rgba(20, 48, 80, 0.14) 100%);
}

.contact-page .page-hero__content {
    max-width: 610px;
    margin: 0;
    padding: 3rem 0;
    text-align: left;
}

.contact-page .page-hero__badge {
    margin-bottom: 0.8rem;
    padding: 0.38rem 0.72rem;
    border-radius: 6px;
    font-size: 0.72rem;
}

.contact-page .page-hero__title-zh {
    margin-bottom: 0.3rem;
    font-size: clamp(2.1rem, 3.4vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-shadow: none;
}

html[lang="zh"] .contact-page .page-hero__title-zh {
    letter-spacing: 0.025em;
}

.contact-page .page-hero__title-en {
    margin-bottom: 0.6rem;
    font-size: 0.74rem;
}

.contact-page .page-hero__subtitle {
    font-size: 0.94rem;
}

.contact-cards-section {
    padding: 2.25rem 0 1.5rem;
}

.contact-cards-grid {
    gap: 1rem;
}

.contact-card {
    padding: 1.2rem 0.8rem;
    border-radius: 10px;
}

.contact-card:hover {
    transform: translateY(-2px);
}

.contact-card__icon {
    width: 48px;
    height: 48px;
}

.contact-card__icon svg {
    width: 22px;
    height: 22px;
}

/* Test centre keeps its editorial identity at a more disciplined scale. */
.exam-hero {
    min-height: 500px;
}

.exam-hero__content {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.exam-hero h1 {
    max-width: 740px;
    font-size: clamp(3rem, 5.4vw, 4.8rem);
    line-height: 0.92;
}

.exam-hero__lead {
    max-width: 650px;
    margin: 1.4rem 0 1.6rem;
    font-size: 1rem;
    line-height: 1.6;
}

.exam-btn {
    min-height: 46px;
    padding: 0.72rem 1.05rem;
    font-size: 0.82rem;
}

.exam-section {
    padding: 4.25rem 0;
}

.exam-info-hero {
    min-height: 260px;
    padding: 3.25rem 0;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(8, 25, 46, 0.97) 0%, rgba(8, 25, 46, 0.88) 46%, rgba(8, 25, 46, 0.38) 78%, rgba(8, 25, 46, 0.18) 100%),
        var(--exam-info-hero-image),
        var(--exam-ink);
    background-position: center;
    background-size: cover;
}

.exam-info-hero h1 {
    max-width: 760px;
    margin-bottom: 0.65rem;
    font-size: clamp(2.2rem, 4.2vw, 3.6rem);
    line-height: 1;
}

.exam-info-hero p:last-child {
    max-width: 650px;
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .page-layout,
    .school-layout {
        grid-template-columns: 1fr;
    }

    .page-sidebar,
    .school-sidebar {
        position: static;
    }

    .sidebar-card {
        position: static;
    }

    .side-nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .school-leadership-preview .container {
        grid-template-columns: 150px minmax(0, 1fr);
    }

    .leadership-preview__team {
        display: none;
    }
}

@media (max-width: 768px) {
    .prog-hero,
    .about-page .prog-hero,
    .evt-hero,
    .contact-page .page-hero {
        min-height: 340px;
    }

    .prog-hero__inner,
    .about-page .prog-hero__inner,
    .evt-hero__inner,
    .contact-page .page-hero__content {
        padding: 2rem 0;
        text-align: left;
    }

    .prog-hero__actions {
        justify-content: flex-start;
    }

    .prog-hero__title-zh,
    .prog-hero__title > .prog-hero__title-en:only-child,
    .evt-hero__title-zh,
    .contact-page .page-hero__title-zh {
        font-size: clamp(1.85rem, 8vw, 2.25rem);
    }

    .prog-hero__sub,
    .evt-hero__sub,
    .contact-page .page-hero__subtitle {
        margin-bottom: 1.05rem;
        font-size: 0.86rem;
    }

    .page-hero-v2 {
        height: 220px;
        min-height: 220px;
        max-height: 220px;
    }

    .page-hero-v2__content {
        width: min(calc(100% - 40px), 1200px);
    }

    .page-hero-v2__title-zh {
        font-size: clamp(1.55rem, 7vw, 1.9rem);
    }

    .page-hero-v2__subtitle {
        font-size: 0.82rem;
    }

    .page-gallery-list .page-hero--compact {
        height: 200px;
        min-height: 200px;
        max-height: 200px;
    }

    .page-gallery-list .page-hero__content {
        width: min(calc(100% - 40px), 1200px);
    }

    .page-gallery-list .page-hero__title-zh,
    .page-gallery-list .page-hero__title-en {
        font-size: clamp(1.55rem, 7vw, 1.9rem);
    }

    .page-gallery-list .main-content > .section {
        padding: 3rem 0;
    }

    .section-content,
    .school-content {
        padding: 2.25rem 0;
    }

    .content-card,
    .section-card {
        padding: 1.25rem;
    }

    .side-nav ul {
        grid-template-columns: 1fr;
    }

    .school-stats {
        padding: 1.5rem 0;
    }

    .school-leadership-preview {
        padding: 2.5rem 0;
    }

    .school-leadership-preview .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .leadership-preview__portrait {
        max-width: 150px;
    }

    .page-chess-club .section,
    .page-badminton-club .section,
    .page-post-list #posts.section {
        padding: 3rem 0;
    }

    .chess-intro__grid,
    .badminton-intro__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .exam-hero {
        min-height: 500px;
    }

    .exam-hero__content {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .exam-hero h1 {
        font-size: clamp(2.7rem, 11vw, 3.5rem);
    }

    .exam-section {
        padding: 3.5rem 0;
    }

    .exam-info-hero {
        min-height: 230px;
        padding: 2.5rem 0;
    }

    .exam-info-hero h1 {
        font-size: clamp(2rem, 9vw, 2.7rem);
    }
}

@media (max-width: 620px) {
    .exam-hero {
        min-height: 520px;
    }

    .exam-hero__actions {
        gap: 0.55rem;
    }
}
