/* Blood Do Zindagi Bachao Foundation - public site theme */

:root {
    --bd-red: #c1121f;
    --bd-red-dark: #8d0801;
    --bd-red-soft: #fdecec;
    --bd-ink: #1c1b1f;
    --bd-muted: #6b6a70;
    --bd-line: #e6e4ea;
    --bd-bg: #ffffff;
    --bd-bg-alt: #f8f7fa;
    --bs-primary: #c1121f;

    /* Layered shadows rather than one soft blur: a tight contact shadow keeps the
       edge crisp while the wide one gives the card its height off the page. */
    --bd-shadow-sm: 0 1px 2px rgba(28, 27, 32, .06), 0 2px 6px rgba(28, 27, 32, .04);
    --bd-shadow-md: 0 2px 4px rgba(28, 27, 32, .06), 0 10px 24px rgba(28, 27, 32, .08);
    --bd-shadow-lg: 0 4px 8px rgba(28, 27, 32, .07), 0 18px 45px rgba(28, 27, 32, .13);
    --bd-shadow-red: 0 10px 30px rgba(193, 18, 31, .22);
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--bd-ink);
    background: var(--bd-bg);
}

a { color: var(--bd-red); text-decoration: none; }
a:hover { color: var(--bd-red-dark); }

.btn-primary,
.btn-primary:focus {
    background-color: var(--bd-red);
    border-color: var(--bd-red);
}
.btn-primary:hover { background-color: var(--bd-red-dark); border-color: var(--bd-red-dark); }
.btn-outline-primary { color: var(--bd-red); border-color: var(--bd-red); }
.btn-outline-primary:hover { background-color: var(--bd-red); border-color: var(--bd-red); }
.text-primary { color: var(--bd-red) !important; }
.bg-primary { background-color: var(--bd-red) !important; }
.border-primary { border-color: var(--bd-red) !important; }
.form-control:focus, .form-select:focus {
    border-color: #e39aa0;
    box-shadow: 0 0 0 .2rem rgba(193, 18, 31, .12);
}
.form-check-input:checked { background-color: var(--bd-red); border-color: var(--bd-red); }

/* ------------------------------------------------------------------ header */

.topbar {
    background: var(--bd-ink);
    color: #dcdae0;
    font-size: .85rem;
    padding: .45rem 0;
}
.topbar a { color: #fff; }
.topbar .helpline { font-weight: 600; }

.navbar-brand-mark {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bd-red); color: #fff; border-radius: 12px;
    font-size: 1.3rem;
}
.navbar .nav-link { font-weight: 500; color: var(--bd-ink); }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--bd-red); }
.navbar { box-shadow: 0 1px 0 var(--bd-line); }

/* ==========================================================================
   Main navigation

   Desktop: a flat bar that gains a frosted background and a shadow once the
   page scrolls, with mega panels that open on hover (see public/js/site.js).
   Mobile: the same menu tree rendered as an accordion in a slide-in drawer.
   ========================================================================== */

.site-nav {
    background: #fff;
    padding-block: .55rem;
    transition: padding .25s ease, box-shadow .25s ease, background-color .25s ease;
}

/* Sitting on top of page content once scrolled.

   OPAQUE BY DEFAULT, translucent only where the blur that makes translucency
   work is actually supported. It used to be the other way round: the 86% white
   was applied unconditionally and only the blur was guarded. On a browser
   without backdrop-filter that left a bar you could see the page through -
   over the dark red hero it reads as a half-there, pink-tinted strip, which is
   what "the nav shows half" describes. */
.site-nav.is-scrolled {
    padding-block: .2rem;
    background: #fff;
    box-shadow: 0 1px 0 var(--bd-line), 0 8px 28px rgba(28, 27, 32, .09);
}
@supports (backdrop-filter: blur(12px)) {
    .site-nav.is-scrolled {
        background: rgba(255, 255, 255, .86);
        backdrop-filter: blur(12px) saturate(160%);
    }
}

/* On a phone it stays solid even where the blur works.
   Translucency earns its keep on a wide screen, where there is page either
   side of the content to glimpse. At 390px the bar is the full width of the
   screen and sits directly over the hero, so all it does is make the links
   harder to read - and iOS Safari is known to render a blurred sticky bar in
   bands as it scrolls, which is the other half of the same complaint. */
