/* ============================================================================
   Header & Hero — light-theme redesign (TEMPORARY toggle override layer)
   ----------------------------------------------------------------------------
   The old header/hero used a dark navy scheme that clashed with the redesigned
   (light) page bodies. This lightens them to match. After comparing three
   header variants live, the design was consolidated into ONE refined look
   (below), so ?hv=1 | 2 | 3 now all render the same design; ?hv=0 still shows
   the original dark header for comparison. The testimonial went through the
   same comparison (three treatments) and is now settled on the single
   "contained card" look — no toggle needed there anymore.

       ?hv=1 | 2 | 3  → the light header/hero (identical); ?hv=0 = original dark

   A snippet in views/base.twig reads ?hv= (or its cookie) and adds `hv-new`
   (+ `hv-N`) classes to <html>. The footer and testimonial are each a single
   fixed treatment — no toggle. Loaded AFTER custom-style.css
   (dependency in functions.php) so these overrides win the cascade. !important
   only where the originals in custom-style.css use it; the html.hv-* scope
   supplies the rest of the specificity.

   >>> TEMPORARY. Once signed off, fold into the real header rules and delete
   >>> this file, its enqueue, and the base.twig snippet.
   ============================================================================ */


/* ============================================================================
   SHARED LIGHT HEADER  (html.hv-new)
   ============================================================================ */

/* Re-point the three header-scoped tokens (verified header-only): flips the
   brand-bar bg, menu-bar bg, and subtitle/mobile-icon colours automatically. */
html.hv-new {
    --header-bg:  #ffffff;
    --nav-bg:     #ffffff;
    --text-muted: #475569;
}

/* ---- Brand bar ----------------------------------------------------------- */
/* Hairline + a soft drop shadow so the header separates from the light page
   body on interior pages (where white header met white content). */
html.hv-new .navbar-default {
    box-shadow: 0 1px 0 var(--border-soft), 0 6px 16px rgba(0, 21, 42, 0.06);
}

/* Bootstrap's base `.navbar` rule sets `min-height: 48px` on the <nav> itself.
   Between roughly 400–767px the actual content (.header-flex-container, which
   IS internally centered) is only ~44px tall — shorter than that floor — so the
   <nav> still renders at 48px but the 4px difference lands entirely at the
   BOTTOM (the container is a plain block child, not vertically centered within
   its parent), pushing the whole logo/title/actions row a few px above true
   centre. Above ~768px the content already exceeds 48px so the floor never
   kicks in, which is why this only shows up at narrower widths. Giving the
   container the same min-height as its parent means the two heights always
   match, so there's never a leftover gap to strand on one side. */
html.hv-new .header-flex-container {
    min-height: 48px;
}

/* Divider between the SIL glyph and the site title. The compact inline layout
   (vs. the old stacked hero-card header, glyph above a big title) sits them
   close together — but they're two distinct links (glyph → network hub,
   title → this site's home; see functions.php's `http_host` vs `site.url`), so
   a hairline separator keeps them reading as two units, not one joined mark. */
html.hv-new .navbar-brand-group {
    gap: 0;
}
/* A pseudo-element rather than a border-right, so its height is independent
   of the logo image's own 42px box. `.logo.navbar-btn` is already
   `display:flex; align-items:center` around the <img>, so this generated box
   becomes a second flex item alongside it.

   Desktop: `align-self:stretch` matches whatever height the row actually is —
   here, the title + subtitle two-line stack — so the line spans its full
   neighbour instead of floating as a shorter, disconnected segment. Mobile
   (below 760px, the exact width `.header-site-subtitle`'s `hidden-xs` already
   drops the subtitle at): the title becomes a single short line, so stretching
   would look oversized next to it — instead match `.mobile-nav-divider`, the
   divider already used a few pixels away between the mobile icon cluster and
   give/menu cluster, so both dividers in that row read as the same element. */
html.hv-new .logo.navbar-btn::after {
    content: "";
    display: block;
    width: 1px;
    align-self: stretch;
    background: var(--border-soft);
    margin-left: 12px;
    margin-right: 12px;
}
@media (max-width: 759px) {
    html.hv-new .logo.navbar-btn::after {
        align-self: center;
        height: 24px;
    }
}

/* Site title: override the hardcoded white. */
html.hv-new .header-site-title a,
html.hv-new .header-site-title a:hover,
html.hv-new .header-site-title a:focus {
    color: var(--brand-navy) !important;
}

/* Subtitle: mid-blue text (--brand-blue, ~7:1 on white — passes AA) with a
   brand-teal underline (--accent-blue / #00ADEF). The bright teal can't be the
   text itself (only ~2.55:1 on white, fails AA at any size), so it lives in the
   underline instead — echoing the teal underline under the menu items, which
   ties the header together as one system.
   align-self:flex-start is what keeps the underline the width of the SUBTITLE
   text, not the title: .header-title-group is a flex column, so a flex item
   otherwise stretches to the column's full width (= the widest item, the title)
   and the underline would run the whole length on long site names. */
