/* ---------- Academic programme pages (hero and breadcrumb styles come from history.css) ---------- */

.page-programme .h-hero::after { background: var(--c-white); }
.page-programme .h-hero__content { padding-bottom: calc(var(--h-curve) + 1.5rem); }
.page-programme .h-hero + .section { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

.pg-title { font-family: var(--f-serif); font-size-adjust: 0.4; font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.8rem); font-weight: 600; line-height: 1.05; color: var(--c-maroon-900, var(--c-maroon-950)); }

/* Introduction: photograph beside the programme name */
.pg-intro { background: var(--c-soft); }
.pg-intro__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.pg-photo { position: relative; margin: 0 1.25rem 1.25rem 0; }
.pg-photo::before { content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem; background: var(--c-gold-500); border-radius: 15px; }
.pg-photo img { position: relative; display: block; width: 100%; height: auto; max-height: 34rem; object-fit: cover; border-radius: 15px; box-shadow: 0 30px 50px -28px rgb(var(--rgb-maroon-950) / 0.7); }
.pg-intro__text { display: grid; gap: 1.2rem; justify-items: start; }
.pg-intro .eyebrow::after, .pg-schemes .eyebrow::after { content: ""; width: 1.75rem; height: 1px; background: currentColor; }
.pg-lead { margin: 0; font-family: var(--f-serif); font-size-adjust: 0.4; font-size: clamp(1.3rem, 1.05rem + 1vw, 1.75rem); font-weight: 500; line-height: 1.5; color: var(--c-maroon-900, var(--c-maroon-950)); }
.pg-grades { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 0; padding: 0; list-style: none; }
.pg-grades li { padding: 0.45rem 1rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; color: var(--c-maroon-950); background: var(--c-gold-500); border-radius: 999px; }

/* Scheme of studies: one block per grade group */
.pg-schemes { background: var(--c-white); }
.pg-schemes__head { display: grid; justify-items: start; gap: 0.9rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

.pg-schemes { background: var(--c-soft, #f6f2eb); }
/* grade tabs, then one panel: a dark banner with the grades and the subject count, and the subjects as numbered tiles */
.pg-tabs__list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }
.pg-tabs__list button { min-height: 2.8rem; padding: 0 1.3rem; font: 700 0.875rem var(--f-sans); color: var(--c-maroon-900, var(--c-maroon-950)); background: var(--c-white); border: 1px solid rgb(var(--rgb-gold-700) / 0.35); border-radius: 999px; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.pg-tabs__list button:hover { border-color: var(--c-gold-500); }
.pg-tabs__list button[aria-selected="true"] { color: var(--c-gold-300); background: var(--c-maroon-900, var(--c-maroon-950)); border-color: var(--c-maroon-900, var(--c-maroon-950)); }

.pg-stage { overflow: hidden; background: var(--c-white); border: 1px solid rgb(var(--rgb-gold-700) / 0.22); border-radius: 15px; box-shadow: 0 24px 40px -32px rgb(var(--rgb-maroon-950) / 0.55); }
.pg-stage[hidden] { display: none; }
.pg-stage__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: clamp(1.4rem, 3vw, 2.1rem) clamp(1.4rem, 3vw, 2.4rem); color: var(--c-white); background: radial-gradient(22rem 12rem at 100% 0%, rgb(var(--rgb-gold-500) / 0.3), transparent 62%), linear-gradient(160deg, var(--c-maroon-800) 0%, var(--c-maroon-950) 100%); border-bottom: 4px solid var(--c-gold-500); }
.pg-stage__label { margin: 0 0 0.4rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c-gold-300); }
.pg-stage__head h3 { font-family: var(--f-serif); font-size-adjust: 0.4; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem); font-weight: 600; line-height: 1.1; color: var(--c-white); }
.pg-stage__count { margin: 0; display: grid; justify-items: center; gap: 0.1rem; min-width: 6rem; padding: 0.7rem 1.2rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgb(255 255 255 / 0.8); border: 1px solid rgb(var(--rgb-gold-500) / 0.55); border-radius: 12px; }
.pg-stage__count b { font-family: var(--f-serif); font-size: 2.4rem; font-weight: 600; line-height: 1; letter-spacing: 0; color: var(--c-gold-500); }