@media (max-width: 991.98px) {
    .site-nav.is-scrolled {
        background: #fff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.site-nav .navbar-brand small { transition: opacity .2s ease; }
.site-nav.is-scrolled .navbar-brand small { opacity: 0; }

.site-nav-list .nav-link {
    position: relative;
    padding-inline: .85rem;
    white-space: nowrap;
}

/* The underline grows out from the middle rather than wiping in from one side. */
.site-nav-list .nav-link::after {
    content: "";
    position: absolute;
    left: .85rem; right: .85rem;
    bottom: .15rem;
    height: 2px;
    border-radius: 2px;
    background: var(--bd-red);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .28s cubic-bezier(.16, .84, .34, 1);
}
.site-nav-list .nav-link:hover::after,
.site-nav-list .nav-link:focus-visible::after,
.site-nav-list .nav-link.active::after,
.site-nav-list .nav-item.show > .nav-link::after { transform: scaleX(1); }

/* Bootstrap's caret is a static triangle. This one is drawn from two borders -
   no icon font to depend on - and flips over as the panel opens. */
.site-nav-list .dropdown-toggle::after {
    content: "";
    border: 0;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    width: .4rem; height: .4rem;
    display: inline-block;
    vertical-align: middle;
    margin-left: .4rem;
    margin-bottom: .15rem;
    transform: rotate(45deg);
    transition: transform .25s ease;
}
.site-nav-list .nav-item.show > .dropdown-toggle::after {
    transform: rotate(-135deg);
    margin-bottom: -.05rem;
}

/* ------------------------------------------------------------- mega panels */

/* Bootstrap's display:none is kept for the closed state on purpose. A panel left
   in the box model - even at visibility:hidden - still counts towards the page's
   scroll width, and a 34rem panel hanging off the right of its item is enough to
   give the whole page a horizontal scrollbar while invisible. display:none has no
   footprint at all, so the open state is animated with a keyframe instead of a
   transition (a keyframe does run when an element becomes rendered).

   The panel is anchored under its own item and then pulled back inside the
   viewport by --mega-shift, which public/js/site.js measures on open. */
.site-nav .dropdown-menu {
    --mega-shift: 0px;
    left: 0;
    right: auto;
    width: var(--mega-width, 22rem);
    max-width: calc(100vw - 1.5rem);
    margin-top: .5rem;
    border: 1px solid var(--bd-line);
    border-radius: 16px;
    box-shadow: var(--bd-shadow-lg);
    padding: 0;
    overflow: hidden;
    transform: translateX(var(--mega-shift));
}
.site-nav .dropdown-menu.show {
    animation: bd-dropdown-in .24s cubic-bezier(.16, .84, .34, 1) both;
}

@keyframes bd-dropdown-in {
    from { opacity: 0; transform: translate(var(--mega-shift), .55rem); }
    to   { opacity: 1; transform: translate(var(--mega-shift), 0); }
}

.mega-panel { width: var(--mega-width, 22rem); }

.mega-body { padding: .75rem; }
.mega-body.has-feature {
    display: grid;
    grid-template-columns: 1fr 12rem;
    gap: .75rem;
    padding: .75rem;
}

.mega-grid { display: grid; gap: .15rem; }
.mega-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem .35rem; }

.mega-item {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .6rem .65rem;
    border-radius: 11px;
    color: var(--bd-ink);
    transition: background-color .18s ease, transform .18s ease;
}
.mega-item:hover, .mega-item:focus-visible {
    background: var(--bd-red-soft);
    color: var(--bd-ink);
    transform: translateX(3px);
}

.mega-icon {
    flex: 0 0 auto;
    width: 2.1rem; height: 2.1rem;
    border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bd-red-soft);
    color: var(--bd-red);
    font-size: 1rem;
    transition: background-color .18s ease, color .18s ease;
}
.mega-item:hover .mega-icon { background: var(--bd-red); color: #fff; }

.mega-text { min-width: 0; }
.mega-text strong { display: block; font-size: .875rem; font-weight: 600; line-height: 1.3; }
.mega-text small { display: block; color: var(--bd-muted); font-size: .765rem; line-height: 1.35; margin-top: .1rem; }

.mega-feature {
    background: linear-gradient(160deg, #8d0801 0%, var(--bd-red) 100%);
    color: #fff;
    border-radius: 12px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mega-feature-icon { font-size: 1.5rem; opacity: .85; margin-bottom: .5rem; }
.mega-feature strong { font-size: .9rem; line-height: 1.3; }
.mega-feature p { font-size: .765rem; opacity: .9; margin: .45rem 0 .85rem; line-height: 1.45; }
.mega-feature .btn { align-self: flex-start; }

/* Panels are wide; on a short laptop screen a long one must still be reachable. */
@media (max-height: 720px) {
    .mega-panel { max-height: calc(100vh - 7rem); overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .site-nav .dropdown-menu.show { animation: none; }
    .site-nav-list .nav-link::after,
    .site-nav-list .dropdown-toggle::after { transition: none; }
}

/* ------------------------------------------------------------ mobile drawer */

.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler { color: var(--bd-ink); padding: .25rem .4rem; }

.nav-drawer { width: min(21rem, 88vw); }
.nav-drawer .offcanvas-header { border-bottom: 1px solid var(--bd-line); }

.drawer-nav { list-style: none; margin: 0; padding: 0; }
.drawer-nav > li + li { border-top: 1px solid var(--bd-line); }

.drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: .5rem;
    padding: .8rem .25rem;
    background: none;
    border: 0;
    text-align: left;
    font-weight: 600;
    font-size: .95rem;
    color: var(--bd-ink);
}
.drawer-link:hover, .drawer-link.active { color: var(--bd-red); }
.drawer-caret { font-size: .7rem; transition: transform .25s ease; }
.drawer-toggle.collapsed .drawer-caret { transform: rotate(-90deg); }

.drawer-sub { list-style: none; margin: 0; padding: 0 0 .6rem; }
.drawer-sub a {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .25rem .5rem .75rem;
    font-size: .87rem;
    color: var(--bd-muted);
    border-left: 2px solid var(--bd-line);
    transition: color .18s ease, border-color .18s ease, padding-left .18s ease;
}
.drawer-sub a:hover {
    color: var(--bd-red);
    border-color: var(--bd-red);
    padding-left: 1rem;
}
.drawer-sub a i { font-size: .95rem; opacity: .8; }

.drawer-foot { border-top: 1px solid var(--bd-line); }
.drawer-foot-link {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .88rem; font-weight: 600; color: var(--bd-ink);
}
.drawer-helpline {
    display: flex; align-items: center; gap: .7rem;
    margin-top: .9rem; padding: .7rem .85rem;
    border-radius: 12px;
    background: var(--bd-red-soft);
    color: var(--bd-red);
}
.drawer-helpline small { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.drawer-helpline strong { font-size: .95rem; }

/* --------------------------------------------------------------- hero/slider */

.hero {
    background: linear-gradient(135deg, #7a0a12 0%, #c1121f 55%, #e04a3f 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 85% 20%, rgba(255,255,255,.14), transparent 45%);
}
.hero .container { position: relative; z-index: 2; }
.hero-title { font-weight: 800; font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.12; }
.hero-eyebrow {
    display: inline-block; letter-spacing: .12em; text-transform: uppercase;
    font-size: .75rem; font-weight: 700; opacity: .9;
    border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: .3rem .9rem;
}
.hero-lead { font-size: 1.06rem; opacity: .95; max-width: 44rem; }

.hero-card {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

/* Rotating hero slides: each slide carries its own text and photo side by side.
   Bootstrap's own .carousel-fade handles the cross-fade at slide level; do not
   override its transition or the outgoing slide stops fading correctly.

   On top of that, each piece of the slide slides in on a short stagger. The
   states below are keyed to Bootstrap's own class sequence:
     1. .carousel-item-next / -prev  -> added with display:block (resting state)
     2. reflow
     3. .carousel-item-start / -end  -> added, so the transition actually runs
     4. .active                      -> lands when the fade finishes
   Matching steps 3 and 4 means the motion starts with the fade and holds
   afterwards, with no flash in between. */
.hero-carousel .hero-anim {
    opacity: 0;
    transform: translateX(34px);
    transition: opacity .6s ease, transform .7s cubic-bezier(.16, .84, .34, 1);
    transition-delay: var(--anim-delay, 0s);
}

/* Stepping backwards should come in from the other side. */
.hero-carousel .carousel-item-prev .hero-anim { transform: translateX(-34px); }

.hero-carousel .hero-anim-figure { transform: translateX(34px) scale(.96); }
.hero-carousel .carousel-item-prev .hero-anim-figure { transform: translateX(-34px) scale(.96); }

.hero-carousel .carousel-item.active .hero-anim,
.hero-carousel .carousel-item-next.carousel-item-start .hero-anim,
.hero-carousel .carousel-item-prev.carousel-item-end .hero-anim {
    opacity: 1;
    transform: none;
}

/* The slide on its way out drifts the opposite way instead of just being
   covered by the incoming one. Higher specificity, so it beats .active above. */
.hero-carousel .carousel-item.active.carousel-item-start .hero-anim,
.hero-carousel .carousel-item.active.carousel-item-end .hero-anim {
    opacity: 0;
    transition-delay: 0s;
    transition-duration: .45s;
}
.hero-carousel .carousel-item.active.carousel-item-start .hero-anim { transform: translateX(-26px); }
.hero-carousel .carousel-item.active.carousel-item-end .hero-anim { transform: translateX(26px); }

@media (prefers-reduced-motion: reduce) {
    .hero-carousel .hero-anim {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* The slide photo, sitting beside the text rather than behind it.
   No fixed aspect ratio, so whatever the admin uploads is shown uncropped. */
.hero-figure {
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
    line-height: 0;
    /* The slides are portrait posters, which grow taller as their column grows
       wider. Without a ceiling the hero keeps stretching on a large monitor. */
    max-width: 480px;
    margin-inline: auto;
}
/* Shown whole, at whatever proportion it was uploaded.
   A fixed box with object-fit:cover was tried and reverted: the slides are
   event posters, not photographs, and they carry the date, the venue and a
   contact number down their full height. Cropping one to a landscape box threw
   away the logo at the top and the date at the bottom. A carousel whose height
   changes between slides is the smaller problem. */
.hero-figure img {
    width: 100%;
    height: auto;
    display: block;
}
/* It is a <figure> now, for the team slides' caption. Bootstrap's reboot gives
   a figure a bottom margin, which would push the dots down on those slides. */
.hero-figure { margin-block: 0; }

/* -------------------------------------------------- hero: a team member slide

   Same slide, same wording, same buttons - the figure holds a person instead of
   a poster, with their name and designation under them.

   A fixed portrait frame, which the poster slides deliberately do NOT have. The
   hero cycles seven photos of seven different proportions, and without a frame
   it would change height on every turn. cover is safe here for the same reason
   it was wrong on a poster: a portrait has its subject in the middle and
   nothing written at the edges, whereas a poster carries the date and the
   contact number right at the margin. */
.hero-figure-person {
    position: relative;
    /* Square, because every team photo already is - all seven are stored 1:1,
       from 382px to 800px. A square frame therefore crops nothing at all while
       still being one fixed size. A 4:5 portrait frame was tried first and is
       more flattering, but covering it with a square source means taking 10%
       off each side, and a photo cropped tighter than the person framed it is
       exactly what has been objected to elsewhere on this site.
       cover rather than contain so a future non-square upload still fills the
       frame instead of floating in it. */
    aspect-ratio: 1 / 1;
    max-width: 390px;
    line-height: 1.25;
}
.hero-figure-person img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Only bites on a non-square upload. Faces sit above the middle of a
       portrait, so a centred crop takes foreheads off and leaves too much
       chest. */
    object-position: center 25%;
}

/* Over the photo, not under it: the caption then costs the frame no height, so
   every person slide is exactly the same size. The scrim is what keeps the name
   readable whatever happens to be behind it - a pale shirt or a bright sky. */
.hero-person {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 2.75rem .95rem .95rem;
    text-align: center;
    background: linear-gradient(180deg,
        rgba(10, 5, 7, 0) 0%,
        rgba(10, 5, 7, .5) 40%,
        rgba(10, 5, 7, .88) 100%);
}
.hero-person-name {
    display: block;
    font-weight: 700;
    font-size: 1.08rem;
    letter-spacing: -.01em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.hero-person-role {
    display: block;
    margin-top: .18rem;
    font-size: .75rem;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .84);
}

/* ------------------------------------------- hero: the mission statement

   The one thing on the hero that never changes, so it sits still above the
   carousel instead of being re-rendered on every slide and faded in and out
   while never changing a word.

   Centred and narrow. It is the only block on the page with no picture beside
   it, and a 60-character headline stretched across 1140px reads as a banner
   rather than a statement. The measure on the paragraph is what makes it
   readable - around 70 characters a line. */
/* The statement and the slide's own picture, side by side, with the rotating
   people below. The column gives the heading half the width, so it takes two
   lines - which is why there is no font-size override here: .hero-title's own
   clamp was written for exactly this column and reads at full strength. */
.hero-head {
    /* The gap below is the separation the carousel needs to read as a
       different thing, and the hairline is what says so without a box. */
    padding-bottom: 2.25rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

/* Nothing rotates below it - one slide and no team members - so there is no
   carousel to be separated from. */
.hero-head-only {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.hero-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.75rem;
}

/* A slide's own headline, which is now a subheading under the statement above
   rather than the hero's headline - so it should not compete with it. */
.hero-title-slide { font-size: clamp(1.4rem, 2.4vw, 2rem); }

@media (max-width: 767.98px) {
    .hero-head { padding-bottom: 1.6rem; margin-bottom: 1.85rem; }
    .hero-head-actions { margin-top: 1.35rem; }
}

/* One volunteer's case for donating, next to the foundation's own headline. A
   rule down the left rather than a boxed card: the hero is already a strong
   colour, and another panel on top of it reads as clutter. The rule plus the
   italic is enough to say "somebody is speaking here". */
.hero-quote {
    margin: 1.4rem 0 0;
    padding: .1rem 0 .1rem 1.1rem;
    border-left: 3px solid rgba(255, 255, 255, .5);
}
.hero-quote p {
    margin: 0;
    font-size: 1.02rem;
    font-style: italic;
    line-height: 1.55;
    color: rgba(255, 255, 255, .95);
}
.hero-quote cite {
    display: block;
    margin-top: .45rem;
    font-size: .74rem;
    font-style: normal;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}
@media (max-width: 575.98px) {
    .hero-quote { margin-top: 1.1rem; padding-left: .85rem; }
    .hero-quote p { font-size: .95rem; }
}

/* ------------------------------- hero: the thalassemia children's faces

   Between the mission statement and the team carousel - the children the
   foundation exists for, above the people who run it.

   It reuses the .marquee component from the partners strip, which already
   solves the seamless loop, the edge fade, pausing on hover and stopping
   entirely under prefers-reduced-motion. */
.hero-faces {
    margin-bottom: 2.25rem;
    padding-bottom: 1.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.hero-faces-label {
    margin: 0 0 1.1rem;
    text-align: center;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .78);
}

/* The hero is a strong red, so the fade at each edge has to be the mask the
   component already uses rather than a white gradient painted on top. */
.hero-faces-marquee { --marquee-duration: 46s; }

.hero-face {
    flex: 0 0 auto;
    margin: 0 .55rem;
    text-align: center;
    width: 5rem;
}
.hero-face img {
    display: block;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    object-fit: cover;
    /* Faces sit above the middle of a portrait; a centred crop takes foreheads
       off and leaves too much chest. */
    object-position: center 22%;
    background: rgba(255, 255, 255, .12);
    border: 2px solid rgba(255, 255, 255, .55);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.hero-face figcaption {
    margin-top: .45rem;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .01em;
    color: rgba(255, 255, 255, .9);
    /* A long first name must not widen the cell and break the loop's maths. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Full names rather than first names - the team, where there is nothing to
   protect. A wider cell and two lines, because "Sainbux Khaskheli" truncated
   to fit a 5rem cell is worse than no caption at all. The avatar stays the
   same size so both sources give the same row of circles. */
.hero-faces-named .hero-face { width: 7.5rem; }
.hero-faces-named .hero-face figcaption {
    white-space: normal;
    text-overflow: clip;
    line-height: 1.25;
    /* Two lines at most, so one long name cannot make the row taller than the
       rest and leave the circles sitting at different heights. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.2em;
}

@media (max-width: 575.98px) {
    .hero-faces { margin-bottom: 1.6rem; padding-bottom: 1.35rem; }
    .hero-faces-label { font-size: .62rem; margin-bottom: .85rem; }
    .hero-face { width: 4rem; margin: 0 .4rem; }
    .hero-face img { width: 4rem; height: 4rem; }
    .hero-face figcaption { font-size: .68rem; }
    .hero-faces-named .hero-face { width: 6rem; }
}

/* Through to this person's card on the team page. Underlined rather than made
   into a button: the slide already carries two buttons of its own, and a third
   competing with them would pull the eye away from "Become a donor". */
.hero-person-more {
    display: inline-flex;
    align-items: center;
    margin-top: .4rem;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, .45);
    text-underline-offset: .22em;
    transition: text-decoration-color .18s ease, gap .18s ease;
    gap: 0;
}
.hero-person-more i {
    font-size: 1.05rem;
    line-height: 1;
    transition: transform .18s ease;
}
.hero-person-more:hover,
.hero-person-more:focus-visible {
    color: #fff;
    text-decoration-color: #fff;
}
.hero-person-more:hover i { transform: translateX(3px); }

.hero-dots {
    position: static;
    margin: 1.75rem 0 0;
    justify-content: flex-start;
}
.hero-dots [data-bs-target] {
    width: 10px; height: 10px; border-radius: 50%;
    border: 0; margin-right: .5rem;
    background-color: rgba(255,255,255,.45);
    opacity: 1; transition: background-color .2s ease, transform .2s ease;
}
.hero-dots [data-bs-target]:hover { background-color: rgba(255,255,255,.75); }
.hero-dots .active { background-color: #fff; transform: scale(1.25); }

/* The hero runs wider than the rest of the page so the slide photo has more
   room. A wide image shown uncropped is only as tall as its column is broad,
   so width is the only lever on its size. Capped against the viewport so it
   can never cause a sideways scrollbar. The search bar below matches it. */
@media (min-width: 1200px) {
    .hero-container { max-width: min(1560px, 94vw); }
}

@media (min-width: 992px) {
    /* Every slide gets the same height so the hero never snaps when a fade
       ends. Slides with less content are centred in that space instead. */
    .hero-carousel .carousel-item,
    .hero-carousel .carousel-item > .row { min-height: 25rem; }

    /* No fixed height and no object-fit here on purpose: the uploaded image is
       shown complete, never cropped. It fills the column width and takes
       whatever height its own proportions give it. */
}

/* Donor search bar, overlapping the bottom edge of the hero. */
.hero-search { position: relative; z-index: 3; margin-top: -2.25rem; }
.hero-search-card {
    background: #fff;
    border: 1px solid var(--bd-line);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(28,27,32,.12);
    padding: 1.25rem;
}
.hero-search-label {
    font-weight: 700;
    white-space: nowrap;
    display: inline-block;
    padding-bottom: .35rem;
}

@media (max-width: 991.98px) {
    .hero-search { margin-top: -1.25rem; }
}

/* On a phone the person frame would otherwise run the full column width, and a
   4:5 portrait 345px wide is 431px tall - taller than the text above it. */
@media (max-width: 767.98px) {
    .hero-figure-person { max-width: 300px; }
    .hero-person { padding: 2.25rem .8rem .8rem; }
    .hero-person-name { font-size: 1rem; }
}

/* ---------------------------------------------------------------- sections */

.section { padding: 4rem 0; }
.section-alt { background: var(--bd-bg-alt); }
.section-title { font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 2rem); }
.section-eyebrow {
    color: var(--bd-red); font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; font-size: .78rem;
}
.lead-muted { color: var(--bd-muted); max-width: 46rem; }

.page-head {
    background: var(--bd-ink);
    color: #fff;
    padding: 2.6rem 0;
}
.page-head h1 { font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.3rem); margin: 0; }
.page-head .breadcrumb { --bs-breadcrumb-divider-color: #9a99a1; margin: .4rem 0 0; }
.page-head .breadcrumb a { color: #d8d7dc; }
.page-head .breadcrumb-item.active { color: #9a99a1; }

/* ------------------------------------------------------------------- cards */

.bd-card {
    /* Declared because the class is also used on <a>, which is inline by
       default - and height:100% below does nothing on an inline box, so the
       card collapses and its border wraps the text instead of the card. */
    display: block;
    background: #fff;
    border: 1px solid var(--bd-line);
    border-radius: 16px;
    box-shadow: var(--bd-shadow-sm);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
    height: 100%;
}
.bd-card:hover {
    box-shadow: var(--bd-shadow-lg);
    transform: translateY(-3px);
    border-color: rgba(193, 18, 31, .18);
}
.bd-card .card-body { padding: 1.25rem; }

.blood-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 3rem; height: 3rem; padding: 0 .5rem;
    background: var(--bd-red-soft); color: var(--bd-red);
    border: 1.5px solid rgba(193,18,31,.25);
    border-radius: 12px; font-weight: 800; font-size: 1.05rem;
}
.blood-badge-sm { min-width: 2.3rem; height: 2.3rem; font-size: .85rem; border-radius: 9px; }

.stat-tile { text-align: center; padding: 1.5rem .75rem; }
.stat-tile .stat-value { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; color: var(--bd-red); }
.stat-tile .stat-label { color: var(--bd-muted); font-size: .9rem; }

/* A word reads as shouting at the size a 4-digit number needs, so values that
   are not numbers ("Free") step down instead of matching their siblings. */
.stat-tile .stat-value-word { font-size: clamp(1.2rem, 2vw, 1.6rem); }

/* A metric tile wrapped in a card is not clickable, so it must not lift or glow
   under the cursor - a static number jumping reads as a glitch, not as polish.
   These also stack several to a column, where a shadow each becomes noise. */
.bd-card:has(> .stat-tile) { box-shadow: none; }
.bd-card:has(> .stat-tile):hover {
    transform: none;
    box-shadow: none;
    border-color: var(--bd-line);
}

/* ---------------------------------------------------------------- Our team */

.team-card {
    padding: 2rem 1.1rem 1.5rem;
    border: 1px solid var(--bd-line);
    border-radius: 18px;
    background: var(--bd-bg);
    box-shadow: var(--bd-shadow-sm);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}

.team-card:hover {
    box-shadow: var(--bd-shadow-md);
    border-color: rgba(193, 18, 31, .22);
}

/* The card somebody arrived at from a hero slide. The browser's jump to the
   fragment is silent, and a page of a dozen near-identical cards gives no clue
   which one was meant - this says "this person". It fades out rather than
   staying marked, because after a few seconds the reader knows. */
.team-card-target {
    border-color: rgba(193, 18, 31, .5);
    box-shadow: 0 0 0 3px rgba(193, 18, 31, .14), var(--bd-shadow-md);
    animation: team-card-target 4.5s ease-out 1 forwards;
}
@keyframes team-card-target {
    0%, 55% {
        border-color: rgba(193, 18, 31, .5);
        box-shadow: 0 0 0 3px rgba(193, 18, 31, .14), var(--bd-shadow-md);
    }
    100% {
        border-color: var(--bd-line);
        box-shadow: 0 0 0 3px rgba(193, 18, 31, 0), var(--bd-shadow-sm);
    }
}
@media (prefers-reduced-motion: reduce) {
    .team-card-target { animation: none; }
}

/* The nav is sticky-top, so a card scrolled to by its fragment would otherwise
   come to rest underneath it. */
.team-card { scroll-margin-top: 6rem; }

/* The portrait sits inside a ring rather than plain against the card: a thin
   red line, a white gap, then the photo. It reads as a formal portrait frame
   and carries the brand colour without tinting the whole card.
   box-sizing is border-box site-wide, so the photo itself is the stated width
   less the padding and border. */
.team-portrait {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.15rem;
    padding: 4px;
    border: 2px solid rgba(193, 18, 31, .38);
    border-radius: 50%;
    background: var(--bd-bg);
    object-fit: cover;
    box-shadow: 0 6px 18px rgba(28, 27, 32, .10);
}

.team-name {
    margin-bottom: .3rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--bd-ink);
}

.team-role {
    margin-bottom: .8rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--bd-red);
}

/* The short centred rule under the role - the classic divider on a formal
   portrait card. */
.team-rule {
    width: 2.25rem;
    height: 2px;
    margin: 0 auto 1rem;
    border-radius: 2px;
    background: var(--bd-red);
    opacity: .45;
}

.team-bio {
    margin-bottom: 1rem;
    font-size: .835rem;
    line-height: 1.62;
    color: var(--bd-muted);
}

/* Opens the rest of the bio in a popover. A button, not a link: it goes
   nowhere, and a link with href="#" would put a stray entry in the history. */
.team-more {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bd-red);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.team-more:hover,
.team-more:focus-visible { color: var(--bd-red-dark); }

.bio-popover { max-width: 320px; }
.bio-popover .popover-header {
    font-size: .88rem;
    font-weight: 700;
    background: var(--bd-red-soft);
    color: var(--bd-red-dark);
    border-bottom-color: rgba(193, 18, 31, .15);
}
.bio-popover .popover-body {
    font-size: .82rem;
    line-height: 1.62;
    color: var(--bd-muted);
}

.team-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--bd-line);
    border-radius: 50%;
    color: var(--bd-muted);
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.team-social a:hover {
    color: #fff;
    background: var(--bd-red);
    border-color: var(--bd-red);
}

/* On a phone the card turns on its side: one to a row, portrait on the left,
   name and role and bio on the right.

   Two to a row left each card about 165px wide, which has to hold a portrait,
   a name, a role and a paragraph - everything came out thin and cramped. A
   stack of wide cards reads far better on a narrow screen than a thin grid. */
@media (max-width: 575.98px) {
    .team-card {
        display: flex;
        align-items: flex-start;
        gap: .9rem;
        padding: 1.1rem 1rem;
        text-align: left;
        border-radius: 16px;
        /* A barely-there warm wash down the card. On a phone the cards sit in
           one long column, and a flat white block repeated eight times reads
           as a list; this gives each one a little body. */
        background: linear-gradient(180deg, #fff 0%, #fdfafa 100%);
        box-shadow: var(--bd-shadow-sm), 0 1px 0 rgba(255, 255, 255, .9) inset;
    }

    .team-portrait {
        flex: 0 0 auto;
        width: 96px;
        height: 96px;
        margin: 0;
    }

    /* A hairline between the portrait and the words. It is the oldest trick on
       a formal card, and it stops the two halves reading as one smudge.
       min-width:0 lets a long name wrap instead of forcing the card wider. */
    .team-card-body {
        flex: 1;
        min-width: 0;
        padding-left: .9rem;
        border-left: 1px solid var(--bd-line);
    }

    .team-name {
        margin-bottom: .4rem;
        font-size: 1rem;
    }

    /* The role becomes a filled chip at this size. A line of small red capitals
       sitting directly under the name was easy to read straight past. */
    .team-role {
        display: inline-block;
        margin-bottom: .55rem;
        padding: .22rem .55rem;
        border-radius: 999px;
        background: var(--bd-red-soft);
        font-size: .62rem;
        letter-spacing: .08em;
    }

    /* The chip already separates the role from the bio. */
    .team-rule { display: none; }

    .team-bio {
        margin-bottom: .35rem;
        font-size: .8rem;
        line-height: 1.55;
        /* Three lines each, so the cards in the stack stay close in height.
           The Read more button sits after this element, not inside it, so the
           clamp never hides the way to the rest of the text. */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .team-more { font-size: .76rem; }

    .team-social { margin-top: .6rem; }

    /* Beats Bootstrap's justify-content-center on specificity, no !important. */
    .team-card .team-social { justify-content: flex-start; }
}

/* Between two team sections. Faded at both ends and well short of the full
   width, so it reads as a pause between groups rather than a line cutting the
   page in half. */
.team-section-rule {
    border: 0;
    height: 1px;
    width: min(100%, 20rem);
    margin: 2.25rem auto;
    background: linear-gradient(90deg, transparent, var(--bd-line-strong, var(--bd-line)), transparent);
    opacity: .9;
}

.step-number {
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    background: var(--bd-red); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}

.icon-circle {
    width: 3rem; height: 3rem; border-radius: 12px;
    background: var(--bd-red-soft); color: var(--bd-red);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem;
}

.urgency-emergency { border-left: 4px solid #c1121f; }
.urgency-urgent { border-left: 4px solid #e58e26; }
.urgency-normal { border-left: 4px solid #7f8c8d; }

.ratio-cover { object-fit: cover; width: 100%; height: 100%; }
.gallery-tile {
    border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; background: var(--bd-bg-alt);
}
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-tile:hover img { transform: scale(1.05); }

.compat-table td, .compat-table th { text-align: center; vertical-align: middle; }
.compat-yes { color: #1e7d32; font-weight: 700; }
.compat-no { color: #c4c3c8; }

blockquote.testimonial {
    background: #fff; border: 1px solid var(--bd-line); border-radius: 14px;
    padding: 1.5rem; margin: 0; height: 100%;
}

.prose { line-height: 1.75; }
.prose h2, .prose h3, .prose h4 { font-weight: 700; margin-top: 1.75rem; margin-bottom: .75rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose img { max-width: 100%; border-radius: 12px; }

/* ------------------------------------------------------------------ footer */

.site-footer { background: var(--bd-ink); color: #b9b8bf; padding-top: 3.5rem; }
.site-footer h6 { color: #fff; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.site-footer a { color: #b9b8bf; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.1rem 0; margin-top: 2.5rem; font-size: .85rem; }
.social-link {
    width: 2.25rem; height: 2.25rem; border-radius: 8px;
    background: rgba(255,255,255,.08);
    display: inline-flex; align-items: center; justify-content: center;
}
.social-link:hover { background: var(--bd-red); color: #fff !important; }

/* Icon and value on one line. The icon holds its width; only the value wraps,
   and an address long enough to need it breaks inside the word rather than
   widening the column. */
.footer-contact li {
    display: flex;
    align-items: start;
    gap: .5rem;
}
.footer-contact li > i {
    flex: 0 0 auto;
    line-height: 1.5;
}
.footer-contact li > a,
.footer-contact li > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------- utilities */

.form-section-title {
    font-weight: 700; font-size: .95rem; text-transform: uppercase;
    letter-spacing: .06em; color: var(--bd-muted);
    padding-bottom: .5rem; border-bottom: 1px solid var(--bd-line); margin-bottom: 1rem;
}
.required-mark { color: var(--bd-red); }
.sticky-side { position: sticky; top: 1.5rem; }

@media (max-width: 767.98px) {
    .section { padding: 2.75rem 0; }
}

/* ==========================================================================
   Depth, motion and the advert / partner strips.

   Everything below is gated on a body class written by the layout from
   Admin -> Site settings -> Look and feel:
     .ui-3d      layered depth and cursor tilt
     .ui-reveal  sections fade up as they enter the viewport
   With neither class present the page renders flat and static, which is the
   fallback for anyone who has switched the effects off.
   ========================================================================== */

/* ---------------------------------------------------------------- 3D tilt */

/* The tilt angles come from public/js/site.js as --tilt-x / --tilt-y. The
   translateZ is what makes the rotation read as depth rather than a skew. */
.ui-3d [data-tilt] {
    transform-style: preserve-3d;
    transition: transform .3s cubic-bezier(.2, .8, .3, 1), box-shadow .3s ease;
    will-change: transform;
}
.ui-3d [data-tilt].is-tilting {
    transform: perspective(900px)
               rotateX(var(--tilt-x, 0deg))
               rotateY(var(--tilt-y, 0deg))
               translateZ(10px);
    box-shadow: var(--bd-shadow-lg);
}

/* A tilted card should not also be doing the flat hover lift. */
.ui-3d .bd-card[data-tilt].is-tilting { transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateZ(10px); }

.ui-3d .stat-tile .stat-value { text-shadow: 0 1px 0 rgba(193, 18, 31, .18); }
.ui-3d .blood-badge {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 10px rgba(193, 18, 31, .18);
}
.ui-3d .step-number { box-shadow: var(--bd-shadow-red); }
.ui-3d .icon-circle { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 4px 12px rgba(193, 18, 31, .14); }

/* Buttons pick up a small lift so the primary actions feel raised too. */
.btn-lift { transition: transform .18s ease, box-shadow .18s ease; }
.ui-3d .btn-lift:hover { transform: translateY(-2px); box-shadow: var(--bd-shadow-md); }
.ui-3d .btn-lift:active { transform: translateY(0); }

/* ------------------------------------------------------------ scroll reveal */

.ui-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.16, .84, .34, 1);
}
.ui-reveal [data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .ui-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
    .ui-3d [data-tilt].is-tilting { transform: none; }
}

/* -------------------------------------------------------------- hero glow */

/* Two slow-drifting radial glows behind the hero gradient. Sit under the
   content (.hero .container is z-index 2) and never intercept clicks. */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(50px);
    opacity: .5;
}
.hero-orb-1 {
    width: 30rem; height: 30rem;
    top: -12rem; right: -8rem;
    background: radial-gradient(circle, rgba(255, 190, 120, .55), transparent 68%);
    animation: bd-drift 20s ease-in-out infinite alternate;
}
.hero-orb-2 {
    width: 24rem; height: 24rem;
    bottom: -12rem; left: -6rem;
    background: radial-gradient(circle, rgba(255, 120, 120, .5), transparent 68%);
    animation: bd-drift 26s ease-in-out infinite alternate-reverse;
}
.hero-orb-3 {
    width: 26rem; height: 26rem;
    top: -10rem; left: 50%;
    background: radial-gradient(circle, rgba(255, 200, 150, .4), transparent 68%);
    animation: bd-drift 24s ease-in-out infinite alternate;
}

@keyframes bd-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-3rem, 2rem, 0) scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-orb { animation: none; }
}

.hero-figure { box-shadow: 0 24px 60px rgba(0, 0, 0, .34); }
.cta-band { margin-top: 0; }

/* The search bar normally overlaps the hero's bottom edge. With the hero
   switched off there is nothing to overlap, so it becomes a plain band. */
.hero-search-detached { margin-top: 0; padding-top: 2.5rem; }

.stats-band { background: linear-gradient(180deg, #fff 0%, var(--bd-bg-alt) 100%); }
.stat-tile .stat-value { font-variant-numeric: tabular-nums; }

/* Blood-group tiles: the badge lifts off the card as the card tilts. */
.group-tile { transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease; }
.ui-3d .group-tile .blood-badge { transition: transform .3s ease; }
.ui-3d .group-tile:hover .blood-badge { transform: translateZ(24px) scale(1.06); }

.media-frame { box-shadow: var(--bd-shadow-lg); }

/* --------------------------------------------------------------- adverts */

.ad-strip {
    position: relative;
    padding: 2.25rem 0 2rem;
    border-block: 1px solid var(--bd-line);
    /* A faint wash rather than the flat grey panel. The strip sits between two
       white sections, so an even block of #f8f7fa reads as a dead gap; fading
       it out towards the bottom lets the sponsors sit on something. */
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(193, 18, 31, .05) 0%, rgba(193, 18, 31, 0) 62%),
        linear-gradient(180deg, var(--bd-bg-alt) 0%, #fff 100%);
}

/* The label as a centred rule rather than a lone grey word - the two hairlines
   give the row a top edge and stop the sponsors looking dropped onto the page. */
.ad-strip-label {
    display: flex;
    align-items: center;
    gap: .9rem;
    max-width: 23rem;
    margin: 0 auto 1.15rem;
    font-size: .64rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 700;
    color: #8d8c94;
    white-space: nowrap;
}
.ad-strip-label::before,
.ad-strip-label::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(230, 228, 234, 0), var(--bd-line));
}
.ad-strip-label::after { background: linear-gradient(90deg, var(--bd-line), rgba(230, 228, 234, 0)); }

/* Every sponsor's logo is drawn at the SAME HEIGHT, and the card around it is
   as wide as that logo turns out to be.

   The card was a fixed width AND height for a while, with the logo fitted
   inside. That is wrong for the shapes sponsors actually send: a 789x124
   banner is 6.4:1, and fitting it into a 3.2:1 card means the width runs out
   first, so it was drawn at about half the card's height with the rest of the
   card left empty. The logo looked small inside a box that was mostly nothing.

   Driving from the height instead means the artwork always fills the card
   vertically and the card simply grows sideways to match. A wide wordmark gets
   a wide card, a compact badge gets a narrow one, and because every logo is the
   same height they still read as one row - equal height is the cue the eye
   uses for "these belong together", not equal width.

   Nothing is cropped: the card takes the artwork's shape rather than the
   artwork being forced into the card's. */
:root { --ad-slot-h: 8rem; }

.ad-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .85rem;
}
.ad-banner {
    /* No flex-basis and no width: the card is sized by its contents. */
    flex: 0 1 auto;
    height: var(--ad-slot-h);
    max-width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .7rem 1.1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--bd-line);
    box-shadow: var(--bd-shadow-sm);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
/* height:100% is what makes the logo fill the card; width:auto keeps its own
   proportions. max-width is the safety net for an extreme banner - a 20:1 strip
   would otherwise be wider than the page, and object-fit:contain scales it down
   inside the card rather than letting it overflow. */
.ad-banner img {
    display: block;
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
a.ad-banner:hover {
    box-shadow: var(--bd-shadow-lg);
    transform: translateY(-3px);
    border-color: rgba(193, 18, 31, .22);
}
.ad-banner-static { cursor: default; }

/* ---- the sponsor strip, scrolling ----

   Shares the .marquee machinery with the partners strip rather than growing its
   own: same track, same two-group loop, same hover pause, same reduced-motion
   escape. Only the spacing differs, because .ad-row's gap does not apply once
   the banners live in a flex track instead of that row. */
.ad-marquee { margin-top: .25rem; }
.ad-marquee .ad-banner { margin: 0 .5rem; }

/* The strip clips its own overflow, so the mask that fades the partners strip's
   edges is doubled up here - without it the banners would simply stop dead at
   the edge of the screen. */
.ad-strip { overflow: hidden; }

/* A portrait banner gets a taller slot.

   The rule above sizes every card by height and lets it widen, which is right
   for the wide wordmarks sponsors usually send. Tall artwork loses by the same
   arithmetic: at a 5.5rem height a 2:3 poster is drawn 3.7rem wide and reads as
   an afterthought beside a 6.4:1 strip that is 35rem across.

   1.7x is what makes the two comparable by AREA rather than by height, which is
   what the eye actually judges. A 4:1 landscape banner at height h covers 4h^2;
   a 3:4 portrait at 1.7h covers 2.2h^2, against 0.56h^2 if it shared the
   landscape height. Going further starts to make the portrait one dominate the
   row, which is not what a sponsor credit is for.

   The orientation is stored on the advert rather than measured from the file -
   see the migration for why. */
.ad-banner-portrait { height: calc(var(--ad-slot-h) * 1.7); }

/* One sponsor gets the room several would share. */
.ad-row-single { --ad-slot-h: 10rem; }

/* The sponsor banner directly under the hero - a credit line rather than a
   section, so a little tighter than the inline strip.

   The height is sized against the sponsors actually on the page. The three
   live ones are 6.36:1, 4.30:1 and 3.47:1 - together 14.13 units of width for
   every unit of height - so the row needs about 14 times the logo height, plus
   padding and gaps. A Bootstrap container gives 1116px of content at 1200px
   and up, which works out at a 5.5rem card with about 60px to spare. 5.75rem
   also fits, by ten pixels, which is not a margin worth having.

   The logo still ends up close to twice the size it was. In the old fixed
   272px-wide card the widest banner was drawn about 38px tall, because its
   width ran out long before its height did and the rest of the card was empty.

   Adding a fourth sponsor means either a shorter logo or a second row; the row
   centres whatever it is given, so wrapping is tidy rather than ragged. */
.ad-strip-banner {
    position: relative;
    padding: 1.35rem 0 1.5rem;
    --ad-slot-h: 5.5rem;
}
.ad-strip-banner .ad-strip-label { margin-bottom: .85rem; }
.ad-strip-banner .ad-banner { padding: .6rem .75rem; }

/* One sponsor on its own has the whole row, so it can be much taller. */
.ad-strip-banner .ad-row-single { --ad-slot-h: 9rem; }

/* ---- the standee down the left edge ----

   A tall sponsor banner standing in the empty margin beside the page, outside
   the container, so the page itself never moves to make room for it.

   That margin is the whole constraint. A Bootstrap container is 82.5rem
   (1320px) from 1400px up, so the gutter on each side is (100vw - 82.5rem) / 2:

     1400px viewport ->  40px of gutter   - nothing fits
     1600px          -> 140px
     1700px          -> 190px             - 8.5rem of banner plus a 2rem gap
     1920px          -> 300px             - capped at 13rem by the clamp

   Hence the 1700px floor. Below it the rail is simply not drawn, which is why
   it does not appear on a laptop; the alternative was shifting the whole page
   sideways on every screen, which was not wanted.

   The anchor has no height, so inserting it costs the page no space. The rail
   scrolls away with the page rather than following the reader - a standee
   stands at the entrance, it does not walk alongside you. */
.ad-rail-anchor {
    position: relative;
    height: 0;
}

.ad-rail { display: none; }

@media (min-width: 1700px) {
    .ad-rail {
        --ad-rail-w: clamp(8.5rem, calc((100vw - 82.5rem) / 2 - 2rem), 13rem);

        display: block;
        position: absolute;
        top: 1.5rem;
        /* Right edge of the banner, one 2rem gap short of the container's left
           edge. max() is the safety net: should the container ever be wider
           than assumed, the rail stops at the page edge instead of going off
           it and giving the document a horizontal scrollbar. */
        left: max(.75rem, calc((100vw - 82.5rem) / 2 - var(--ad-rail-w) - 2rem));
        width: var(--ad-rail-w);
        padding: .55rem;
        border-radius: 18px;
        background: #fff;
        border: 1px solid var(--bd-line);
        box-shadow: var(--bd-shadow-sm);
        transition: box-shadow .22s ease, border-color .22s ease;
    }

    .ad-rail:hover {
        box-shadow: var(--bd-shadow-lg);
        border-color: rgba(193, 18, 31, .22);
    }

    /* height: auto, so the artwork's own proportions decide how tall the
       banner is. A 1:3 standee at 13rem across stands 39rem tall. Nothing is
       cropped and nothing is stretched; a very long banner simply runs past
       the fold, which for something that scrolls away is no problem. */
    .ad-rail img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 13px;
    }

    .ad-rail-label {
        font-size: .58rem;
        letter-spacing: .18em;
        text-transform: uppercase;
        font-weight: 700;
        color: #8d8c94;
        text-align: center;
        margin-bottom: .45rem;
    }

    /* Tucked just outside the top-right corner, clear of the artwork.
       Scoped through .ad-rail on purpose: the base .ad-close rule is further
       down this file and would otherwise win on equal specificity. */
    .ad-rail .ad-rail-close {
        top: -.6rem;
        right: -.6rem;
    }
}

/* Sits inside the strip's own padding so it never overlaps the artwork. */
.ad-close {
    position: absolute;
    top: .4rem;
    right: .6rem;
    z-index: 2;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    line-height: 1;
    color: var(--bd-muted);
    background: #fff;
    border: 1px solid var(--bd-line);
    border-radius: 50%;
    box-shadow: var(--bd-shadow-sm);
    transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.ad-close:hover {
    color: var(--bd-red);
    border-color: rgba(193, 18, 31, .35);
    transform: rotate(90deg);
}
.ad-close:focus-visible {
    outline: 2px solid var(--bd-red);
    outline-offset: 2px;
}

/* A Bootstrap container does not shrink smoothly, it steps: 1140px wide at
   1200px and up, then 960, 720, 540. The logo height has to step with it or
   the row overflows and wraps the moment the container drops a size.
   Laptop. 960px container, 936px of content, so about 55px of logo. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    :root { --ad-slot-h: 6rem; }
    .ad-strip-banner { --ad-slot-h: 4.75rem; }
    .ad-row-single { --ad-slot-h: 8.5rem; }
    .ad-strip-banner .ad-row-single { --ad-slot-h: 7.5rem; }
}

/* Tablet. 720px or 540px of container is not enough for three wide banners at
   any height worth looking at, so here the row is expected to wrap - which it
   does centred, at one height, rather than ragged. The size is chosen to read
   well on two lines instead of to squeeze onto one. */
@media (min-width: 576px) and (max-width: 991.98px) {
    :root { --ad-slot-h: 5.5rem; }
    .ad-strip-banner { --ad-slot-h: 4.75rem; }
    .ad-row-single { --ad-slot-h: 7.5rem; }
    .ad-strip-banner .ad-row-single { --ad-slot-h: 6.5rem; }
}

@media (max-width: 575.98px) {
    .ad-strip { padding: 1.5rem 0 1.35rem; }
    .ad-strip-banner { padding: 1rem 0 1.1rem; }
    .ad-strip-label { margin-bottom: .85rem; font-size: .6rem; gap: .65rem; }

    /* A phone is the one place the width runs out first, so here the card goes
       full width and the HEIGHT follows the artwork instead of the other way
       round. A 6.4:1 banner across a 320px card is 50px tall and the card is
       50px tall with it - no empty space, and nothing shrunk to fit a shape it
       was never going to match.
       max-height stops a near-square logo from becoming a huge block. */
    .ad-row { gap: .6rem; }
    .ad-row .ad-banner {
        flex: 1 1 100%;
        width: 100%;
        height: auto;
        padding: .6rem .9rem;
    }
    .ad-row .ad-banner img {
        width: 100%;
        height: auto;
        max-height: 6rem;
    }
    .ad-row-single .ad-banner img { max-height: 8rem; }
}

/* ------------------------------------------------------- what is coming up

   Sits between the hero and the sponsor strip. Laid out along the page rather
   than down it: at the top of the homepage there is usually one thing coming
   up and the whole width to say it in, and a tall card there would push the
   rest of the page down for no gain. */

.section-upcoming {
    padding: 2.5rem 0 2.25rem;
    background: var(--bd-bg);
}
.upcoming-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.event-feature {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 1.4rem;
    border: 1px solid var(--bd-line);
    border-radius: 18px;
    background: var(--bd-bg);
    box-shadow: var(--bd-shadow-sm);
    /* The accent says which kind of thing this is without another badge
       competing with the one already in the body. */
    border-left: 4px solid var(--bd-ink);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
.event-feature:hover {
    box-shadow: var(--bd-shadow-md);
    transform: translateY(-2px);
}
.event-feature-camp { border-left-color: var(--bd-red); }

/* ---- the date block ---- */

.event-feature-date {
    flex: 0 0 auto;
    width: 5.25rem;
    padding: .6rem .25rem;
    text-align: center;
    line-height: 1.1;
    border-radius: 14px;
    background: var(--bd-bg-alt);
    border: 1px solid var(--bd-line);
}
.event-feature-camp .event-feature-date {
    background: rgba(193, 18, 31, .06);
    border-color: rgba(193, 18, 31, .18);
}
.event-feature-month {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bd-red);
}
.event-feature-day {
    display: block;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--bd-ink);
}
.event-feature-weekday {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--bd-muted);
}

/* ---- the middle ---- */

.event-feature-body { flex: 1 1 auto; min-width: 0; }

.event-feature-kind {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--bd-muted);
}
.event-feature-title {
    margin: .3rem 0 .5rem;
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bd-ink);
}
.event-feature-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .84rem;
    color: var(--bd-muted);
}
.event-feature-meta li {
    display: flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
}
.event-feature-meta i { color: var(--bd-red); font-size: .9rem; }
.event-feature-summary {
    margin: .6rem 0 0;
    font-size: .88rem;
    line-height: 1.55;
    color: var(--bd-muted);
}

/* ---- who backed this one ----

   A credit line, not an advert. The sponsor strip below the hero is where the
   foundation's own sponsors get room; these are small, greyed back, and sit
   behind a hairline so they read as a footnote to the event rather than as a
   second sponsor block competing with it. */
.event-sponsors {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    margin-top: .8rem;
    padding-top: .7rem;
    border-top: 1px dashed var(--bd-line);
}
.event-sponsors-label {
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #9b9aa2;
}
.event-sponsors-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.event-sponsors-list li { display: flex; align-items: center; }

/* One circle, one size, for every sponsor - logo or not.

   contain, not cover: a circle is square, and covering it with a wide logo
   takes the sponsor's name off the ends. This project has made that mistake
   before.

   The logo used to look lost in here, and the cause was in the files rather
   than in this rule. Partner logos were stored on a 600x300 canvas, and four
   of the five are very nearly square artwork - 306x300, 371x300, 369x300 -
   so each carried 115 to 165 pixels of dead margin down both sides. Contained
   in a circle, the file spanned the circle and the artwork spanned about half
   of it. The canvas is gone from config/uploads.php and the stored logos have
   been trimmed back to their artwork, so the file IS the logo now.

   The padding is what keeps a square logo inside the circle rather than inside
   the square that contains it. A square inscribed in a circle has sides about
   0.707 of the diameter, so an 88px circle fits a 62px square - roughly
   .7rem of padding each side. Less, and the circle clips the logo's corners. */
.event-sponsor-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 5.5rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bd-line);
    box-shadow: var(--bd-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* Square-ish logos, and the initials fallback.

   The logo fills the circle rather than being fitted inside it with a white
   ring around it. Fitting looks wrong for the two kinds of logo that exist
   here: one with its own background colour becomes a coloured SQUARE floating
   in a white circle, and one without still only reaches the inscribed square,
   which is 70% of the width. Filling makes the circle actually read as a
   circle.
   The cost is the corners, and it is small at these ratios - a 1.2:1 logo
   loses about a tenth off each side. A logo that cannot afford that is a logo
   for the Wide shape, which fits rather than fills. */
.event-sponsor-circle {
    width: 5.5rem;
    border-radius: 50%;
}
.event-sponsor-circle > img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
}

/* A wordmark much wider than it is tall. The badge keeps the same HEIGHT as the
   circles so a mixed row still reads as one set, and takes whatever width the
   logo turns out to need - the rule the sponsor strip under the hero already
   uses. Forcing one of these into a circle is what made it look small. */
.event-sponsor-wide {
    padding: .5rem .8rem;
    border-radius: 14px;
    max-width: 100%;
}
.event-sponsor-wide img { height: 100%; width: auto; }
.event-sponsor-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--bd-shadow-md);
    border-color: rgba(193, 18, 31, .22);
}
.event-sponsor-badge img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* A partner with no logo still gets a circle, so the row stays a row of equal
   circles rather than a circle and some text. */
.event-sponsor-initials {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--bd-red);
}

@media (prefers-reduced-motion: reduce) {
    .event-sponsor-badge { transition: none; }
    .event-sponsor-badge:hover { transform: none; }
}

/* ---- the poster ---- */

.event-feature-poster {
    flex: 0 0 auto;
    display: block;
    width: 8.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--bd-line);
    background: var(--bd-bg-alt);
}
.event-feature-poster img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- the end of the line ---- */

.event-feature-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .4rem;
    text-align: center;
}
.event-feature-open {
    font-size: .72rem;
    color: #1a7f4b;
    white-space: nowrap;
}

/* Tablet: the action drops under the text, which is the only part that can
   lose its column without the row falling apart. */
@media (max-width: 991.98px) {
    .event-feature { flex-wrap: wrap; gap: 1rem 1.25rem; }
    .event-feature-body { flex: 1 1 16rem; }
    .event-feature-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: .75rem;
        width: 100%;
        padding-left: 6.25rem;  /* lines up under the text, past the date block */
    }
}

/* Phone: there is no landscape left. The date block sits beside the kind and
   title as a header strip, and everything else stacks under it. */
@media (max-width: 575.98px) {
    .section-upcoming { padding: 1.85rem 0 1.6rem; }
    .upcoming-head { margin-bottom: 1.1rem; }

    .event-feature {
        align-items: flex-start;
        gap: .9rem;
        padding: .95rem 1rem;
        border-radius: 15px;
    }
    .event-feature-date {
        width: 4rem;
        padding: .45rem .2rem;
    }
    .event-feature-day { font-size: 1.5rem; }
    .event-feature-title { font-size: 1.04rem; }
    .event-feature-meta { gap: .3rem .85rem; font-size: .8rem; }
    .event-feature-summary { font-size: .84rem; }

    /* Three circles at the desktop size are wider than a phone card. Smaller,
       but still one size for all of them. */
    .event-sponsor-badge { height: 4.25rem; }
    .event-sponsor-circle { width: 4.25rem; }
    .event-sponsor-wide { padding: .4rem .6rem; }
    .event-sponsor-initials { font-size: 1.05rem; }
    .event-sponsors { gap: .4rem .6rem; }
    .event-sponsors-list { gap: .45rem; }
    .event-feature-actions {
        padding-left: 0;
        flex-wrap: wrap;
    }

    /* Its own row, full width, so the poster's text stays readable. */
    .event-feature-poster {
        flex: 1 1 100%;
        width: auto;
        max-width: 22rem;
        margin: 0 auto;
    }
    .event-feature-actions .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------------ photo walls

   Three places show documentary photographs: the donors beside the awareness
   text, the children's section and the recognition strip. They share a tile so
   a photograph looks the same wherever it is, and differ only in how the grid
   is laid out.

   One fixed tile size, and the photograph is sized to it exactly - its width
   and its height are the tile's width and height.

   SQUARE, because the photos are half portrait and half landscape - 33 of 76
   are taller than they are wide. A tile shape that flatters one orientation at
   the other's expense is the wrong shape when there is an even mix of both,
   and square is also the shape that asks the least of either: it is a shorter
   distance from 3:4 or 4:3 to square than it is between them. */
.photo-tile {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: #ebe9ef;
    box-shadow: var(--bd-shadow-sm);
    transition: box-shadow .25s ease, transform .25s ease;
}

/* The photograph is given the tile's exact width and height.

   Five things were wanted here and only four of them can hold at once. Each
   arrangement tried gives up a different one, so this is the whole ledger:

     contain   equal tiles, whole photo, no stretch - but 25% to 60% of the
               tile is left empty
     blurred   equal tiles, whole photo, nothing empty - but the border is a
     backdrop   blurred copy of the photo
     cover     equal tiles, nothing empty, no stretch - but it trims the
               overflow, 31% of the average photo here and 53% at worst
     columns   whole photo, nothing empty, no stretch - but the tiles end up
               all different sizes
     fill      equal tiles, whole photo, nothing empty, no blur - but the
     (this)    photograph stretches

   fill is the one asked for, and the stretch is the price. It is not uniform
   across the wall: a photo already near square barely moves, while a 16:9
   landscape squeezes to about half its width, which is visible on faces. The
   way to avoid it entirely is to crop square in the gallery, because a square
   photo in a square tile is not stretched at all - which is a per-photo
   choice, not something this stylesheet can make. */
.photo-tile img,
.donor-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.photo-tile:hover { box-shadow: var(--bd-shadow-lg); transform: translateY(-3px); }

/* Over the photo on a scrim, so a caption costs the grid no height and the
   tiles stay a grid rather than becoming a list of different-length cards. */
.photo-tile figcaption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 1.75rem .85rem .7rem;
    font-size: .78rem;
    line-height: 1.35;
    color: #fff;
    background: linear-gradient(180deg, rgba(10, 5, 7, 0), rgba(10, 5, 7, .82));
}

/* ---- the children: a wall with one lead photo ---- */

.section-children { padding-top: 3.25rem; }
.children-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: .75rem;
    margin-bottom: 1.75rem;
}

/* A grid of equal cells, which is what a fixed tile size means. Every tile is
   the same square whatever shape the photograph inside it is. */
.photo-wall {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .85rem;
}
/* Two cells each way for the first one - still square, just bigger. A wall of
   identical tiles reads as a contact sheet; one larger gives the eye somewhere
   to start. */
.photo-wall .photo-tile-lead {
    grid-column: span 2;
    grid-row: span 2;
}
.photo-wall .photo-tile-lead figcaption { font-size: .85rem; padding: 2.25rem 1.1rem .9rem; }

/* ---- recognition ---- */

.photo-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .85rem;
}

