/* ==========================================================================
   SFS Academy — inner pages
   A plain, readable frame for the pages carried over from the existing
   website. These pages have not been redesigned yet.
   ========================================================================== */

.page-banner {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
    background: var(--navy-900);
    color: var(--white);
}

.page-banner__title {
    max-width: 22ch;
    font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--white);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.breadcrumb li + li::before {
    content: "/";
    margin-right: 0.5rem;
    color: var(--orange-500);
}

.breadcrumb a {
    display: inline-block;
    padding-block: 0.375rem;
    color: inherit;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--saffron-400);
}

.page {
    padding-block: clamp(3rem, 7vw, 5.5rem);
}

.page__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: 3rem clamp(2.5rem, 6vw, 5.5rem);
    align-items: start;
}

.page__aside {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    background: var(--cream);
}

.page__aside-title {
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--indigo-700);
}

.page__aside a {
    display: block;
    padding-block: 0.625rem;
    border-top: 1px solid var(--line);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
    text-decoration: none;
}

.page__aside a:hover,
.page__aside a[aria-current="page"] {
    color: var(--indigo-700);
}

.page__aside a[aria-current="page"] {
    font-weight: 800;
}

/* Prose */

.prose {
    max-width: 46rem;
}

.prose > * + * {
    margin-top: 1.25rem;
}

.prose h2 {
    margin-top: 2.5rem;
    font-size: 1.625rem;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin-top: 2rem;
}

.prose ul,
.prose ol {
    padding-left: 1.375rem;
}

.prose li + li {
    margin-top: 0.625rem;
}

.prose li::marker {
    font-weight: 700;
    color: var(--orange-600);
}

.prose a {
    color: var(--indigo-700);
    font-weight: 600;
}

.prose blockquote {
    padding-left: 1.5rem;
    border-left: 3px solid var(--orange-500);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: var(--ink);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
}

.prose th,
.prose td {
    padding: 0.875rem 1rem 0.875rem 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.prose th {
    width: 38%;
    font-weight: 700;
    color: var(--ink);
}

.prose .closing {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--indigo-700);
}

/* People (founder, patron, management, PTA) */

.portrait {
    float: right;
    width: 11rem;
    margin: 0 0 1.25rem 2rem;
}

.portrait img {
    width: 100%;
    border-radius: 50%;
}

.people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 2rem;
    padding: 0;
    list-style: none;
}

.people li {
    margin: 0;
}

.people img {
    width: 100%;
    border-radius: var(--radius);
}

.people figcaption {
    margin-top: 0.875rem;
    line-height: 1.4;
}

.people figcaption strong {
    display: block;
    color: var(--ink);
}

.people--wide {
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
}

/* Contact */

.contact-list {
    display: grid;
    gap: 1.5rem;
    padding: 0;
    list-style: none;
}

.contact-list li {
    display: flex;
    gap: 1rem;
    margin: 0;
}

.contact-list .icon {
    margin-top: 0.3rem;
    color: var(--orange-600);
}

.contact-list strong {
    display: block;
    color: var(--ink);
}

/* Link list on the About page */

.link-list {
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.link-list li {
    margin: 0;
}

.link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.875rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.link-list a:hover {
    color: var(--indigo-700);
}

/* Gallery */

.album + .album {
    margin-top: clamp(3rem, 7vw, 5rem);
}

.album {
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.album__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--ink);
}

.album__head h2 {
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);
}

.album__head p {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--orange-600);
}

.album__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.album__grid a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--sand);
}

.album__grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}

.album__grid a:hover img {
    transform: scale(1.03);
}

@media (max-width: 899.98px) {
    .page__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .page__aside {
        position: static;
    }

    .album__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 599.98px) {
    .portrait {
        float: none;
        margin: 0 0 1.5rem;
    }

    .prose th,
    .prose td {
        display: block;
        width: 100%;
    }

    .prose th {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .prose td {
        padding-top: 0.25rem;
    }
}

/* School timings table: navy header, icon rows, tinted first column. */
.timings {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--white);
    box-shadow: 0 18px 36px -28px rgba(11, 31, 77, 0.4);
}