html.hv-new .header-site-subtitle {
    align-self: flex-start;
    color: var(--brand-blue) !important;
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 3px;
    font-weight: 700 !important;
    opacity: 1;
}

/* ---- Menu bar ------------------------------------------------------------ */
html.hv-new .header-sub-navbar {
    border-top: 1px solid var(--border-soft);
}

/* Links navy (override hardcoded white). */
html.hv-new .header-sub-navbar .nav-main-link {
    color: var(--brand-navy) !important;
    padding: 8px 16px !important;
    position: relative;
    transition: color 0.15s ease;
}

/* Bar-height model: remove the item's own vertical padding, and inset the pill
   a small amount. Bar renders at ~46-48px (verified via getBoundingClientRect on
   staging) — the signed-off target; the earlier "≈42px" figure in this comment
   didn't match measured reality. The hover pill fills most of the bar's height
   so the hit area stays comfortable without the bar feeling tall. */
html.hv-new .navbar-default li.nav-main-item {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
html.hv-new .header-sub-navbar .menu-item-wrapper {
    height: auto;
    margin: 4px 2px;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

/* Underline sits under the LINK TEXT only (not the full pill / caret) and a few
   px below the text — consistent for every item, submenu or not. It's on the
   link's ::after; custom-style.css forces `content:none !important` on
   has-children links (line ~1369), so re-enable it explicitly. */
html.hv-new .header-sub-navbar .nav-main-item .nav-main-link::after,
html.hv-new .header-sub-navbar .nav-main-item.menu-item-has-children .nav-main-link::after {
    content: "" !important;
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 4px;   /* matches where the GTranslate bar sat — a touch higher */
    height: 2px;
    border-radius: 1px;
    background: var(--accent-blue);
    transform: scaleX(0);
    transform-origin: center;
    will-change: transform; /* must be always-on — toggling on :hover causes GPU re-rasterize that reads as a snap/shrink */
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html.hv-new .header-sub-navbar .nav-main-item:hover .menu-item-wrapper,
html.hv-new .header-sub-navbar .nav-main-item.active .menu-item-wrapper,
html.hv-new .header-sub-navbar .nav-main-item.current-menu-item .menu-item-wrapper,
html.hv-new .header-sub-navbar .nav-main-item.current-menu-ancestor .menu-item-wrapper,
html.hv-new .header-sub-navbar .nav-main-item.current_page_item .menu-item-wrapper {
    background-color: rgba(0, 173, 239, 0.16);
    box-shadow: none;
}

html.hv-new .header-sub-navbar .nav-main-item:hover .nav-main-link::after,
html.hv-new .header-sub-navbar .nav-main-item.active .nav-main-link::after,
html.hv-new .header-sub-navbar .nav-main-item.current-menu-item .nav-main-link::after,
html.hv-new .header-sub-navbar .nav-main-item.current-menu-ancestor .nav-main-link::after,
html.hv-new .header-sub-navbar .nav-main-item.current_page_item .nav-main-link::after {
    transform: scaleX(1);
}

/* custom-style.css puts a bright-blue (#0f6cbd) background + white text/caret on
   the LI on hover (for items WITH a submenu). Neutralise all three so the light
   pill/underline shows for every item and the caret doesn't flip to
   (invisible) white — keep the caret a consistent navy at rest and on hover. */
html.hv-new .navbar-default li.nav-main-item:hover {
    background-color: transparent !important;
}
html.hv-new .navbar-default .navbar-nav > li.nav-main-item:hover a.nav-main-link {
    color: var(--brand-navy) !important;
}
html.hv-new .header-sub-navbar .submenu-caret,
html.hv-new .header-sub-navbar .submenu-caret i,
html.hv-new .header-sub-navbar .nav-main-item:hover .submenu-toggle-btn span,
html.hv-new .header-sub-navbar .nav-main-item:hover .submenu-caret i {
    color: var(--brand-navy) !important;
}

/* (Submenu caret colour is pinned navy in the menu-item rules below, so it
   stays consistent and doesn't flip to white on hover.) */

/* ---- GTranslate pill (desktop nav) — matches the menu items exactly:
   same rounded pill, same cyan-tint hover background, same teal underline. --- */
html.hv-new .header-language-container-nav {
    border: 1px solid var(--border-medium) !important;   /* subtle pill, matching the search box */
    background-color: var(--page-bg-soft);
    border-radius: 8px;
    margin: 4px 2px 4px 4px;
    position: relative;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
html.hv-new .header-language-container-nav:hover {
    background-color: rgba(0, 173, 239, 0.16);
    background-image: none;
    box-shadow: none;
    border-color: var(--accent-blue) !important;
}
/* No teal underline on the GTranslate control — the hover background alone reads
   better for a language switcher (an underline implies a nav destination). */
/* The GTranslate popup's tall padding was setting the whole menu-bar height
   (~54px). Match it to the menu links (8px) so the bar comes down to ~46px. */
html.hv-new .header-language-container-nav .gt_switcher-popup {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

html.hv-new .header-language-container-nav .gt_switcher-popup,
html.hv-new .header-language-container-nav .gt_switcher-popup::before,
html.hv-new .header-language-container-nav:hover .gt_switcher-popup,
html.hv-new .header-language-container-nav:hover .gt_switcher-popup::before,
html.hv-new .header-language-container-nav .gt_switcher-popup:hover,
html.hv-new .header-language-container-nav .gt_switcher-popup:hover::before {
    color: var(--brand-navy) !important;
}

/* Dropdown caret stays slate (white on hover would vanish on white). */
html.hv-new .header-language-container-nav .gt_switcher-popup span:last-child,
html.hv-new .header-language-container-nav:hover .gt_switcher-popup span:last-child,
html.hv-new .header-language-container-nav .gt_switcher-popup:hover span:last-child {
    color: var(--text-muted-dark) !important;
}

/* ---- Search field (desktop pill + mobile full-width bar) ----------------- */
/* Slightly darker border + faint fill so it's clearly a field on the white
   header (the old #e2e8f0 hairline was too faint to spot). */
html.hv-new .header-search-container .gsc-input-box,
html.hv-new .full-width-search-bar .gsc-input-box {
    background: var(--page-bg-soft) !important;
    border: 1px solid var(--border-medium) !important;
}

html.hv-new .header-search-container .gsc-input-box-focus,
html.hv-new .full-width-search-bar .gsc-input-box-focus {
    background: #ffffff !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 173, 239, 0.15) !important;
}

html.hv-new .header-search-container input.gsc-input,
html.hv-new .full-width-search-bar input.gsc-input {
    color: var(--brand-navy) !important;
}

/* Magnifier icon — same SVG as custom-style.css, recoloured slate (#64748b). */
html.hv-new .header-search-container .gsc-input-box td.gsib_a,
html.hv-new .full-width-search-bar .gsc-input-box td.gsib_a {
    background-image: url("data:image/svg+xml;utf8,<svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M14.76 13.27L20.49 19L19 20.49L13.27 14.76C12.2 15.53 10.91 16 9.5 16C5.91 16 3 13.09 3 9.5C3 5.91 5.91 3 9.5 3C13.09 3 16 5.91 16 9.5C16 10.91 15.53 12.2 14.76 13.27ZM9.5 5C7.01 5 5 7.01 5 9.5C5 11.99 7.01 14 9.5 14C11.99 14 14 11.99 14 9.5C14 7.01 11.99 5 9.5 5Z' fill='%2364748b' stroke='%2364748b' stroke-width='1.4'/></svg>") !important;
}

/* Clear "×" icon — recoloured slate to match. */
html.hv-new .header-search-container .gscb_a,
html.hv-new .full-width-search-bar .gscb_a {
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z' fill='%2364748b' stroke='%2364748b' stroke-width='1.4'/></svg>") center no-repeat !important;
    background-size: 16px 16px !important;
}

/* Placeholder text — slate, both fields. */
html.hv-new .header-search-container input.gsc-input::placeholder,
html.hv-new .full-width-search-bar input.gsc-input::placeholder {
    color: var(--text-muted-dark) !important;
}
html.hv-new .header-search-container .gsc-input-box input.gsc-input::-webkit-input-placeholder,
html.hv-new .full-width-search-bar .gsc-input-box input.gsc-input::-webkit-input-placeholder {
    color: var(--text-muted-dark) !important;
}

/* Rotating placeholder overlay (site.js) is white in custom-style.css. */
html.hv-new .gcs-rotating-ph {
    color: var(--text-muted-dark) !important;
}

/* ---- Mobile action row (search / language / donate / hamburger) ---------- */
html.hv-new .search-toggle:hover,
html.hv-new .search-toggle:active,
html.hv-new .search-toggle.active,
html.hv-new .navbar-toggle:hover,
html.hv-new .navbar-toggle:active,
html.hv-new .navbar-toggle.active {
    color: var(--brand-navy) !important;
}

html.hv-new .navbar-toggle {
    background: rgba(0, 43, 92, 0.06) !important;
}
html.hv-new .navbar-toggle:hover,
html.hv-new .navbar-toggle:active,
html.hv-new .navbar-toggle.active {
    background: rgba(0, 43, 92, 0.10) !important;
}

/* Crisp hamburger: replace the three 2px <span> bars (which round unevenly at
   fractional desktop zoom on low-DPI screens) with a Font Awesome bars glyph
   that renders sharp at any zoom/DPI. Real devices (2x/3x) were already fine;
   this makes the desktop-zoom case robust too. */
html.hv-new .navbar-toggle .icon-bar {
    display: none !important;
}
html.hv-new .navbar-toggle::before {
    font-family: "Font Awesome 7 Free", "FontAwesome", "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f0c9";
    font-size: 20px;
    line-height: 1;
    color: var(--brand-navy);
    display: block;
    -webkit-font-smoothing: antialiased;
}

/* Divider between the icon cluster and the give/menu cluster. */
html.hv-new .mobile-nav-divider {
    background: var(--border-soft);
}

/* GTranslate globe (mobile, icon-only). */
html.hv-new .header-language-container-mobile .gt_switcher-popup::before {
    color: var(--text-muted) !important;
}
html.hv-new .header-language-container-mobile:hover .gt_switcher-popup::before {
    color: var(--brand-navy) !important;
}

/* ---- Full-width mobile search dropdown ----------------------------------- */
/* Deeper shadow + firmer border so the dropdown reads as a distinct floating
   overlay on its own — the original 8%-opacity shadow over a plain white fill
   relied on whatever sat directly below (a colourful hero on the homepage) for
   contrast; on a plain content page it nearly disappeared into the page bg. */
html.hv-new .full-width-search-bar {
    background: #ffffff;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1.5px solid var(--border-medium);
    box-shadow: 0 10px 26px rgba(0, 21, 42, 0.14);
}

/* Sizing the field. The real blocker (measured) was NOT the container — it was
   the search FORM itself: searchform.php emits `<form id="searchform"
   class="navbar-form navbar-right">`, used in BOTH the desktop pill and this
   mobile dropdown, and style.css's `.navbar-default form#searchform` caps it at
   `max-width:320px` (an ID selector, so it beat the existing width:100%). On top
   of that, `.navbar-right` floats the form, so its 320px block hugged LEFT below
   768px and RIGHT above it (Bootstrap only floats the navbar form ≥768px) —
   which is exactly the off-centre drift seen across widths. So: lift the 320px
   cap and kill the float on the mobile form, force every nested layer of the
   GCS widget (note the class is `.gsc-control-searchbox-only`, not
   `.gsc-control-cse`) to fill it, then size + centre the CONTAINER ourselves —
   full width below 600px (phone: expand), capped and centred from 600px up
   (tablet: don't stretch edge-to-edge). */
html.hv-new .full-width-search-bar .container {
    width: 100%;
    max-width: 480px;
    /* the shared .container already has margin:0 auto → this centres it */
}
@media (max-width: 599px) {
    html.hv-new .full-width-search-bar .container {
        max-width: none;
    }
}
/* Lift the ID-selector 320px cap and the navbar-right float on the mobile form. */
html.hv-new .full-width-search-bar form#searchform,
html.hv-new .full-width-search-bar .navbar-form {
    max-width: none !important;
    float: none !important;
    width: 100% !important;
}
/* Force each nested layer of the Google searchbox widget to fill the form. */
html.hv-new .full-width-search-bar .form-group,
html.hv-new .full-width-search-bar .input-group,
html.hv-new .full-width-search-bar .gsc-control-searchbox-only,
html.hv-new .full-width-search-bar .gsc-search-box,
html.hv-new .full-width-search-bar table.gsc-search-box,
html.hv-new .full-width-search-bar .gsc-input-box,
html.hv-new .full-width-search-bar .gsc-input,
html.hv-new .full-width-search-bar input.gsc-input {
    width: 100% !important;
    max-width: none !important;
}
html.hv-new .full-width-search-bar table.gsc-search-box {
    table-layout: fixed !important;
}

/* ---- Mobile action icons — clearer hover/focus (were nearly invisible) ----
   Give search / language / hamburger a consistent rounded highlight on hover
   AND focus so the affordance is obvious, and a visible focus ring for
   keyboard users (WCAG 2.4.7). */
@media (max-width: 991px) {
    html.hv-new .search-toggle,
    html.hv-new .header-language-container-mobile .gt_switcher-popup {
        border-radius: 8px !important;
        transition: background-color 0.15s ease, color 0.15s ease;
    }
    html.hv-new .search-toggle:hover,
    html.hv-new .search-toggle:focus-visible,
    html.hv-new .header-language-container-mobile:hover .gt_switcher-popup,
    html.hv-new .header-language-container-mobile:focus-within .gt_switcher-popup,
    html.hv-new .navbar-toggle:hover,
    html.hv-new .navbar-toggle:focus-visible {
        background-color: rgba(0, 43, 92, 0.12) !important;
        color: var(--brand-navy) !important;
    }
    html.hv-new .search-toggle:focus-visible,
    html.hv-new .navbar-toggle:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 173, 239, 0.35) !important;
    }

    /* Uniform 40px height for all four action controls so their hover/tap
       backgrounds are the same size (search + language were shorter than the
       give chip + hamburger). */
    html.hv-new .search-toggle,
    html.hv-new .header-language-container-mobile .gt_switcher-popup,
    html.hv-new .navbar-toggle,
    html.hv-new .header-donate-container-mobile .donate-heart-link {
        height: 40px !important;
        min-height: 40px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
    }
    /* Icon-only controls are uniform 40×40 squares; the give chip stays wider
       because it carries a label (an icon button and a labeled button are
       different things — that width difference is expected/fine). */
    html.hv-new .search-toggle,
    html.hv-new .header-language-container-mobile .gt_switcher-popup,
    html.hv-new .navbar-toggle {
        width: 40px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* The give chip stacks its heart + label, so keep it a centered column. */
    html.hv-new .header-donate-container-mobile .donate-heart-link {
        flex-direction: column !important;
    }
    /* Keep the whole action cluster vertically centred in the brand bar so the
       space above and below the icons matches. */
    html.hv-new .header-mobile-actions-group {
        align-items: center !important;
    }
}

/* Off-canvas menu items — a clean, full-width hover band. The base rule rounds
   the wrapper (8px) and the list adds a 5px gap between rows; both fought the
   full-width divider lines (rounded corners + uneven white above/below each
   line). Square the band and remove the gap so each row is a contiguous strip
   that butts cleanly against the hairline dividers, like a standard mobile list. */
html.hv-new .off-canvas-body .nav-main-item {
    margin-bottom: 0;
}
html.hv-new .off-canvas-body .menu-item-wrapper {
    border-radius: 0;
    min-height: 50px; /* a touch taller → more breathing room around the carets */
}

/* Off-canvas submenu parents: kill the inert middle tap zone. The link grows to
   fill the row (tap anywhere left of the caret = go to the page), and the caret
   is a defined right-hand button (tap = expand submenu) set off by a divider.
   Both stay ≥44px tall. Parents keep navigating (they're real pages), so no
   need to duplicate them inside the submenu. */
html.hv-new .off-canvas-body .nav-main-link {
    flex: 1 1 auto;
}
/* The caret is a circular outlined button — visually distinct from the row's
   tappable label, so it clearly reads as the separate "expand submenu" control.
   The full-height toggle button stays the (≥44px) tap target; the circle is the
   mark inside it. Coordinates with the theme: soft-gray ring + navy chevron.
   It keeps ONE calm resting look; only the *open* state changes (below), so the
   menu never juggles too many caret states at once. */
html.hv-new .off-canvas-body .submenu-caret {
    width: 30px;
    height: 30px;
    border: 1.5px solid var(--border-medium);
    border-radius: 50%;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-navy);
    font-size: 12px;
    font-weight: 900;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
/* Passive ROW hover deliberately leaves the caret alone — its white circle
   already reads against the faint hover band, and reacting on every row-hover
   was one state too many ("too bold"). Feedback is reserved for actually
   pointing at the caret button: */
html.hv-new .off-canvas-body .submenu-toggle-btn:hover .submenu-caret {
    border-color: var(--brand-navy);
}
/* Open (clicked): a calm navy ring + faint navy fill (not bright cyan — that
   read as too much). The rotated chevron also signals the open state. */
html.hv-new .off-canvas-body .nav-main-item.submenu-active .submenu-caret {
    border-color: var(--brand-navy);
    background-color: rgba(0, 43, 92, 0.06);
}

/* Hairline dividers between the top-level mobile menu items, inset on the left
   to line up with the menu text (not full-bleed). A pseudo-element so the line
   can start at the text edge — a plain border-bottom can't be inset. Sits at
   the bottom boundary of each item (below any open submenu), so it always marks
   the gap between one top-level item and the next. Dropped on the last item. */
html.hv-new .off-canvas-body .nav-main-item {
    position: relative;
}
html.hv-new .off-canvas-body .nav-main-item::after {
    content: "";
    position: absolute;
    /* Measured to the rendered geometry: text box starts at 15px (first letter),
       caret circle's right edge is 10px in from the row's right edge. The line
       spans exactly first-letter → caret-circle-right so both ends line up. */
    left: 15px;
    right: 10px;
    bottom: 0;
    height: 1px;
    background: var(--border-soft);
}
html.hv-new .off-canvas-body .nav-main-item:last-child::after {
    display: none;
}

/* Submenu: match the squared, full-width main-menu language. The base rule
   makes it a rounded, bordered inset card, which looked out of place floating
   under the now-square main rows. Drop the radius + border + side margins so it
   butts directly under its open parent as one continuous shaded block. Tinted
   to match the parent's expanded band (~7%) so the whole open section reads as
   one clearly-shaded group against the white rows — the earlier 3.5% was almost
   invisible. Vertical-only padding here → each sub-link's hover spans full width. */
html.hv-new .off-canvas-body .sub-menu {
    background-color: rgba(0, 43, 92, 0.07) !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 4px 0 8px !important;
}
/* Sub-links: squared, full-width hover band (no rounded pill), text indented
   past the parent's first letter to signal the hierarchy. */
html.hv-new .off-canvas-body .nav-sub-link {
    border-radius: 0;
    padding: 11px 16px 11px 28px !important;
}
html.hv-new .off-canvas-body .nav-sub-link:hover,
html.hv-new .off-canvas-body .nav-sub-link:focus {
    border-radius: 0;
    background-color: rgba(0, 43, 92, 0.13) !important; /* a step darker than the 7% submenu bg so hover still reads */
}

/* Off-canvas drawer header brand lockup — SIL glyph + site title, mirroring the
   main header so the drawer still shows whose site this is while it covers the
   header. Two separate links (see base.twig): glyph → network root, title →
   this site's home — matching the header's logo/title split exactly, so the
   drawer doesn't behave differently from the rest of the site. This wrapper is
   a plain grouping div, not a link. Unscoped (not .hv-new) because the markup
   lives in base.twig for both header modes and the drawer is light in either.
   Title wraps to two lines like the header title — never truncated. */
.off-canvas-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;            /* let the title wrap inside the flex row */
    flex: 1 1 auto;
}
.off-canvas-brand-logo-link {
    display: block;
    flex-shrink: 0;
}
.off-canvas-brand-logo {
    height: 28px;
    width: auto;
    display: block;
}
.off-canvas-brand-title {
    color: var(--brand-navy);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    white-space: normal;     /* wrap to a second line rather than ellipsize */
    text-decoration: none !important;
}
/* No hover color change on the title — it stays navy like a static brand mark. */
.off-canvas-brand-title:hover,
.off-canvas-brand-title:focus,
.off-canvas-brand-title:visited {
    color: var(--brand-navy);
    text-decoration: none !important;
}

/* ---- Subsite home content — heading spacing ------------------------------
   Bootstrap gives content h2/h3 only 21px top margin, so section headings like
   "Key Features of PTXprint" sat tight against the text above. Give them more
   separation. Scope: headings inside a subsite homepage's post content
   (.sub-site-home-box-contents) — does not touch other pages or the root home.
   The first heading is zeroed because the wrapper already adds top padding
   under the hero (set above), so it doesn't double up. */
html.hv-new .sub-site-home-box-contents h2,
html.hv-new .sub-site-home-box-contents h3 {
    margin-top: 28px;
}
html.hv-new .sub-site-home-box-contents > h2:first-child,
html.hv-new .sub-site-home-box-contents > h3:first-child {
    margin-top: 0;
}

/* Widget feature images: cap at 300px on SUBSITE homepages only (their
   `.col-md-4` trifold columns, ~360px wide) — the production size. The
   redesign's `max-width:500px` let them fill the column (too big, and it
   magnified the low-res sources, e.g. Charis's 200x200 native photos).
   Excludes the root homepage's `.trio-widget` layout: its container is much
   wider (585px) and its photos are high-resolution, so it's sized instead in
   custom-style.css (`.trio-widget > div > .rl-image-widget-image`) to fill
   that wider container rather than being capped to this same 300px. */
html.hv-new #home_primary .row.trifold > div:not(.trio-widget) .rl-image-widget-image {
    width: 100% !important;
    max-width: 300px !important;
}

/* ---- Breadcrumb row — a little air below the header (was touching it) ----- */
html.hv-new #page-breadcrumbs {
    padding-top: 16px;
}

/* ---- Language popup — cyan hover on the (unselected) cards; the selected
   language stays a strong navy fill so it reads as "current" and never matches
   the hover state. Excluding .gt-current-lang is essential: the cyan-tint hover
   on the navy selected card turned its white text invisible. ---- */
html.hv-new .gt_languages a.glink:not(.gt-current-lang):hover {
    border-color: var(--accent-blue) !important;
    background: rgba(0, 173, 239, 0.08) !important;
}

/* ---- Hero — lighten in place --------------------------------------------- */
html.hv-new .modern-hero-section::before {
    background:
        linear-gradient(to top, rgba(0, 21, 42, 0.42), rgba(0, 21, 42, 0) 50%),
        linear-gradient(to right, rgba(0, 43, 92, 0.55) 0%, rgba(0, 43, 92, 0.22) 55%, rgba(0, 58, 112, 0.04) 100%);
}

html.hv-new .modern-hero-section .site-description {
    text-shadow: 0 2px 14px rgba(0, 21, 42, 0.55), 0 1px 3px rgba(0, 21, 42, 0.45);
}

/* CTA buttons — mid-blue with an elevation shadow (no outline/ring, which read
   as a border). They stay visible on dark photos because the hero's bottom
   scrim (strengthened above) darkens the area they sit in, and the drop shadow
   lifts them off the image. */
html.hv-new .hero-actions .btn-download {
    border-radius: 10px;
    /* Dual shadow: a dark elevation shadow separates the button on light photos;
       a soft light halo separates it on dark photos. Both are always present, so
       the hover state just intensifies both — no jarring dark<->light swap. The
       light layer is a diffuse glow (blur, no spread), not a hard 1px ring. */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38), 0 0 16px rgba(255, 255, 255, 0.18);
}
html.hv-new .hero-actions .btn-download:hover,
html.hv-new .hero-actions .btn-download:focus,
html.hv-new .hero-actions .btn-download:active {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 20px rgba(255, 255, 255, 0.24);
}
html.hv-new .hero-actions .btn-secondary-download {
    background-color: var(--accent-blue) !important;
}