@media (max-width: 991.98px) {
    .photo-wall { grid-template-columns: repeat(3, 1fr); }
    .photo-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
    /* Two across, and the lead stops being special - at this width "twice as
       big" is the whole screen, which pushes everything else off it. */
    .photo-wall,
    .photo-row { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
    .photo-wall .photo-tile-lead { grid-column: span 2; grid-row: span 1; }
    .photo-tile figcaption { font-size: .72rem; padding: 1.4rem .6rem .55rem; }
    .children-head { margin-bottom: 1.25rem; }
}

/* ---- the donors, beside the awareness text ---- */

/* Same rule as the wall: fixed cells, the whole photograph inside each one. */
.donor-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .7rem;
}
.donor-photo {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: #ebe9ef;
    box-shadow: var(--bd-shadow-sm);
}
/* The first one spans the row above the others. These are documentary
   photographs of a drive rather than portraits, and at a third of the width
   nothing in one is legible. 4:3 rather than square here because it is the
   one tile wide enough that the orientation mix stops mattering. */
.donor-photo-lead {
    grid-column: 1 / -1;
    aspect-ratio: 4 / 3;
}
.donor-photo figcaption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 1.9rem .95rem .8rem;
    font-size: .8rem;
    line-height: 1.35;
    color: #fff;
    background: linear-gradient(180deg, rgba(10, 5, 7, 0), rgba(10, 5, 7, .82));
}

