/* Programme hub pages. Loaded after styles.css; markup comes from
   website-extras/dev-tools/programme-pages/build.py. */

.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* The width attribute (present to avoid layout shift) would otherwise
   stretch the logo, since styles.css only sets its height. */
.footer-logo { width: auto; }

/* --- Hero (clears the fixed nav) --- */
.prog-hero { padding: 100px 0 40px; background: var(--off-white); }
.prog-hero-inner, .prog-narrow { max-width: 868px; } /* 820px of text + .container padding */
.prog-breadcrumb { font-size: 13px; color: var(--charcoal-light); margin-bottom: 18px; }
.prog-breadcrumb a { color: var(--charcoal-light); }
.prog-breadcrumb a:hover { color: var(--health-green); }
.prog-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.2; margin: 14px 0 18px; }
.prog-lede { font-size: 1.15rem; color: var(--charcoal-light); max-width: 720px; }
.prog-cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Keep long button labels inside narrow columns */
.prog-cta-row .btn, .prog-card .btn, .prog-find-result .btn { padding: 14px 24px; justify-content: center; text-align: center; }
.bcta-btn { justify-content: center; text-align: center; }

/* --- Sections and prose --- */
.prog-section { padding: 48px 0; }
.prog-section--tint { background: var(--off-white); border-block: 1px solid var(--border-color); }
.prog-section h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 38px 0 14px; }
.prog-section h3 { font-size: 1.2rem; margin: 26px 0 10px; }
.prog-section .container > :first-child { margin-top: 0; }
.prog-section p { margin-bottom: 18px; line-height: 1.85; }
.prog-section ul:not([class]), .prog-section ol:not([class]) { margin: 0 0 20px 22px; }
.prog-section ul:not([class]) { list-style: disc; }
.prog-section ul:not([class]) li, .prog-section ol:not([class]) li { margin-bottom: 9px; line-height: 1.7; }
.prog-section strong { font-weight: 600; }
.prog-section :is(p, ul, ol):last-child { margin-bottom: 0; }
.prog-section :is(p, li, td) a:not(.btn), .prog-lede a {
    color: inherit; text-decoration: underline;
    text-decoration-color: var(--health-green); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.prog-section :is(p, li, td) a:not(.btn):hover, .prog-lede a:hover { color: var(--health-green); }
.prog-section[id], .prog-section [id] { scroll-margin-top: 100px; }

/* --- Quick-answer callout --- */
.prog-answer {
    background: rgba(var(--health-green-rgb), 0.06); border: 1px solid rgba(var(--health-green-rgb), 0.15);
    border-radius: var(--radius-lg); padding: 24px 20px; margin-bottom: 28px;
}
.prog-section .prog-answer h2 { font-size: 1.2rem; line-height: 1.35; margin: 0 0 10px; }

/* --- Cards --- */
.prog-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }
.prog-card {
    display: flex; flex-direction: column; background: var(--white);
    border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 24px 20px;
    box-shadow: var(--shadow-sm); transition: border-color .2s, transform .2s;
}
.prog-card:hover { border-color: var(--health-green); transform: translateY(-2px); }
.prog-section .prog-card h3 { margin: 0 0 10px; }
.prog-card > .btn { margin-top: auto; align-self: flex-start; }
.prog-section .prog-card :is(p, ul):has(+ .btn) { margin-bottom: 20px; }
.prog-badge {
    align-self: flex-start; display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--health-green); background: rgba(var(--health-green-rgb), 0.1);
    padding: 4px 12px; border-radius: var(--radius-full); margin-bottom: 10px;
}
.prog-ticks { margin-bottom: 16px; }
.prog-ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; line-height: 1.6; }
.prog-ticks li::before { content: '\2713'; position: absolute; left: 0; top: 0; color: var(--health-green); font-weight: 700; }
.prog-section .prog-choose { font-size: .95rem; line-height: 1.65; color: var(--charcoal-light); }

/* --- Steps and chips --- */
.prog-steps { list-style: none; counter-reset: prog-step; margin: 20px 0; }
.prog-steps li { counter-increment: prog-step; position: relative; padding-left: 50px; margin-bottom: 20px; min-height: 34px; line-height: 1.7; }
.prog-steps li::before {
    content: counter(prog-step); position: absolute; left: 0; top: 0; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    font-size: 14px; font-weight: 600; color: var(--health-green); background: rgba(var(--health-green-rgb), 0.12);
}
.prog-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 20px; }
.prog-chips li { font-size: 13px; padding: 7px 16px; border-radius: var(--radius-full); border: 1px solid var(--border-color); background: var(--white); }

