/* ==========================================================================
   Program page (program.php) — the sections that show everything an admin
   enters in admin/program-details.php.

   The page's original sections (hero, stats, about, schedule, pricing, enroll)
   are styled by the theme's `*-module--*` classes in assets/public/main.css.
   Everything added here is namespaced `pg-` so it can never collide with them,
   while borrowing their type scale (Plus Jakarta Sans, 42px/700 capitalised
   section titles) and palette so the page reads as one design.

   The video section reuses assets/css/home-videos.css (the `tv-` block from the
   homepage) unchanged — same markup, same player script.

   --pg-accent is set inline on <body> from the program's own `color` column, so
   each program tints its own page.
   ========================================================================== */

:root {
    --pg-ink: #0b1b3b;
    --pg-body: #43506b;
    --pg-line: #e4e8f0;
    --pg-card: #ffffff;
    --pg-dark: #0a141b;
    --pg-dark-2: #0a303c;
    --pg-accent: #00b3ff;
    /* Ink that stays readable on --pg-accent; program.php computes it from the
       program's own colour and sets both on <body>. */
    --pg-accent-ink: #06182b;
    --pg-radius: 18px;
    --pg-shadow: 0 18px 46px rgba(11, 27, 59, 0.09);
}

/* --------------------------------- shell --------------------------------- */
.pg-sec {
    position: relative;
    padding: 92px 0;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.pg-sec--tight { padding: 70px 0; }

/* Clear the theme's fixed header when an anchor is followed. */
.pg-sec[id] { scroll-margin-top: 145px; }

.pg-sec--dark {
    background-color: var(--pg-dark);
    color: #fff;
}

/* Soft tinted wash so light sections don't read as one flat slab. */
.pg-sec--wash {
    background:
        radial-gradient(760px 420px at 88% -8%, rgba(0, 179, 255, 0.09), transparent 62%),
        radial-gradient(680px 420px at -6% 108%, rgba(11, 27, 59, 0.06), transparent 60%);
}

/* ------------------------------ section head ----------------------------- */
.pg-head {
    max-width: 780px;
    margin: 0 0 52px;
}

.pg-head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.pg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 16px;
    margin: 0 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(11, 27, 59, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: var(--pg-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pg-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pg-accent);
}

.pg-sec--dark .pg-kicker {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.pg-title {
    color: var(--pg-ink);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.14;
    text-transform: capitalize;
    margin: 0 0 12px;
}

.pg-sec--dark .pg-title { color: #fff; }

.pg-lead {
    color: var(--pg-body);
    font-size: 18px;
    line-height: 1.7;
    margin: 0;
    max-width: 68ch;
}

.pg-head--center .pg-lead { margin-inline: auto; }

.pg-sec--dark .pg-lead { color: #c3d1e6; }

/* ------------------------- rich text from CKEditor ------------------------ */
/* `skills` and `fewsAndPayment` are admin-authored HTML — give it a readable
   default so the section looks designed whatever the admin pastes in. */
.pg-prose {
    color: var(--pg-body);
    font-size: 16.5px;
    line-height: 1.78;
}

.pg-prose > *:first-child { margin-top: 0; }
.pg-prose > *:last-child { margin-bottom: 0; }

.pg-prose h1,
.pg-prose h2,
.pg-prose h3,
.pg-prose h4 {
    color: var(--pg-ink);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin: 30px 0 12px;
}

.pg-prose h1 { font-size: 28px; }
.pg-prose h2 { font-size: 25px; }
.pg-prose h3 { font-size: 21px; }
.pg-prose h4 { font-size: 18px; }

.pg-prose p { margin: 0 0 16px; }
.pg-prose strong, .pg-prose b { color: var(--pg-ink); font-weight: 700; }
.pg-prose a { color: #0a76c2; text-decoration: underline; }
.pg-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.pg-prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
.pg-prose th, .pg-prose td { border: 1px solid var(--pg-line); padding: 10px 14px; text-align: left; }
.pg-prose th { background: #f4f7fb; color: var(--pg-ink); font-weight: 700; }

/* Bulleted lists become ticked lines — the page's own idiom (pricing cards). */
.pg-prose ul {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.pg-prose ul > li {
    position: relative;
    padding-inline-start: 34px;
    margin-bottom: 11px;
}

.pg-prose ul > li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.42em;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 179, 255, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a76c2' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat 50% 50% / 12px 12px;
}

.pg-prose ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.pg-prose ol > li { margin-bottom: 11px; }

/* Nested lists stay plain so they read as sub-points, not more headline ticks. */
.pg-prose ul ul > li::before {
    background-image: none;
    background-color: rgba(11, 27, 59, 0.22);
    width: 7px;
    height: 7px;
    top: 0.72em;
    inset-inline-start: 6px;
}

.pg-prose ul ul > li { padding-inline-start: 22px; }

/* Right-to-left programs (Farsi/Dari). The ticks above are placed with logical
   properties, which only flip when `direction` is rtl — but CKEditor marks a
   block as RTL either with dir="rtl" or with an inline text-align, so opt those
   into rtl direction and the ticks land beside their text instead of stranded
   in a column down the far side. */
.pg-prose [dir="rtl"],
.pg-prose[dir="rtl"],
.pg-prose li[style*="text-align:right"],
.pg-prose li[style*="text-align: right"],
.pg-prose [style*="text-align:right"] li,
.pg-prose [style*="text-align: right"] li { direction: rtl; }

/* ------------------------------ skills panel ----------------------------- */
.pg-panel {
    background: var(--pg-card);
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius);
    box-shadow: var(--pg-shadow);
    padding: 40px 44px;
}

.pg-panel--flush { padding: 34px 36px; }

/* --------------------------- media (in #about) ---------------------------- */
/* Left column of the intro: every video the admin added, two to a row, then the
   flyer and photos in a matching grid below. No panel behind them — the cards
   sit straight on the section, so the column reads as part of the page rather
   than a widget dropped onto it. */
.pg-media {
    --pgm-line: var(--pg-line);
    --pgm-muted: #8b97ad;

    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Editorial label over each grid: name, count, then a rule that runs out to the
   edge — enough to separate the two grids without a heavy divider. */
.pg-media-cap {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--pg-ink);
    font-size: 12px;
    font-weight: 800;
    /* The theme's body line-height resolves to 32px here, which both inflates
       this row and pushes the count off-centre inside its chip. */
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.pg-media-cap::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--pgm-line), rgba(228, 232, 240, 0));
}

/* A tight rounded tile rather than a wide pale circle: a single digit left the
   circle reading as a smudge, and #eef3f9 barely separated from the section. */
.pg-media-cap span {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 6px;
    /* Inverted, like the numbered badge on a topic card. A pale fill on a pale
       section read as a smudge however the border was tuned. */
    background: var(--pg-ink);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

/* Breathing room before the second label. Keyed off :not(:first-child) rather
   than a sibling combinator, because the payload and player <script> tags sit
   between the two grids. */
.pg-media-cap:not(:first-child) { margin-top: 10px; }

.pg-media-grid,
.pg-media-shots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

/* ------------------------------- video cards ------------------------------ */
.pg-vid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.pg-vid-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--pgm-line);
    /* Only seen when an uploaded video has no thumbnail — a soft slate tile
       rather than a black hole punched in a light section. */
    background: linear-gradient(135deg, #e9eef6 0%, #d5dfec 100%);
    box-shadow: 0 8px 22px rgba(11, 27, 59, 0.07);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

@supports not (aspect-ratio: 16 / 9) {
    .pg-vid-stage { height: 0; padding-bottom: 56.25%; }
}

.pg-vid:hover .pg-vid-stage {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(11, 27, 59, 0.16);
}

.pg-vid-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.pg-vid:hover .pg-vid-poster { transform: scale(1.06); }

/* The whole poster is the play control. */
.pg-vid-btn {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    padding: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: transparent;
}

/* Veil only over a real thumbnail, so the play button reads against a busy
   photo. The slate placeholder above needs no darkening. */
.pg-vid-poster ~ .pg-vid-btn {
    background: linear-gradient(to top, rgba(6, 14, 32, 0.5) 0%, rgba(6, 14, 32, 0.04) 58%, rgba(6, 14, 32, 0.16) 100%);
}

.pg-vid-play {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--pg-accent);
    color: var(--pg-accent-ink);
    display: grid;
    place-items: center;
    /* White halo keeps the button visible whatever the programme colour is and
       whatever it lands on. */
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.34), 0 12px 26px rgba(11, 27, 59, 0.3);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease;
}

.pg-vid-play svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-left: 3px;
}

.pg-vid-btn:hover .pg-vid-play,
.pg-vid-btn:focus-visible .pg-vid-play {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.3), 0 14px 30px rgba(11, 27, 59, 0.34);
}