@media (max-width: 575.98px) {
    .donor-photos { gap: .5rem; }
}

/* ------------------------------------------------------- we never store blood

   The one sentence on the page that corrects what most visitors assume before
   they arrive: that the foundation keeps blood and can hand it over. It was a
   grey Bootstrap alert at the foot of the section, which is the styling used
   for footnotes. Given the brand colour, a mark of its own and room to breathe,
   it reads as a statement instead. */
.no-stock {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    margin-top: 2.25rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid rgba(193, 18, 31, .28);
    border-left: 4px solid #c1121f;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(193, 18, 31, .055), rgba(193, 18, 31, .015));
    box-shadow: var(--bd-shadow-sm);
}
.no-stock-mark {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #c1121f;
    color: #fff;
    font-size: 1.25rem;
}
.no-stock-title {
    margin: .1rem 0 .3rem;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #c1121f;
}
.no-stock-text { font-size: .93rem; line-height: 1.6; color: var(--bd-muted); }

@media (max-width: 575.98px) {
    .no-stock { padding: 1.1rem 1.15rem; gap: .85rem; }
    .no-stock-mark { width: 2.25rem; height: 2.25rem; font-size: 1.05rem; }
    .no-stock-title { font-size: 1rem; }
}

/* ------------------------------------------------ register, mid-page prompt

   A quiet strip, not a second hero band. The closing CTA stays the climax of
   the page; this one only has to catch somebody who has just looked at the
   children's photographs and would act now if asked. Two full-width red bands
   on one page read as a repeat and both get ignored. */