/* --- Comparison tables: stacked up to 640px, scrollable just above that --- */
.prog-table-wrap { overflow-x: auto; margin: 20px 0 8px; }
.prog-table-wrap:focus-visible { outline: 3px solid var(--wellness-blue); outline-offset: 2px; }
.prog-table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.55; background: var(--white); }
.prog-table th, .prog-table td { padding: 12px 14px; text-align: left; vertical-align: top; border: 1px solid var(--border-color); }
.prog-table th { font-weight: 600; }
.prog-table thead th { background: rgba(var(--health-green-rgb), 0.08); }
@media (max-width: 640px) {
    .prog-table-wrap { overflow-x: visible; }
    .prog-table, .prog-table tbody, .prog-table tr, .prog-table th, .prog-table td { display: block; width: 100%; }
    .prog-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .prog-table { background: none; }
    .prog-table tr { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 14px; }
    .prog-table th, .prog-table td { border: 0; overflow-wrap: anywhere; }
    .prog-table tbody th { background: rgba(var(--health-green-rgb), 0.08); }
    .prog-table td + td { border-top: 1px solid var(--border-color); }
    .prog-table td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 600; color: var(--charcoal-light); }
}
@media (min-width: 641px) {
    .prog-table { min-width: 680px; }
}

/* --- FAQ --- */
.prog-faq details { border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 4px 20px; margin-bottom: 12px; background: var(--white); }
.prog-faq summary { cursor: pointer; font-weight: 600; padding: 16px 28px 16px 0; list-style: none; position: relative; }
.prog-faq summary::-webkit-details-marker { display: none; }
.prog-faq summary::after { content: '+'; position: absolute; right: 0; top: 14px; font-size: 1.4rem; color: var(--health-green); font-weight: 400; }
.prog-faq details[open] summary::after { content: '\2212'; }
.prog-faq summary:focus-visible { outline: 3px solid var(--wellness-blue); outline-offset: 2px; border-radius: var(--radius-sm); }
.prog-faq-a { padding-bottom: 18px; color: var(--charcoal-light); }
.prog-section .prog-faq-a p { color: inherit; line-height: 1.75; margin-bottom: 12px; }
.prog-section .prog-faq-a p:last-child { margin-bottom: 0; }

/* --- Explore links --- */
.prog-explore-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.prog-explore-links a { font-size: 13px; padding: 7px 16px; border-radius: var(--radius-full); border: 1px solid var(--border-color); transition: all .2s; }
.prog-explore-links a:hover { border-color: var(--health-green); color: var(--health-green); }

/* --- Closing band (.blog-cta component from styles.css, used here as a full section).
   Extra class keeps the card's white text ahead of any .prog-section prose rule. */
.blog-cta { margin: 0; padding: 8px 0 72px; }
.blog-cta .blog-cta-card h2 { color: #fff; font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 14px; line-height: 1.2; }
.blog-cta .blog-cta-card > p { color: rgba(255,255,255,.94); max-width: 620px; margin: 0 auto 26px; font-size: 1.02rem; line-height: 1.7; }
.blog-cta-buttons:last-child { margin-bottom: 20px; }

/* --- Find Your Programme --- */
.prog-find-step { margin-bottom: 36px; }
.prog-find-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin-top: 16px; }
.prog-find-option {
    font: inherit; color: inherit; text-align: left; cursor: pointer; background: var(--white);
    border: 1.5px solid var(--border-color); border-radius: var(--radius-md); padding: 18px 20px;
    box-shadow: var(--shadow-sm); transition: border-color .2s, background-color .2s, transform .2s;
}
.prog-find-option strong { display: block; font-weight: 600; margin-bottom: 4px; }
.prog-find-option:hover { border-color: var(--health-green); transform: translateY(-2px); }
.prog-find-option[aria-pressed="true"] { border-color: var(--health-green); background: rgba(var(--health-green-rgb), 0.1); box-shadow: inset 0 0 0 1px var(--health-green); }
.prog-find-option:focus-visible { outline: 3px solid var(--wellness-blue); outline-offset: 2px; }
.prog-find-result {
    background: rgba(var(--health-green-rgb), 0.06); border: 1px solid rgba(var(--health-green-rgb), 0.15);
    border-radius: var(--radius-lg); padding: 24px 20px;
}
.prog-section .prog-find-result > :first-child { margin-top: 0; }
.prog-find-step[hidden], .prog-find-result[hidden] { display: none; }

/* --- Wider screens --- */
@media (min-width: 640px) {
    .prog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 769px) {
    .prog-hero { padding: 130px 0 56px; }
    .prog-section { padding: 56px 0; }
    .prog-answer, .prog-find-result { padding: 30px 34px; }
    .prog-card { padding: 28px 26px; }
}
@media (min-width: 1024px) {
    .prog-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .prog-grid--2, .prog-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .prog-card, .prog-find-option, .prog-explore-links a, .btn-slide-fill, .btn-slide-text, .bcta-btn { transition: none; }
    .prog-card:hover, .prog-find-option:hover, .bcta-btn:hover { transform: none; }
}

.prog-note { font-size: 0.875rem; color: var(--charcoal-light); margin-top: 12px; }
.prog-note a { color: inherit; text-decoration: underline; }