.pg-vid-btn:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: -4px; }

.pg-vid-dur {
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(9, 18, 40, 0.82);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.65;
}

/* Once playing, the poster layers give way to the real player. */
.pg-vid-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.pg-vid.is-playing .pg-vid-stage { transform: none; }

.pg-vid.is-playing .pg-vid-poster,
.pg-vid.is-playing .pg-vid-btn,
.pg-vid.is-playing .pg-vid-dur {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.pg-vid-meta { min-width: 0; }

.pg-vid-meta b {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--pg-ink);
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.42;
}

.pg-vid-meta small {
    display: block;
    margin-top: 4px;
    color: var(--pgm-muted);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* ------------------------------ gallery tiles ----------------------------- */
.pg-shot {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--pg-line);
    border-radius: 14px;
    overflow: hidden;
    background: #eef2f7;
    aspect-ratio: 4 / 3;
    cursor: zoom-in;
    box-shadow: 0 8px 22px rgba(11, 27, 59, 0.07);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.pg-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Tells the visitor the tile opens — the cursor alone does not, and never does
   on touch. */
.pg-shot::after {
    content: "";
    position: absolute;
    right: 9px;
    bottom: 9px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1b3b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6M11 8v6M8 11h6'/%3E%3C/svg%3E") no-repeat 50% 50% / 16px 16px;
    box-shadow: 0 6px 16px rgba(11, 27, 59, 0.22);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.pg-shot:hover { transform: translateY(-4px); box-shadow: 0 20px 42px rgba(11, 27, 59, 0.16); }
.pg-shot:hover img { transform: scale(1.07); }
.pg-shot:hover::after,
.pg-shot:focus-visible::after { opacity: 1; transform: none; }
.pg-shot:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 3px; }

/* --------------------------------- lightbox ------------------------------ */
.pg-lb {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(6, 13, 30, 0.9);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.pg-lb.is-open { display: flex; }

.pg-lb img {
    max-width: min(1100px, 94vw);
    max-height: 88vh;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.pg-lb-close {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.pg-lb-close:hover { background: rgba(255, 255, 255, 0.18); }

/* ------------------------------ batch cards ------------------------------ */
.pg-batches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.pg-batch {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px 26px 24px;
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius);
    background: var(--pg-card);
    box-shadow: var(--pg-shadow);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
}

.pg-batch:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 179, 255, 0.45);
}

.pg-batch h3 {
    color: var(--pg-ink);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.pg-batch-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 16px 0 4px;
    border-top: 1px dashed var(--pg-line);
    list-style: none;
}

.pg-batch-rows li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--pg-body);
    font-size: 15px;
    line-height: 1.55;
}

