/* ---------- Programs & Initiatives ---------- */
.programs {
    --ink: #1a1412;
    --ink-soft: rgba(26,20,18,.66);
    --line: rgba(26,20,18,.12);
    --pc: #2f7d4f;                       /* accent of the active program, set by JS */
    position: relative; overflow: hidden; color: var(--ink); background: #fff;
    padding: 0 0 clamp(48px, 5vw, 72px);
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The composition fills the width; its outer segments run off the edges like the reference layout. */
.ring-stage { position: relative; max-width: 1560px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px) 0 0;
    display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(320px, .8fr); gap: clamp(16px, 2.5vw, 40px); align-items: center; }
/* Drawn larger than its column and pulled left, so the outer segments run off the page edge like the reference. */
.ring { display: block; width: 116%; height: auto; margin-left: -16%; }

/* Grey dotted guides in the white space */
.feature-edge { fill: none; stroke: rgba(26,20,18,.14); stroke-width: 1.5; }
.guides circle, .guides line { fill: none; stroke: rgba(26,20,18,.28); stroke-width: 1.6; stroke-dasharray: 1 7; stroke-linecap: round; }

/* Segments */
.seg { cursor: pointer; outline: none; transform: translate(0, 0);
    transition: transform .7s cubic-bezier(.2,.75,.15,1), filter .5s ease; }
.seg--decor { cursor: default; }
.seg-outline { fill: none; stroke: transparent; stroke-width: 5; transition: stroke .5s ease; }
.seg[role="button"]:hover { transform: translate(calc(var(--dx) * .5), calc(var(--dy) * .5)); }
.seg.is-active { transform: translate(var(--dx), var(--dy)); filter: drop-shadow(0 22px 34px rgba(30,10,10,.32)); }
.seg.is-active .seg-outline { stroke: var(--c); }
.seg:focus-visible .seg-outline { stroke: var(--c); stroke-dasharray: 10 6; }

/* White transit network over the photos */
.network { pointer-events: none; }
.network circle, .network line { fill: none; stroke: rgba(255,255,255,.92); stroke-width: 2.2; }
.network .thick { stroke-width: 4.5; }
.network .hub-edge { stroke-width: 3; }
.network .node { fill: #fff; stroke: rgba(26,20,18,.45); stroke-width: 1.5; }

/* Program routes */
.routes { pointer-events: none; }
.route line { stroke: #fff; stroke-width: 3.5; stroke-linecap: round; opacity: .9; transition: stroke .5s ease; }
.route .node-end { fill: #fff; stroke: rgba(26,20,18,.5); stroke-width: 2; transition: fill .5s ease; }
.route.is-active line { stroke: var(--pc); stroke-width: 5; opacity: 1; }
.route.is-active .node-end { fill: var(--pc); stroke: #fff; stroke-width: 3.5; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0%, 100% { r: 9; } 50% { r: 13; } }
.seg-label { font: 800 20px/1 'Manrope', sans-serif; fill: #fff; text-anchor: middle; dominant-baseline: middle;
    paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: 4px; letter-spacing: .04em; }

/* Hub title */
.hub text { fill: #fff; text-anchor: middle; }
.hub-kicker { font: 700 11.5px/1 'Manrope', sans-serif; letter-spacing: .3em; opacity: .9; }
.hub-title { font: 800 64px/1 'Manrope', sans-serif; letter-spacing: -.01em; }
.hub-title--italic { font: italic 400 54px/1 'Fraunces', Georgia, serif; fill: #f3c47a !important; }

/* ---------- Details panel ---------- */
.programs-panel { min-width: 0; }
.panel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-count { font: 500 14px/1 'Manrope', sans-serif; letter-spacing: .08em; color: var(--ink-soft); }
.panel-count b { font: 500 26px/1 'Fraunces', serif; color: var(--pc); transition: color .5s ease; }
.panel-arrows { display: flex; gap: 6px; }
.panel-arrow { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    border: 1px solid var(--line); background: #fff; color: var(--ink); transition: border-color .25s, transform .25s; }
.panel-arrow:hover { border-color: var(--pc); transform: scale(1.06); }
.panel-progress { height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; margin-bottom: 18px; }
.panel-progress span { display: block; height: 100%; background: var(--pc); transform: scaleX(0); transform-origin: left; }
.programs.is-playing .panel-progress span { animation: progress var(--auto, 6s) linear forwards; }
.programs.is-paused .panel-progress span { animation-play-state: paused; }
.programs.is-manual .panel-progress span { animation: none; transform: scaleX(1); }
@keyframes progress { to { transform: scaleX(1); } }

.program-details { display: grid; }
.program-detail { grid-area: 1 / 1; opacity: 0; transform: translateY(12px); visibility: hidden;
    transition: opacity .45s ease, transform .6s cubic-bezier(.2,.75,.15,1), visibility 0s linear .45s; }
.program-detail.is-active { opacity: 1; transform: none; visibility: visible; transition-delay: .1s, .1s, 0s; }
.program-tag { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, #fff); }
.program-title { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: clamp(26px, 2.4vw, 38px);
    line-height: 1.1; letter-spacing: -.015em; margin: 12px 0 10px; }
.program-text { margin: 0 0 20px; font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.program-points { display: grid; list-style: none; margin: 0 0 24px; padding: 0; gap: 10px; }
.program-points li { position: relative; padding-left: 30px; font-size: 15px; line-height: 1.5; }
.program-points li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
    background: color-mix(in srgb, var(--pc) 14%, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1412' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.program-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; text-decoration: none;
    font: 600 14px/1 'Manrope', sans-serif; transition: transform .25s ease, background .25s ease, border-color .25s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: #1a1412; color: #fff; box-shadow: 0 12px 24px -12px rgba(26,20,18,.6); }
.btn-dark svg { transition: transform .25s ease; }
.btn-dark:hover svg { transform: translateX(3px); }
.btn-line { border: 1px solid rgba(26,20,18,.18); color: var(--ink); background: #fff; }
.btn-line:hover { border-color: var(--pc); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .ring-stage { grid-template-columns: 1fr; padding: 0; gap: 8px; }
    .ring { width: 100%; margin-left: 0; }
    .programs-panel { width: 100%; max-width: 620px; margin: 0 auto; padding: 0 20px; }
}
@media (max-width: 560px) {
    .ring-stage { overflow: hidden; }
    .ring { width: 124%; margin-left: -12%; }
    .program-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .programs *, .programs *::before { animation: none !important; transition-duration: .01s !important; }
}