/* Subsite hero logo/glyph — layered drop shadow so it stands out on any banner
   photo (a tight dark edge for definition + a soft wider shadow for lift). */
html.hv-new .hero-content img {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}

/* Breathing room above the first subsite home heading (e.g. "Audio Project
   Manager: Manage Your Audio Projects…") — it was sitting tight under the
   hero. Scoped to the subsite home content wrapper so the root homepage
   layout is unaffected. GH issue #38: more air above the heading (separating
   it from the hero) but LESS between the intro text and the trio images below
   (so the heading + its text stay visually connected to what follows, rather
   than reading as disconnected from both neighbors) — asymmetric on purpose,
   not a copy-paste of the same value both sides. 24px matches this project's
   established standard section-header gap (see the Simple content-page header
   pattern in CLAUDE.md). */
html.hv-new .sub-site-home-box-contents {
    padding-top: 40px;
    padding-bottom: 24px;
}


/* ============================================================================
   DONATE  (html.hv-new) — desktop navy pill, mobile cyan-tinted chip
   ----------------------------------------------------------------------------
   Desktop: the navy pill + red heart (liked from variant 2). Mobile: the
   cyan-tinted chip (liked from variant 3) with a smaller heart so it isn't
   cramped. The "GIVE" label is a real, translatable <span> (.donate-text-mobile
   in multisite-donate-links.php) — see the ".donate-text-mobile" rule below.
   ============================================================================ */