.pg-batch-rows span {
    flex: 0 0 74px;
    color: #8b97ad;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding-top: 2px;
}

.pg-batch-rows b { color: var(--pg-ink); font-weight: 600; }

.pg-batch-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--pg-ink);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.pg-batch-cta:hover { background: #0a76c2; color: #fff; }

/* ---------------------------- fees + at a glance -------------------------- */
.pg-split {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.pg-aside {
    position: sticky;
    top: 130px;
    border-radius: var(--pg-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(165deg, #10233f 0%, #0a303c 100%);
    color: #fff;
    box-shadow: 0 24px 60px rgba(10, 20, 44, 0.28);
}

.pg-aside-head {
    padding: 24px 26px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pg-aside-head h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.pg-aside-head p {
    color: rgba(226, 235, 255, 0.66);
    font-size: 14px;
    line-height: 1.6;
    margin: 6px 0 0;
}

.pg-facts {
    list-style: none;
    margin: 0;
    padding: 8px 26px 4px;
}

.pg-facts li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pg-facts li:last-child { border-bottom: 0; }

.pg-facts i {
    flex: 0 0 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    place-items: center;
    font-size: 14px;
    color: var(--pg-accent);
}

.pg-facts .pg-fact-k {
    display: block;
    color: rgba(226, 235, 255, 0.6);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.pg-facts .pg-fact-v {
    display: block;
    color: #fff;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.5;
}

.pg-aside-cta {
    display: grid;
    gap: 10px;
    padding: 18px 26px 26px;
}

.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.22s ease;
}

.pg-btn--solid { background: var(--pg-accent); color: var(--pg-accent-ink) !important; }
.pg-btn--solid:hover { filter: brightness(1.08); }

.pg-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.24);
    color: #fff !important;
}

.pg-btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* --- full-width variant (short / empty fees copy) --------------------------
   Most admins write a line or two under Fees & payments, which left the split
   layout with a stub of a paragraph on one side and a tall card on the other.
   program.php measures the copy and switches to this variant, where the card
   goes full width, the facts sit in a tile grid across it, and the note shares
   a footer row with the buttons — same content, no dead column. */
.pg-split--single { grid-template-columns: minmax(0, 1fr); }

.pg-aside--wide {
    position: static;
    background:
        radial-gradient(620px 300px at 100% 0%, rgba(0, 179, 255, 0.16), transparent 62%),
        linear-gradient(165deg, #10233f 0%, #0a303c 100%);
    background:
        radial-gradient(620px 300px at 100% 0%, color-mix(in srgb, var(--pg-accent) 17%, transparent), transparent 62%),
        linear-gradient(165deg, #10233f 0%, #0a303c 100%);
}

.pg-aside--wide .pg-aside-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 26px 34px 22px;
}

.pg-aside--wide .pg-aside-head h3 { font-size: 23px; }
.pg-aside--wide .pg-aside-head p { margin-top: 4px; }

.pg-aside-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(226, 235, 255, 0.9);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pg-aside-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pg-accent);
    box-shadow: 0 0 0 4px rgba(0, 179, 255, 0.18);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--pg-accent) 20%, transparent);
}

