/* ================================================================
   PAGE DETAIL
   ================================================================ */

.page-detail {
    --page-navy: #071a2f;
    --page-blue: #0871b9;
    --page-blue-light: #52a9df;
    --page-gold: #d8ad4a;
    --page-text: #172033;
    --page-muted: #5a6878;
    --page-border: #d8e2ec;
    --page-surface: #ffffff;
    --page-surface-soft: #f3f7fb;

    background: var(--page-surface);
}


/* ================================================================
   HERO
   ================================================================ */

.page-detail__hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(3.5rem, 7vw, 6rem);
    border-bottom: 1px solid var(--page-border);
    color: #ffffff;
    background:
        radial-gradient(
            circle at 84% 18%,
            rgb(82 169 223 / 18%),
            transparent 24rem
        ),
        linear-gradient(
            125deg,
            #0a2139,
            #061525 70%
        );
}

.page-detail__hero::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 0.22rem;
    background:
        linear-gradient(
            90deg,
            var(--page-blue),
            var(--page-blue-light),
            var(--page-gold)
        );
    content: "";
}

.page-detail__hero-container {
    position: relative;
    z-index: 1;
}


/* ================================================================
   BREADCRUMB
   ================================================================ */

.page-detail__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 2rem;
    color: #c7d4e1;
    font-size: 0.9rem;
    line-height: 1.5;
}

.page-detail__breadcrumb a {
    color: #ffffff;
    font-weight: 700;
    text-decoration-color: var(--page-blue-light);
    text-decoration-thickness: 0.1rem;
    text-underline-offset: 0.2rem;
}

.page-detail__breadcrumb a:hover {
    color: var(--page-blue-light);
}

.page-detail__breadcrumb a:focus-visible {
    border-radius: 0.2rem;
    outline: 0.18rem solid var(--page-gold);
    outline-offset: 0.2rem;
}


/* ================================================================
   HERO HEADING
   ================================================================ */

.page-detail__heading {
    max-width: 58rem;
}

.page-detail__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 1.2rem;
    color: var(--page-blue-light);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.4;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.page-detail__eyebrow::before {
    width: 2.6rem;
    height: 0.16rem;
    flex: 0 0 2.6rem;
    border-radius: 999px;
    background: var(--page-gold);
    content: "";
}

.page-detail__title {
    max-width: 14ch;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    font-weight: 850;
    line-height: 1.06;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.page-detail__summary {
    max-width: 50rem;
    margin: 1.5rem 0 0;
    color: #d6e1ec;
    font-size: clamp(1.05rem, 1.7vw, 1.22rem);
    line-height: 1.8;
}


/* ================================================================
   CONTENT
   ================================================================ */

.page-detail__content-section {
    position: relative;
    padding-block: clamp(4rem, 8vw, 7rem);
    background:
        linear-gradient(
            90deg,
            #ffffff 0%,
            #ffffff 72%,
            var(--page-surface-soft) 72%,
            var(--page-surface-soft) 100%
        );
}

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


/* ================================================================
   ARTICLE
   ================================================================ */

.page-detail__article {
    width: 100%;
    max-width: 58rem;
    box-sizing: border-box;
    padding: clamp(2rem, 4vw, 3.5rem);
    border: 1px solid var(--page-border);
    border-radius: 1.25rem;
    background: rgb(255 255 255 / 97%);
    box-shadow:
        0 1.5rem 4rem rgb(7 26 47 / 8%),
        inset 0 1px 0 rgb(255 255 255 / 90%);
}


/* ================================================================
   APPLICATION FORM INTEGRATION
   ================================================================ */

.page-detail .application-form-section {
    width: 100%;
    max-width: 58rem;
    box-sizing: border-box;
    margin-top: 2rem;
}

.page-detail .application-form-shell {
    width: 100%;
}


/* ================================================================
   RICH TEXT
   ================================================================ */

.page-detail .rich-text {
    color: var(--page-text);
    font-size: 1.04rem;
    line-height: 1.9;
}

.page-detail .rich-text > *:first-child {
    margin-top: 0;
}

.page-detail .rich-text > *:last-child {
    margin-bottom: 0;
}

.page-detail .rich-text p {
    margin: 0 0 1.35rem;
}


/* ================================================================
   RICH TEXT HEADINGS
   ================================================================ */

.page-detail .rich-text h2,
.page-detail .rich-text h3,
.page-detail .rich-text h4 {
    color: var(--page-navy);
    font-weight: 850;
    line-height: 1.25;
    text-wrap: balance;
}

.page-detail .rich-text h2 {
    margin: 2.6rem 0 1rem;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
}

.page-detail .rich-text h3 {
    margin: 2.2rem 0 0.9rem;
    font-size: clamp(1.4rem, 2.3vw, 1.75rem);
}

.page-detail .rich-text h4 {
    margin: 1.8rem 0 0.75rem;
    font-size: 1.15rem;
}


/* ================================================================
   RICH TEXT LISTS
   ================================================================ */

.page-detail .rich-text ul,
.page-detail .rich-text ol {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0 1.6rem;
    padding-left: 1.5rem;
}

.page-detail .rich-text li {
    padding-left: 0.35rem;
}

.page-detail .rich-text li::marker {
    color: var(--page-blue);
    font-weight: 850;
}


/* ================================================================
   RICH TEXT STRONG / LINKS
   ================================================================ */

.page-detail .rich-text strong {
    color: var(--page-navy);
    font-weight: 850;
}

.page-detail .rich-text a {
    color: var(--page-blue);
    font-weight: 750;
    text-decoration-thickness: 0.1rem;
    text-underline-offset: 0.2rem;
}

.page-detail .rich-text a:hover {
    color: var(--page-navy);
}

.page-detail .rich-text a:focus-visible {
    border-radius: 0.2rem;
    outline: 0.18rem solid var(--page-gold);
    outline-offset: 0.2rem;
}


/* ================================================================
   BLOCKQUOTE
   ================================================================ */

.page-detail .rich-text blockquote {
    margin: 2rem 0;
    padding: 1.2rem 1.4rem;
    border-left: 0.35rem solid var(--page-blue);
    border-radius: 0 0.75rem 0.75rem 0;
    background: #f2f7fb;
    color: var(--page-text);
}

.page-detail .rich-text blockquote p:last-child {
    margin-bottom: 0;
}


/* ================================================================
   CONTENT NOTE
   ================================================================ */

.page-detail .rich-text .content-note {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid #bfd0df;
    border-left: 0.35rem solid var(--page-gold);
    border-radius: 0.85rem;
    background: #f7f9fc;
}

.page-detail .rich-text .content-note h2,
.page-detail .rich-text .content-note h3,
.page-detail .rich-text .content-note h4 {
    margin-top: 0;
}

.page-detail .rich-text .content-note p:last-child {
    margin-bottom: 0;
}


/* ================================================================
   IMAGES
   ================================================================ */

.page-detail .rich-text img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-block: 2rem;
    border-radius: 0.85rem;
}