html.hv-new .header-donate-container .donate-heart-link {
    background-color: var(--brand-navy) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 43, 92, 0.28) !important;
}
html.hv-new .header-donate-container .donate-heart-link:hover {
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0, 43, 92, 0.38) !important;
}
html.hv-new .header-donate-container .donate-heart-link i.fa-heart,
html.hv-new .header-donate-container .donate-heart-link:hover i.fa-heart {
    color: #ef4444 !important;
}

/* The short "Give" span is hidden everywhere by default (desktop shows the full
   "Donate"; the original ?hv=0 header keeps its own label) — only hv-new mobile
   below reveals it. */
.donate-text-mobile {
    display: none;
}

@media (max-width: 991px) {
    html.hv-new .header-donate-container-mobile .donate-heart-link {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 3px 9px !important;
        border-radius: 10px !important;
        background: rgba(0, 173, 239, 0.10) !important;
        box-shadow: none !important;
        min-width: 44px;
    }
    html.hv-new .header-donate-container-mobile .donate-heart-link i.fa-heart {
        color: #ef4444 !important;
        font-size: 15px !important;   /* shrunk so the chip isn't cramped */
        margin-bottom: 2px;
    }
    /* Show the real, translatable "Give" span; hide the desktop "Donate" span
       and suppress the old non-translatable CSS ::after "GIVE" label. */
    html.hv-new .header-donate-container-mobile .donate-text {
        display: none !important;
    }
    html.hv-new .header-donate-container-mobile .donate-text::after {
        content: none !important;
    }
    html.hv-new .header-donate-container-mobile .donate-text-mobile {
        display: block !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: var(--brand-navy) !important;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        line-height: 1.1 !important;
        white-space: nowrap;
    }
}


