/* =============================================
   OUR STORY (ABOUT) PAGE
   ============================================= */

/* ---------- Mission / Vision / Values ---------- */
.about-pillars {
    background: var(--color-surface);
    padding-block: var(--space-16);
}
.about-pillars__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}
.about-pillar {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-6);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}
.about-pillar__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-green);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.about-pillar__content { min-width: 0; }
.about-pillar__title {
    font-size: var(--text-lg);
    letter-spacing: var(--leading-tight);
    margin-bottom: var(--space-3);
}
.about-pillar__body {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}
/* 3 cards with real body copy (plus a 48px icon eating into each column)
   had no step between the 3-col desktop layout and the 768px full stack —
   tablets (769-1024px) were left squeezing 3 columns into as little as
   ~230px each. This only touches that gap; 1025px+ and ≤768px are
   unchanged (the rule below still wins at ≤768 since it comes later). */
@media (max-width: 1024px) {
    .about-pillars__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .about-pillars__grid { grid-template-columns: 1fr; }
}

/* ---------- Impact intro ---------- */
.about-impact-intro__banner {
    width: 100%;
    height: 420px;
    object-fit: cover;
}
.about-impact-intro__banner--placeholder { background: var(--color-surface-mid); }
.about-impact-intro__content {
    /* Fills the row (the standard .container width) per the design —
       previously capped at max-width:760px + margin-inline:auto, which
       squeezed it into a narrow centered column with large empty side
       margins the design doesn't have. Undone; text-align:center is the
       only centering this needs. */
    text-align: center;
    padding-block: var(--space-16);
}
.about-impact-intro__heading {
    /* Was an <h2>, now <h4> for document-outline reasons — this preserves
       the h2-level look it already had rather than dropping to h4's
       smaller default size. Same reasoning on every other former-<h2>
       heading below. */
    font-size: var(--text-5xl);
    letter-spacing: var(--leading-tight);
    text-align: center;
    margin-bottom: var(--space-5);
}
.about-impact-intro__body {
    text-align: center;
    margin-bottom: var(--space-8);
    /* Distributes text across lines more evenly (no lone short last line) —
       supported in current Chrome/Edge/Safari/Firefox; browsers without it
       just wrap normally, no fallback needed. */
    text-wrap: balance;
}
@media (max-width: 768px) {
    .about-impact-intro__banner { height: 260px; }
}

/* ---------- Our journey (timeline) ---------- */
.about-journey { padding-block: var(--space-16); }
.about-journey__heading {
    font-size: var(--text-5xl);
    letter-spacing: var(--leading-tight);
    text-align: center;
    margin-bottom: var(--space-16);
}

.about-journey__timeline { position: relative; }
.about-journey__timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--color-border-light);
    transform: translateX(-50%);
}

.journey-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-12);
}
.journey-item:last-child { margin-bottom: 0; }

/*
   The dot is positioned absolutely against .journey-item itself (top:0 is
   this row's own top, i.e. right where the year label starts) rather than
   as a grid column — grid's align-items was tying the dot's position to
   whichever column happened to be tallest (the image, or a long paragraph),
   which is what caused it to drift away from the year label. left:50%
   matches .about-journey__timeline::before, the continuous vertical line,
   so it always sits exactly on it regardless of row height. top is a
   calc() off the year's own font-size/line-height (both fixed to exact,
   known values below) instead of a guessed px, so it's centered on the
   year's line precisely rather than approximately.
*/
.journey-item__marker {
    position: absolute;
    left: 50%;
    top: calc(var(--text-3xl) / 2);
    transform: translate(-50%, -50%);
    z-index: 1;
}
.journey-item__year {
    display: block;
    font-size: var(--text-3xl);
    line-height: 1;
    font-weight: 700;
    color: var(--color-border);
    margin-bottom: var(--space-2);
}
.journey-item__dot {
    /* Must be block/inline-block — width/height do nothing on a plain
       inline <span>, which is what silently made this invisible. */
    display: block;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-full);
    background: var(--color-text);
}

