/*
 * Academy programme (single of the CPT "programme")
 * Same grid as the rest of the site: 5 columns inside the container, 16px gap, c = (100% - 64px) / 5.
 * The content of the sections starts in column 2; column 1 holds the sticky side navigation.
 */

/* ── Shared ─────────────────────────────────────────────────────────────── */
.pg-head { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.pg-title { margin: 0; font-size: clamp(56px, 6.111vw, 88px); }
.pg-title--xl { font-size: clamp(72px, 7.222vw, 104px); }
.pg-fig { margin: 0; overflow: hidden; }
.pg-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-mono { margin: 0; font-family: var(--font-mono); color: var(--color-muted); }
.pg-medium { font-weight: var(--fw-medium); }
.pg-lead { margin: 0; font-size: var(--fs-lead); font-weight: var(--fw-medium); line-height: var(--line-height); letter-spacing: var(--ls-tight); }
.pg-name { margin: 0; font-size: var(--fs-lead); font-weight: var(--fw-medium); line-height: var(--line-height); letter-spacing: var(--ls-tight); }
.pg-num { text-align: left; }
.is-dark .pg-mono { color: var(--color-on-dark-faint); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.pg-hero { padding: 48px 0 150px; }
.pg-hero__grid {
    display:               grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap:            16px;
    row-gap:               62px;
    align-items:           start;
}
.pg-hero__head { grid-column: 1 / 6; grid-row: 1; }
.pg-hero__intro { grid-column: 1 / 3; grid-row: 2; display: flex; flex-direction: column; gap: 16px; }
.pg-hero__intro p { margin: 0; }
.pg-hero__actions { grid-column: 4 / 6; grid-row: 2; align-self: end; display: flex; align-items: center; gap: 16px; }
.pg-hero__actions .btn:not(.btn--link) { flex: 0 0 calc((100% - 16px) / 2); }
.pg-hero__actions .btn--link { flex: 1; justify-content: flex-start; }

.pg-facts {
    grid-column:           1 / 6;
    grid-row:              3;
    display:               grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap:            16px;
    margin:                -6px 0 0;
    padding:               24px 0;
    border-top:            1px solid rgba(14, 14, 16, .12);
    border-bottom:         1px solid rgba(14, 14, 16, .12);
}
.pg-facts > div { display: flex; flex-direction: column; gap: 4px; }
.pg-facts dt, .pg-facts dd { margin: 0; }
.pg-facts dd { font-size: var(--fs-lead); font-weight: var(--fw-semibold); line-height: var(--line-height); letter-spacing: -0.02em; }
.pg-hero__figure { grid-column: 1 / 6; grid-row: 4; height: 600px; margin-top: -38px; }

/* ── Sections: side navigation + groups ─────────────────────────────────── */
.pg-sections { position: relative; }

/* Desktop: the list of links sticks in column 1 and follows the page. The nav layer covers all the sections, so the sticky list
   stays inside them and stops at the end of the last section (it never runs onto the footer). It is white with "difference"
   blending: dark on the light sections, light on the dark ones. */
.pg-nav {
    position:       absolute;
    inset:          0;
    z-index:        6;
    color:          #fff;
    mix-blend-mode: difference;
    pointer-events: none;
}
.pg-nav .container { height: 100%; }
.pg-nav__current { display: none; }
.pg-nav__list {
    position:       sticky;
    top:            96px;
    width:          calc((100% - 64px) / 5);
    margin:         0 0 300px; /* the list stops 300px before the end of the last section (= the gap above the footer) */
    padding:        0;
    list-style:     none;
    display:        flex;
    flex-direction: column;
    gap:            16px;
    pointer-events: auto;
}
.pg-nav__list a { display: block; color: inherit; opacity: .6; text-decoration: none; transition: opacity var(--transition); }
.pg-nav__list a:hover { opacity: 1; }
.pg-nav__list a.is-active { font-weight: var(--fw-semibold); opacity: 1; }

.pg-group { position: relative; }
.pg-group--dark { padding: 300px 0; margin-bottom: 300px; }
.pg-group--dark > .grid-lines { z-index: 0; }
.pg-group--dark .pg-section { position: relative; z-index: 1; }
.pg-group--dark .pg-section:last-child { padding-bottom: 0; }
.pg-section { padding: 0 0 300px; }
.pg-group--dark .pg-section + .pg-section { padding-top: 300px; }
.pg-group:last-child .pg-section:last-child { padding-bottom: 300px; }

.pg-grid {
    display:               grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap:            16px;
    row-gap:               72px;
    align-items:           start;
}
.pg-grid__head { grid-column: 2 / 6; grid-row: 1; }
.pg-grid > p, .pg-grid p { max-width: none; }
.pg-section p { margin-top: 0; }

/* ── Overview ───────────────────────────────────────────────────────────── */
.pg-overview__note { grid-column: 2; grid-row: 2; margin-top: 5px; }
.pg-overview__text { grid-column: 4 / 6; grid-row: 2; display: flex; flex-direction: column; gap: 32px; }
.pg-overview__text p { margin: 0; }
.pg-stages {
    grid-column:           2 / 6;
    grid-row:              3;
    display:               grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap:            16px;
    margin:                -16px 0 0;
    padding:               56px 0 0;
    list-style:            none;
    border-top:            1px solid rgba(14, 14, 16, .12);
}
.pg-stages li { display: flex; flex-direction: column; gap: 24px; }
.pg-stages p { margin: 0; }
.pg-stages .pg-num { text-align: right; }
.pg-stages .pg-name + p { margin-top: -16px; }

/* ── Who it is for ──────────────────────────────────────────────────────── */
.pg-who__list {
    grid-column:           2 / 6;
    grid-row:              2;
    display:               grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap:            16px;
    row-gap:               48px;
    margin:                0;
    padding:               0;
    list-style:            none;
}
.pg-who__list li { display: flex; flex-direction: column; gap: 14px; }
.pg-who__list li:nth-child(4) { grid-column: 2; }
.pg-who__list p { margin: 0; }
.pg-who__foot {
    grid-column:           2 / 6;
    grid-row:              3;
    display:               grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap:            16px;
    margin-top:            -20px;
    padding-top:           52px;
    border-top:            1px solid rgba(255, 255, 255, .12);
}
.pg-who__note { grid-column: 1; }
.pg-who__text { grid-column: 2 / 4; margin: 0; }

/* ── Learning outcomes ──────────────────────────────────────────────────── */
.pg-outcomes__side { grid-column: 2; grid-row: 2; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.pg-outcomes__figure { height: 288px; }
.pg-outcomes__list { grid-column: 4 / 6; grid-row: 2; display: flex; flex-direction: column; gap: 64px; margin: 0; padding: 0; list-style: none; }
.pg-outcomes__list li { display: grid; grid-template-columns: 24px 212px minmax(0, 1fr); column-gap: 17px; align-items: start; }
.pg-outcomes__list p { margin: 0; }

/* ── Curriculum (accordion) ─────────────────────────────────────────────── */
.pg-curriculum__note { grid-column: 2 / 6; grid-row: 2; margin-bottom: -40px; }
.pg-modules { grid-column: 2 / 5; grid-row: 3; display: flex; flex-direction: column; margin-top: -8px; }
.pg-module { padding: 0 0 24px; border-bottom: 1px solid rgba(14, 14, 16, .12); }
.pg-module + .pg-module { padding-top: 24px; }
.pg-module:last-child { padding-bottom: 0; border-bottom: 0; }
.pg-module__title { margin: 0; }
.pg-module__toggle {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             16px;
    width:           100%;
    padding:         0;
    font:            inherit;
    font-size:       var(--fs-title);
    font-weight:     var(--fw-medium);
    line-height:     var(--line-height);
    letter-spacing:  var(--ls-tight);
    text-align:      left;
    color:           var(--color-text);
    background:      none;
    border:          0;
    cursor:          pointer;
}
.pg-module__toggle--static { cursor: default; }
.pg-module__icon { flex: 0 0 24px; transition: rotate .3s ease; }
.pg-module.is-open .pg-module__icon { rotate: 90deg; }
.pg-module__toggle:hover .pg-module__icon { opacity: .6; }
.pg-module__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.pg-module.is-open .pg-module__panel { grid-template-rows: 1fr; }
.pg-module__body { display: flex; flex-direction: column; gap: 16px; min-height: 0; overflow: hidden; opacity: 0; transition: opacity .3s ease; }
.pg-module.is-open .pg-module__body { padding-top: 17px; opacity: 1; }
.pg-module__body p { margin: 0; }
.pg-module__practical { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; border-top: 1px solid rgba(14, 14, 16, .12); }

/* ── Project showcase ───────────────────────────────────────────────────── */
.pg-project__list {
    grid-column:           2 / 6;
    grid-row:              2;
    display:               grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap:            16px;
    row-gap:               32px;
    margin:                0;
    padding:               0;
    list-style:            none;
}
.pg-project__list li { display: flex; flex-direction: column; gap: 20px; padding-bottom: 32px; border-bottom: 1px solid rgba(14, 14, 16, .12); }
.pg-project__item { display: flex; flex-direction: column; gap: 14px; }
.pg-project__item p, .pg-project__list p { margin: 0; }
.pg-project__note { grid-column: 4; grid-row: 3; margin-top: -24px; }

/* ── Learning experience ────────────────────────────────────────────────── */
.pg-experience__figure { grid-column: 2 / 5; grid-row: 2; height: 300px; }
.pg-experience__text { grid-column: 5; grid-row: 2; display: flex; flex-direction: column; gap: 24px; }
.pg-experience__text p { margin: 0; }
.pg-experience__steps {
    grid-column:           2 / 5;
    grid-row:              3;
    display:               grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap:            16px;
    row-gap:               56px;
    margin:                0;
    padding:               0;
    list-style:            none;
}
.pg-experience__steps li { display: flex; flex-direction: column; gap: 14px; }
.pg-experience__steps p { margin: 0; }
.pg-experience__steps .pg-num { margin-bottom: 10px; }

/* ── Details ────────────────────────────────────────────────────────────── */
.pg-details__note { grid-column: 2 / 4; grid-row: 2; margin: 0; font-size: var(--fs-lead); line-height: 1.55; }
.pg-table { grid-column: 2 / 6; grid-row: 3; margin: -24px 0 0; }
.pg-table__row { display: grid; grid-template-columns: 360px minmax(0, 1fr); column-gap: 24px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.pg-table__row dt, .pg-table__row dd { margin: 0; }
.pg-table__row dt { color: var(--color-on-dark-muted); }
.pg-table__row dd { font-size: var(--fs-lead); font-weight: var(--fw-semibold); line-height: 1.55; letter-spacing: -0.012em; }

/* ── Boötes Academy ─────────────────────────────────────────────────────── */
.pg-academy__side { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: 16px; }
.pg-academy__figure { height: 104px; }
.pg-academy__text { grid-column: 4 / 6; grid-row: 2; display: flex; flex-direction: column; gap: 20px; }
.pg-academy__text p { margin: 0; }

/* ── Career relevance ───────────────────────────────────────────────────── */
.pg-career__list { grid-column: 2 / 4; grid-row: 2; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.pg-career__list li { display: flex; flex-direction: column; gap: 24px; padding: 0 0 24px; border-bottom: 1px solid rgba(14, 14, 16, .12); }
.pg-career__list li + li { padding-top: 24px; }
.pg-career__list li:last-child { padding-bottom: 0; border-bottom: 0; }
.pg-career__list p { margin: 0; }
.pg-career__list .pg-name + p { margin-top: -8px; }
.pg-career__note { grid-column: 5; grid-row: 2; display: flex; flex-direction: column; gap: 16px; }
.pg-career__note p { margin: 0; }

/* ── Contact ────────────────────────────────────────────────────────────── */
.pg-contact__text { grid-column: 2; grid-row: 2; }
.pg-contact__form.contact-page { grid-column: 4 / 6; grid-row: 2; min-width: 0; padding: 0; }

/* ── Tablet / mobile ────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .pg-title,
    .pg-title--xl { font-size: 48px; }
    .pg-title--xl { font-size: 56px; }

    .pg-hero { padding: 40px 0 64px; }
    .pg-hero__grid { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
    .pg-hero__actions { flex-direction: column; align-items: stretch; gap: 16px; }
    .pg-hero__actions .btn:not(.btn--link) { flex: none; }
    .pg-hero__actions .btn--link { justify-content: center; }
    .pg-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; margin: 0; }
    .pg-hero__figure { height: 360px; margin: 0; }

    /* Navigation: a bar under the header with the current section and a drop-down list */
    .pg-nav { position: sticky; inset: auto; top: 72px; height: auto; color: var(--color-text); mix-blend-mode: normal; background: var(--color-light); border-bottom: 1px solid rgba(14, 14, 16, .08); pointer-events: auto; }
    .pg-nav .container { position: relative; height: auto; }
    .pg-nav__current {
        display:         flex;
        align-items:     center;
        justify-content: space-between;
        width:           100%;
        padding:         14px 0;
        font:            inherit;
        font-weight:     var(--fw-semibold);
        color:           var(--color-text);
        background:      none;
        border:          0;
        cursor:          pointer;
    }
    .pg-nav__current svg { transition: rotate .25s ease; }
    .pg-nav__current[aria-expanded="true"] svg { rotate: 180deg; }
    .pg-nav__list {
        display:    none;
        position:   absolute;
        top:        100%;
        left:       var(--container-padding);
        right:      var(--container-padding);
        z-index:    2;
        width:      auto;
        margin:     0;
        padding:    16px 0;
        gap:        16px;
        background: var(--color-light);
        border-bottom: 1px solid rgba(14, 14, 16, .08);
    }
    .pg-nav.is-open .pg-nav__list { display: flex; }

    .pg-group--dark { padding: 104px 0; margin-bottom: 104px; }
    .pg-section { padding-bottom: 104px; }
    .pg-group--dark .pg-section + .pg-section { padding-top: 104px; }
    .pg-group:last-child .pg-section:last-child { padding-bottom: 104px; }
    .pg-section[id] { scroll-margin-top: 130px; }

    .pg-grid { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
    .pg-grid > * { margin: 0 !important; }

    .pg-overview__text { gap: 16px; }
    .pg-stages { grid-template-columns: minmax(0, 1fr); row-gap: 24px; padding-top: 24px; }
    .pg-stages .pg-num { text-align: right; }
    .pg-stages li { gap: 8px; }
    .pg-stages .pg-name + p { margin-top: 0; }

    .pg-who__list { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
    .pg-who__list li:nth-child(4) { grid-column: auto; }
    .pg-who__foot { display: flex; flex-direction: column; gap: 16px; padding-top: 24px; }

    .pg-outcomes__side { flex-direction: column-reverse; justify-content: flex-start; }
    .pg-outcomes__figure { height: 288px; }
    .pg-outcomes__list { gap: 24px; }
    .pg-outcomes__list li { grid-template-columns: 24px minmax(0, 1fr); row-gap: 8px; }
    .pg-outcomes__list li p:last-child { grid-column: 2; }

    .pg-module__toggle { font-size: var(--fs-lead); }

    .pg-project__list { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
    .pg-project__list li { padding-bottom: 24px; }

    .pg-experience__figure { height: 180px; }
    .pg-experience__steps { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }

    .pg-table__row { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
    .pg-table { margin: 0; }

    .pg-academy__figure { height: 104px; }
    .pg-contact__form.contact-page { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .pg-module__icon, .pg-module__panel, .pg-module__body, .pg-nav__current svg { transition: none; }
}