/* ============================================================================
   TESTIMONIAL — light quote block  (shared: html.hv-new)
   ----------------------------------------------------------------------------
   The mid-page testimonial was the last element still using the old dark
   photo-with-scrim treatment. Recast as a light pull-quote matching the card
   system: navy italic quote, a cyan quote-mark accent, clean light band.
   (The "SIL … NEEDS YOU / Take the Survey" block is a separate survey popup
   modal, not the testimonial.)
   ============================================================================ */
html.hv-new #testimonial {
    color: var(--brand-navy) !important;
    text-align: center;
    position: relative;
    background: var(--page-bg-soft) !important;
    padding: 48px 0 !important;
}

html.hv-new #testimonial .container {
    max-width: 900px;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 44px 48px;
}

/* Phones: this card's background/border/shadow are on .container ITSELF, not
   on an inner child (unlike every other homepage card — .mission-card,
   .rssItem — where the outer .container stays a plain, invisible padding
   wrapper and the CHILD carries the card look). Below the breakpoint where
   Bootstrap's .container goes full-bleed (width:100%, no max-width), that
   difference means this card's visible edge touches the screen edges at
   0px, while every other card keeps a visible gap — an explicit margin here
   restores that same gap. 20px (not 15) to match the standardized edge inset
   used by the other homepage sections at this breakpoint (hero, mission
   cards, FAQ/Recent Posts, trio) — see the "Standardize the homepage's main-
   section edge inset" rule in custom-style.css. Also shrinks the card's own
   44px/48px internal padding, which was still desktop-sized — combined with
   the old 15px margin that put the actual quote text ~63px in from the
   screen edge, a much deeper inset than anything else on the page. */