/* grid-row:1 forces both into the same row explicitly rather than relying
   on grid auto-placement inferring it (media and content are the only two
   real grid items here — the marker is position:absolute, excluded from
   grid placement entirely) — belt-and-suspenders against the image
   floating away from its row's text, which the default row auto-flow
   should already prevent but evidently didn't reliably. */
.journey-item__media { grid-column: 1; grid-row: 1; align-self: start; }
.journey-item__content { grid-column: 2; grid-row: 1; align-self: start; text-align: left; }

.journey-item:nth-child(even) .journey-item__media { grid-column: 2; }
.journey-item:nth-child(even) .journey-item__content { grid-column: 1; text-align: right; }

.journey-item__image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius-lg);
}
.journey-item__image--placeholder { background: var(--color-surface-mid); }

.journey-item__title { letter-spacing: var(--leading-tight); margin-bottom: var(--space-3); }
.journey-item__body { font-size: var(--text-sm); }

@media (max-width: 900px) {
    /* Single column, image then content stacked in DOM order; the line
       and dots move to a left rail instead of the center. */
    .about-journey__timeline::before { left: 20px; }
    .journey-item,
    .journey-item:nth-child(even) {
        grid-template-columns: 1fr;
        padding-left: 40px;
    }
    .journey-item__marker { left: 20px; }
    /* grid-row:1 (set above, for the desktop side-by-side layout) isn't
       reset by grid-template-columns:1fr alone — media and content both
       staying pinned to row 1 in a single-column grid stacks them directly
       on top of each other instead of one after another. This is what
       actually puts image and text on top of each other on mobile. */
    .journey-item__media,
    .journey-item:nth-child(even) .journey-item__media { grid-column: 1; grid-row: 1; }
    .journey-item__content,
    .journey-item:nth-child(even) .journey-item__content { grid-column: 1; grid-row: 2; text-align: left; }
    .journey-item__year { font-size: var(--text-md); }
}

/* ---------- Proven Impact (stat band) ---------- */
.about-impact-stats {
    background: var(--color-green);
    padding-block: var(--space-16);
    text-align: center;
}
.about-impact-stats__heading {
    font-size: var(--text-5xl);
    letter-spacing: var(--leading-tight);
    color: var(--color-white);
    margin-bottom: var(--space-10);
}
.about-impact-stats__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}
.about-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}
.about-stat__icon {
    color: rgba(255,255,255,0.85);
    margin-bottom: var(--space-1);
}
/* The icon strings from outbox_pillar_icons() are hardcoded to 24x24 —
   too small next to the 48px stat numbers next to them. CSS width/height
   on the <svg> overrides those HTML attributes. */
.about-stat__icon svg { width: 48px; height: 48px; }
.about-stat__number {
    font-size: var(--text-4xl);
    font-weight: 700;
    color: var(--color-accent);
}
.about-stat__label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-white);
}
/* Was plain white text on the green band — same weight/color as the stat
   labels above it, so it read as more of the same copy than an actual
   call to action. Styled as a real button (white fill, high contrast)
   instead, matching .about-cta__btn's treatment on the same green tone
   elsewhere on this page. */
.about-impact-stats__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-white);
    color: var(--color-green-darker);
    font-weight: 700;
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    transition: background var(--transition);
}
.about-impact-stats__link:hover { background: rgba(255,255,255,0.9); }

@media (max-width: 1024px) {
    .about-impact-stats__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .about-impact-stats__grid { grid-template-columns: repeat(2, 1fr); }
}
/* 2 columns gets tight once the icon just went from 36px to 48px, on the
   smallest phones specifically (a 4xl bold number + 2-line label next to a
   48px icon in ~130px). Only kicks in below 380px — 381px and up (including
   the 480px rule right above) is unchanged. */
@media (max-width: 380px) {
    .about-impact-stats__grid { grid-template-columns: 1fr; }
}

/* ---------- District impact map ---------- */
.about-map { background: var(--color-surface); padding-block: var(--space-16); }
.about-map__heading { font-size: var(--text-5xl); letter-spacing: var(--leading-tight); text-align: center; margin-bottom: var(--space-10); }

