/* =========================================================================
   ERC / Nahr Al Hayat — design tokens, fonts, RTL base
   Source of truth: Figma "Du - Red Crescent" (get_variable_defs)
   Loaded globally via globalCSS client extension.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Roboto:wght@400;500;700&family=Noto+Sans+Arabic:wght@400;500;700&display=swap');
@import url('erc-theme-ataya.css');

:root {
  /* Brand / red (Red Crescent) */
  --erc-red-500: #e20612;   /* primary CTA, links            */
  --erc-red-400: #f35757;   /* gradient highlight            */
  --erc-brand-header: #bf0d0d; /* identity bar / header brand */
  --erc-indigo: #3c3f90;    /* Nahr Al Hayat logo indigo     */
  --erc-green-500: #16a34a; /* Ataya "Donate now" CTA        */
  --erc-green-600: #15803d; /* Ataya CTA hover                */
  --erc-green-hero: #3f9678; /* Ataya About Us hero background */

  /* Text */
  --erc-text-heading: #020617;
  --erc-text-body: #334155;     /* descriptions               */
  --erc-text-caption: #475569;
  --erc-text-on-color: #ffffff;
  --erc-text-link: #e20612;

  /* Surfaces / strokes */
  --erc-surface-base: #ffffff;
  --erc-surface-low: #f1f5f9;   /* tinted sections, menu bar  */
  --erc-stroke: #cbd5e1;

  /* Shape */
  --erc-radius-pill: 24px;      /* buttons / cards / tags     */
  --erc-radius-card: 20px;
  --erc-radius-round: 100px;

  /* Type families (Latin default; Arabic falls back gracefully) */
  --erc-font-heading: 'Inter', 'Noto Sans Arabic', system-ui, sans-serif;
  --erc-font-body: 'Roboto', 'Noto Sans Arabic', system-ui, sans-serif;

  /* Brand gradient used on filled CTAs (Donate now) */
  --erc-cta-gradient: radial-gradient(circle at 50% 120%, var(--erc-red-400) 0%, #eb2f35 25%, #e61a23 38%, var(--erc-red-500) 50%);

  /* Layout */
  --erc-content-max: 1440px;
  --erc-gutter: 80px;
}

/* ============================================================================
   Nahr Al Hayat brand recolour — RED -> INDIGO/BLUE (Figma "Du - Red Crescent",
   home node 4977-302972). SCOPED to nahr pages via body:has(.erc-header) so the
   shared erc-theme keeps serving the original palette to other microsites. NOTE:
   ataya ALSO carries .erc-header (its root is class="erc-header ataya-header"), so we
   must EXCLUDE it via :not(:has(.ataya-header)) — otherwise ataya's shared-token
   elements (member-form Submit, links, focus) would recolour too. Ataya's own identity
   bar uses --erc-indigo (untouched) regardless. Every nahr fragment consumes these brand
   tokens, so this single block recolours CTAs (+hover), links, pagination, focus
   rings, the Make-a-Gift progress bar and the identity bar at once. globalCSS =>
   deploys LIVE, no site re-init. --brand-color-1 is overridden here too (beats the
   Style Book by specificity: body:has() = 0,1,1 > :root = 0,1,0) so token-fallback
   consumers such as report-item recolour live as well. New brand:
     Indigo  #3c3f90  (primary CTA / links / accents)
     Blue    #4cb9db  (secondary accent / identity bar)  */
/* Per-microsite brand palette. CONVENTION: each microsite header root carries
   `erc-header <site>-header` (ataya=.ataya-header, nahr=.nahr-header). Add ONE block
   per site, keyed on its own class — no shared default, so a NEW microsite never
   inherits another's colours; it simply gets its own block (+ its own identity-bar
   rule in its header fragment). Nahr Al Hayat = indigo/blue:
   (2nd selector is transitional — keeps nahr recoloured until its header re-init picks
   up the .nahr-header class; drop it once every site has its modifier class.) */
/* The second selector is the same palette reached another way: Liferay's Cookie
   Configuration dialog is a separate document in an iframe with no site header,
   so `body:has(...)` cannot match there. `erc-analytics` stamps the site key on
   that document's `<html>` (see `markSite`), which lets ONE definition serve
   both the page and the dialog.

   ★ Scoped to `.portlet-cookies-banner-configuration` and NOT to bare
   `html[data-erc-site=...]`. The marker is stamped on every page of the site
   INCLUDING Site Administration (its path is /group/<site>/~/control_panel/...,
   which `siteKey()` matches), and these blocks redefine `--brand-color-1` - a
   Liferay Style Book token - along with the CTA palette. On bare `html` that
   repaints Clay's primary colour throughout the admin UI, which nothing here
   wants and which `body:has(.nahr-header)` never could. */