@media (max-width: 759px) {
    html.hv-new #testimonial .container {
        margin-left: 20px;
        margin-right: 20px;
        width: auto;
        padding: 28px 24px;
    }
}

html.hv-new #testimonial .container::before {
    content: "\201C";
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    /* The imbalance bug here was never the font-size — it was line-height
       artificially shrunk to squeeze the glyph's box down (0.4, then 0.2),
       verified by ground-truth pixel-scanning the actual rendered card (not
       just CSS box-model math, which was measuring the wrong thing and
       reporting a false "balanced" result twice in a row): shrinking
       line-height that far let the glyph's own ink overflow past its own
       collapsed box, eating into the container's real padding-top (22px
       above the quote vs 60px below on desktop; 5px vs 44px on mobile). At
       the original 80px size with a normal, safe line-height:1 (glyph box
       never overflows), it stays balanced — re-verified by the same
       pixel-scan method: 55px vs 60px desktop, 37px vs 44px mobile. */
    font-size: 80px;
    line-height: 1;
    color: var(--accent-blue);
    /* line-height:1 leaves a lot of empty space below the glyph's own ink
       within its 80px line box (quote marks sit high in their em-square) —
       this negative margin pulls the answer text up to close that gap
       without touching line-height (the mechanism that caused the original
       overflow bug above). Only changes the quote-to-text gap, not the
       card's own top/bottom padding — verified: still 55px/60px desktop,
       37px/44px mobile. */
    margin-bottom: -22px;
}