.pg-stage__body { padding: clamp(1.4rem, 3vw, 2.4rem); }
.pg-stage__body h4 { margin: 0 0 1rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-gold-700); }
.pg-stage__body h4:not(:first-child) { margin-top: 2rem; }

.pg-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.pg-tiles li { position: relative; display: grid; align-content: end; min-height: 5.6rem; padding: 1rem 1.1rem; overflow: hidden; background: var(--c-soft, #f6f2eb); border: 1px solid rgb(var(--rgb-gold-700) / 0.22); border-bottom: 3px solid var(--c-gold-500); border-radius: 12px; transition: transform 0.25s var(--ease), box-shadow 0.25s ease; }
.pg-tiles li:hover { transform: translateY(-3px); box-shadow: 0 16px 24px -20px rgb(var(--rgb-maroon-950) / 0.6); }
.pg-tiles__no { position: absolute; top: 0.35rem; right: 0.8rem; font-family: var(--f-serif); font-size: 2.6rem; font-weight: 700; line-height: 1; color: rgb(var(--rgb-gold-700) / 0.2); }
.pg-tiles__name { position: relative; font-weight: 700; line-height: 1.3; color: var(--c-maroon-900, var(--c-maroon-950)); }
.pg-tiles--lang li { min-height: 4rem; align-content: center; font-weight: 700; color: var(--c-maroon-950, var(--c-maroon-950)); background: linear-gradient(135deg, var(--c-gold-200), var(--c-gold-500)); border-color: transparent; border-bottom-color: var(--c-gold-700); }
@media (max-width: 900px) {
    .pg-intro__grid, .pg-stage { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Redesign: a plain, tighter introduction (photograph left, programme name and text right), and the scheme of studies
   follows straight after it with only a ruled heading between the two.
   ========================================================================== */
.pg-intro, .pg-schemes { background: var(--c-white); }
.pg-intro { padding-block: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.25rem, 2.5vw, 2rem); }
.pg-intro__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.pg-photo { margin: 0; }
.pg-photo::before { display: none; }
.pg-photo img { aspect-ratio: 4 / 3; max-height: none; border-radius: 6px; box-shadow: 0 26px 44px -34px rgb(var(--rgb-maroon-950) / 0.7); }
.pg-intro__text { gap: 0.9rem; }
.pg-grades li { color: var(--c-maroon-800); background: none; border: 1px solid rgb(var(--rgb-gold-700) / 0.5); border-radius: 3px; }

.pg-schemes { padding-block: clamp(2.5rem, 5vw, 4rem); }
/* the second section's heading: the label above, the headline beneath it, under a ruled line */
.pg-schemes__head { display: grid; justify-items: start; gap: 0.9rem; margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); padding-top: 1.5rem; border-top: 2px solid var(--c-maroon-900); }
.pg-schemes__head .eyebrow { margin: 0; }
@media (max-width: 900px) { .pg-intro__grid { grid-template-columns: 1fr; } }

/* the second section gets a soft background of its own, and no ruled line above its heading */
.pg-schemes { background: var(--c-soft); }
.pg-schemes__head { padding-top: 0; border-top: 0; }

/* more room between the introduction and the scheme of studies */
.pg-intro { padding-bottom: clamp(3rem, 6vw, 5rem); }

/* ==========================================================================
   General information: the photograph on the left (about 60% of the width) with a colour bar down its edge, and the
   programme name, text and grades on a white card that overlaps the photograph's right edge.
   ========================================================================== */
.pg-intro__grid { position: relative; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: 0; align-items: center; }
.pg-photo { position: relative; grid-column: 1; grid-row: 1; overflow: hidden; border-radius: 6px; box-shadow: 0 28px 46px -34px rgb(var(--rgb-maroon-950) / 0.7); }
.pg-photo img { aspect-ratio: 3 / 2; border-radius: 0; box-shadow: none; }
.pg-photo::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 0.6rem; background: linear-gradient(180deg, var(--c-maroon-800) 0 25%, var(--c-gold-700) 25% 50%, var(--c-gold-500) 50% 75%, var(--c-gold-300) 75% 100%); }
.pg-intro__text { position: relative; z-index: 1; grid-column: 2; grid-row: 1; justify-items: start; gap: 1rem; margin-left: clamp(-5rem, -6vw, -2rem); padding: clamp(1.5rem, 3.5vw, 2.5rem); background: var(--c-white); border-top: 4px solid var(--c-gold-500); box-shadow: 0 30px 50px -36px rgb(var(--rgb-maroon-950) / 0.6); }
.pg-intro__text .pg-title { font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.6rem); }
.pg-lead { font-family: var(--f-sans); font-size: 1.125rem; font-weight: 400; line-height: 1.8; color: var(--c-ink); }