.cta-slim {
    padding: 2.4rem 0;
    background: var(--bd-bg-alt);
    border-block: 1px solid var(--bd-line);
}
.cta-slim-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    flex-wrap: wrap;
}
/* The text takes the room it needs and the button never wraps under itself;
   below that the two simply stack. */
.cta-slim-text {
    flex: 1 1 22rem;
    max-width: 46rem;
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--bd-muted);
}
.cta-slim-text strong { color: var(--bd-ink); display: block; margin-bottom: .2rem; }

@media (max-width: 575.98px) {
    .cta-slim { padding: 1.9rem 0; }
    .cta-slim-inner { gap: 1.1rem; }
    .cta-slim-text { font-size: .95rem; }
    .cta-slim .btn { width: 100%; }
}

/* ------------------------------------------------- supporting organisations */

.section-partners { padding: 3.25rem 0; border-top: 1px solid var(--bd-line); overflow: hidden; }
.partners-heading {
    text-align: center;
    color: var(--bd-muted);
    font-size: .78rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .1em;
    margin-bottom: 1.75rem;
}

/* Marquee: the track holds two identical groups side by side and slides left by
   exactly half its width, so the moment it snaps back the second group is
   sitting where the first one was and the loop is invisible. Fading both edges
   hides the logos entering and leaving. */