html[data-erc-site="nahr-al-hayat"] .portlet-cookies-banner-configuration,
body:has(.nahr-header),
body:has(.erc-header):not(:has(.ataya-header)):not(:has(.nahr-header)):not(:has(.fatima-header)) {
  --erc-red-500: #3c3f90;      /* primary CTA / links / focus  -> Nahr indigo  */
  --erc-red-400: #585ba7;      /* gradient highlight           -> light indigo */
  --erc-brand-header: #4cb9db; /* top identity bar             -> Nahr blue    */
  --erc-text-link: #3c3f90;    /* links, pagination hover      -> Nahr indigo  */
  --erc-blue: #4cb9db;         /* secondary brand accent                       */
  --brand-color-1: #3c3f90;    /* Classic "Brand Color 1" (report-item hover…) */
  --erc-cta-gradient: radial-gradient(circle at 50% 120%, #585ba7 0%, #4d51a5 25%, #43469a 38%, #3c3f90 50%);
  /* Figma keeps the primary-button hover/active/focus red even on Nahr's indigo
     theme (idle state stays indigo) — see erc-btn--primary interactive rules. */
  --erc-btn-primary-hover-bg: #e20612;
}

/* Fatima (Sheikha Fatima Fund for Women Refugee) brand palette — cream/gold,
   per Figma "Du - Red Crescent" node 5286:210186 (header) & 5548:12438 (hero).
   Scoped to fatima pages via body:has(.fatima-header), same convention as
   ataya/nahr above, so other microsites keep their own tokens untouched. The
   marker selector reaches the consent dialog, whose own document has no header -
   see the note on the nahr block. Without it Fatima's page would show a gold
   Accept button and its dialog base-red toggles. */
html[data-erc-site="fatima"] .portlet-cookies-banner-configuration,
body:has(.fatima-header) {
  --erc-red-500: #d7b642;      /* primary CTA / links / focus -> Fatima gold  */
  --erc-red-400: #e6ce78;      /* gradient highlight          -> light gold   */
  --erc-brand-header: #f7f3e4; /* top identity bar            -> Fatima cream */
  --erc-text-link: #d7b642;
  --erc-cta-gradient: radial-gradient(circle at 50% 120%, #e6ce78 0%, #ddc35a 25%, #dabb4c 38%, #d7b642 50%);
  /* Classic theme's #wrapper (main.css) reads background-color from
     var(--body-bg, #fff) -- overriding the variable itself (rather than
     fighting #wrapper's rule with our own selector/!important) means Classic's
     own CSS renders the fallback colour with no specificity war. --body-bg only
     feeds background-color though (Classic has no background-image variable),
     so the gradient itself still needs one explicit background-image rule below. */
  --body-bg: #0b2b76;
}
body:has(.fatima-header) #wrapper {
  background-image: radial-gradient(101.75% 61.7% at 50% 50%, #0b2b76 0%, #000f33 100%);
}

/* Arabic / RTL: prefer the Arabic family, mirror automatically via dir=rtl */
[lang="ar"],
[dir="rtl"] {
  --erc-font-heading: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
  --erc-font-body: 'Noto Sans Arabic', 'Roboto', system-ui, sans-serif;
}

/* Ataya brand typeface (Brando Arabic) — scoped to ataya pages only via
   body:has(.ataya-header), same convention as the Nahr brand recolour above.
   Declared AFTER [lang="ar"]/[dir="rtl"] so it wins on Arabic ataya pages too
   (equal specificity, later source order); other microsites are untouched
   and keep Inter/Roboto/Noto Sans Arabic. Font files + @font-face live in
   erc-theme-ataya.css. */
/* Scoped to the dialog for the marker, whole body for the header - see the note
   on the nahr block above: on bare `html` this would push Brando Arabic onto the
   Site Administration chrome too. */
html[data-erc-site="ataya"] .portlet-cookies-banner-configuration,
body:has(.ataya-header) {
  --erc-font-heading: 'Brando Arabic', 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
  --erc-font-body: 'Brando Arabic', 'Noto Sans Arabic', 'Roboto', system-ui, sans-serif;

  /* EERC-1000 — Ataya's thank-you screen (shared erc-payment fragment, step 3).
     The design (Figma node 4964-285990, token Ataya/Green #329d72) wants a GREEN
     badge and two GREEN buttons; the fragment ships nahr's blue badge and the base
     red CTA, because one shared component cannot know whose page it is on.
     Ring = tick lightened over white at 27%, the ratio the original blue pair used
     (#4CB9DB -> #CFEAF2), so the badge keeps the weight it was drawn with. */
  --erc-paysuccess-ring: #c8e5d9;
  --erc-paysuccess-tick: #329d72;
}
/* Scoped to the thank-you buttons, NOT to .erc-btn--primary site-wide: ataya's other
   primary CTAs keep red / the indigo .ataya-btn--primary per their own designs.
   .erc-btn--primary reads its background from these three custom properties, and
   custom properties inherit - so overriding them on the button carries :hover,
   :active and :focus-visible along with no duplicated rules. Yes, `--erc-red-500`
   is being set to a green: that token is simply the name .erc-btn--primary reads
   its background from.

   ★ These rules live HERE, in erc-theme.css, and NOT in erc-theme-ataya.css next to
   the rest of the ataya CSS - on purpose. erc-theme.css is served content-hashed
   (erc-theme.<sha>.css), so editing it changes the URL and every browser picks the
   change up immediately. erc-theme-ataya.css is pulled in by @import under a FIXED
   url and is served with an ETag but no Cache-Control, so browsers heuristically
   reuse their cached copy: the first cut of this fix went there and simply did not
   appear for anyone who had already loaded the page - blue badge, red buttons, as
   if nothing had been deployed. Anything a user must SEE change belongs in the
   hashed file; erc-theme-ataya.css is for things that are added rather than
   changed (@font-face, the font files themselves). */
body:has(.ataya-header) .erc-paysuccess__btn {
  --erc-cta-gradient: none;
  --erc-red-500: #329d72;
  --erc-btn-primary-hover-bg: #329d72;
}

/* EERC-1164 — Ataya /become-a-member: the form block sat flush against the
   footer (gap measured at exactly 0px) and against the intro Section above it.
   The page definition puts an `ataya-become-member-form-section` class on that
   Section but nothing ever styled it, so it had no vertical padding at all.
   28px/56px is the same rhythm the other last-Section-before-footer blocks use
   (.ataya-gallery-collection / .ataya-years-collection in erc-theme-ataya.css).

   ★ Lives HERE rather than in erc-theme-ataya.css with the rest of the ataya CSS,
   for the reason spelled out in the block above: this is a change a user must SEE,
   and the @import'ed ataya file is served under a fixed URL with no Cache-Control,
   so already-cached browsers would keep the old spacing and the fix would look
   like it never deployed. */
body:has(.ataya-header) .ataya-become-member-form-section {
  padding-block: 28px 56px;
}

@media (max-width: 768px) {
  body:has(.ataya-header) .ataya-become-member-form-section {
    padding-block: 24px 32px;
  }
}

/* Shared building blocks consumed by ERC fragments ----------------------- */

h1, h2 {
  text-wrap: balance;
}

.erc-container {
  width: 100%;
  max-width: var(--erc-content-max);
  margin-inline: auto;
  padding-inline: var(--erc-gutter);
}

/* Responsive side gutter. The desktop gutter (80px) is far too wide on phones —
   e.g. on a 390px screen it leaves only ~230px of content, which is why the
   /apply form (max-width:100%) was squeezed to ~230px regardless of its own
   media queries: the PARENT .erc-container constrained it. Shrinking the token
   here fixes every .erc-container-based page at once (apply form, about,
   partners, section intros...). Only reduces padding, so it can never introduce
   horizontal scrolling. Desktop (>=901px) keeps the original 80px. */
@media (max-width: 1024px) { :root { --erc-gutter: 24px; } }
@media (max-width: 600px) { :root { --erc-gutter: 20px; } }

/* ---- Medium nav (768–1364px): shrink the pill bar to fit one row, no hamburger ----
   The full 8-item pill bar + logos + tools only fits one row from ~1366px up at
   full size (measured: wraps at 1280, clean single row at 1440). Rather than
   pushing the hamburger down across the whole tablet range (which hid the nav
   behind a tap target on iPad-sized screens), shrink logo size, pill padding and
   font size in this band so the same one-row layout keeps fitting down to 768px.
   The hamburger only appears below that, at true phone widths (<=767px). */
@media (max-width: 1364px) and (min-width: 768px) {
  .erc-header__primary { padding-block: 10px; gap: 12px; }
  .erc-header__logos { gap: 10px; }
  .erc-header__logo { height: clamp(48px, 5vw, 72px) !important; }
  .erc-header__emblem { height: clamp(52px, 5.6vw, 80px) !important; }

  /* Let the nav pills claim the row's free space instead of sitting at their
     natural width — keeps the utility icons pinned on the same row instead of
     being pushed onto a second line as the pill bar's own width tightens. */
  .erc-header__nav-widget { flex: 1; }
  .erc-header__nav-widget .nav-link {
    padding-inline: 12px;
    font-size: 14px;
  }
  .erc-header__nav-widget .navbar-nav { gap: 2px; }
  .erc-header__tools { gap: 8px; }
}

/* ---- Mobile navigation (collapse the nav behind the hamburger, <=767px) ----
   Declared globally here (not the fragment) so it deploys WITHOUT a site re-init.
   !important on the show/hide toggles guarantees these beat the fragment's own
   rules regardless of stylesheet load order. */
@media (max-width: 767px) {
  .erc-header__primary { padding-block: 10px; justify-content: flex-start; gap: 12px; }
  /* Keep ALL brand logos visible at every width (scaled down) — override the
     fragment's <=900 display:none so the full lock-up (Nahr + Red Crescent +
     accreditation + UAE emblem) stays in the bar; the hamburger is pushed to
     the far right. */
  .erc-header__logos { gap: 10px; }
  .erc-header__logos > .erc-header__logo { display: block !important; }
  /* Fluid logo height: 34px on phones, grows with the viewport, capped near the
     80px desktop size. clamp() keeps marks legible without ever wrapping the row. */
  .erc-header__logo { height: clamp(34px, 5.2vw, 72px) !important; }
  .erc-header__emblem { display: block !important; height: clamp(38px, 5.8vw, 80px) !important; }

  .erc-header__burger {
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    flex: none;
    margin-inline-start: auto;
    border: 0;
    background: transparent;
    border-radius: 12px;
    color: var(--erc-text-heading);
    cursor: pointer;
  }
  .erc-header__burger:hover { background: rgba(2, 6, 23, .04); }
  .erc-header__burger-bar {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }
  .erc-header.is-nav-open .erc-header__burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .erc-header.is-nav-open .erc-header__burger-bar:nth-child(2) { opacity: 0; }
  .erc-header.is-nav-open .erc-header__burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .erc-header__menu { display: none !important; }
  .erc-header.is-nav-open .erc-header__menu { display: block !important; }

  .erc-header__nav {
    flex-direction: column !important;
    align-items: stretch;
    gap: 8px;
    padding-block: 8px 16px;
  }
  .erc-header__nav-widget { padding-block: 0; }
  .erc-header__nav-widget .navbar-nav {
    flex-direction: column !important;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 2px;
  }
  .erc-header__nav-widget .nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .erc-header__nav-widget .nav-link { width: 100%; min-height: 48px; }
  .erc-header__nav-widget .dropdown-menu {
    display: block !important;
    position: static !important;
    float: none;
    min-width: 0;
    margin: 0;
    padding: 2px 0 2px 16px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .erc-header__nav-widget .dropdown-menu .nav-link,
  .erc-header__nav-widget .dropdown-menu a { min-height: 44px; }
  .erc-header__tools { justify-content: flex-start; gap: 12px; padding-inline: 4px; }
  /* .erc-header__nav stretches its column children (align-items: stretch above)
     so the language pill fills the row; pin it to its natural width instead. */
  .erc-lang { align-self: flex-start; }
}

/* Mobile tap targets: guarantee >=44x44px touch area on footer links (email,
   phone, legal, social). Global so it applies wherever the footer renders.
   Nav pills get their 48px height from the header fragment's mobile styles;
   carousel arrows are already 48px. */
@media (max-width: 600px) {
  .erc-footer__contact-link,
  .erc-footer__phone-num,
  .erc-footer__legal a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .erc-footer__social-btn { min-width: 44px; min-height: 44px; }
}

/* Pill button system (matches Figma button component) */
.erc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 8px 24px;
  border-radius: var(--erc-radius-round);
  font-family: var(--erc-font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter .15s ease, background-color .15s ease;
}
.erc-btn:hover,
.erc-btn:focus,
.erc-btn:active { text-decoration: none; }
.erc-btn--primary {
  background-image: var(--erc-cta-gradient);
  background-color: var(--erc-red-500);
  color: var(--erc-text-on-color);
}
.erc-btn--primary:hover {
  background-image: none;
  background-color: var(--erc-btn-primary-hover-bg, var(--erc-red-500));
  color: var(--erc-text-on-color);
  filter: brightness(1.05);
  box-shadow: 0px 6px 8px rgba(0, 0, 0, .08), 0px 3px 3px rgba(0, 0, 0, .12), 0px 9px 14px rgba(0, 0, 0, .05);
}
.erc-btn--primary:active {
  background-image: none;
  background-color: var(--erc-btn-primary-hover-bg, var(--erc-red-500));
  color: var(--erc-text-on-color);
  filter: brightness(.92);
  box-shadow: none;
}
.erc-btn--primary:focus-visible {
  background-image: none;
  background-color: var(--erc-btn-primary-hover-bg, var(--erc-red-500));
  color: var(--erc-text-on-color);
  border-color: var(--erc-stroke-focused, #f8a0a0);
  box-shadow: 0 0 0 2px rgba(226, 6, 18, .2);
  outline: none;
}
.erc-btn--primary:disabled,
.erc-btn--primary.disabled {
  background-image: none;
  background-color: var(--erc-surface-disabled, #cbd5e1);
  color: var(--erc-text-disabled, #94a3b8);
  opacity: 1;
  cursor: default;
}
.erc-btn--ghost {
  background: var(--erc-surface-base);
  border-color: var(--erc-stroke);
  color: var(--erc-text-body);
}
.erc-btn--ghost:hover { background: var(--erc-surface-low-hover, #e2e8f0); }
.erc-btn--ghost:active { background: var(--erc-stroke, #cbd5e1); }
.erc-btn--ghost:focus-visible {
  background: var(--erc-surface-low-hover, #e2e8f0);
  border-color: var(--erc-stroke-focused, #f8a0a0);
  box-shadow: 0 0 0 2px rgba(226, 6, 18, .2);
  outline: none;
}
.erc-btn--ghost:disabled,
.erc-btn--ghost.disabled {
  background: var(--erc-surface-disabled, #cbd5e1);
  border-color: transparent;
  color: var(--erc-text-disabled, #94a3b8);
  opacity: 1;
  cursor: default;
}

.erc-btn svg { width: 20px; height: 20px; flex: none; }

/* RTL: flip directional icons (arrows) */
[dir="rtl"] .erc-icon--flip { transform: scaleX(-1); }

/* The microsite provides its own header/footer via the master page, so hide the
   Classic theme's default banner/footer — but ONLY on pages that render our own
   header (i.e. the microsite, via the master page). Scoping with :has(.erc-header)
   keeps the default Liferay site's header/footer intact (login, navigation, etc.).
   erc-theme is company-scoped, so this selector is what limits it per-site. */
body:has(.erc-header) #banner,
body:has(.erc-header) #footer { display: none !important; }

/* Sticky footer: on short microsite pages, keep our footer pinned to the bottom
   of the viewport. The Classic theme's #wrapper is a 100vh flex column and #content
   (.flex-fill) fills it; we make #content's content grow so the master-page footer
   (rendered after the DropZone) is pushed down. */
body:has(.erc-header) #content { display: flex; flex-direction: column; }
body:has(.erc-header) #content > div { flex: 1 0 auto; display: flex; flex-direction: column; }
body:has(.erc-header) #main-content { flex: 1 0 auto; }

/* About Us web content (rendered via Journal Content widget + DDM template).
   Liferay strips the template's inline <style>, so the styling lives here in the
   global theme CSS. Targets the .erc-about-content wrapper (works for both the
   minimal and the styled FTL markup). */
.erc-about-content {
  max-width: var(--erc-content-max);
  margin-inline: auto;
  padding: 56px var(--erc-gutter);
  font-family: var(--erc-font-body);
  color: var(--erc-text-body);
}
.erc-about-content h1,
.erc-about-content__title {
  font-family: var(--erc-font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--erc-text-heading);
  margin: 0 0 20px;
  line-height: 1.2;
}
.erc-about-content h2 {
  font-family: var(--erc-font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--erc-red-500);
  margin: 28px 0 10px;
}
.erc-about-content p { margin: 0 0 14px; line-height: 1.75; }
[dir="rtl"] .erc-about-content { text-align: right; }

/* ============================================================
   News page - Collection Display: row spacing + restyled pager.
   Kept in the theme so CSS-only changes deploy via erc-theme
   WITHOUT re-running the Site Initializer.
   ============================================================ */

.erc-news-collection .erc-news-card { margin-bottom: 32px; }

/* --- Restyle Liferay's built-in Collection Display pager (Clay). ---
   Clay renders: prev/next arrows + numbers + a "..." ellipsis (a
   .dropdown.page-item) for skipped pages. Clay itself never renders
   First/Last -- those <li class="erc-pagination-first/-last"> items are
   injected by the pagination block in each site's header fragment main.js
   (liferay-fragments/src/<site>/header/main.js), which reuses Clay's own
   first/last page-number links rather than building URLs. This lives in
   the header fragment, NOT a company-scope globalJS client extension,
   because globalJS injection does not work on this Liferay instance --
   confirmed by deploying a verbatim copy of Liferay's own sample globalJS
   extension and observing it never gets injected into any page either,
   despite being registered/APPROVED in Client Extensions admin and the
   LPD-30371 feature flag being enabled. The header fragment is proven to
   render on every page (it's embedded in the master page), so the script
   lives there instead. Only hide the "Showing X to Y" text -- do NOT hide
   .dropdown (that IS the ellipsis). */
.lfr-layout-structure-item-collection .pagination-results { display: none !important; }

.lfr-layout-structure-item-collection .pagination-bar { justify-content: center !important; border: 0 !important; padding: 16px 0 56px !important; }
.lfr-layout-structure-item-collection .pagination { display: flex !important; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin: 0; }

/* Figma node 4964:284166 ("Pagination"): 12px gap between all items; number
   items get 16px/8px padding, Prev/Next add a 12px icon-text gap on top of
   that same padding; text is Regular 16px in --erc-text-heading; the active
   page is a --erc-surface-low pill pinned to 40px (Figma's 41px width is
   this same 40px box plus its 1px border, which this pager doesn't use). */
.lfr-layout-structure-item-collection .pagination .page-item .page-link {
  display: inline-flex !important; align-items: center !important; justify-content: center; gap: 12px;
  min-width: 40px; height: 40px; padding: 8px 16px; white-space: nowrap;
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  border-radius: var(--erc-radius-round, 100px);
  color: var(--erc-text-heading, #020617); font-size: 16px; font-weight: 400; line-height: 1.5;
  /* Liferay's Classic theme (clay.css) ships the base .page-link with
     letter-spacing:0.033em, then zeroes it back out to 0px on :hover, .hover,
     :active, .active, .page-item.active, and [aria-expanded="true"]/.show —
     so page numbers visibly shift width on hover/active unless every one of
     those states is pinned to this same 0.033em explicitly (declaring
     "normal" here does NOT match 0.033em, so that only fixes hover in one
     direction and still drifts elsewhere). */
  letter-spacing: 0.033em;
}
.lfr-layout-structure-item-collection .pagination .page-item .page-link:hover,
.lfr-layout-structure-item-collection .pagination .page-item .page-link.hover,
.lfr-layout-structure-item-collection .pagination .page-item .page-link:active,
.lfr-layout-structure-item-collection .pagination .page-item .page-link[aria-expanded="true"],
.lfr-layout-structure-item-collection .pagination .page-item .page-link.show,
.lfr-layout-structure-item-collection .pagination .page-item.active .page-link {
  letter-spacing: 0.033em;
}
.lfr-layout-structure-item-collection .pagination .page-item .page-link:hover,
.lfr-layout-structure-item-collection .pagination .page-item .page-link.hover {
  color: var(--erc-text-link, #dc2626); background: transparent !important;
}
.lfr-layout-structure-item-collection .pagination .page-item.active .page-link {
  background: var(--erc-surface-low, #f1f5f9) !important; color: var(--erc-text-heading, #020617); font-weight: 400;
  padding-inline: 8px;
}
/* Clay.css draws a ::before on EVERY .page-link, not just the active one
   (confirmed live: an inactive number, the ellipsis-adjacent item, and our
   own injected First/Last all carry it) -- a 0-height bar sized to the
   link's width that only becomes visible as an underline on :hover/.active
   via Clay's own hover/active styling. None of that is part of the Figma
   pill design, which has no underline in any state, so hide it everywhere
   in this pager, not just .active. */
.lfr-layout-structure-item-collection .pagination .page-item .page-link::before {
  display: none !important;
}
.lfr-layout-structure-item-collection .pagination .page-item.disabled .page-link { opacity: .4; }

/* Prev/Next/First/Last: let text + arrow sit on one line. */
.lfr-layout-structure-item-collection .pagination .page-item:has(.lexicon-icon) .page-link { min-width: auto; }
.lfr-layout-structure-item-collection .pagination .page-item:has(.lexicon-icon-angle-right) .page-link,
.lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-last .page-link { flex-direction: row-reverse !important; }
.lfr-layout-structure-item-collection .pagination .page-item .page-link svg { flex: none; display: inline-block; vertical-align: middle; }
.lfr-layout-structure-item-collection .pagination .page-item:has(.lexicon-icon-angle-left) .page-link::after { content: "Previous"; }
.lfr-layout-structure-item-collection .pagination .page-item:has(.lexicon-icon-angle-right) .page-link::after { content: "Next"; }

/* First/Last: injected by erc-theme-pagination.js, styled the same as
   Prev/Next. Their <span> label + inline svg are markup we control
   directly, so no content::after trick is needed (unlike Prev/Next,
   which restyle Clay's own lexicon-icon markup). */
.lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-first .page-link,
.lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-last .page-link {
  gap: 12px;
}
.lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-first .page-link svg,
.lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-last .page-link svg {
  flex: none; display: inline-block; vertical-align: middle; fill: currentColor;
}
/* The Arabic label replaces the SAME ::after pseudo-element used above (not
   a separate ::before) — an earlier version put the Arabic "Next" label in
   ::before while the English ::after rule above still matched too, so both
   "Next" and "التالي" rendered together. */
:lang(ar) .lfr-layout-structure-item-collection .pagination .page-item:has(.lexicon-icon-angle-left) .page-link::after { content: "\0627\0644\0633\0627\0628\0642"; }
:lang(ar) .lfr-layout-structure-item-collection .pagination .page-item:has(.lexicon-icon-angle-right) .page-link::after { content: "\0627\0644\062A\0627\0644\064A"; }

/* Prev/Next/First/Last arrows point along reading direction, not the
   screen's left/right -- mirror them in RTL so "Next"/"Last" still point
   toward where the reader expects the next page (screen-left in Arabic). */
[dir="rtl"] .lfr-layout-structure-item-collection .pagination .page-item .lexicon-icon-angle-left,
[dir="rtl"] .lfr-layout-structure-item-collection .pagination .page-item .lexicon-icon-angle-right,
[dir="rtl"] .lfr-layout-structure-item-collection .pagination .page-item .lexicon-icon-angle-double-left,
[dir="rtl"] .lfr-layout-structure-item-collection .pagination .page-item .lexicon-icon-angle-double-right {
  transform: scaleX(-1);
}

/* First/Last labels: real text nodes (see erc-theme-pagination.js), not
   Clay markup, so translate via :lang() text-swap same as Prev/Next
   rather than content::after (there's no lexicon-icon ::after to hook). */
:lang(ar) .lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-first .page-link span { display: none; }
:lang(ar) .lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-first .page-link::after { content: "\0627\0644\0623\0648\0644"; }
:lang(ar) .lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-last .page-link span { display: none; }
:lang(ar) .lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-last .page-link::after { content: "\0627\0644\0623\062E\064A\0631"; }

/* Figma node 8007:4800 ("Pagination", type=Mobile): below 600px, collapse
   to icon-only Prev/Next + only the page numbers adjacent to the active
   one (current-1, current, current+1) -- no "Previous"/"Next" text, no
   "..." ellipsis. Clay still renders its full desktop set of page-item
   <li>s in the DOM at this width (it doesn't recompute which numbers
   exist per-breakpoint), so this can only hide/show from what Clay gave
   us; it can't invent a number Clay never rendered. That means near the
   start/end of a long range (e.g. viewing page 1 of 17) the window won't
   be a perfectly centred triplet -- Clay's own DOM already isn't
   symmetric there. Accepted as a minor edge-case gap vs. building a
   custom pager (see PR discussion). */
@media (max-width: 600px) {
  .lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-first,
  .lfr-layout-structure-item-collection .pagination .page-item.erc-pagination-last {
    display: none !important;
  }
  .lfr-layout-structure-item-collection .pagination .page-item:has(.lexicon-icon) .page-link::after {
    display: none;
  }
  .lfr-layout-structure-item-collection .pagination .page-item:has(.lexicon-icon) .page-link {
    gap: 0;
  }
  .lfr-layout-structure-item-collection .pagination .page-item.dropdown {
    display: none !important;
  }
  .lfr-layout-structure-item-collection .pagination .page-item:not(:has(.lexicon-icon)) {
    display: none !important;
  }
  .lfr-layout-structure-item-collection .pagination .page-item.active:not(:has(.lexicon-icon)),
  .lfr-layout-structure-item-collection .pagination .page-item.active:not(:has(.lexicon-icon)) + .page-item:not(:has(.lexicon-icon)),
  .lfr-layout-structure-item-collection .pagination .page-item:not(:has(.lexicon-icon)):has(+ .page-item.active) {
    display: inline-flex !important;
  }
}

/* ============================================================
   Partners web content (rendered via Journal Content widget +
   PARTNER-CARD DDM template). Liferay strips the template's inline
   <style>, so the styling lives here in the global theme CSS.
   The template loops a repeatable "partner" fieldset, so this must
   handle any number of partner logos (wraps to new rows).
   ============================================================ */
.erc-partners {
  background: var(--erc-surface-base);
  padding-block: 40px 80px;
  font-family: var(--erc-font-body);
}
.erc-partners .erc-container { max-width: var(--erc-content-max); margin-inline: auto; padding-inline: var(--erc-gutter); }
.erc-partners__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 48px 0 49px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}
.erc-partners__col { min-width: 0; flex: 1 1 0; }
.erc-partners__col--heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-inline: 48px;
}
.erc-partners__col--logos {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 24px 48px;
  padding-inline: 40px;
}
.erc-partners__title {
  margin: 0;
  font-family: var(--erc-font-heading);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.2;
  color: var(--erc-text-heading);
  text-align: center;
}
.erc-partners__partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-decoration: none;
  color: inherit;
}
.erc-partners__logo-box {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.erc-partners__logo-box img { height: 100px; width: auto; max-width: 140px; display: block; object-fit: contain; }
.erc-partners__name {
  font-family: var(--erc-font-heading);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  color: var(--erc-text-heading);
  text-align: center;
}

/* The logos column is a drop zone holding a Collection Display over the PARTNERS
   collection. Liferay renders it as
     .erc-partners__col--logos > div                      (unnamed drop-zone wrapper)
       > .lfr-layout-structure-item-collection
         > .container-fluid > .row > .col-*               (one per card)
   EVERY level in that chain must be transparent - miss one (the unnamed div is
   easy to forget) and it stays the single flex item, the cards collapse into
   normal block flow (a vertical stack) and the `order` the partners fragment JS
   derives from the Priority field lands on the wrapper instead of the cards. */
.erc-partners__col--logos > div,
.erc-partners__col--logos .lfr-layout-structure-item-collection,
.erc-partners__col--logos .container-fluid,
.erc-partners__col--logos .row { display: contents; }
.erc-partners__col--logos .col,
.erc-partners__col--logos [class*="col-"] {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding-inline: 0;
}
/* Collection Display still draws its single-page pager under the logos. */
.erc-partners__col--logos .pagination-bar,
.erc-partners__col--logos .taglib-page-iterator { display: none !important; }

@media (max-width: 768px) {
  .erc-partners__card { flex-direction: column; gap: 24px; padding: 32px 24px; }
  .erc-partners__col--heading,
  .erc-partners__col--logos { padding-inline: 0; }
  .erc-partners__col--logos { gap: 24px 32px; }
}

/* Gallery lightbox — declared GLOBALLY (not just in the gallery fragment CSS) so the
   overlay element (appended to <body> by the fragment JS) stays hidden after Liferay's
   SennaJS SPA navigation swaps to a page where the fragment CSS is no longer loaded. */
.erc-gallery-lightbox {
  position: fixed; inset: 0; z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.erc-gallery-lightbox.is-open { display: flex; }
.erc-gallery-lightbox__backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, .85); }
.erc-gallery-lightbox__inner { position: relative; z-index: 1; width: fit-content; max-width: 92vw; }
.erc-gallery-lightbox__body { position: relative; min-height: 140px; }
.erc-gallery-lightbox__img {
  display: block; max-width: 92vw; max-height: 88vh; margin: 0;
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.erc-gallery-lightbox__frame { position: relative; width: min(1100px, 92vw); aspect-ratio: 16 / 9; }
.erc-gallery-lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
.erc-gallery-lightbox__hint {
  position: absolute; bottom: -34px; left: 0; right: 0; text-align: center;
  color: rgba(255, 255, 255, .75); font-family: var(--erc-font-body, sans-serif); font-size: 13px;
}
.erc-gallery-lightbox__spinner {
  position: absolute; top: 50%; left: 50%;
  width: 52px; height: 52px; margin: -26px 0 0 -26px; z-index: 2;
  border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff;
  border-radius: 50%; animation: erc-gallery-spin .8s linear infinite;
}
@keyframes erc-gallery-spin { to { transform: rotate(360deg); } }

/* ============================================================================
   Composable /home section set — global rules (see [[home-composable-fragment-set]])
   ============================================================================ */

/* card-grid: the <lfr-drop-zone> renders an extra wrapper <div> inside
   .erc-cardgrid__track, so the CSS grid must sit on THAT wrapper (its children
   are the dropped story-cards). Declared globally so it survives SennaJS SPA nav
   and applies without re-running the Site Initializer. */
.erc-cardgrid__track {
  display: grid;
  gap: 24px;
  align-items: stretch;
}
.erc-cardgrid--cols-2 .erc-cardgrid__track { grid-template-columns: repeat(2, 1fr); }
.erc-cardgrid--cols-3 .erc-cardgrid__track { grid-template-columns: repeat(3, 1fr); }
.erc-cardgrid--cols-4 .erc-cardgrid__track { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .erc-cardgrid__track { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .erc-cardgrid__track { grid-template-columns: 1fr; } }
/* The <lfr-drop-zone> renders one (view) or two (page-editor) single wrapper
   <div>s around the actual items. Dissolve those single wrappers so the cards
   (view) / toppers (editor) become the grid items in BOTH modes → same row layout
   on the editing canvas and the published page. */
.erc-cardgrid__track > div:only-child,
.erc-cardgrid__track > div:only-child > div:only-child { display: contents; }
.erc-cardgrid__track [class*="lfr-layout-structure-item"] { min-width: 0; height: 100%; }

/* Content width control (fragment config "Content width" -> class on the section).
   Overrides the inner .erc-container max-width. All values are MAX-widths, so they
   shrink to 100% on small screens automatically = mobile-safe (no fixed px). */
.erc-w-narrow  .erc-container { max-width: 960px; }
.erc-w-default .erc-container { max-width: var(--erc-content-max); }
.erc-w-wide    .erc-container { max-width: 1760px; }
.erc-w-full    .erc-container { max-width: none; }

/* "Meet the children" card row = a NATIVE Liferay Row (WYSIWYG in the page editor)
   whose columns each hold one story-card. We override Bootstrap's 12-grid with CSS
   grid so columns are ALWAYS equal width (Liferay's 12-grid can't split evenly by
   5/7 → middle column wider), the row width matches .erc-container (so it lines up
   with the other sections), and it stays horizontal in the editor. Add/remove a
   card = add/remove a column; cards auto-arrange 4 → 2 (tablet) → 1 (mobile). */
/* NOTE: cssClasses "erc-cards" lands on the OUTER layout-structure-item wrapper,
   whose single child is the Bootstrap `.row`. So constrain width on the wrapper and
   put the CSS grid on the inner .row (its children are the columns). */
.erc-cards {
  width: 100%;
  max-width: var(--erc-content-max);
  margin-inline: auto;
  padding-inline: var(--erc-gutter);
}
.erc-cards > .row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0 !important;
}
.erc-cards > .row > [class*="col-"] {
  flex: none !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  padding: 0 !important;
  margin: 0 !important;
}
@media (max-width: 1024px) { .erc-cards > .row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .erc-cards > .row { grid-template-columns: 1fr; } }

/* 3-up card rows (Make a Gift, Our News) reuse .erc-cards but need 3 columns, not 4. */
.erc-cards--3 > .row { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1024px) { .erc-cards--3 > .row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .erc-cards--3 > .row { grid-template-columns: 1fr; } }

/* Top gap for content sections that don't start with a section-intro (which already
   carries 40px top). Used between Make a Gift and the Support media+text block. */
.erc-section-gap { padding-top: 56px; }

/* ---- Page content spacing (global, fixes every page at once) ----
   The master header/footer render OUTSIDE #main-content, which wraps the page's
   content sections. One rule gives every page top/bottom breathing room from the
   chrome. Global (no SI re-init needed). Excludes ataya (:not(:has(.ataya-header)))
   -- ataya's sections (hero, collections, footer) each own their own spacing, so
   this shared padding just double-insets them (e.g. stacked with
   .ataya-news-collection's own padding-block on /news). */
body:not(:has(.ataya-header)) #main-content { padding-block: 40px 56px; }
/* Display pages (news details) embed the header+footer fragments INSIDE #main-content
   (they don't inherit the master), so the rule above would pad above the header and
   below the footer. Zero it out whenever the header is embedded in the content.
   NOTE (EERC-802): must match/beat the specificity of the rule above
   (body:not(:has(...)) #main-content = 1,1,1) or it silently loses the cascade and
   #main-content keeps its 40px/56px padding — this was previously body-less
   (#main-content:has(...) = 1,1,0) and lost outright, which is part of why display
   pages had visible top/bottom whitespace despite this rule's intent. */
body #main-content:has(.erc-header) { padding-block: 0; }
/* Fatima pages want their sections flush against the header/footer chrome —
   zero out the global page padding for this microsite only. */
body:has(.fatima-header) #main-content { padding-block: 0; }
/* inter-section gaps within a page (between the 1st block and the one below it) */
.erc-apply--form { padding-top: 24px; }
.erc-contact--map { padding-top: 24px; }
.erc-news-collection { padding-top: 24px; }
.erc-news-page-collection { padding-top: 24px; }
.erc-programs-page-collection { padding-top: 24px; }
.erc-gallery-collection { padding-top: 24px; }
.erc-stories-collection { padding-top: 24px; }

/* Vertical gap between wrapped card rows (EERC-804): the Collection Display
   grid is Bootstrap-style (.row > .col-*, flex + negative margin), which only
   gives a horizontal gutter (12px padding each side = 24px between columns).
   margin-bottom on each column matches that 24px vertically so wrapped rows
   of cards aren't flush against each other (same pattern already used for
   Ataya's news grid, erc-theme-ataya.css). Listing pages only (not the home
   .erc-news-collection carousel, which doesn't wrap). */
.erc-news-page-collection .row > [class*="col-"],
.erc-programs-page-collection .row > [class*="col-"],
.erc-gallery-collection .row > [class*="col-"],
.erc-stories-collection .row > [class*="col-"] {
  margin-bottom: 24px;
}

/* ---- Collection Display grids: responsive column counts on mobile ----
   Home page News carousel uses .erc-news-collection; the standalone /news
   and /programs listing pages use .erc-news-page-collection /
   .erc-programs-page-collection (EERC-804 — must stay distinct from
   .erc-news-collection so the pagination rules below can tell the home
   carousel and the paginated listing pages apart); /gallery uses
   .erc-gallery-collection; /success-stories uses .erc-stories-collection.
   All render Liferay Collection Display markup (.container-fluid > .row >
   Bootstrap col-*). The generated columns keep a fixed small width at every
   breakpoint (col-3 / col-2 base), so on phones the cards shrink to ~70-80px
   instead of stacking. Desktop (>=901px) is left exactly as Liferay renders
   it — these are media-query-only overrides that step the columns down to
   2-up <=900px and 1-up <=600px, matching the .erc-carousel--cols-4
   step-down. Descendant .row selector (not ">") because the Collection
   Display nests the row under its own wrapper container-fluid. */
@media (max-width: 1024px) {
  .erc-news-collection .row > [class*="col-"],
  .erc-news-page-collection .row > [class*="col-"],
  .erc-programs-page-collection .row > [class*="col-"],
  .erc-gallery-collection .row > [class*="col-"],
  .erc-stories-collection .row > [class*="col-"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }
}
@media (max-width: 600px) {
  .erc-news-collection .row > [class*="col-"],
  .erc-news-page-collection .row > [class*="col-"],
  .erc-programs-page-collection .row > [class*="col-"],
  .erc-gallery-collection .row > [class*="col-"],
  .erc-stories-collection .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
/* Fatima home Events grid: 2-up on desktop, 1-up (full width) below 1024px —
   no step-down to 2-up like News/Gallery, since it's already only 2 columns. */
@media (max-width: 1024px) {
  .fatima-events-collection .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
/* Fatima Gallery grid (/gallery, all 20 videos, no pagination). The
   Collection's own cssClasses ("fatima-gallery-collection") never reach the
   DOM (Liferay only renders cssClasses on Row/Column/Section wrappers, not on
   a bare Collection element), so everything below is scoped off the
   surrounding Section class instead.
   Also fixes a real Liferay Collection Display bug seen only at higher item
   counts (20 items / 10 grid rows): the intermediate
   `.lfr-layout-structure-item-*` wrapper divs between the outer Column and
   the Bootstrap grid, and again around each card fragment, render as
   `display:block; width:auto` with only percentage-widthed / absolutely
   positioned descendants — so they have no intrinsic content width and
   collapse to ~4px, taking the whole grid down with them. Liferay sometimes
   patches this with an inline `style="width:100%"` on the collection
   wrapper, but not on the per-item wrapper and not reliably — so force it
   here rather than depend on that. */
.fatima-gallery-section .lfr-layout-structure-item-collection,
.fatima-gallery-section [class*="lfr-layout-structure-item-gallery-item"],
.fatima-gallery-section [class*="lfr-layout-structure-item-gallery-item"] > div {
  width: 100%;
}
@media (max-width: 1024px) {
  .fatima-gallery-section .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
/* No pager on the Fatima Gallery — all 20 items render on one page. */
.fatima-gallery-section .pagination-bar { display: none !important; }
/* Fatima News grid (/news, 36 articles paginated 6/page, 3 columns). Same
   wrapper-collapse bug as the Gallery grid above (see that comment) — the
   `.lfr-layout-structure-item-*` wrappers around the Collection and each
   news-item card have no intrinsic width and collapse to ~4px at this item
   count. Pager stays (6 real pages), only the grid itself is fixed. */
.fatima-news-section .lfr-layout-structure-item-collection,
.fatima-news-section [class*="lfr-layout-structure-item-news-item"],
.fatima-news-section [class*="lfr-layout-structure-item-news-item"] > div {
  width: 100%;
}
@media (max-width: 1024px) {
  .fatima-news-section .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
/* Side padding so the collection cards aren't edge-to-edge on mobile — applies
   to the home Gallery/News blocks AND the /news, /gallery, /programs pages
   (all the same full-width container-fluid with 0 side padding by default).
   Inset by the responsive gutter (24px <=900, 20px <=600). Mobile-only, so
   desktop keeps its centered container-fluid-max-xl layout.
   NOT .erc-stories-collection — that Section also carries .erc-container
   (constrained layout, not Fluid), which already applies the same
   padding-inline at every width; adding it again here would double-inset. */
@media (max-width: 1024px) {
  .erc-news-collection,
  .erc-news-page-collection,
  .erc-programs-page-collection,
  .erc-gallery-collection { padding-inline: var(--erc-gutter); }
}

/* Empty "No Results Found" state on the dedicated collection pages (/news,
   /programs, /gallery, /open-data, /success-stories): Liferay renders it
   full-width and flush to the viewport edge, so it looks misaligned against
   the page heading + builder note (which sit at the centered content
   margin). Constrain it to the same content width so it lines up. Only
   visible before the builder adds content. */
.erc-news-collection .c-empty-state,
.erc-news-page-collection .c-empty-state,
.erc-programs-page-collection .c-empty-state,
.erc-gallery-collection .c-empty-state,
.erc-stories-collection .c-empty-state,
.erc-open-data-collection .c-empty-state {
  max-width: var(--erc-content-max, 1440px);
  margin-inline: auto;
  padding-inline: var(--erc-gutter);
  box-sizing: border-box;
}

/* Fatima /reports empty state ("no reports yet"): restyle Liferay's native
   .c-empty-state to match the Figma "Page to be Updated" no-data screen
   (navy panel, gold ring icon, white message) instead of the default
   neutral/light empty state used elsewhere. Shown together with the
   page-hero fragment (image + "Report" title, toggled by
   reports-heading/index.js) when the collection has no items. */
.fatima-reports-collection .c-empty-state {
  max-width: var(--erc-content-max, 1440px);
  margin-inline: auto;
  padding: 80px var(--erc-gutter);
  box-sizing: border-box;
  background: transparent;
}

.fatima-reports-collection .c-empty-state .c-empty-state__icon,
.fatima-reports-collection .c-empty-state svg {
  color: #d7b642;
  fill: #d7b642;
}

.fatima-reports-collection .c-empty-state__title,
.fatima-reports-collection .c-empty-state__description,
.fatima-reports-collection .c-empty-state p {
  color: var(--erc-text-on-color, #ffffff);
}

/* Empty state content, per Figma node 7138:12833 ("Page to be Updated"): a
   gold ring-clock icon fading in above the message. Liferay's Collection
   Display only ever renders .c-empty-state > .c-empty-state-text (plain
   text, no icon slot, no as-code override for the markup), so the icon is a
   ::before background-image and the built-in text node is restyled in
   place rather than replaced. */
.fatima-reports-collection .c-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.fatima-reports-collection .c-empty-state::before {
  content: "";
  display: block;
  width: 64px;
  height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 52' fill='none'%3E%3Cpath d='M26 0C20.8577 0 15.8309 1.52487 11.5552 4.38179C7.27951 7.23871 3.94702 11.2994 1.97914 16.0502C0.0112654 20.8011 -0.503621 26.0288 0.499594 31.0723C1.50281 36.1159 3.97907 40.7486 7.61524 44.3848C11.2514 48.0209 15.8842 50.4972 20.9277 51.5004C25.9712 52.5036 31.1989 51.9887 35.9498 50.0209C40.7007 48.053 44.7613 44.7205 47.6182 40.4448C50.4751 36.1691 52 31.1423 52 26C51.9927 19.1066 49.2511 12.4976 44.3767 7.62326C39.5024 2.74889 32.8934 0.00727955 26 0ZM26 48C21.6488 48 17.3953 46.7097 13.7775 44.2923C10.1596 41.8749 7.33979 38.439 5.67466 34.419C4.00953 30.3991 3.57386 25.9756 4.42274 21.708C5.27161 17.4404 7.36691 13.5204 10.4437 10.4437C13.5204 7.3669 17.4404 5.2716 21.708 4.42272C25.9756 3.57385 30.3991 4.00952 34.419 5.67465C38.439 7.33978 41.875 10.1596 44.2923 13.7775C46.7097 17.3953 48 21.6488 48 26C47.9934 31.8327 45.6734 37.4247 41.5491 41.549C37.4247 45.6734 31.8327 47.9934 26 48ZM42 26C42 26.5304 41.7893 27.0391 41.4142 27.4142C41.0392 27.7893 40.5304 28 40 28H26C25.4696 28 24.9609 27.7893 24.5858 27.4142C24.2107 27.0391 24 26.5304 24 26V12C24 11.4696 24.2107 10.9609 24.5858 10.5858C24.9609 10.2107 25.4696 10 26 10C26.5304 10 27.0392 10.2107 27.4142 10.5858C27.7893 10.9609 28 11.4696 28 12V24H40C40.5304 24 41.0392 24.2107 41.4142 24.5858C41.7893 24.9609 42 25.4696 42 26Z' fill='%23D7B642'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: fatima-reports-empty-icon-in 1.3s linear;
}

.fatima-reports-collection .c-empty-state-text {
  color: var(--erc-text-on-color, #ffffff);
  font-family: var(--erc-font-body);
  font-size: 40px;
  letter-spacing: .8px;
  animation: fatima-reports-empty-title-in 1.3s linear;
}

@keyframes fatima-reports-empty-icon-in {
  0% { animation-timing-function: ease-in-out; opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fatima-reports-empty-title-in {
  0% { animation-timing-function: ease-in-out; translate: 0 140px; }
  100% { translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fatima-reports-collection .c-empty-state::before,
  .fatima-reports-collection .c-empty-state-text {
    animation: none;
  }
}

/* Belt-and-braces: fragment wrapper divs can carry a Bootstrap/Liferay
   `display` rule that outranks the bare [hidden] attribute's UA style, so
   force it explicitly for the two blocks reports-heading/index.js toggles. */
.fatima-reports-hero[hidden],
.fatima-reports-heading[hidden] {
  display: none !important;
}

/* /partners hero photo, per Figma node 5286:205609. page-hero is a shared
   fragment whose bg_image editable defaults to the About SFFWR photo; every
   page using it (Reports included) either keeps that default or has an
   editor swap it in the page editor. Overriding here via the page's own
   cssClasses (set on the Fragment element in page-definition.json) gives
   Partners its correct photo out of the box without touching the shared
   fragment default, and an editor can still replace it later -- this rule
   only wins until the editable field itself is next saved with a new value. */
.fatima-partners-hero .fatima-page-hero__bg {
  content: url("/o/erc-theme/fatima/hero-partners.png");
}

/* /contact-us hero photo, per Figma node 7672:13101. Same pattern as
   Partners above -- an editor can still replace it in the page editor. */
.fatima-contact-hero .fatima-page-hero__bg {
  content: url("/o/erc-theme/fatima/hero-partners.png");
}

/* Story details page: the media panel is `flex: 1 1 0` for the desktop two-column
   row. When the layout stacks to a column on mobile, flex-basis:0 on the now
   VERTICAL main axis collapses its height to 0, so the image vanishes (measured
   335x0). Reset to flex:none so its aspect-ratio drives the height from the full
   stacked width. */
@media (max-width: 900px) {
  .erc-storydetail__media { flex: none !important; width: 100%; }
}

/* Home banner alignment: the banner <section> wraps its own .erc-container
   (20px gutter) AND the fragment adds `padding: 20px` on mobile, double-
   insetting the hero card to ~40px while every other home section sits at 20px.
   Drop the banner's own horizontal padding so the card lines up at 20px. */
@media (max-width: 768px) {
  .erc-banner { padding-inline: 0 !important; }
}
/* Make a Gift CAROUSEL (home): a DonationObject Collection Display nested in the
   card-carousel fragment's drop zone. The collection renders container-fluid and
   CHUNKS the items into several .row elements (one per grid row); the fragment's
   main.js merges them into the FIRST .row, which these rules turn into a nowrap
   horizontal scroll track sized 3 / 2 / 1 cards. Prev/next buttons are the only
   control — the scrollbar is hidden. Kept in globalCSS (not the fragment) so it can
   be tuned without a site re-init. NO :has() in selector groups (would drop the rule). */
.erc-carousel__track .container-fluid { max-width: none !important; padding: 0 !important; margin: 0 !important; }
.erc-carousel__track .row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin: 0 !important;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.erc-carousel__track .row::-webkit-scrollbar { width: 0; height: 0; display: none; }
.erc-carousel__track .row > [class*="col-"] {
  flex: 0 0 calc((100% - 48px) / 3) !important;
  max-width: none !important;
  min-width: 0;
  padding: 0 !important;
  margin: 0 !important;
  scroll-snap-align: start;
}
@media (max-width: 1024px) { .erc-carousel__track .row > [class*="col-"] { flex-basis: calc((100% - 24px) / 2) !important; } }
@media (max-width: 600px)  { .erc-carousel__track .row > [class*="col-"] { flex-basis: 100% !important; } }

/* Successful Stories carousel = 4 cards on desktop (card-carousel perView="4").
   More specific than the default 3-up rules above, so these win regardless of
   source order; steps down 4 -> 3 -> 2 -> 1. */
.erc-carousel--cols-4 .erc-carousel__track .row > [class*="col-"] { flex-basis: calc((100% - 72px) / 4) !important; }
@media (max-width: 1200px) { .erc-carousel--cols-4 .erc-carousel__track .row > [class*="col-"] { flex-basis: calc((100% - 48px) / 3) !important; } }
@media (max-width: 900px)  { .erc-carousel--cols-4 .erc-carousel__track .row > [class*="col-"] { flex-basis: calc((100% - 24px) / 2) !important; } }
@media (max-width: 600px)  { .erc-carousel--cols-4 .erc-carousel__track .row > [class*="col-"] { flex-basis: 100% !important; } }

/* Sticky footer (EERC-802). On display pages (story/news/program details) the
   header+footer fragments are embedded DIRECTLY inside #main-content (see the
   :has(.erc-header) note above) instead of the master page's own #content/
   #wrapper flex chain, which is what the OLD version of this rule assumed --
   #main-content itself was never a flex container, so `margin-top: auto` on
   the footer item had no flex parent to push against and short stories left a
   gap below the footer. Make #main-content the flex column here so it fills
   the remaining viewport height and the auto margin has something to resolve
   against. Scoped to display pages only (:has(.erc-header)) so normal pages
   (header/footer outside #main-content) are untouched. */
#main-content:has(.erc-header) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.lfr-layout-structure-item-footer { margin-top: auto; }

/* ...and the same for the microsites whose footer is NOT a single `footer` fragment.
   The hook above is the class Liferay derives from the FRAGMENT KEY, so it only exists
   where the footer is one `footer` fragment (nahr). ataya composes its footer from TWO
   top-level Section blocks - `ataya-footer` and `ataya-footer__bottom` - out of atomic
   fragments (footer-logos / footer-cta / footer-contact / footer-bottom-bar /
   footer-social-links), and fatima from one, `fatima-footer-section`. Neither has an
   .lfr-layout-structure-item-footer item to hang the auto margin on, so their display
   pages left a gap below the footer on short content: measured 385px at 1280x1400 on
   ataya's donation checkout, and latent on fatima (its seeded articles happen to be
   long enough to hide it). For ataya push the FIRST of the two blocks - the bottom bar
   is its sibling and follows it.
   ★ A NEW microsite with display pages needs its own footer block added here. */
#main-content:has(.erc-header) > .ataya-footer,
#main-content:has(.erc-header) > .fatima-footer-section { margin-top: auto; }

/* Shared media lightbox. JS (gallery-card / story-card / story-detail) toggles
   .is-open on a single #erc-gallery-lightbox appended to <body>. Kept global here
   so it works on any page, including the story details display page (which has no
   gallery-card fragment). */
.erc-gallery-lightbox { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 24px; }
.erc-gallery-lightbox.is-open { display: flex; }
.erc-gallery-lightbox__backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, .85); }
.erc-gallery-lightbox__inner { position: relative; z-index: 1; width: fit-content; max-width: 92vw; }
.erc-gallery-lightbox__body { position: relative; min-height: 140px; }
.erc-gallery-lightbox__spinner {
  position: absolute; top: 50%; left: 50%;
  width: 52px; height: 52px; margin: -26px 0 0 -26px; z-index: 2;
  border: 4px solid rgba(255, 255, 255, .25); border-top-color: #fff;
  border-radius: 50%; animation: erc-gallery-spin .8s linear infinite;
}
@keyframes erc-gallery-spin { to { transform: rotate(360deg); } }
.erc-gallery-lightbox__img {
  display: block; max-width: 92vw; max-height: 88vh; margin: 0;
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.erc-gallery-lightbox__frame { position: relative; width: min(1100px, 92vw); aspect-ratio: 16 / 9; }
.erc-gallery-lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
.erc-gallery-lightbox__hint {
  position: absolute; bottom: -34px; left: 0; right: 0; text-align: center;
  color: rgba(255, 255, 255, .75); font-family: var(--erc-font-body, sans-serif); font-size: 13px;
}

/* Make a Gift campaign collection (DonationObject objects). The Liferay collection
   renders a full-width container-fluid > row > col-*; constrain it to the site content
   width and lay the cards out on the same 2-up grid as the other listing pages
   (/news, /programs, /gallery) so it is wrapped and responsive (not edge-to-edge).
   Numeric pagination stays visible. EERC-970: was 3-up, which made /make-a-gift the
   odd one out among the listing pages. */
.erc-gift-collection { padding-block: 24px; }
/* Donation carousel (.erc-gift-carousel) reuses the card-carousel chrome, which has its
   OWN .erc-container for the page gutter. When the fragment is dropped in a Row that ALSO
   carries .erc-container (home), the two nest and double-indent the heading + cards ~80px
   past every other section (e.g. "Successful Stories"). Zero the inner gutter so it aligns
   to the content edge. Inert when NOT nested (make-a-gift / correctly-structured pages),
   so the fragment's own .erc-container still provides the single gutter there. Scoped to
   .erc-gift-carousel so the shared card-carousel is never affected. */
.erc-container .erc-gift-carousel .erc-container { padding-inline: 0; max-width: none; }
/* EERC-970: the gutter needs !important. Liferay renders the collection wrapper as
   .container-fluid.px-0, and Bootstrap's .px-0 is itself !important, so the plain
   declaration here silently lost and the campaign cards ran edge-to-edge while
   /news, /programs and /gallery sat at the 80px content margin (those pages already
   use !important, further down). */
.erc-gift-collection .container-fluid {
  max-width: var(--erc-content-max);
  margin-inline: auto;
  padding-inline: var(--erc-gutter) !important;
}
.erc-gift-collection .container-fluid > .row {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 0 !important;
}
.erc-gift-collection .container-fluid > .row > [class*="col-"] {
  flex: none !important; width: auto !important; max-width: none !important; min-width: 0;
  padding: 0 !important; margin: 0 !important;
}
/* EERC-970 follow-up: two layout defects the old 3-up grid was hiding.
   (a) NO GAP BETWEEN WRAPPED ROWS. Liferay CHUNKS a Collection Display into one
       `.row` ELEMENT per grid row (here 2 + 2 + 1), so the grid `gap` above only
       ever produced the HORIZONTAL gutter - the second row of cards sat flush
       against the first. The vertical gap has to go BETWEEN the `.row` elements,
       and it needs !important because the rule above zeroes `margin` with
       !important. (/news & friends solve the same problem with `margin-bottom`
       on each column, since they are not a CSS grid.)
   (b) UNEQUAL CARD HEIGHTS IN ONE ROW. Liferay stamps Bootstrap's
       `.align-items-start` on that `.row` and the utility is itself !important,
       so the columns never stretched: a card with a two-line description came
       out ~24px taller than its one-line neighbour and their amount steppers and
       "Donate now" buttons did not line up. Stretching the column is only half
       the fix - the card already IS `height: 100%`, but it sits under two
       auto-height Liferay wrappers
       (.lfr-layout-structure-item-donation-card > div > article.erc-gift) which
       break the percentage chain, so the wrappers need the height too. The card
       is already a flex column with `margin-top: auto` on .erc-gift__actions, so
       once it fills the row the stepper and CTA align by themselves. */
.erc-gift-collection .container-fluid > .row { align-items: stretch !important; }
.erc-gift-collection .container-fluid > .row + .row { margin-top: 24px !important; }
.erc-gift-collection .container-fluid > .row > [class*="col-"] > div,
.erc-gift-collection .container-fluid > .row > [class*="col-"] > div > div { height: 100%; }
/* <=1024px needs no rule any more: the base grid is already 2-up (EERC-970), which is
   exactly where /news, /programs and /gallery step down to. Phones still go 1-up. */
@media (max-width: 600px)  { .erc-gift-collection .container-fluid > .row { grid-template-columns: 1fr; } }
/* Pagination bar aligned to the same content width. */
.erc-gift-collection .pagination-bar,
.erc-gift-collection [class*="pagination"] { max-width: var(--erc-content-max); margin-inline: auto; padding-inline: var(--erc-gutter); }
/* EERC-970: same centred pager treatment as /news, /programs, /gallery and
   /success-stories below, so all the listing pages share one pagination control. */
.erc-gift-collection .pagination-bar { display: flex !important; justify-content: center; }
.erc-gift-collection .pagination-root { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }

/* Gallery pager: the gallery-card fragment hid the collection pager (leftover
   from when /gallery was a no-pager grid). Now that gallery paginates 6/page
   like /news, re-show it here (global → no fragment re-init needed). */
.erc-gallery-collection .pagination-bar { display: flex !important; justify-content: center; }
.erc-gallery-collection .pagination-root { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }

/* /success-stories pager: same treatment as /gallery — the story-card
   fragment carries no pager-hiding CSS, but keep the bar centered to match
   the rest of the site's collection pages. */
.erc-stories-collection .pagination-bar { display: flex !important; justify-content: center; }
.erc-stories-collection .pagination-root { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }

/* Fatima home Events grid: a fixed 4-card static grid, never more than one
   page, so Liferay's default pager (Previous / 1 / Next) is pure clutter. */
.fatima-events-collection .pagination-bar { display: none !important; }

/* Home News collection: a fixed 3-card grid (paginationType: "none" in the
   page-definition, numberOfItems == numberOfItemsPerPage), so it never has a
   second page — Liferay still renders the "Showing 1 to 3 of 3" pager
   regardless. Hide it, same as the Fatima Events grid above. This class is
   home-page-only; the standalone /news and /programs pages use their own
   classes below now that they paginate (EERC-597). */
.erc-news-collection .pagination-bar { display: none !important; }

/* /news and /programs pagers: both paginate 6/page (EERC-597) — same
   center-aligned treatment as /gallery and /success-stories above. */
.erc-news-page-collection .pagination-bar,
.erc-programs-page-collection .pagination-bar { display: flex !important; justify-content: center; }
.erc-news-page-collection .pagination-root,
.erc-programs-page-collection .pagination-root { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }

/* ---- Plain page hero (Donate / Zakat) ----
   Reuses the `banner` fragment as a title-ONLY page header (image + one big
   title, no description/CTAs), per the Donate & Zakat redesigns. The
   page-def wraps the banner Section in .erc-hero-plain and sets only the title;
   here we hide the CTA row + description (so their fragment defaults
   never show), shrink the hero height and vertically centre the title (left
   aligned). RTL is free (banner overlay + flex already mirror). Global CSS →
   deploys without a site re-init. */
.erc-hero-plain .erc-banner__actions,
.erc-hero-plain .erc-banner__desc { display: none !important; }
/* EERC-953: keep the gap above (nav → banner) and below (banner → form) at 40px. The
   banner fragment adds its own 40px padding-block on top of the page's 40px content
   padding above and the form's 40px top padding below, doubling both gaps to 80px —
   drop the banner's own padding here so only the intended 40px remains on each side. */
.erc-hero-plain .erc-banner { padding-block: 0; }
.erc-hero-plain .erc-banner__container {
  min-height: 200px;
  justify-content: center; /* EERC-950: was flex-end; the title sat at the bottom */
  gap: 0;
}
.erc-hero-plain .erc-banner__title { font-size: 48px; line-height: 1.1; }
@media (max-width: 900px) {
  .erc-hero-plain .erc-banner__container { min-height: 160px; padding: 24px; }
  .erc-hero-plain .erc-banner__title { font-size: 32px; }
}

/* EERC-954: the Home hero is a full .erc-banner sitting in the page's first section, so its
   own 40px padding-top stacks on the layout's 40px content padding — leaving the hero 80px
   below the nav instead of the intended 40px. Drop the top padding of a first-section hero
   banner only (keep padding-bottom for the gap to the next section). Pure global CSS, so it
   applies live without a site re-init. Only the Home hero qualifies: Donate/Zakat heroes are
   .erc-hero-plain and sit in the page's second section, and Ataya/Fatima use a different hero
   fragment (.do-hero-banner), so none of them are affected. */
#main-content > div:first-child .erc-banner { padding-top: 0; }

/* Indigo CTA variant (payment flow: "Confirm and Pay", success-page buttons) —
   matches the Figma indigo gradient. Reusable alongside .erc-btn / .erc-btn--primary. */
.erc-btn--indigo {
  background: radial-gradient(circle at 50% 120%, #585ba7 0%, var(--erc-indigo, #3c3f90) 55%);
  color: var(--erc-text-on-color, #fff);
  border: 0;
}
.erc-btn--indigo:hover { filter: brightness(1.06); }
.erc-btn--indigo:active { filter: brightness(.9); }
.erc-btn--indigo:focus-visible {
  filter: brightness(1.06);
  box-shadow: 0 0 0 2px rgba(60, 63, 144, .3);
  outline: none;
}
.erc-btn--indigo:disabled { opacity: .5; cursor: default; filter: none; }

/* Desktop: constrain the full-width Collection Display container to the content width
   so the /gallery, /news, /programs card grids line up with their page-intro hero
   (which uses .erc-container). Liferay renders the collection as a full-width
   .container-fluid.px-0; match .erc-container's max-width + responsive gutter. */
@media (min-width: 1025px) {
  .erc-gallery-collection .container-fluid,
  .erc-news-collection .container-fluid,
  .erc-news-page-collection .container-fluid,
  .erc-programs-page-collection .container-fluid {
    max-width: var(--erc-content-max);
    margin-inline: auto;
    padding-inline: var(--erc-gutter) !important;
  }
}

/* /news, /programs and /gallery hero image columns: force them onto the SAME
   width schedule as their Collection Display card columns (50% <=1024px,
   100% <=600px) at every breakpoint, not just desktop. The two grids on each
   page are built by different Liferay mechanisms (a native Row/Column vs a
   Collection Display's generated col-*), so their Bootstrap classes diverge
   below the lg breakpoint even though both render the same col-lg-6 on
   desktop (news/programs and gallery are both 2-up grids, EERC-804) -- this
   keeps them pixel-equal below lg too, with the text column taking the
   complementary width. Both hero variants share one 50%/100% schedule
   because .erc-news-page-collection / .erc-programs-page-collection and
   .erc-gallery-collection already step every card down to that same
   50%/100% (section above).
   Liferay's SI does not render a Column's own `cssClasses` in this version
   (silently dropped), so the two columns are targeted structurally instead:
   .erc-news-hero / .erc-gallery-hero is on the Row (that class DOES render),
   and each hero has exactly 2 columns in a fixed order (text, then image).
   EERC-970: /make-a-gift now carries .erc-news-hero too, so "news hero" reads
   as "listing-page hero" - /news, /programs, /gallery and /make-a-gift all
   share this 6+6 layout and this responsive schedule. */
@media (max-width: 1024px) {
  .erc-news-hero > .row > [class*="col-"],
  .erc-gallery-hero > .row > [class*="col-"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }
}
@media (max-width: 600px) {
  .erc-news-hero > .row > [class*="col-"],
  .erc-gallery-hero > .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* EERC-970: the listing-page hero banner must be the SAME SIZE on every one of
   those pages. Nothing pinned its height before, so the banner was simply
   whatever aspect the chosen photo happened to have - home-about.jpg is 16:9
   (540x304 at a 1280px viewport) while /make-a-gift's child-4.jpg is 440x392,
   i.e. 540x482, ~60% taller than the others. Pin the box to 16:9 and let the
   fragment's own object-fit: cover do the cropping, so swapping the photo can
   never change the banner size again. max-height is neutralised because the
   fragment caps the image at 520px, which would otherwise win over the ratio
   on very wide viewports. */
.erc-news-hero .erc-imageblock__img,
.erc-gallery-hero .erc-imageblock__img {
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: none;
}
/* child-4.jpg (/make-a-gift) is a near-square portrait of a child filling the
   frame: a CENTRED 16:9 crop cuts the top of her head off. Anchor it to the
   top so the crop only takes from the bottom. Same treatment as about-fund.jpg
   further down. */
.erc-news-hero .erc-imageblock__img[src*="child-4.jpg"] { object-position: top; }

/* /gallery collection: Liferay's layout-item container padding overrides the
   .erc-gallery-collection padding-top down to ~8px (unlike /news), collapsing the
   gap under the hero. Force it to match the /news & /programs spacing. */
.erc-gallery-collection.lfr-layout-structure-item-container { padding-top: 24px !important; }

/* View All in the card-carousel head: match the section-intro "View All" colour
   (heading colour, not the red link colour). + breadcrumb breathing room under the
   embedded header on article detail pages. Live overrides (no site re-init). */
.erc-carousel__head .erc-carousel__viewall { color: var(--erc-text-heading); }
.erc-article-header[dir] { padding-top: 40px; }

/* ============================================================
   Make a Gift donation card (.erc-gift*) — GLOBAL copy.
   These live in the donation-card fragment's index.css too, but on /home the
   card-carousel main.js merges the Collection Display rows (moves the card
   columns into one scroll track). That DOM move drops Liferay's per-fragment
   scoped CSS, so the cards render unstyled after the carousel runs ("flash then
   break"). On the plain /make-a-gift page (no carousel) the fragment CSS holds.
   Putting the card styles in globalCSS makes them apply regardless of where the
   carousel moves the cards. (Matches the "collection CSS -> erc-theme" rule.) */
.erc-gift {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--erc-surface-low);
  border-radius: var(--erc-radius-card);
  overflow: hidden;
  font-family: var(--erc-font-body);
}
.erc-gift__media {
  position: relative;
  aspect-ratio: 413 / 260;
  border-radius: var(--erc-radius-card);
  overflow: hidden;
}
.erc-gift__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.erc-gift__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.16) 62%, rgba(0,0,0,.75) 84%);
}
.erc-gift__tag {
  position: absolute; top: 16px;
  display: inline-flex; align-items: center; gap: 2px;
  height: 40px; padding: 8px 16px;
  background: var(--erc-surface-low);
  border-radius: var(--erc-radius-pill);
  font-size: 14px; line-height: 20px; white-space: nowrap;
}
.erc-gift__tag--progress { inset-inline-start: 16px; color: var(--erc-text-caption); }
.erc-gift__tag--progress strong { color: var(--erc-text-info, #0e87b9); font-weight: 700; }
.erc-gift__tag--progress .erc-gift__tag-sep { color: var(--erc-text-caption); }
.erc-gift__tag--category { inset-inline-start: 127px; color: var(--erc-text-caption); }
.erc-gift__stats {
  position: absolute; inset-inline: 16px; bottom: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: #fff; font-size: 14px; line-height: 20px;
}
.erc-gift__stat { display: inline-flex; align-items: center; gap: 4px; }
.erc-gift__stat--end { justify-content: flex-end; }
.erc-gift__stat-label { font-weight: 400; }
.erc-gift__stat strong { font-weight: 700; }
.erc-gift__bar {
  position: absolute; inset-inline: 16px; bottom: 12px;
  height: 8px; background: var(--erc-surface-base); border-radius: 24px; overflow: hidden;
}
.erc-gift__bar-fill { display: block; height: 100%; background: var(--erc-red-500); border-radius: 24px; }
.erc-gift__body { display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 0; }
.erc-gift__title {
  margin: 0; font-weight: 500; font-size: 20px; line-height: 28px; color: var(--erc-text-heading);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.erc-gift__desc {
  margin: 0; font-size: 16px; line-height: 24px; color: var(--erc-text-body);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.erc-gift__time { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 16px; line-height: 24px; color: var(--erc-text-body); }
.erc-gift__time svg { width: 24px; height: 24px; flex: none; color: var(--erc-text-caption); }
.erc-gift__actions { display: flex; flex-direction: column; gap: 12px; padding: 16px; margin-top: auto; }
.erc-gift__amount {
  display: flex; align-items: center;
  height: 48px; border: 1px solid var(--erc-stroke); border-radius: var(--erc-radius-pill);
  background: var(--erc-surface-base); overflow: hidden;
}
.erc-gift__step {
  flex: none; width: 48px; height: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; cursor: pointer; color: var(--erc-text-heading);
}
.erc-gift__step svg { width: 20px; height: 20px; }
.erc-gift__step:hover { background: rgba(2, 6, 23, .04); }
.erc-gift__amount-value {
  flex: 1 0 0; text-align: center; font-weight: 500; font-size: 16px; color: var(--erc-text-heading);
  border-inline: 1px solid var(--erc-stroke); height: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.erc-gift__amount-cur { color: var(--erc-text-caption); }
.erc-gift__cta { width: 100%; justify-content: center; }

/* Disabled form input — clear greyed-out affordance (e.g. the donation amount on
   /donate when it is locked to the value carried from a Make-a-Gift card). */
.erc-field__input:disabled {
  background: #eef1f4 !important; color: var(--erc-text-caption) !important;
  cursor: not-allowed; opacity: 1;
}

/* Make-a-Gift amount input: center the digits and size to content so "AED N" reads
   centered between the − / + steppers (overrides the fragment's inline left-align +
   fixed width). Base rule works everywhere; field-sizing tightens it on modern browsers. */
.erc-gift__amount-input { width: 5ch !important; text-align: center !important; }
@supports (field-sizing: content) {
  .erc-gift__amount-input {
    field-sizing: content; width: auto !important; min-width: 1.5ch; max-width: 8ch;
  }
}

/* About Nahr Al Hayat Fund image (home + about-us): align to top instead of the
   fragment's default center crop, per Figma. */
.erc-imageblock__img[src*="about-fund.jpg"] { object-position: top; }

/* ----------------------------------------------------------------------------------
   Article gallery carousel (news details display page) — EERC-510, Figma 7207-17128 /
   7207-16598. The `article-gallery` fragment reads ONE field of the News web content
   ("Gallery (photos / videos)"), one media item per line, and its main.js builds the
   tiles - so unlike the home carousels there is no Collection Display markup here and
   nothing to un-chunk: the track below IS our own element. Tiles reuse the
   .erc-gallery-media classes of the gallery-card fragment (and the shared
   .erc-gallery-lightbox), so this gallery and /gallery look and behave identically.
   Lives in globalCSS so the block can be tuned without a site re-init.
   ---------------------------------------------------------------------------------- */
.erc-agallery {
  /* Same measure as the article body (.erc-article-body__inner) so the tiles line up
     with the text above them instead of spanning the full page. */
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--erc-gutter);
  padding-block: 8px 56px;
  font-family: var(--erc-font-body);
}
/* Ships hidden: an article whose gallery field is empty renders nothing at all, arrows
   included. main.js removes the class as soon as it has built at least one tile. */
.erc-agallery.is-empty { display: none; }

.erc-agallery__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.erc-agallery__track::-webkit-scrollbar { width: 0; height: 0; display: none; }
.erc-agallery__item {
  flex: 0 0 calc((100% - 48px) / 3);
  min-width: 0;
  scroll-snap-align: start;
}
.erc-agallery--cols-4 .erc-agallery__item { flex-basis: calc((100% - 72px) / 4); }
@media (max-width: 900px) {
  .erc-agallery__item,
  .erc-agallery--cols-4 .erc-agallery__item { flex-basis: calc((100% - 24px) / 2); }
}
@media (max-width: 600px) {
  .erc-agallery__item,
  .erc-agallery--cols-4 .erc-agallery__item { flex-basis: 100%; }
}
/* ★ The tile look has to live HERE, not in the gallery-card fragment. Liferay only
   injects a fragment's CSS on pages where that fragment is placed, and this carousel
   builds its own tiles in JS - gallery-card is not on the article page at all, so its
   rules (aspect ratio, cover crop, badge) never arrive and the tiles render at the
   image's natural size. Same lesson as the .erc-gift* copy further up. Scoped to
   .erc-agallery so /gallery keeps using the fragment's own copy untouched. */
.erc-agallery .erc-gallery-media {
  position: relative;
  margin: 0;
  border: 1px solid var(--erc-stroke, #cbd5e1);
  border-radius: 12px;
  overflow: hidden;
  background: var(--erc-surface-low, #f1f5f9);
}
.erc-agallery .erc-gallery-media__link {
  display: block; position: relative; width: 100%;
  aspect-ratio: 630 / 350; overflow: hidden;
  border: 0; padding: 0; margin: 0; cursor: pointer; background: none;
}
.erc-agallery .erc-gallery-media__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; transition: transform .4s ease;
}
.erc-agallery .erc-gallery-media__link:hover .erc-gallery-media__img,
.erc-agallery .erc-gallery-media__link:focus-visible .erc-gallery-media__img { transform: scale(1.04); }
.erc-agallery .erc-gallery-media__badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 100px; background: rgba(2, 6, 23, .55); color: #fff;
  transition: opacity .25s ease, background .25s ease; pointer-events: none;
}
.erc-agallery .erc-gallery-media.is-video .erc-gallery-media__badge { background: rgba(226, 6, 18, .92); }
.erc-agallery .erc-gallery-media.is-image .erc-gallery-media__badge {
  width: 40px; height: 40px; top: auto; left: auto; bottom: 12px; right: 12px;
  transform: none; opacity: 0;
}
[dir="rtl"] .erc-agallery .erc-gallery-media.is-image .erc-gallery-media__badge { right: auto; left: 12px; }
.erc-agallery .erc-gallery-media.is-image .erc-gallery-media__link:hover .erc-gallery-media__badge,
.erc-agallery .erc-gallery-media.is-image .erc-gallery-media__link:focus-visible .erc-gallery-media__badge { opacity: 1; }
.erc-agallery .erc-gallery-media__badge svg { width: 24px; height: 24px; }
.erc-agallery .erc-gallery-media.is-image .erc-gallery-media__badge svg { width: 18px; height: 18px; }

/* Controls: centered UNDER the track — arrow, page dots, arrow (per Figma, unlike the
   home carousels whose arrows sit beside the section heading). */
.erc-agallery__nav {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 24px;
}
.erc-agallery.is-static .erc-agallery__nav { display: none; }
.erc-agallery__btn {
  width: 40px; height: 40px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--erc-stroke); border-radius: var(--erc-radius-round, 100px);
  background: #fff; color: var(--erc-text-heading); cursor: pointer;
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.erc-agallery__btn:hover:not(:disabled) { background: var(--erc-surface-low, #f1f5f9); }
.erc-agallery__btn:disabled { opacity: .4; cursor: default; }
.erc-agallery__btn svg { width: 20px; height: 20px; }
[dir="rtl"] .erc-agallery__btn .erc-icon--flip { transform: scaleX(-1); }
.erc-agallery__dots { display: inline-flex; align-items: center; gap: 8px; }
.erc-agallery__dot {
  width: 8px; height: 8px; padding: 0; flex: none;
  border: 0; border-radius: 100px; background: var(--erc-stroke, #cbd5e1);
  cursor: pointer; transition: background .2s ease, width .2s ease;
}
.erc-agallery__dot.is-active { background: var(--erc-text-info, #0e87b9); width: 24px; }

/* ============================================================================
   Cookie consent — banner + configuration dialog (EERC-1262)

   Liferay's stock cookie banner and its "Cookie Configuration" dialog ship in
   Clay's default look: square grey `btn-secondary` buttons, Clay-blue links,
   system font. Next to the brand palette they read as a foreign element, so
   they are re-skinned here with the SAME tokens and the same two button
   recipes the fragments use (`.erc-btn--primary` / `.erc-btn--ghost`).

   Because every colour comes from a token, each microsite gets its own brand
   automatically through the per-site override blocks at the top of this file —
   Nahr indigo, Ataya green/red — with no per-site rule below.

   Anatomy, for anyone changing this (verified on 2025.q1.6-lts):
     .cookies-banner.cookies-banner-bottom      the bar, in the page
       └ .portlet-cookies-banner                the portlet inside it
           └ buttons, addressed by id SUFFIX ([id$="_acceptAllButton"]) because
             the full id is portlet-namespaced
     .liferay-modal                             the dialog, in the PARENT page
       └ .modal-body-iframe > iframe            the panel is a separate document
   The dialog markup carries nothing cookie-specific, so it is selected via
   `:has(iframe[src*="CookiesBannerConfiguration"])` — otherwise these rules
   would repaint every Liferay iframe dialog in the admin UI too. The panel's
   own document is scoped by `.portlet-cookies-banner-configuration`; this
   stylesheet is loaded inside that iframe as well (globalCSS, company scope).
   ========================================================================= */

/* ---- the bar ---- */
.cookies-banner {
  background: var(--erc-surface-base);
  border-top: 1px solid var(--erc-stroke);
  box-shadow: 0 -4px 16px rgba(2, 6, 23, .08);
  font-family: var(--erc-font-body);
  padding: 16px 0;
}
.cookies-banner p {
  color: var(--erc-text-body);
  font-size: 14px;
  line-height: 22px;
  margin: 0;
}
.cookies-banner p a {
  color: var(--erc-consent-accent, var(--erc-text-link));
  text-decoration: underline;
}
.cookies-banner p a:hover { filter: brightness(.9); }
.cookies-banner .autofit-row { gap: 12px; row-gap: 12px; }

/* ---- the three actions ---- */
/* Shared shape: the pill from .erc-btn, so they sit next to the site's own
   CTAs without looking borrowed. */
.cookies-banner .btn[id$="_acceptAllButton"],
.cookies-banner .btn[id$="_declineAllButton"] {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--erc-radius-round);
  display: inline-flex;
  font-family: var(--erc-font-body);
  font-size: 15px;
  font-weight: 500;
  height: 40px;
  justify-content: center;
  line-height: 22px;
  padding: 8px 24px;
  transition: filter .15s ease, background-color .15s ease;
  white-space: nowrap;
}

/* Accept = the primary action, so it gets the brand CTA gradient. */
.cookies-banner .btn[id$="_acceptAllButton"] {
  background-color: var(--erc-red-500);
  background-image: var(--erc-cta-gradient);
  color: var(--erc-text-on-color);
}
.cookies-banner .btn[id$="_acceptAllButton"]:hover,
.cookies-banner .btn[id$="_acceptAllButton"]:focus {
  background-color: var(--erc-btn-primary-hover-bg, var(--erc-red-500));
  background-image: none;
  color: var(--erc-text-on-color);
  filter: brightness(1.05);
}
.cookies-banner .btn[id$="_acceptAllButton"]:active {
  background-image: none;
  filter: brightness(.92);
}

/* Decline is deliberately equal in size and weight to Accept — a refusal that
   is visibly harder to click is exactly what a consent regulator objects to. */
.cookies-banner .btn[id$="_declineAllButton"] {
  background: var(--erc-surface-base);
  border-color: var(--erc-stroke);
  color: var(--erc-text-body);
}
.cookies-banner .btn[id$="_declineAllButton"]:hover,
.cookies-banner .btn[id$="_declineAllButton"]:focus {
  background: var(--erc-surface-low-hover, #e2e8f0);
  color: var(--erc-text-heading);
}

.cookies-banner .btn[id$="_configurationButton"] {
  color: var(--erc-consent-accent, var(--erc-text-link));
  font-family: var(--erc-font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  text-decoration: underline;
}
.cookies-banner .btn[id$="_configurationButton"]:hover { filter: brightness(.9); }

.cookies-banner .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(60, 63, 144, .25);
  outline: none;
}

/* Ataya's primary CTA is NOT the shared red one. Its site-wide primary is
   `.ataya-btn--primary` — the indigo radial gradient from Figma node
   4964:283513, i.e. the "Donate now" on Ataya in Years — and ataya deliberately
   leaves `--erc-red-500` red for everything else. So the banner cannot just read
   the shared token: it has to follow its own site's CTA.

   Done by overriding the three custom properties the Accept button reads, on the
   button itself, exactly as the thank-you buttons do above: custom properties
   inherit, so :hover and :focus come along with no duplicated rules. The
   `Confirm` button in the dialog footer lives in this same document, so it is
   covered by the same selector.

   Add one block per microsite whose primary CTA is not the shared token. */
/* Its links, too. `--erc-text-link` is still red on ataya, and on a real ataya
   page nothing else is red: the nav is ink, the footer contact is green, the
   tertiary buttons are slate. Left alone, "Configuration" and "Visit our
   Privacy Policy" would be the only red text on the page. Indigo keeps the
   banner internally consistent with its own Accept button — swap it here if the
   design says otherwise. */
body:has(.ataya-header) .cookies-banner .btn[id$="_acceptAllButton"],
body:has(.ataya-header)
  .liferay-modal:has(iframe[src*="CookiesBannerConfiguration"])
  .modal-footer .btn-group-spaced .btn:first-child {
  --erc-btn-primary-hover-bg: var(--erc-indigo);
  --erc-cta-gradient: radial-gradient(
    118.27% 118.27% at 49.89% 0%,
    #6a6caf 0%,
    #3c3f90 50%
  );
  --erc-red-500: var(--erc-indigo);
}

/* Stacked on phones: full-width actions in the order the visitor reads them. */
@media (max-width: 575px) {
  .cookies-banner .autofit-col { width: 100%; }
  .cookies-banner .btn { width: 100%; }
}

/* ---- the configuration dialog (parent document) ---- */
.liferay-modal:has(iframe[src*="CookiesBannerConfiguration"]) .modal-content {
  border: 0;
  border-radius: var(--erc-radius-card);
  overflow: hidden;
}
.liferay-modal:has(iframe[src*="CookiesBannerConfiguration"]) .modal-header {
  border-bottom: 1px solid var(--erc-stroke);
}
.liferay-modal:has(iframe[src*="CookiesBannerConfiguration"]) .modal-title {
  color: var(--erc-text-heading);
  font-family: var(--erc-font-heading);
  font-size: 20px;
  font-weight: 600;
}
.liferay-modal:has(iframe[src*="CookiesBannerConfiguration"]) .modal-footer {
  border-top: 1px solid var(--erc-stroke);
}
.liferay-modal:has(iframe[src*="CookiesBannerConfiguration"]) .modal-footer .btn {
  border: 1px solid var(--erc-stroke);
  border-radius: var(--erc-radius-round);
  background: var(--erc-surface-base);
  color: var(--erc-text-body);
  font-family: var(--erc-font-body);
  font-size: 15px;
  font-weight: 500;
  height: 40px;
  padding: 8px 24px;
}
.liferay-modal:has(iframe[src*="CookiesBannerConfiguration"]) .modal-footer .btn:hover {
  background: var(--erc-surface-low-hover, #e2e8f0);
  color: var(--erc-text-heading);
}
/* "Confirm" — applies the toggles the visitor just set, so it is the primary
   action here. Positional: the footer renders Confirm, Accept All, Decline All
   as three identical `btn btn-secondary` with no ids or data attributes to key
   on. If a Liferay upgrade reorders them, this highlights the wrong one — the
   verifier screenshots this dialog, so compare before shipping an upgrade. */
.liferay-modal:has(iframe[src*="CookiesBannerConfiguration"])
  .modal-footer .btn-group-spaced .btn:first-child {
  background-color: var(--erc-red-500);
  background-image: var(--erc-cta-gradient);
  border-color: transparent;
  color: var(--erc-text-on-color);
}
.liferay-modal:has(iframe[src*="CookiesBannerConfiguration"])
  .modal-footer .btn-group-spaced .btn:first-child:hover {
  background-image: none;
  color: var(--erc-text-on-color);
  filter: brightness(1.05);
}

/* ---- the configuration panel (inside the dialog's own document) ---- */
.portlet-cookies-banner-configuration { font-family: var(--erc-font-body); }
.portlet-cookies-banner-configuration h2 {
  color: var(--erc-text-heading);
  font-family: var(--erc-font-heading);
  font-size: 17px;
  font-weight: 600;
}
.portlet-cookies-banner-configuration p {
  color: var(--erc-text-body);
  font-size: 14px;
  line-height: 22px;
}
/* The panel is a separate document in an iframe that renders no site header, so
   for a while this was deliberately neutral: `body:has(.nahr-header)` cannot
   match in there and a branded colour would have painted every site's dialog in
   the base palette. It is branded now because `erc-analytics` stamps
   `data-erc-site` on that document's `<html>` (see `markSite`), which the
   per-site token blocks at the top of this file also key on — so fonts and
   palette resolve in the dialog exactly as they do on the page.

   If that extension is ever removed the marker disappears, the tokens fall back
   to the base palette, and the dialog goes back to looking generic. It keeps
   working; it just stops matching. Do NOT key on `groupId` instead — it appears
   in asset URLs in that document but is regenerated by every clean rebuild. */
.portlet-cookies-banner-configuration a {
  color: var(--erc-consent-accent, var(--erc-text-link));
  text-decoration: underline;
}
/* "Always Active" on the strictly-necessary row — Clay renders it .text-primary
   (Clay blue), which belongs to no site. */
.portlet-cookies-banner-configuration .text-primary {
  color: var(--erc-text-caption) !important;
}
/* Category toggles.
   `::before` is where the ON colour actually lands: Clay draws it as a 48px
   overlay on top of `.toggle-switch-bar`, so recolouring the bar alone changes
   a layer nobody can see - it measures as branded and still renders Clay blue.
   `!important` because Clay's stylesheet loads after this one inside the
   dialog, so an equal-specificity override loses the cascade. */
.portlet-cookies-banner-configuration .toggle-switch-check:checked + .toggle-switch-bar::before,
.portlet-cookies-banner-configuration .toggle-switch-check:checked ~ .toggle-switch-bar::before {
  background-color: var(--erc-consent-accent, var(--erc-red-500)) !important;
}
.portlet-cookies-banner-configuration .toggle-switch-check:checked + .toggle-switch-bar,
.portlet-cookies-banner-configuration .toggle-switch-check:checked ~ .toggle-switch-bar {
  background-color: var(--erc-consent-accent, var(--erc-red-500)) !important;
  border-color: var(--erc-consent-accent, var(--erc-red-500)) !important;
}
/* Ataya again: its accent is the indigo of `.ataya-btn--primary`, not the shared
   red token it keeps for other things. One block per such microsite, same as
   for the banner above. */
html[data-erc-site="ataya"] .portlet-cookies-banner-configuration,
body:has(.ataya-header) .cookies-banner {
  --erc-consent-accent: var(--erc-indigo);
}
.portlet-cookies-banner-configuration .toggle-switch-check:focus-visible + .toggle-switch-bar {
  box-shadow: 0 0 0 3px rgba(2, 6, 23, .18);
}