@media (max-width: 900px) {
    .pg-intro__grid { grid-template-columns: 1fr; }
    .pg-photo, .pg-intro__text { grid-column: 1; grid-row: auto; }
    .pg-intro__text { margin: -2rem 1rem 0; }
}
/* ==========================================================================
   What is studied: underlined year tabs; each grade group is a title and subject count on the left, and on the right the
   languages as three bordered entries and the other subjects as a ruled, numbered list in columns.
   ========================================================================== */
.pg-tabs__list { gap: 0.25rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); border-bottom: 1px solid var(--c-line); }
.pg-tabs__list button { min-height: 0; padding: 0.8rem 1.25rem; font-size: 0.95rem; color: var(--c-muted); background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; }
.pg-tabs__list button:hover { color: var(--c-maroon-900); background: var(--c-white); }
.pg-tabs__list button[aria-selected="true"] { color: var(--c-maroon-900); background: none; border-bottom-color: var(--c-gold-500); }

.pg-stage { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; }
.pg-stage[hidden] { display: none; }
.pg-stage__head { display: block; padding: 0; color: var(--c-ink); background: none; border: 0; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.pg-stage__label { margin: 0 0 0.5rem; color: var(--c-gold-700); }
.pg-stage__head h3 { margin: 0; font-family: var(--f-serif); font-size-adjust: 0.4; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); font-weight: 600; line-height: 1.1; color: var(--c-maroon-900); }
.pg-stage__count { display: flex; align-items: baseline; gap: 0.6rem; min-width: 0; margin: 1.25rem 0 0; padding: 1rem 0 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-muted); border: 0; border-top: 2px solid var(--c-gold-500); border-radius: 0; }
.pg-stage__count b { font-family: var(--f-serif); font-size: clamp(3rem, 2.2rem + 3vw, 4.5rem); font-weight: 600; line-height: 0.9; letter-spacing: 0; color: var(--c-gold-700); }

.pg-stage__body { padding: 0; }
.pg-stage__body h4 { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 0.9rem; }
.pg-stage__body h4::after { content: ""; flex: 1; height: 1px; background: rgb(var(--rgb-gold-700) / 0.3); }
.pg-stage__body h4:not(:first-child) { margin-top: 2.25rem; }