.page-detail .rich-text figure {
    margin: 2rem 0;
}

.page-detail .rich-text figcaption {
    margin-top: 0.7rem;
    color: var(--page-muted);
    font-size: 0.875rem;
    line-height: 1.6;
    text-align: center;
}


/* ================================================================
   TABLES
   ================================================================ */

.page-detail .rich-text table {
    width: 100%;
    margin-block: 2rem;
    border-collapse: collapse;
}

.page-detail .rich-text th,
.page-detail .rich-text td {
    padding: 0.85rem;
    border: 1px solid var(--page-border);
    text-align: left;
    vertical-align: top;
}

.page-detail .rich-text th {
    color: var(--page-navy);
    background: #eef4f9;
    font-weight: 850;
}


/* ================================================================
   CONTACT PAGE
   ================================================================ */

.page-detail .rich-text .contact-map {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-top: 1.5rem;
    border: 1px solid var(--page-border);
    border-radius: 1rem;
    background: #eef4f9;
    box-shadow: 0 1rem 2.5rem rgb(7 26 47 / 8%);
}

.page-detail .rich-text .contact-map iframe {
    display: block;
    width: 100%;
    height: clamp(20rem, 50vw, 30rem);
    border: 0;
}


/* ================================================================
   TABLET
   ================================================================ */

@media (max-width: 900px) {
    .page-detail__content-section {
        background: var(--page-surface-soft);
    }

    .page-detail__article,
    .page-detail .application-form-section {
        max-width: none;
    }

    .page-detail__title {
        max-width: 16ch;
    }
}


/* ================================================================
   MOBILE
   ================================================================ */

@media (max-width: 600px) {
    .page-detail__hero {
        padding-block: 3rem;
    }

    .page-detail__breadcrumb {
        margin-bottom: 1.5rem;
        font-size: 0.85rem;
    }

    .page-detail__title {
        font-size: clamp(2.45rem, 12vw, 3.6rem);
        line-height: 1.08;
    }

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

    .page-detail__content-section {
        padding-block: 3.5rem;
    }

    .page-detail__article {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .page-detail .application-form-section {
        margin-top: 1.5rem;
    }

    .page-detail .rich-text {
        font-size: 1rem;
        line-height: 1.8;
    }

    .page-detail .rich-text table {
        display: block;
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }

    .page-detail .rich-text .contact-map {
        border-radius: 0.75rem;
    }

    .page-detail .rich-text .contact-map iframe {
        height: 22rem;
    }
}


/* ================================================================
   FORCED COLORS / HIGH CONTRAST
   ================================================================ */

@media (forced-colors: active) {
    .page-detail__hero,
    .page-detail__article,
    .page-detail .rich-text blockquote,
    .page-detail .rich-text .content-note,
    .page-detail .rich-text th,
    .page-detail .rich-text td,
    .page-detail .rich-text .contact-map {
        border-color: CanvasText;
    }

    .page-detail__hero::after,
    .page-detail__eyebrow::before {
        background: CanvasText;
    }

    .page-detail .rich-text .contact-map {
        border-width: 2px;
    }
}


/* ================================================================
   REDUCED MOTION
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
    .page-detail *,
    .page-detail *::before,
    .page-detail *::after {
        scroll-behavior: auto !important;
    }
}