.marquee {
    position: relative;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: bd-marquee var(--marquee-duration, 38s) linear infinite;
}
.marquee-group { display: flex; align-items: center; }

.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes bd-marquee {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

/* No endless sideways motion for anyone who asked for less of it - the logos
   stay put and the row simply scrolls by hand instead. */
@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
    .marquee { overflow-x: auto; }
}

/* Bigger than it was - 11rem x 5rem with 1rem of padding left the logo about
   52px tall, which is small for the only place these organisations are
   credited. The logos have also been trimmed back to their artwork (the 2:1
   canvas is gone from config/uploads.php), so the extra room goes to the logo
   rather than to margin inside the file. */
.partner-chip {
    flex: 0 0 auto;
    width: 13.5rem;
    height: 6.5rem;
    margin: 0 .6rem;
    padding: .7rem .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--bd-line);
    border-radius: 14px;
    box-shadow: var(--bd-shadow-sm);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
/* Full colour, always. These were greyed back so the row read as one band,
   which is a reasonable default for a wall of logos - but these are a handful
   of named organisations the foundation actually works with, and crediting
   them properly matters more than the row looking tidy. */
.partner-chip img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.partner-chip:hover {
    box-shadow: var(--bd-shadow-md);
    transform: translateY(-3px);
    border-color: rgba(193, 18, 31, .2);
}
.partner-chip-text {
    font-size: .82rem;
    font-weight: 600;
    color: var(--bd-muted);
    text-align: center;
    line-height: 1.25;
}
.partner-chip-static { width: 100%; margin: 0; }

@media (max-width: 575.98px) {
    .partner-chip { width: 10.5rem; height: 5.5rem; margin: 0 .4rem; padding: .6rem .75rem; }
    .section-partners { padding: 2.5rem 0; }
}

/* ------------------------------------------------ membership type cards
   Radio buttons styled as cards on the "Become a member" form. The input is
   Bootstrap's .btn-check (visually hidden, still focusable), so keyboard and
   screen-reader behaviour is a normal radio group. */
.member-type {
    display: flex; gap: .85rem; align-items: flex-start; height: 100%;
    padding: 1rem; border: 2px solid var(--bd-line); border-radius: 14px;
    background: var(--bd-bg); cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.member-type:hover { border-color: #e39aa0; }
.btn-check:checked + .member-type { border-color: var(--bd-red); background: var(--bd-red-soft); }
.btn-check:focus-visible + .member-type { outline: 3px solid rgba(193, 18, 31, .35); outline-offset: 2px; }
.member-type-icon {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bd-red-soft); color: var(--bd-red); font-size: 1.2rem;
}
.btn-check:checked + .member-type .member-type-icon { background: var(--bd-red); color: #fff; }
