/**
 * Inner content pages: the layout the generic page.php renders for every
 * non-designed page (Inner Page wireframe). This file owns the hero, the
 * two-column grid, the prose defaults for the editable content column, and
 * the sidebar (section nav + contact card). The structured components that
 * sit inside the content column (principles, values, quotes, callouts) are
 * ACF blocks styled in css/hos-blocks.css.
 *
 * Design-system tokens throughout. Anchors carry explicit overrides because
 * the design-system base rule underlines and recolours every <a> inside
 * .fl-ds-page; this stylesheet is enqueued after presa-child so its ties win.
 */

/* ---- Hero ---- */
.hos-inner-hero { background: var(--ds-color-surface); padding: clamp(40px, 6vw, 72px) 0; }
.hos-inner-hero__inner { max-width: var(--ds-width-container); margin: 0 auto; padding: 0 var(--ds-space-gutter); display: flex; flex-direction: column; gap: var(--ds-space-md); }
.hos-inner-hero h1 { margin: 0; font-family: var(--ds-font-heading); font-weight: var(--ds-weight-bold); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: var(--ds-letter-display); color: var(--ds-color-heading); }
.hos-inner-hero__standfirst { margin: 0; font-size: var(--ds-text-intro); line-height: var(--ds-line-lead); max-width: 60ch; color: var(--ds-color-body); }