/* languages: three entries side by side */
.pg-tiles { counter-reset: pgsub; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(1.25rem, 3vw, 2.5rem); }
.pg-tiles--lang { counter-reset: pglang; gap: 0.75rem; }
.pg-tiles--lang li { min-height: 0; display: grid; gap: 0.3rem; align-content: start; padding: 1rem 1.1rem; font-weight: 600; line-height: 1.4; color: var(--c-maroon-900); background: var(--c-white); border: 1px solid rgb(var(--rgb-gold-700) / 0.25); border-left: 4px solid var(--c-gold-500); border-bottom-color: rgb(var(--rgb-gold-700) / 0.25); border-radius: 4px; }
.pg-tiles--lang li::before { counter-increment: pglang; content: "Language " counter(pglang); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-gold-700); }

/* other subjects: a ruled, numbered list */
.pg-tiles:not(.pg-tiles--lang) li { display: flex; align-items: baseline; gap: 0.9rem; min-height: 0; padding: 0.85rem 0; overflow: visible; background: none; border: 0; border-bottom: 1px solid var(--c-line); border-radius: 0; transition: padding-left 0.25s var(--ease), color 0.2s ease; }
.pg-tiles:not(.pg-tiles--lang) li:hover { transform: none; box-shadow: none; padding-left: 0.5rem; }
.pg-tiles:not(.pg-tiles--lang) .pg-tiles__no { position: static; flex: none; min-width: 1.6rem; font-family: var(--f-sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--c-gold-700); }
.pg-tiles:not(.pg-tiles--lang) .pg-tiles__name { font-weight: 500; font-size: 1rem; line-height: 1.35; color: var(--c-ink); }

@media (max-width: 960px) {
    .pg-stage { grid-template-columns: 1fr; }
    .pg-stage__head { position: static; }
    .pg-stage__count { max-width: 14rem; }
    .pg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .pg-tiles { grid-template-columns: 1fr; } }
/* ==========================================================================
   What is studied, redesigned: segmented grade tabs, then one white panel per grade group. The panel's header carries the
   grades and a subject-count badge; the languages and the numbered subject list (unchanged) sit below it.
   ========================================================================== */
.pg-tabs__list { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1.5rem; padding: 0.3rem; background: var(--c-white); border: 1px solid var(--c-line); border-radius: 999px; }
.pg-tabs__list button { padding: 0.55rem 1.3rem; font-size: 0.9rem; font-weight: 600; color: var(--c-muted); background: none; border: 0; border-radius: 999px; transition: background-color 0.2s ease, color 0.2s ease; }
.pg-tabs__list button:hover { color: var(--c-maroon-900); background: var(--c-soft); }
.pg-tabs__list button[aria-selected="true"] { color: var(--c-white); background: var(--c-maroon-800); border: 0; }

.pg-stage { display: block; overflow: hidden; background: var(--c-white); border: 1px solid rgb(var(--rgb-gold-700) / 0.22); border-top: 4px solid var(--c-gold-500); border-radius: 6px; box-shadow: 0 26px 44px -36px rgb(var(--rgb-maroon-950) / 0.5); }
.pg-stage[hidden] { display: none; }
.pg-stage__head { position: static; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem); background: linear-gradient(180deg, var(--c-soft), var(--c-white)); border-bottom: 1px solid var(--c-line); }
.pg-stage__head > div { min-width: 0; }
.pg-stage__label { margin: 0 0 0.35rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--c-gold-700); }
.pg-stage__head h3 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem); }
.pg-stage__count { display: inline-flex; align-items: baseline; gap: 0.5rem; margin: 0; padding: 0.55rem 1.1rem; border: 1px solid rgb(var(--rgb-gold-700) / 0.45); border-radius: 999px; }
.pg-stage__count b { font-size: 1.7rem; line-height: 1; }
.pg-stage__body { padding: clamp(1.25rem, 3vw, 2.25rem); }

@media (max-width: 960px) { .pg-stage { display: block; } .pg-stage__count { max-width: none; border-top: 1px solid rgb(var(--rgb-gold-700) / 0.45); } }

/* the introduction text uses the page's normal letter size (the same as the MSFS province text) */
.pg-lead { font-size-adjust: 0.49; font-size: 1.125rem; line-height: 1.8; }