html.hv-new #testimonial p,
html.hv-new #testimonial .textwidget {
    color: var(--brand-navy) !important;
    font-size: 22px !important;
    font-style: italic;
    font-weight: 400;
    line-height: 1.6;
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
}

html.hv-new #testimonial h2 {
    color: var(--brand-navy) !important;
    font-weight: 700;
}

html.hv-new #testimonial a {
    color: var(--accent-blue) !important;
    text-decoration: none;
}
html.hv-new #testimonial a:hover {
    text-decoration: underline;
}


/* ============================================================================
   FOOTER — the single, settled treatment (polished dark). Applied whenever the
   new design is active; no toggle. (The plain-dark and light-license-band
   alternates were dropped.)
   ============================================================================ */
html.hv-new .footer-top-bg {
    background: linear-gradient(135deg, #00224a 0%, #003a70 100%);
}
html.hv-new .footer-top-bg #license a {
    text-decoration-color: rgba(0, 173, 239, 0.55);
}
html.hv-new .footer-top-bg #license a:hover {
    text-decoration-color: var(--accent-blue);
    color: #ffffff;
}
html.hv-new .footer-top {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
html.hv-new .footer-top h2 {
    color: var(--accent-blue);
}
html.hv-new .footer-top a:hover,
html.hv-new .footer-bottom a:hover {
    color: var(--accent-blue);
    text-decoration: underline;   /* teal alone was too subtle — underline on hover */
}

/* Bottom bar: "Terms of Use" / "Privacy Policy" were a dimmer #617785 than the
   "SIL Global" link (#8da3b3) on the left. Match them at rest, and match the
   surrounding links' cyan + underline on hover. */
html.hv-new .footer-bottom li.leaf.active a {
    color: #8da3b3;
}
html.hv-new .footer-bottom li.leaf.active a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}