/*
   .about-map__layout lives outside .container (see about-map.php) so the
   map can bleed to the true left edge of the viewport, per the reference
   design — a plain centered .container caps out at --container-max on
   wide screens, same as everywhere else on the site, which left visible
   margin down the map's left side instead of it touching the edge.

   No max-width/centering here: this row is simply the full viewport
   width, and padding-inline-end pushes the sidebar's right edge in to
   line up with where a normal .container's content would end on any
   viewport width (the centering gutter beyond --container-max, plus the
   container's own inline padding) — everything else on the page keeps
   using .container as normal, only this row bleeds.
*/
.about-map__layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: var(--space-6);
    align-items: start;
    padding-inline-end: calc(max(0px, (100vw - var(--container-max)) / 2) + var(--container-pad));
}

.about-map__canvas {
    height: 520px;
    overflow: hidden;
    background: var(--color-surface-mid);
    /* Leaflet's internal panes/controls/popups use their own z-index values
       (up to ~700), which can climb above the sticky navbar (z-index: 200)
       on scroll since nothing here previously contained them to a local
       stacking context. isolation forces that regardless of Leaflet's
       internal numbers. */
    isolation: isolate;
}

.about-map__sidebar {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.about-map__toggle {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}
.about-map__toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    background: var(--color-surface-mid);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-secondary);
    border-radius: var(--radius-full);
    transition: background var(--transition), color var(--transition);
}
.about-map__toggle-icon { flex-shrink: 0; }
.about-map__toggle-btn.is-active {
    background: var(--color-primary-bg);
    color: var(--color-primary-mid);
}

.about-map__search {
    width: 100%;
    height: 44px;
    padding-inline: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--font-primary);
    margin-bottom: var(--space-4);
}
.about-map__search:focus { border-color: var(--color-primary-light); }
.about-map__search:focus-visible { outline: 2px solid var(--color-primary-light); outline-offset: 2px; }

.map-region { border-bottom: 1px solid var(--color-border-light); }
.map-region:last-child { border-bottom: none; }

.map-region__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-block: var(--space-4);
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--color-text);
}
.map-region__toggle .map-region__chevron {
    transition: transform var(--transition);
}
.map-region.is-open .map-region__toggle .map-region__chevron { transform: rotate(180deg); }

.map-region__list {
    display: none;
    flex-direction: column;
    gap: var(--space-2);
    padding-bottom: var(--space-4);
}
.map-region.is-open .map-region__list { display: flex; }
.map-region__item {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}
.map-region__item.is-hidden { display: none; }

.about-map__noscript-list { padding: var(--space-4); font-size: var(--text-sm); }

/* Cluster badge styling (overrides Leaflet.markercluster default). Actual
   background color is set per-cluster inline by about-map.js (graduated by
   value — see clusterColor()); this is just the fallback/shape. */
.about-map-cluster {
    background: var(--color-green);
    color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-primary);
}

@media (max-width: 900px) {
    /* Stacked to one column below this — the map keeps bleeding edge-to-edge
       (a normal treatment for a full-width mobile map banner), but the
       sidebar needs its own left/right padding now that it's no longer in
       a separate grid column keeping it clear of the bleed. */
    .about-map__layout { grid-template-columns: 1fr; padding-inline-end: 0; }
    .about-map__canvas { height: 380px; }
    .about-map__sidebar { margin-inline: var(--container-pad); }
}
@media (max-width: 768px) {
    /* Matches .container's own breakpoint for switching to the mobile
       padding value. */
    .about-map__sidebar { margin-inline: var(--container-pad-mobile); }
}

/* ---------- Our team teaser ---------- */
.about-team-teaser {
    padding-block: var(--space-16);
    text-align: center;
}
.about-team-teaser__heading { font-size: var(--text-5xl); letter-spacing: var(--leading-tight); margin-bottom: var(--space-4); }
.about-team-teaser__body {
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: var(--space-8);
}
.about-team-teaser__media { margin-bottom: var(--space-8); }
.about-team-teaser__image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: var(--radius-xl);
}
.about-team-teaser__image--placeholder { background: var(--color-surface-mid); }
@media (max-width: 768px) {
    .about-team-teaser__image { height: 260px; }
}