/* Facts become tiles. Flex rather than grid so the last row grows to fill the
   width — a program with five facts must not leave a half-empty track, which is
   the dead space this layout exists to remove. */
.pg-aside--wide .pg-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    padding: 0 34px 26px;
}

.pg-aside--wide .pg-facts li {
    /* Grow to close the row, but capped so a lone trailing tile is a centred
       half-row rather than one stretched full-width strip. */
    flex: 1 1 270px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 540px;
    align-items: center;
    gap: 15px;
    padding: 17px 20px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.pg-aside--wide .pg-facts li.pg-fact--hero {
    border-color: rgba(0, 179, 255, 0.42);
    background: rgba(0, 179, 255, 0.12);
    border-color: color-mix(in srgb, var(--pg-accent) 42%, transparent);
    background: color-mix(in srgb, var(--pg-accent) 13%, rgba(255, 255, 255, 0.05));
}

.pg-aside--wide .pg-facts i {
    flex: 0 0 40px;
    height: 40px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.pg-aside--wide .pg-facts li.pg-fact--hero i {
    background: var(--pg-accent);
    border-color: transparent;
    color: var(--pg-accent-ink);
}

.pg-aside--wide .pg-facts .pg-fact-v { font-size: 16.5px; font-weight: 700; line-height: 1.45; }
.pg-aside--wide .pg-facts li.pg-fact--hero .pg-fact-v { font-size: 24px; letter-spacing: -0.01em; }

/* Footer row: the admin's note on the left, the two calls to action on the right. */
.pg-aside--wide .pg-aside-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px 30px;
    padding: 22px 34px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.pg-aside--wide .pg-aside-cta {
    grid-auto-flow: column;
    gap: 12px;
    padding: 0;
}

.pg-aside--wide .pg-btn { padding: 14px 26px; }

/* The note is admin HTML, so it needs the prose rules re-tinted for the dark card. */
.pg-aside .pg-aside-note.pg-prose {
    color: rgba(226, 235, 255, 0.82);
    font-size: 15.5px;
    line-height: 1.7;
}

.pg-aside .pg-aside-note.pg-prose > *:last-child { margin-bottom: 0; }
.pg-aside .pg-aside-note.pg-prose p { margin-bottom: 12px; }

.pg-aside .pg-aside-note.pg-prose h1,
.pg-aside .pg-aside-note.pg-prose h2,
.pg-aside .pg-aside-note.pg-prose h3,
.pg-aside .pg-aside-note.pg-prose h4,
.pg-aside .pg-aside-note.pg-prose strong,
.pg-aside .pg-aside-note.pg-prose b { color: #fff; }

.pg-aside .pg-aside-note.pg-prose h1,
.pg-aside .pg-aside-note.pg-prose h2,
.pg-aside .pg-aside-note.pg-prose h3 { font-size: 18px; margin: 0 0 8px; }

.pg-aside .pg-aside-note.pg-prose a { color: #7dd8ff; }
.pg-aside .pg-aside-note.pg-prose ul { margin-bottom: 0; }
.pg-aside .pg-aside-note.pg-prose ul > li { margin-bottom: 7px; }

/* -------------------------------- topics --------------------------------- */
/* Topic cards, styled light (the curriculum section sits on a light ground) with
   a dark-section override so the block can be moved without a rewrite. */
.pg-topics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.pg-topic {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius);
    overflow: hidden;
    background: var(--pg-card);
    box-shadow: var(--pg-shadow);
    text-decoration: none !important;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.pg-topic:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 179, 255, 0.5);
    box-shadow: 0 26px 60px rgba(11, 27, 59, 0.14);
}

.pg-topic-img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #22345c, #0f1c39);
}

.pg-topic-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.pg-topic:hover .pg-topic-img img { transform: scale(1.07); }

.pg-topic-n {
    position: absolute;
    left: 14px;
    top: 14px;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    background: rgba(6, 13, 30, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: grid;
    place-items: center;
    font-variant-numeric: tabular-nums;
}

.pg-topic-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 22px 24px;
    flex: 1;
}

.pg-topic-body h3 {
    color: var(--pg-ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.32;
    margin: 0;
}

.pg-topic-body p {
    color: var(--pg-body);
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
}

.pg-topic-more {
    margin-top: auto;
    padding-top: 6px;
    color: #0a76c2;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pg-sec--dark .pg-topic {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: none;
}

.pg-sec--dark .pg-topic:hover { background: rgba(255, 255, 255, 0.07); box-shadow: none; }
.pg-sec--dark .pg-topic-body h3 { color: #fff; }
.pg-sec--dark .pg-topic-body p { color: #c3d1e6; }
.pg-sec--dark .pg-topic-more { color: var(--pg-accent); }

/* -------------------------------- empty ---------------------------------- */
.pg-empty {
    padding: 34px;
    border: 1px dashed var(--pg-line);
    border-radius: var(--pg-radius);
    background: #fff;
    color: #8b97ad;
    text-align: center;
    font-size: 15px;
}

/* -------------------- dark sections: panels + at-a-glance ----------------- */
/* The sections alternate light and dark down the page, so the two admin-authored
   rich-text blocks (skills, fees) and the facts card each need a dark skin. */
/* A solid panel, not glass: over a near-black section a 4%-white wash barely
   separates from the ground, which is what made these blocks look murky. */
.pg-sec--dark .pg-panel {
    border-color: rgba(255, 255, 255, 0.1);
    background: #111f33;
    box-shadow: 0 22px 54px rgba(3, 9, 24, 0.4);
}

.pg-sec--dark .pg-prose { color: #d3dfef; }
.pg-sec--dark .pg-prose h1,
.pg-sec--dark .pg-prose h2,
.pg-sec--dark .pg-prose h3,
.pg-sec--dark .pg-prose h4,
.pg-sec--dark .pg-prose strong,
.pg-sec--dark .pg-prose b { color: #ffffff; }
.pg-sec--dark .pg-prose a { color: #7dd8ff; }
.pg-sec--dark .pg-prose th,
.pg-sec--dark .pg-prose td { border-color: rgba(255, 255, 255, 0.14); }
.pg-sec--dark .pg-prose th { background: rgba(255, 255, 255, 0.06); color: #fff; }
.pg-sec--dark .pg-prose ul > li::before {
    background-color: rgba(125, 216, 255, 0.16);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237dd8ff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}
.pg-sec--dark .pg-prose ul ul > li::before { background-color: rgba(255, 255, 255, 0.32); background-image: none; }

/* On a dark section the facts card flips to paper, so it still reads as the
   thing you look at first. */
.pg-sec--dark .pg-aside {
    background: var(--pg-card);
    border-color: var(--pg-line);
    color: var(--pg-ink);
    box-shadow: 0 24px 60px rgba(3, 9, 24, 0.34);
}

.pg-sec--dark .pg-aside-head { border-bottom-color: var(--pg-line); }
.pg-sec--dark .pg-aside-head h3 { color: var(--pg-ink); }
.pg-sec--dark .pg-aside-head p { color: #8b97ad; }
.pg-sec--dark .pg-facts li { border-bottom-color: var(--pg-line); }
.pg-sec--dark .pg-facts i { background: #eef3f9; color: #0a76c2; }
.pg-sec--dark .pg-facts .pg-fact-k { color: #8b97ad; }
.pg-sec--dark .pg-facts .pg-fact-v { color: var(--pg-ink); }
.pg-sec--dark .pg-btn--ghost {
    background: #eef3f9;
    border-color: var(--pg-line);
    color: var(--pg-ink) !important;
}
.pg-sec--dark .pg-btn--ghost:hover { background: #e2eaf3; }

/* ...and the full-width variant follows it onto paper: tiles, footer and note
   all need the light skin when the section band behind them is dark. */
.pg-sec--dark .pg-aside--wide { background: var(--pg-card); }

.pg-sec--dark .pg-aside-badge {
    border-color: var(--pg-line);
    background: #f4f7fb;
    color: #667287;
}

.pg-sec--dark .pg-aside--wide .pg-facts li {
    border-color: var(--pg-line);
    background: #f7f9fc;
}

.pg-sec--dark .pg-aside--wide .pg-facts li.pg-fact--hero {
    border-color: rgba(0, 179, 255, 0.38);
    background: rgba(0, 179, 255, 0.08);
    border-color: color-mix(in srgb, var(--pg-accent) 38%, transparent);
    background: color-mix(in srgb, var(--pg-accent) 9%, #ffffff);
}

.pg-sec--dark .pg-aside--wide .pg-facts i {
    background: #eef3f9;
    border-color: var(--pg-line);
    color: #0a76c2;
}

.pg-sec--dark .pg-aside--wide .pg-facts li.pg-fact--hero i {
    background: var(--pg-accent);
    border-color: transparent;
    color: var(--pg-accent-ink);
}

.pg-sec--dark .pg-aside--wide .pg-facts li.pg-fact--hero .pg-fact-v { color: var(--pg-ink); }

.pg-sec--dark .pg-aside--wide .pg-aside-foot {
    border-top-color: var(--pg-line);
    background: #f7f9fc;
}

.pg-sec--dark .pg-aside .pg-aside-note.pg-prose { color: var(--pg-body); }
.pg-sec--dark .pg-aside .pg-aside-note.pg-prose h1,
.pg-sec--dark .pg-aside .pg-aside-note.pg-prose h2,
.pg-sec--dark .pg-aside .pg-aside-note.pg-prose h3,
.pg-sec--dark .pg-aside .pg-aside-note.pg-prose h4,
.pg-sec--dark .pg-aside .pg-aside-note.pg-prose strong,
.pg-sec--dark .pg-aside .pg-aside-note.pg-prose b { color: var(--pg-ink); }
.pg-sec--dark .pg-aside .pg-aside-note.pg-prose a { color: #0a76c2; }

 /* ------------------------------- pricing --------------------------------- */
/* The theme paints these bullets #88898d — too faint on a white card. */
.pg-sec .tuition-card_feature-bullets__u1H0E ul { color: var(--pg-body); }
.pg-sec .tuition-card_feature-bullets__u1H0E li.supported { color: var(--pg-ink); }
.pg-sec .tuition-card_feature-bullets__u1H0E li.unsupported { color: #667287; }

/* --------------------------- entrance animation --------------------------- */
/* `pg-anim` is added by JS, so without JS everything is visible. */
.pg-anim .pg-reveal {
    opacity: 0;
    transform: translateY(18px);
}

.pg-anim .pg-reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--d, 0) * 80ms);
}

@media (prefers-reduced-motion: reduce) {
    .pg-anim .pg-reveal { opacity: 1; transform: none; }
    .pg-shot:hover,
    .pg-batch:hover,
    .pg-topic:hover { transform: none; }
    .pg-shot:hover img,
    .pg-vid:hover .pg-vid-stage,
    .pg-vid:hover .pg-vid-poster,
    .pg-vid-btn:hover .pg-vid-play,
    .pg-topic:hover .pg-topic-img img { transform: none; }
}

/* ------------------------------- responsive ------------------------------- */
@media (max-width: 1199px) {
    .pg-title { font-size: 36px; }
    .pg-panel { padding: 34px 32px; }
}

@media (max-width: 991px) {
    .pg-sec { padding: 72px 0; }
    .pg-sec--tight { padding: 56px 0; }
    .pg-title { font-size: 32px; }
    .pg-head { margin-bottom: 38px; }
    .pg-split { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .pg-aside { position: static; }
    .pg-aside--wide .pg-aside-foot { grid-template-columns: minmax(0, 1fr); }
    .pg-aside--wide .pg-aside-cta { grid-auto-flow: row; }
    .pg-aside--wide .pg-btn { padding: 14px 18px; }
}

@media (max-width: 575px) {
    .pg-sec { padding: 58px 0; }
    .pg-title { font-size: 27px; }
    .pg-lead { font-size: 16px; }
    .pg-panel { padding: 26px 20px; }
    .pg-prose { font-size: 15.5px; }
    .pg-aside--wide .pg-aside-head { padding: 22px 20px 18px; }
    .pg-aside--wide .pg-aside-head h3 { font-size: 20px; }
    .pg-aside--wide .pg-facts { gap: 12px; padding: 0 20px 20px; }
    .pg-aside--wide .pg-facts li { flex-basis: 100%; padding: 14px 16px; }
    .pg-aside--wide .pg-facts li.pg-fact--hero .pg-fact-v { font-size: 22px; }
    .pg-aside--wide .pg-aside-foot { padding: 20px; }
    .pg-media { gap: 13px; }
    .pg-media-grid, .pg-media-shots { gap: 12px; }
    /* Two-up would leave a ~160px-wide player on a phone — too small to aim at,
       and the title would clamp to nothing. Photos are fine two-up, so only the
       videos go full width. */
    .pg-media-grid { grid-template-columns: minmax(0, 1fr); }
    .pg-vid-play { width: 48px; height: 48px; }
    .pg-vid-play svg { width: 18px; height: 18px; }
    .pg-batch { padding: 22px 20px; }
    .pg-batch-rows span { flex-basis: 62px; }
    .pg-lb { padding: 16px; }
    .pg-lb-close { top: 12px; right: 14px; }
}
