/* ==========================
   Simple Content Page
   ========================== */
/* Shared hero + card-block pattern for the site's main pages (all but
   home - Calendar, Members' Board, Scholarship, About, ...). The hero is
   one navy band, kept short so the page's content starts near the top,
   especially on a phone. */

/* The same height on every page: room for the title and two lines of
   lede (three on phones), centered. Keep ledes to about 110 characters
   so they fit - anything more (instructions, buttons, facts) belongs in
   the page below. A longer one still shows in full; that header just
   grows. */
.page-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-height: 11rem;
    padding: 1.75rem 0;

    background: var(--color-secondary);

    color: #fff;
    text-align: center;
}

.page-hero h1 {
    margin-bottom: 0.5rem;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    line-height: 1.15;
}

.page-lede {
    max-width: 40rem;
    margin: 0 auto;

    color: rgb(255 255 255 / 90%);
    font-size: 1.05rem;
    line-height: 1.55;
}

/* The same band over a photo (About - its about_background_image, set
   inline) - tinted navy so the text stays readable and it still reads
   as the same header as every other page. */
.page-hero-image {
    position: relative;
    isolation: isolate;

    background-size: cover;
    background-position: center;
}

.page-hero-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background: rgb(17 52 86 / 84%);
}

.page-body {
    padding: 3.5rem 0 4rem;
    background: #f8fafc;
}

/* A line of how-it-works help at the top of a page's body - what would
   make the header's lede too long. */
.page-note {
    max-width: 48rem;
    margin: 0 auto 1.25rem;

    color: #475569;
    font-size: 0.9rem;
    text-align: center;
}

.page-block {
    max-width: 42rem;
    margin: 0 auto 1.5rem;
    padding: 1.75rem 2rem;

    background: #fff;
    border: 1px solid rgb(17 52 86 / 10%);
    border-top: 3px solid var(--color-primary);
    border-radius: 12px;

    box-shadow: 0 4px 12px rgb(17 52 86 / 6%);
}

.page-block:last-child {
    margin-bottom: 0;
}

.page-block h2 {
    margin: 0 0 0.75rem;
    color: var(--color-secondary);
    font-size: 1.2rem;
}

.page-block p {
    margin: 0 0 1rem;
    color: #475569;
    line-height: 1.6;
}

.page-block p:last-child {
    margin-bottom: 0;
}

/* A link in the middle of the text (e.g. {% resource_link %}) - marked
   so it reads as one. */
.page-block p a {
    color: var(--color-secondary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-block p a:hover {
    color: var(--color-primary);
}

.page-list {
    margin: 0 0 1rem;
    padding-left: 1.2rem;

    color: #475569;
    line-height: 1.6;
}

.page-list li {
    margin-bottom: 0.4rem;
}

.page-list:last-child {
    margin-bottom: 0;
}

.page-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;

    padding: 0.75rem 1.5rem;
    margin-top: 0.25rem;

    background: var(--color-primary);
    border-radius: 6px;

    color: #fff;
    font-weight: 700;
    text-decoration: none;

    transition: background .2s ease;
}

.page-cta:hover {
    background: var(--color-secondary);
}

.page-link {
    display: inline-block;
    color: var(--color-secondary);
    font-weight: 700;
    text-decoration: none;
}

.page-link:hover {
    color: var(--color-primary);
}

/* Phones: less padding around and inside the blocks, so the text gets
   the width. */
@media (max-width: 600px) {
    .page-hero {
        min-height: 9.25rem;
        padding: 1.2rem 0;
    }

    .page-lede {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .page-body {
        padding: 2rem 0 3rem;
    }

    .page-block {
        padding: 1.35rem 1.25rem;
    }
}

/* ---- Tabs between related pages (Inbox | Sent, Users | Applications) ----
   A bar of tabs, the current one underlined, with an optional action
   button (.page-tabs-action) at the right end. */

.page-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.5rem;

    margin-bottom: 1.5rem;

    border-bottom: 2px solid rgb(17 52 86 / 10%);
}

.page-tabs {
    display: flex;
    gap: 0.25rem;
    /* Sit on the bar's bottom border, so the current tab's underline
       replaces it. */
    margin-bottom: -2px;
}

.page-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;

    padding: 0.6rem 1rem;

    border-bottom: 3px solid transparent;

    color: #64748b;
    font-weight: 700;
}

.page-tab:hover {
    color: var(--color-secondary);
}

.page-tab.active {
    border-bottom-color: var(--color-primary);
    color: var(--color-secondary);
}

/* Right-aligned, and lifted off the tabs' line. */
.page-tabs-action {
    margin: 0 0 0.6rem auto;
}

/* Phones: the action button on its own row, full width, above the tabs. */
@media (max-width: 600px) {
    .page-tabs-bar {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .page-tabs-action {
        margin: 0;
        text-align: center;
    }
}

/* ---- Pages of a long list (components/pagination.html) ---- */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.25rem;

    margin-top: 1.25rem;
}

.pagination-link {
    color: var(--color-secondary);
    font-weight: 700;
}

.pagination-link:hover {
    color: var(--color-primary);
}

.pagination-current {
    color: #64748b;
    font-size: 0.9rem;
}