.prose .timings__table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
}

.timings__table thead th {
    padding: 1.125rem 1.5rem;
    border: 0;
    background: var(--navy-800);
    font-size: 1.125rem;
    font-weight: 700;
    text-align: left;
    color: var(--white);
}

.timings__table thead th:first-child {
    width: 38%;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.timings__table tbody tr + tr > * {
    border-top: 1px solid var(--line);
}

.timings__table tbody th,
.timings__table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    font-size: 1rem;
    line-height: 1.55;
    color: #2c3a57;
}

.timings__table tbody th {
    display: table-cell;
    background: #e6f4f6;
    text-align: left;
    font-weight: 700;
    color: var(--navy-900);
}

.timings__table tbody th > span {
    display: inline-block;
    vertical-align: middle;
}

.timings__icon {
    display: inline-grid !important;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-right: 1rem;
    border-radius: 50%;
    background: #bfeaec;
    color: #0e7c8a;
}

@media (max-width: 640px) {
    .timings__table thead th,
    .timings__table tbody th,
    .timings__table tbody td {
        padding: 0.875rem 1rem;
    }

    .timings__table thead th:first-child {
        width: 46%;
    }

    .timings__icon {
        width: 2.25rem;
        height: 2.25rem;
        margin-right: 0.625rem;
    }

    .timings__icon .icon {
        width: 18px;
        height: 18px;
    }
}

/* Pages shown without the side menu use the full width. */
.page__grid--single {
    grid-template-columns: minmax(0, 1fr);
}

.page__grid--single .prose {
    max-width: none;
}

.page-banner__lead {
    max-width: 40rem;
    margin-top: 1rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.86);
}

/* ---- Inner-page banner, in the style of the home page hero ---- */
.page-banner {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem);
    background: linear-gradient(120deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
}

/* The photograph fills the whole banner and shows clearly. */
.page-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--banner-img, url("../img/home/campus-front-elevation-1278.webp")) center center / cover no-repeat;
}

/* A see-through navy layer, strongest behind the text, so the title stays readable and the photograph still shows. */
.page-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(7, 20, 47, 0.78) 0%, rgba(11, 31, 77, 0.5) 50%, rgba(11, 31, 77, 0.12) 100%);
}

.page-banner .container { position: relative; }

.page-banner__title {
    position: relative;
    max-width: 24ch;
    padding-top: 1.25rem;
}

.page-banner__title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3rem;
    height: 3px;
    border-radius: 2px;
    background: var(--orange-500);
}

.breadcrumb ol { margin-bottom: 1.25rem; }

.page-banner__lead { max-width: 38rem; }

@media (max-width: 760px) {
    .page-banner::after { background: linear-gradient(90deg, rgba(7, 20, 47, 0.78) 0%, rgba(11, 31, 77, 0.55) 100%); }
}

/* Taller inner-page banner: its height follows the height of the browser window. */
.page-banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 70vh;
    min-height: 70svh;
}

@media (max-width: 760px) {
    .page-banner { min-height: 48vh; min-height: 48svh; }
}

/* School timings on phones: the general prose rule stacks every table cell, which breaks this
   two-column table. Keep it as a table and let the text wrap inside the cells. */
@media (max-width: 599.98px) {
    .prose .timings__table { table-layout: fixed; }

    .prose .timings__table th,
    .prose .timings__table td {
        display: table-cell;
        width: auto;
        padding: 0.875rem 0.75rem;
        border-bottom: 0;
        overflow-wrap: anywhere;
    }

    .prose .timings__table tbody tr + tr > * { border-top: 1px solid var(--line); }

    .timings__table thead th,
    .timings__table tbody th { font-size: 0.9375rem; }

    .timings__table tbody td { font-size: 0.9375rem; }

    .timings__table thead th:first-child { width: 46%; }

    .timings__table tbody th {
        display: table-cell;
        text-align: left;
    }

    /* The round icon sits above the label so a long label has the full cell width. */
    .timings__icon {
        display: grid !important;
        margin: 0 0 0.375rem;
    }

    .timings__table tbody th > span { display: block; }
}