/* ---- Body layout ---- */
.hos-inner { background: var(--ds-color-white); padding: clamp(48px, 7vw, 88px) 0; color: var(--ds-color-body); }
.hos-inner__inner { max-width: var(--ds-width-container); margin: 0 auto; padding: 0 var(--ds-space-gutter); }
.hos-inner-grid { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.hos-inner-grid--full { display: block; }
.hos-inner-main { flex: 1 1 560px; min-width: 0; }
.hos-inner-grid--full .hos-inner-main { max-width: 820px; }
.hos-inner-side { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: var(--ds-space-lg); position: sticky; top: 24px; }

/* ---- Prose defaults for the editable content column ---- */
.hos-inner-main { font-size: var(--ds-text-base); line-height: var(--ds-line-body); color: var(--ds-color-body); }
.hos-inner-main > * { margin-top: 0; margin-bottom: var(--ds-space-lg); }
.hos-inner-main > *:last-child { margin-bottom: 0; }
.hos-inner-main h2 { font-family: var(--ds-font-heading); font-weight: var(--ds-weight-bold); font-size: clamp(1.625rem, 3vw, 2.125rem); line-height: 1.2; color: var(--ds-color-heading); margin-top: var(--ds-space-xl); }
.hos-inner-main h3 { font-family: var(--ds-font-heading); font-weight: var(--ds-weight-bold); font-size: var(--ds-text-h4); line-height: 1.25; color: var(--ds-color-heading); margin-top: var(--ds-space-lg); }
.hos-inner-main h2:first-child, .hos-inner-main h3:first-child { margin-top: 0; }
.hos-inner-main p, .hos-inner-main li { max-width: 68ch; }
.hos-inner-main ul, .hos-inner-main ol { padding-left: 1.3em; }
.hos-inner-main li { margin-bottom: 8px; }
.hos-inner-main .is-style-hos-intro { font-size: var(--ds-text-intro); line-height: var(--ds-line-lead); color: var(--ds-color-heading); max-width: 60ch; }
.hos-inner-main a { color: var(--ds-color-red-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.hos-inner-main a:hover { color: var(--ds-color-red-hover); }

/* ---- Sidebar: section nav ---- */
.hos-inner-nav { background: var(--ds-color-white); border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-lg); padding: 24px; display: flex; flex-direction: column; gap: var(--ds-space-sm); }
.hos-inner-nav__title { font-family: var(--ds-font-heading); font-weight: var(--ds-weight-semibold); text-transform: uppercase; letter-spacing: .06em; font-size: var(--ds-text-label); color: var(--ds-color-muted); }
.hos-inner-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hos-inner-nav li { margin: 0; }
.hos-inner-nav li:not(:last-child) { border-bottom: 1px solid var(--ds-color-border); }
.hos-inner-nav__link, .hos-inner-nav__current { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; font-size: var(--ds-text-base); line-height: 1.3; }
.hos-inner a.hos-inner-nav__link { color: var(--ds-color-red-dark); text-decoration: none; }
.hos-inner a.hos-inner-nav__link:hover { color: var(--ds-color-red-hover); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
.hos-inner-nav__current { font-family: var(--ds-font-heading); font-weight: var(--ds-weight-semibold); color: var(--ds-color-heading); }
.hos-inner-nav svg { width: 16px; height: 16px; flex: none; }

/* ---- Sidebar: contact card ---- */
.hos-inner-cta { background: var(--ds-color-blue-tint); border: 1px solid var(--ds-color-blue-dark); border-radius: var(--ds-radius-lg); padding: 28px; display: flex; flex-direction: column; gap: var(--ds-space-sm); }
.hos-inner-cta__title { font-family: var(--ds-font-heading); font-weight: var(--ds-weight-bold); font-size: var(--ds-text-h4); line-height: 1.3; color: var(--ds-color-heading); }
.hos-inner-cta p { margin: 0; font-size: var(--ds-text-xs); }
.hos-inner-cta__phone { font-family: var(--ds-font-heading); font-weight: var(--ds-weight-bold); font-size: var(--ds-text-lead); }
.hos-inner a.hos-inner-cta__phone { color: var(--ds-color-heading); text-decoration: none; }
.hos-inner-cta__btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: var(--ds-space-xs); padding: 14px 24px; border-radius: var(--ds-radius-pill); border: 2px solid transparent; font-family: var(--ds-font-heading); font-weight: var(--ds-weight-semibold); font-size: var(--ds-text-base); line-height: 1; }
.hos-inner a.hos-inner-cta__btn { text-decoration: none; background: var(--ds-color-red-dark); color: var(--ds-color-white); }
.hos-inner a.hos-inner-cta__btn:hover { background: var(--ds-color-red-hover); color: var(--ds-color-white); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.hos-inner-side { position: static; max-width: none; width: 100%; }
}

/* ---- Closing CTA band (opt-in per page, from the CTA post type) ---- */
.hos-inner-closing { padding: clamp(44px, 6vw, 76px) 0; margin-top: clamp(40px, 6vw, 72px); background: var(--ds-color-blue-dark); }
.hos-inner-closing--red { background: var(--ds-color-red-dark); }
.hos-inner-closing--neutral { background: var(--ds-color-surface); }
.hos-inner-closing__inner { max-width: var(--ds-width-container); margin: 0 auto; padding: 0 var(--ds-space-gutter); display: flex; flex-wrap: wrap; gap: var(--ds-space-xl); align-items: center; justify-content: space-between; }
.hos-inner-closing__text { flex: 1 1 440px; display: flex; flex-direction: column; gap: var(--ds-space-md); }
.hos-inner-closing__text h2 { margin: 0; font-family: var(--ds-font-heading); font-weight: var(--ds-weight-bold); font-size: clamp(1.625rem, 3vw, 2.125rem); line-height: 1.15; color: var(--ds-color-white); }
.hos-inner-closing__text p { margin: 0; font-size: var(--ds-text-intro); line-height: 1.6; color: var(--ds-color-blue-on-dark); max-width: 52ch; }
.hos-inner-closing--neutral .hos-inner-closing__text h2 { color: var(--ds-color-heading); }
.hos-inner-closing--neutral .hos-inner-closing__text p { color: var(--ds-color-body); }
.hos-inner-closing__actions { display: flex; flex-wrap: wrap; gap: var(--ds-space-md); align-items: center; }
.hos-inner-closing__btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 16px 30px; border-radius: var(--ds-radius-pill); border: 2px solid transparent; font-family: var(--ds-font-heading); font-weight: var(--ds-weight-semibold); font-size: var(--ds-text-base); line-height: 1; }
.hos-inner-closing a.hos-inner-closing__btn { text-decoration: none; background: var(--ds-color-white); color: var(--ds-color-blue-dark); }
.hos-inner-closing a.hos-inner-closing__btn:hover { background: var(--ds-color-blue-tint); color: var(--ds-color-blue-dark); }
.hos-inner-closing a.hos-inner-closing__btn--ghost { background: transparent; border-color: var(--ds-color-white); color: var(--ds-color-white); }
.hos-inner-closing a.hos-inner-closing__btn--ghost:hover { background: rgba(255, 255, 255, .16); color: var(--ds-color-white); }
.hos-inner-closing--neutral a.hos-inner-closing__btn { background: var(--ds-color-red-dark); color: var(--ds-color-white); }
.hos-inner-closing--neutral a.hos-inner-closing__btn--ghost { border-color: var(--ds-color-border-hover); color: var(--ds-color-heading); }
.hos-inner a.hos-inner-cta__link { margin-top: 2px; color: var(--ds-color-red-dark); font-weight: var(--ds-weight-semibold); font-size: var(--ds-text-xs); text-decoration: none; }
.hos-inner a.hos-inner-cta__link:hover { text-decoration: underline; }

/* ---- Collapsible (e.g. the film script) ---- */
.hos-inner-main .wp-block-details { border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-md); padding: var(--ds-space-md) var(--ds-space-lg); background: var(--ds-color-surface); }
.hos-inner-main .wp-block-details > summary { cursor: pointer; font-family: var(--ds-font-heading); font-weight: var(--ds-weight-bold); color: var(--ds-color-heading); }
.hos-inner-main .wp-block-details[open] > summary { margin-bottom: var(--ds-space-md); }