/* ---------- "Join us on our mission" CTA banner ---------- */
.about-cta {
    background: var(--color-green-light);
    padding-block: var(--space-16);
}

.about-cta__inner {
    display: grid;
    grid-template-columns: 0.55fr 1fr;
    align-items: center;
    gap: var(--space-8);
    padding-inline-start: var(--space-8);
    padding-inline-end: 0;
}
.about-cta__heading { font-size: var(--text-5xl); letter-spacing: var(--leading-tight); color: var(--color-white); margin-bottom: var(--space-4); }
.about-cta__body { color: rgba(255,255,255,0.9); margin-bottom: var(--space-6); }
.about-cta__btn {
    background: var(--color-white);
    color: var(--color-green-darker);
    border-color: var(--color-white);
}
.about-cta__btn:hover { background: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.9); }
.about-cta__media {
    width: 100%;
    height: 100%;
}
.about-cta__image {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    display: block;
}
.about-cta__image--placeholder { background: rgba(255,255,255,0.15); }

@media (max-width: 900px) {
    .about-cta__inner {
        grid-template-columns: 1fr;
        padding-inline: var(--space-6);
    }
}

/* ---------- Contact Us ---------- */
.about-contact { padding-block: var(--space-16); }
.about-contact__heading { font-size: var(--text-5xl); letter-spacing: var(--leading-tight); margin-bottom: var(--space-4); }
.about-contact__body { max-width: 640px; margin-bottom: var(--space-10); }

.about-contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    align-items: start;
}

.about-contact__col-heading {
    font-size: var(--text-lg);
    letter-spacing: var(--leading-tight);
    margin-bottom: var(--space-4);
}
.about-contact__col-heading--spaced { margin-top: var(--space-8); }

.about-contact__hub-name {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}
.about-contact__hub-address {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}
.about-contact__map-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-primary);
    font-weight: 600;
    font-size: var(--text-sm);
}

.about-contact__link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-primary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
}

.about-contact__social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}
.about-contact__social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-surface-mid);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}
.about-contact__social-link:hover { background: var(--color-primary); color: var(--color-white); }

.about-contact__map-image {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border-radius: var(--radius-xl);
    overflow: hidden; /* clips the Leaflet canvas to the rounded corners */
    background: var(--color-surface-mid); /* visible briefly while tiles load */
    /* Same fix as .about-map__canvas — keeps Leaflet's internal z-index
       values from climbing above the sticky navbar on scroll. */
    isolation: isolate;
}
/* Leaflet injects its own positioned children/controls into this container
   once about-contact-map.js initialises it — no extra styling needed here. */

@media (max-width: 900px) {
    .about-contact__grid { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */
.about-faq { padding-block: var(--space-16); }
.about-faq__inner { max-width: 960px; text-align: center; }
.about-faq__heading { font-size: var(--text-5xl); letter-spacing: var(--leading-tight); margin-bottom: var(--space-4); }
.about-faq__body { margin-bottom: var(--space-10); }

.about-faq__list { text-align: left; }
.faq-item { border-bottom: 1px solid var(--color-border-light); }
.faq-item:first-child { border-top: 1px solid var(--color-border-light); }

.faq-item__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: var(--space-5);
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
}

.faq-item__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-primary-light);
    position: relative;
}
.faq-item__icon::before,
.faq-item__icon::after {
    content: '';
    position: absolute;
    background: var(--color-primary-light);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.faq-item__icon::before { width: 10px; height: 1.5px; }
.faq-item__icon::after { width: 1.5px; height: 10px; transition: opacity var(--transition); }
.faq-item.is-open .faq-item__icon::after { opacity: 0; }

/* max-height:0 + overflow:hidden, driven by an inline pixel max-height from
   about.js (scrollHeight to open, 0 to close) — more reliable across
   browsers than animating grid-template-rows: 0fr/1fr, which can leave a
   sliver of the answer visible instead of fully collapsing in some browsers.
   See the same fix/reasoning in faq.css. */
.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
}
.faq-item__answer > p {
    font-size: var(--text-sm);
    padding-bottom: var(--space-5);
}