/* 14 Sept: space the collapsible transcript away from the video/embed above it */
.hos-inner-main .wp-block-details { margin-top: var(--ds-space-xl); }

/* Two-column hero when the page carries a featured image (Who we are, Our funders) */
.hos-inner-hero--media .hos-inner-hero__inner { flex-direction: row; flex-wrap: wrap; align-items: center; gap: clamp(28px, 5vw, 64px); }
.hos-inner-hero--media .hos-inner-hero__text { flex: 1 1 420px; display: flex; flex-direction: column; gap: var(--ds-space-md); min-width: 0; }
.hos-inner-hero__img { flex: 1 1 380px; width: 100%; max-width: 540px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ds-radius-lg); display: block; }
@media (max-width: 720px){ .hos-inner-hero--media .hos-inner-hero__img { max-width: none; aspect-ratio: 16 / 10; } }

/* Optional banner buttons (ACF Page banner buttons: hero_button_1 solid, hero_button_2 outline) */
.hos-inner-hero__cta { display: flex; flex-wrap: wrap; gap: var(--ds-space-sm); margin-top: var(--ds-space-sm); }
.hos-inner-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 28px; border-radius: var(--ds-radius-pill); border: 2px solid transparent; font-family: var(--ds-font-heading); font-weight: var(--ds-weight-semibold); font-size: var(--ds-text-base); line-height: 1; text-decoration: none !important; transition: background .15s ease, border-color .15s ease, color .15s ease; }
a.hos-inner-btn--primary { background: var(--ds-color-red-dark); color: var(--ds-color-white) !important; }
a.hos-inner-btn--primary:hover { background: var(--ds-color-red-hover); }
a.hos-inner-btn--outline { background: var(--ds-color-white); border-color: var(--ds-color-muted); color: var(--ds-color-heading) !important; }
a.hos-inner-btn--outline:hover { background: var(--ds-color-surface); border-color: var(--ds-color-blue-dark); }
.hos-inner-main h2[id] { scroll-margin-top: 24px; }

/* Long email addresses and URLs wrap instead of overflowing on phones */
.hos-inner-main { overflow-wrap: break-word; }
