/* Al-Amal website theme — clean NGO layout (sticky header, hero + stats bar, card sections, dark footer).
   Uses logical properties so the same rules work for Arabic (RTL) and English (LTR). */

:root {
  --primary: #0a86bf;
  --primary-dark: #086a97;
  --navy: #12304d;
  --navy-deep: #0b1c2e;
  --gold: #e9b949;
  --gold-dark: #d4a12f;
  --ink: #1d2b3a;
  --muted: #5d6d7e;
  --line: #e3eaf1;
  --soft: #f4f7fa;
  --white: #fff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 20px rgba(18, 48, 77, .07);
  --shadow-lg: 0 18px 40px rgba(18, 48, 77, .14);
  --container: 1200px;
  --header-h: 77px; /* sticky header height (76px + 1px border); used by the announcements sidebar */

  /* Theme tokens (light). Brand colours (--navy, --gold, --primary) stay the same in both themes. */
  --bg: #fff;
  --surface: #fff;
  --heading: var(--navy);
  --link: #0a6f9f;          /* 5.2:1 on white (the brand blue #0a86bf is 4.1:1, too low for small text) */
  --btn: #0a6f9f;
  --btn-hover: #085a81;
  --tint-blue: #e8f4fa;
  --tint-gold: #fdf4e0;
  --header-bg: rgba(255, 255, 255, .97);
  color-scheme: light;
}

/* Dark theme: system preference on first visit, or the visitor's explicit choice (data-theme). */
:root[data-theme="dark"] {
  --bg: #0d1825; --surface: #132235; --soft: #182a3f; --line: #283d55;
  --ink: #dfe7ef; --muted: #a9b8c7; --heading: #f2f6fa; --link: #6cc4ee;
  --btn: #0a6f9f; --btn-hover: #0b80b7;
  --tint-blue: #16324a; --tint-gold: #3a2f17; --header-bg: rgba(13, 24, 37, .96);
  --shadow: 0 6px 20px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1825; --surface: #132235; --soft: #182a3f; --line: #283d55;
    --ink: #dfe7ef; --muted: #a9b8c7; --heading: #f2f6fa; --link: #6cc4ee;
    --btn: #0a6f9f; --btn-hover: #0b80b7;
    --tint-blue: #16324a; --tint-gold: #3a2f17; --header-bg: rgba(13, 24, 37, .96);
    --shadow: 0 6px 20px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Cairo', Tahoma, Arial, sans-serif; font-size: 16px; line-height: 1.8; color: var(--ink); background: var(--bg); }
main:focus { outline: none; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.4; margin: 0; color: var(--heading); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[id] { scroll-margin-top: 90px; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
.container.narrow { width: min(860px, 100% - 40px); }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 12px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1.3; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn-primary, .btn.primary { background: var(--btn); color: #fff; }
.btn-primary:hover, .btn.primary:hover { background: var(--btn-hover); }
.btn-outline { border-color: var(--link); color: var(--link); background: transparent; }
.btn-outline:hover { background: var(--btn); border-color: var(--btn); color: #fff; }
.btn-ghost:hover { color: var(--navy); background: #fff; }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; background: rgba(255, 255, 255, .06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 56px; height: 56px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { font-size: 15px; color: var(--heading); }
.brand-text small { font-size: 11px; color: var(--muted); }
.main-nav { display: flex; align-items: center; justify-content: center; gap: 4px; flex: 1; }
.main-nav > a, .nav-dropdown > summary { padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; transition: color .2s, background .2s; }
.main-nav > a:hover, .nav-dropdown > summary:hover { color: var(--link); background: var(--soft); }
.nav-dropdown { position: relative; }
.nav-dropdown > summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown[open] > summary .icon { transform: rotate(180deg); }
/* E-services: highlighted in gold */
.nav-dropdown--services > summary { background: var(--gold); color: var(--navy-deep); padding-inline: 14px; }
.nav-dropdown--services > summary:hover, .nav-dropdown--services[open] > summary { background: var(--gold-dark); color: var(--navy-deep); }
.nav-dropdown-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 200px; display: flex; flex-direction: column; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.nav-dropdown-menu a { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; }
.nav-dropdown-menu a:hover { background: var(--soft); color: var(--link); }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-switch { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: var(--radius-sm); font-weight: 800; font-size: 14px; color: var(--heading); }
.lang-switch:hover { background: var(--soft); color: var(--link); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--heading); cursor: pointer; place-items: center; }


/* ── Hero ── */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: center; overflow: hidden; color: #fff; background: var(--navy); }
.hero-media, .hero-slide, .hero-overlay { position: absolute; inset: 0; }
.hero-slide { background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-slide--brand {
  background:
    radial-gradient(circle at 15% 20%, rgba(233, 185, 73, .22), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(10, 134, 191, .55), transparent 45%),
    linear-gradient(135deg, #0b2a47 0%, #0f4c75 55%, #0a86bf 100%);
}
.hero-slide--brand::after {
  content: ''; position: absolute; inset-block: 12%; inset-inline-end: 3%; width: min(36vw, 440px);
  background: url('../images/logo.png') center / contain no-repeat; opacity: .07; filter: grayscale(1) brightness(3);
}
.hero-overlay { background: linear-gradient(to bottom, rgba(11, 28, 46, .35), rgba(11, 28, 46, .7)); }
.hero-slide--brand ~ .hero-overlay, .hero-media:has(.hero-slide--brand) + .hero-overlay { background: linear-gradient(to bottom, rgba(11, 28, 46, .05), rgba(11, 28, 46, .35)); }
/* Hero background video */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--navy); }
[dir='rtl'] .hero--video .hero-overlay { background: linear-gradient(to left, rgba(11, 28, 46, .88) 0%, rgba(11, 28, 46, .62) 45%, rgba(11, 28, 46, .3) 100%), linear-gradient(to top, rgba(11, 28, 46, .75) 0%, rgba(11, 28, 46, 0) 40%); }
[dir='ltr'] .hero--video .hero-overlay { background: linear-gradient(to right, rgba(11, 28, 46, .88) 0%, rgba(11, 28, 46, .62) 45%, rgba(11, 28, 46, .3) 100%), linear-gradient(to top, rgba(11, 28, 46, .75) 0%, rgba(11, 28, 46, 0) 40%); }
.hero-video-toggle { position: absolute; z-index: 3; bottom: 84px; inset-inline-end: 24px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%; background: rgba(11, 28, 46, .45); color: #fff; cursor: pointer; }
.hero-video-toggle:hover { background: rgba(11, 28, 46, .7); }
.hero-video-toggle[hidden] { display: none; }
.hero-video-toggle .icon-play, .hero-video-toggle.is-paused .icon-pause { display: none; }
.hero-video-toggle.is-paused .icon-play { display: block; }
.hero-content { position: relative; z-index: 2; padding-block: 90px 140px; max-width: var(--container); }
.hero-eyebrow { display: inline-block; margin-bottom: 18px; padding: 4px 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 30px; font-size: 14px; font-weight: 700; color: #e6f3fa; }
.hero h1 { max-width: 720px; font-size: clamp(32px, 5vw, 58px); font-weight: 800; line-height: 1.3; color: #fff; }
.hero h1 span { color: var(--gold); }
.hero p { max-width: 620px; margin: 20px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: #dbe9f3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-arrow { position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; transform: translateY(-50%); }
.hero-arrow:hover { background: rgba(255, 255, 255, .3); }
.hero-arrow--prev { inset-inline-start: 18px; }
.hero-arrow--next { inset-inline-end: 18px; }
[dir='rtl'] .hero-arrow--prev .icon { transform: none; }
[dir='rtl'] .hero-arrow--next .icon, [dir='ltr'] .hero-arrow--prev .icon { transform: scaleX(-1); }

/* ── Stats bar ── */
.stats-wrap { position: relative; z-index: 5; margin-top: -64px; }
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
/* Valid <dl>: each .stat wraps one <dt> (icon + label) and one <dd> (value); the grid shows the value above the label. */
.stat { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "icon value" "icon label"; column-gap: 14px; align-items: center; padding: 22px 24px; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat dt { display: contents; }
.stat-icon { grid-area: icon; display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--tint-blue); color: var(--link); }
.stat dd { grid-area: value; margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--heading); }
.stat-label { grid-area: label; font-size: 13px; color: var(--muted); }
.stat > div { display: flex; flex-direction: column; }

/* ── Sections ── */
.section { padding-block: 88px; }
.section-soft { background: var(--soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-head--spaced { margin-top: 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; font-weight: 800; color: var(--link); }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: currentColor; }
.eyebrow-light { color: var(--gold); }
.section-title { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; }
.section-sub { max-width: 640px; margin: 10px 0 0; color: var(--muted); }
.icon-box { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--tint-blue); color: var(--link); }
.icon-box--gold { background: var(--tint-gold); color: var(--gold-dark); }

/* ── Home: main content (~70%) + announcements sidebar (~30%) right after the hero ──
   Grid areas follow the page direction: "aside main" puts the sidebar on the right in RTL and on the left in LTR. */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 72px 16px; }
.home-layout.has-aside { grid-template-columns: minmax(280px, 3fr) minmax(0, 7fr); grid-template-areas: "aside main"; }
.home-layout.has-aside .home-main { grid-area: main; }
.home-layout.has-aside .ann-sidebar { grid-area: aside; }
.home-main { display: flex; flex-direction: column; gap: 72px; min-width: 0; }
.home-block.about { padding-top: 0; }
.home-panel { padding: 36px; background: var(--soft); border: 1px solid var(--line); border-radius: 18px; }
/* Narrower main column: fewer cards per row */
.has-aside .about-grid { grid-template-columns: minmax(0, 1fr) minmax(220px, 34%); gap: 40px; }
.has-aside .value-card { padding: 14px; }
.has-aside .center-grid, .has-aside .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.has-aside .story-card { min-height: 340px; }

/* Announcements sidebar: sticky under the header, its list scrolls on its own */
.ann-sidebar {
  position: sticky; top: calc(var(--header-h) + 20px); align-self: start;
  display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - 40px); max-height: calc(100dvh - var(--header-h) - 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.ann-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 16px 18px; background: var(--navy); color: #fff; }
.ann-head h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; color: #fff; }
.ann-head h2 .icon { color: var(--gold); }
.ann-all { font-size: 13px; font-weight: 800; color: var(--gold); white-space: nowrap; }
.ann-all:hover { text-decoration: underline; }
.ann-list { display: flex; flex-direction: column; gap: 12px; padding: 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9d8e4 transparent; }
.ann-list:focus-visible { outline-offset: -3px; }
.ann-card { display: flex; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.ann-card:hover { border-color: #bfdcec; box-shadow: var(--shadow); }
.ann-thumb { display: grid; place-items: center; flex-shrink: 0; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--tint-blue); color: var(--link); }
.ann-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ann-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ann-body time { font-size: 12px; font-weight: 700; color: var(--muted); }
.ann-body h3 { font-size: 15px; line-height: 1.6; }
.ann-body h3 a:hover { color: var(--link); }
.ann-body p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 13px; font-weight: 800; color: var(--link); }
[dir='rtl'] .ann-more .icon { transform: scaleX(-1); }

/* ── About ── */
.about { padding-top: 110px; }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.lead { margin-top: 18px; font-size: 17px; color: var(--muted); }
.value-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.value-card { padding: 18px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.value-card h3 { margin-bottom: 6px; font-size: 17px; }
.value-card p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); }
.about-visual { position: relative; padding-bottom: 40px; }
.about-panel { display: grid; place-items: center; aspect-ratio: 4 / 4.2; border-radius: 18px; background: linear-gradient(150deg, #eef8fd 0%, #d6ecf7 100%); box-shadow: var(--shadow); overflow: hidden; }
.about-panel img { width: 62%; }
.about-note { position: absolute; bottom: 0; inset-inline-end: -16px; max-width: 290px; padding: 18px 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about-note strong { display: block; margin-bottom: 4px; color: var(--heading); }
.about-note span { font-size: 14px; color: var(--muted); }

/* ── Centers ── */
.center-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.center-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s, transform .2s; }
.center-card:hover { border-color: #bfdcec; box-shadow: var(--shadow); transform: translateY(-3px); }
.center-card-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.center-card-text strong { font-size: 15px; line-height: 1.6; color: var(--heading); }
.center-card-text small { margin-top: 2px; font-size: 13px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.center-card-arrow { flex-shrink: 0; color: var(--link); opacity: .6; }
[dir='rtl'] .center-card-arrow .icon, [dir='rtl'] .link-more .icon { transform: scaleX(-1); }

/* ── Story cards (news & projects) ── */
.story-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.story-card { position: relative; display: flex; align-items: flex-end; min-height: 380px; border-radius: var(--radius); overflow: hidden; background: var(--navy); color: #fff; isolation: isolate; }
.story-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(11, 28, 46, .92) 0%, rgba(11, 28, 46, .45) 50%, rgba(11, 28, 46, 0) 80%); }
.story-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.story-card:hover .story-img { transform: scale(1.05); }
.story-card--brand { background: linear-gradient(160deg, #e9f5fb 0%, #bfdeee 45%, #0f4c75 100%); }
.story-mark { position: absolute; top: 18%; left: 50%; z-index: -2; width: 46%; transform: translateX(-50%); opacity: .95; transition: transform .4s; }
.story-card--brand:hover .story-mark { transform: translateX(-50%) scale(1.05); }
.story-body { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 22px; }
.story-body time { align-self: flex-start; padding: 2px 10px; border-radius: 20px; background: var(--gold); color: var(--navy-deep); font-size: 12px; font-weight: 800; }
.story-body strong { font-size: 17px; line-height: 1.6; }
.story-summary { font-size: 13px; line-height: 1.7; color: #d5e3ee; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Donate ── */
.donate-band { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px 48px; padding: 48px; border-radius: 18px; color: #fff; background: radial-gradient(circle at 90% 10%, rgba(233, 185, 73, .18), transparent 35%), linear-gradient(130deg, var(--navy-deep), #0f4c75 60%, var(--primary)); }
.donate-intro h2 { font-size: clamp(24px, 3vw, 34px); color: #fff; }
.donate-intro p { margin: 14px 0 0; color: #d3e4f0; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-self: center; }
.tier { display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); background: rgba(255, 255, 255, .07); }
.tier-amount { display: flex; align-items: baseline; gap: 6px; }
.tier-amount b { font-size: 30px; line-height: 1.2; color: var(--gold); }
.tier-amount small { font-size: 13px; color: #c9dcea; }
.tier strong { font-size: 15px; }
.tier span:last-child { font-size: 13px; color: #c9dcea; }
.donate-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }
.campaign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.campaign-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .2s, transform .2s; }
.campaign-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.campaign-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); }
.campaign-card strong { margin-top: 6px; font-size: 17px; color: var(--heading); }
.campaign-card > span:not(.icon-box):not(.link-more) { font-size: 14px; line-height: 1.7; color: var(--muted); }
.link-more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 800; color: var(--link); }

/* ── Reports ── */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.report-card { display: flex; gap: 14px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.report-card strong { display: block; color: var(--heading); }
.report-card small { color: var(--muted); }

/* ── Partners ── */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.partner-card { display: flex; align-items: center; justify-content: center; height: 128px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: box-shadow .2s, transform .2s; }
.partner-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.partner-card img { width: auto; max-width: 100%; max-height: 76px; object-fit: contain; }
.partner-card strong { font-size: 14px; text-align: center; color: var(--heading); }

/* ── Inner pages ── */
.page-header { padding-block: 64px 56px; color: #fff; background: radial-gradient(circle at 85% 10%, rgba(233, 185, 73, .16), transparent 35%), linear-gradient(130deg, var(--navy-deep), #0f4c75 65%, var(--primary)); }
.page-header h1 { max-width: 860px; font-size: clamp(26px, 4vw, 44px); color: #fff; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: 14px; color: #c3d8e7; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.page-date { display: inline-block; margin-top: 14px; padding: 2px 12px; border-radius: 20px; background: var(--gold); color: var(--navy-deep); font-size: 13px; font-weight: 800; }
.page-body { padding-block: 56px 80px; }
.prose { margin-bottom: 32px; font-size: 17px; line-height: 2; color: var(--ink); white-space: pre-line; }
.entry-cover { display: block; width: 100%; max-height: 520px; object-fit: cover; margin-bottom: 28px; border-radius: var(--radius); }
.entry-summary { padding: 18px 20px; margin-bottom: 26px; border-inline-start: 4px solid var(--gold); background: var(--soft); border-radius: var(--radius-sm); font-size: 18px; font-weight: 600; color: var(--heading); }
.translation-note { padding: 16px; margin-bottom: 24px; background: var(--tint-gold); border: 1px solid #edcf85; border-radius: var(--radius-sm); }
.translation-note a { color: var(--link); font-weight: 700; text-decoration: underline; }

.gallery-title { margin: 8px 0 16px; font-size: 20px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 32px; }
.gallery a { display: block; overflow: hidden; border-radius: var(--radius-sm); }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
.page-intro { max-width: 760px; margin: 12px 0 0; color: #d3e4f0; }
.partner-grid--page { margin: 8px 0 32px; }
.entry-cover { height: auto; }
picture { display: contents; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 36px; color: var(--muted); }

.gallery-count { font-size: 15px; font-weight: 600; color: var(--muted); }
.entry-cover-link { position: relative; display: block; margin-bottom: 28px; cursor: zoom-in; }
.entry-cover-link .entry-cover { margin-bottom: 0; }
.gallery a { cursor: zoom-in; }
.photo-count, .story-photos { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; background: rgba(11, 28, 46, .72); color: #fff; font-size: 13px; font-weight: 700; }
.photo-count { position: absolute; bottom: 14px; inset-inline-end: 14px; }
.story-photos { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 1; padding: 2px 10px; font-size: 12px; }
.preview-bar { padding: 10px 0; background: var(--gold); color: var(--navy-deep); font-weight: 700; font-size: 14px; }
.preview-bar a { margin-inline-start: 10px; text-decoration: underline; }

/* History corner: vertical timeline grouped by decade (line on the inline-start side; RTL/LTR aware) */
.timeline { position: relative; display: grid; gap: 34px; }
.timeline-decade-title { display: inline-block; margin-bottom: 16px; padding: 6px 18px; border-radius: 30px; background: var(--navy); color: #fff; font-size: 18px; }
.timeline-list { position: relative; display: grid; gap: 18px; margin: 0; padding: 0 0 0; padding-inline-start: 34px; list-style: none; }
.timeline-list::before { content: ''; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 9px; width: 2px; background: linear-gradient(var(--gold), #e3ebf2); }
.timeline-item { position: relative; }
.timeline-dot { position: absolute; top: 26px; inset-inline-start: -31px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--gold); box-shadow: 0 0 0 4px #fff; }
.timeline-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; transition: box-shadow .2s, transform .2s, border-color .2s; }
.timeline-card:hover { border-color: #bfdcec; box-shadow: var(--shadow); transform: translateY(-2px); }
.timeline-media { position: relative; display: block; min-height: 150px; background: var(--tint-blue); }
.timeline-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: sepia(.12); }
.timeline-media-icon { position: absolute; inset: 0; display: grid; place-items: center; color: var(--link); }
.timeline-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.timeline-date { align-self: flex-start; padding: 2px 12px; border-radius: 20px; background: var(--tint-gold); color: #8a5a00; font-size: 13px; font-weight: 800; }
.timeline-body strong { font-size: 18px; line-height: 1.6; color: var(--heading); }
.timeline-summary { font-size: 14.5px; line-height: 1.8; color: var(--muted); }
.timeline-photos { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--link); }
.history-date { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 680px) {
  .timeline-list { padding-inline-start: 26px; }
  .timeline-list::before { inset-inline-start: 6px; }
  .timeline-dot { inset-inline-start: -26px; top: 18px; width: 14px; height: 14px; }
  .timeline-card { grid-template-columns: 1fr; }
  .timeline-media { min-height: 0; aspect-ratio: 16 / 9; }
}

/* YouTube video (news & announcements): responsive 16:9 player on the detail page, small badge on cards */
.video-embed { margin: 0 0 28px; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: #0b1c2e; box-shadow: var(--shadow); }
@supports not (aspect-ratio: 16 / 9) { .video-frame { height: 0; padding-top: 56.25%; } }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.story-video { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #e62117; color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.story-video .icon { fill: currentColor; margin-left: 2px; } /* optical centring of the play triangle (same in RTL/LTR) */
.ann-thumb { position: relative; }
.video-badge { position: absolute; bottom: 4px; inset-inline-end: 4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e62117; color: #fff; }
.video-badge .icon, .ann-video .icon { fill: currentColor; }
.ann-video { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #c4180f; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Photo viewer (dialog) */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 14, 24, .94); color: #fff; }
.lightbox::backdrop { background: rgba(6, 14, 24, .94); }
.lightbox figure { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; margin: 0; padding: 60px 72px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { max-width: 900px; font-size: 15px; text-align: center; color: #d5e3ee; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 16px; inset-inline-end: 16px; font-size: 28px; }
.lb-prev { top: 50%; inset-inline-start: 16px; transform: translateY(-50%); }
.lb-next { top: 50%; inset-inline-end: 16px; transform: translateY(-50%); }
.lb-count { position: absolute; top: 26px; inset-inline-start: 24px; font-size: 14px; color: #c3d3e0; }
.lightbox.is-single .lb-prev, .lightbox.is-single .lb-next, .lightbox.is-single .lb-count { display: none; }
@media (max-width: 680px) {
  .lightbox figure { padding: 64px 10px 24px; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
}

/* Page blocks added from the CMS */
.section .section-head h2 { font-size: clamp(24px, 3vw, 34px); }

/* ── Footer ── */
.site-footer { margin-top: 0; padding-top: 72px; color: #c4d1de; background: radial-gradient(circle at 0% 100%, rgba(10, 134, 191, .18), transparent 40%), var(--navy-deep); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand strong { font-size: 17px; color: #fff; }
.footer-logo { display: grid; place-items: center; width: 60px; height: 60px; border-radius: var(--radius); background: var(--surface); }
.footer-logo img { width: 48px; height: 48px; object-fit: contain; }
.footer-about p { font-size: 15px; line-height: 1.9; }
.footer-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 16px; color: #fff; }
.footer-title::before { content: ''; width: 18px; height: 2px; background: var(--gold); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a:hover { color: #fff; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact small { display: block; font-size: 12px; color: #8ea3b6; }
.footer-contact a, .footer-contact li > span:last-child { color: #fff; font-weight: 600; }
.footer-icon { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .07); color: var(--gold); }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.social-links li { margin: 0; }
.social-links a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); color: #fff; transition: background .2s, border-color .2s, color .2s; }
.social-links a:hover, .social-links a:focus-visible { background: var(--primary); border-color: var(--primary); color: #fff; }
.social-links .social-facebook:hover { background: #1877f2; border-color: #1877f2; }
.social-links .social-instagram:hover { background: #d62976; border-color: #d62976; }
.social-links .social-youtube:hover { background: #e62117; border-color: #e62117; }
.social-links .social-x:hover { background: #000; border-color: #000; }
.social-links--light a { width: 44px; height: 44px; border-color: var(--line); color: var(--heading); background: var(--surface); }
.follow-box { margin: 28px 0; padding: 20px 22px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.follow-box h2 { font-size: 18px; }
.follow-box .social-links { margin-top: 12px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; color: #8ea3b6; }

.footer-credit { font-weight: 700; color: #dbe5ee; }

/* ── Responsive: wide screens — tighter menu so all links fit on one line ── */
@media (min-width: 1241px) {
  .header-inner { gap: 12px; }
  .header-actions { gap: 8px; }
  .main-nav { gap: 2px; }
  .main-nav > a, .nav-dropdown > summary { padding-inline: 6px; }
  .nav-dropdown--services > summary { padding-inline: 10px; }
}

/* ── Responsive: large tablets ── */
@media (max-width: 1180px) {
  .center-grid { grid-template-columns: repeat(3, 1fr); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive: small laptops and below (menu collapses into the ☰ button) ── */
@media (max-width: 1240px) {
  .menu-toggle { display: grid; }
  .main-nav {
    display: none; position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 20px 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .main-nav.is-open { display: flex; }
  .main-nav > a, .nav-dropdown > summary { padding: 12px 10px; font-size: 15px; border-bottom: 1px solid var(--soft); border-radius: 0; }
  .nav-dropdown > summary { display: flex; justify-content: space-between; width: 100%; }
  .nav-dropdown--services { margin-top: 8px; }
  .nav-dropdown--services > summary { border-radius: var(--radius-sm); border-bottom: 0; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: 0; padding: 0 12px; }
  .header-inner { justify-content: space-between; }
}

/* ── Responsive: tablets ── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { max-width: 520px; width: 100%; margin-inline: auto; }
  .about-note { inset-inline-end: 0; }
  .donate-band { grid-template-columns: 1fr; padding: 36px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Responsive: phones ── */
@media (max-width: 680px) {
  body { font-size: 15px; }
  .container, .container.narrow { width: calc(100% - 32px); }
  .header-inner { min-height: 66px; gap: 10px; }
  .brand img { width: 44px; height: 44px; }
  .brand-text strong { font-size: 13px; }
  .brand-text small { display: none; }
  .header-cta { display: none; }
  .main-nav { max-height: calc(100vh - 66px); }
  .notice-inner { flex-direction: column; align-items: flex-start; gap: 6px; padding-block: 10px; }
  .hero { min-height: 0; }
  .hero-content { padding-block: 56px 110px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-arrow { display: none; }
  [dir] .hero--video .hero-overlay { background: linear-gradient(to top, rgba(11, 28, 46, .9) 0%, rgba(11, 28, 46, .6) 55%, rgba(11, 28, 46, .45) 100%); }
  .stats-wrap { margin-top: -56px; }
  .stat { padding: 16px 14px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; }
  .stat dd { font-size: 21px; }
  .stat dt { font-size: 12px; line-height: 1.5; }
  .section { padding-block: 60px; }
  .about { padding-top: 70px; }
  .section-head { flex-direction: column; align-items: flex-start; margin-bottom: 26px; }
  .section-head--spaced { margin-top: 52px; }
  .value-cards { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 auto; }
  .about-note { position: relative; inset: auto; max-width: none; margin: -40px 16px 0; }
  .about-visual { padding-bottom: 0; }
  .center-grid { grid-template-columns: 1fr; gap: 12px; }
  .story-grid { grid-template-columns: 1fr; gap: 14px; }
  .story-card { min-height: 300px; }
  .donate-band { padding: 26px 20px; border-radius: var(--radius); }
  .tiers { grid-template-columns: 1fr; }
  .donate-actions .btn { flex: 1 1 100%; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .partner-card { height: 104px; padding: 14px; }
  .partner-card img { max-height: 60px; }
  .page-header { padding-block: 44px 40px; }
  .page-body { padding-block: 40px 60px; }
  .prose { font-size: 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }
}

/* ── Home layout: responsive ── */
@media (max-width: 1180px) {
  .home-layout.has-aside { grid-template-columns: minmax(260px, 32%) minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 1024px) {
  .has-aside .about-grid { grid-template-columns: 1fr; }
  .has-aside .value-cards { grid-template-columns: 1fr; }
  .home-panel { padding: 26px; }
}
/* Phones & small tablets: no sidebar column. The announcements become a horizontal swipe row
   placed right after the first content section (main's children join the outer flex flow). */
@media (max-width: 900px) {
  .home-layout, .home-layout.has-aside { display: flex; flex-direction: column; gap: 48px; padding-block: 56px 8px; }
  .home-layout.has-aside .home-main { display: contents; }
  .home-layout.has-aside .home-main > * { order: 2; }
  .home-layout.has-aside .home-main > :first-child { order: 0; }
  /* align-self: stretch + min-width: 0 keep the row inside the screen however many cards there are. */
  .ann-sidebar { order: 1; position: static; align-self: stretch; min-width: 0; width: 100%; max-height: none; overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .ann-head { padding: 0 0 12px; background: transparent; color: var(--heading); }
  .ann-head h2 { color: var(--heading); font-size: 20px; }
  .ann-head h2 .icon { color: var(--link); }
  .ann-all { color: var(--link); }
  .ann-list {
    flex-direction: row; gap: 12px; padding: 2px 2px 14px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  }
  .ann-card { flex: 0 0 min(84%, 330px); scroll-snap-align: start; box-shadow: var(--shadow); }
  .has-aside .center-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  :root { --header-h: 67px; }
  .home-main { gap: 48px; }
  .home-panel { padding: 22px 16px; border-radius: 14px; }
  .has-aside .center-grid, .has-aside .story-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ══ Accessibility, theme, consent, sharing, errors (2026-10) ══ */

/* Header: theme toggle */
.theme-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--heading); cursor: pointer; }
.theme-toggle:hover { background: var(--soft); }
.theme-icon--sun { display: none; }
:root[data-theme="dark"] .theme-icon--sun { display: inline; }
:root[data-theme="dark"] .theme-icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon--sun { display: inline; }
  :root:not([data-theme="light"]) .theme-icon--moon { display: none; }
}
.lang-switch, .menu-toggle { min-width: 44px; min-height: 44px; }
.menu-toggle { background: var(--surface); color: var(--heading); }
.menu-toggle.is-open { background: var(--soft); }

/* Visible keyboard focus everywhere (also on dark backgrounds) */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.ann-list:focus-visible { outline-offset: -3px; }

/* Links inside running text are underlined (not identified by colour alone) */
.prose a, .entry-summary a, .page-body p a, .translation-note a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* Gallery as a list */
ul.gallery { list-style: none; margin: 0 0 28px; padding: 0; }
ul.gallery li { margin: 0; }

/* YouTube click-to-load placeholder */
.video-consent { display: grid; place-items: center; color: #fff; background: #0b1c2e; }
.video-poster, .video-consent picture { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-poster { object-fit: cover; opacity: .35; }
.video-consent picture img { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.video-consent-body { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; max-width: 560px; padding: 18px; text-align: center; font-size: 14px; line-height: 1.7; }
.video-consent-body p { margin: 0; color: #e4ebf2; }
.video-consent-body a { color: #fff; text-decoration: underline; }
.video-play { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 18px 8px 10px; border: 0; border-radius: 40px; background: #c4180f; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.video-play:hover { background: #a3140c; }
.video-play-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.video-play-icon .icon { fill: currentColor; margin-left: 3px; }
.video-remember { display: inline-flex; align-items: center; gap: 8px; color: #e4ebf2; cursor: pointer; }
.video-remember input { width: 18px; height: 18px; }
@media (max-width: 520px) { .video-consent-body { font-size: 12.5px; gap: 6px; padding: 10px; } .video-consent-body p { display: none; } }

/* Share */
.share { margin: 8px 0 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.share-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 17px; }
.share-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 30px; background: var(--surface); color: var(--heading); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.share-btn:hover { border-color: var(--link); color: var(--link); }
.share-btn.is-done { border-color: #1d7a4d; color: #1d7a4d; }

/* Back to top */
.back-to-top { position: fixed; z-index: 60; bottom: 20px; inset-inline-end: 20px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; box-shadow: var(--shadow-lg); transition: transform .2s, background .2s; }
.back-to-top:hover { background: var(--btn); transform: translateY(-2px); }
.back-to-top[hidden] { display: none; }
:root[data-theme="dark"] .back-to-top { background: var(--btn); }

/* Footer legal links */
.footer-legal { display: inline-flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-legal a, .link-button { color: rgba(255, 255, 255, .85); text-decoration: underline; text-underline-offset: 3px; }
.link-button { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.footer-legal a:hover, .link-button:hover { color: #fff; }

/* Cookie notice (non-blocking) + preferences dialog */
.cookie-banner { position: fixed; z-index: 70; inset-inline: 16px; bottom: 16px; max-width: 980px; margin-inline: auto; padding: 18px 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; align-items: center; }
.cookie-banner h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 17px; }
.cookie-banner p { margin: 0; font-size: 14px; line-height: 1.7; }
.cookie-banner a, .cookie-dialog a { color: var(--link); text-decoration: underline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* All three choices look the same: no option is visually pushed. */
.btn-consent { min-height: 44px; padding: 8px 16px; font-size: 14px; background: var(--surface); color: var(--heading); border: 1.5px solid var(--heading); }
.btn-consent:hover { background: var(--soft); transform: none; }
.cookie-dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.cookie-dialog::backdrop { background: rgba(6, 14, 24, .6); }
.cookie-dialog-form { display: grid; gap: 14px; padding: 22px; }
.cookie-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-dialog h2 { font-size: 19px; }
.cookie-dialog p { margin: 0; font-size: 14px; }
.cookie-close { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--heading); cursor: pointer; }
.cookie-category { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.cookie-category legend { padding: 0 6px; font-weight: 800; color: var(--heading); }
.cookie-always { font-size: 12px; font-weight: 700; color: var(--muted); }
.cookie-switch { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.7; cursor: pointer; }
.cookie-switch input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; }
.small-note { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .cookie-banner { inset-inline: 10px; bottom: 10px; padding: 14px; }
  .cookie-banner-inner { grid-template-columns: 1fr; }
  .cookie-actions .btn-consent { flex: 1 1 100%; }
}

/* Error pages */
.error-page { padding-block: 72px 80px; text-align: center; }
.error-code { margin: 0; font-size: clamp(64px, 12vw, 120px); font-weight: 800; line-height: 1; color: #b07d12; }
.error-page h1 { margin: 10px 0 8px; font-size: clamp(24px, 4vw, 34px); }
.error-text-lead { color: var(--muted); }
.error-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.error-links a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--heading); font-weight: 700; }
.error-links a:hover { border-color: var(--link); color: var(--link); }
:root[data-theme="dark"] .error-code { color: var(--gold); }

/* Dark theme: surfaces that must stay light, and gentler photos */
:root[data-theme="dark"] .partner-card { background: #fff; }
:root[data-theme="dark"] .partner-card strong { color: var(--navy); }
:root[data-theme="dark"] .story-img, :root[data-theme="dark"] .gallery img, :root[data-theme="dark"] .entry-cover, :root[data-theme="dark"] .timeline-media img { filter: brightness(.94); }
:root[data-theme="dark"] .brand img { background: #fff; border-radius: 12px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .partner-card { background: #fff; }
  :root:not([data-theme="light"]) .partner-card strong { color: var(--navy); }
  :root:not([data-theme="light"]) .story-img, :root:not([data-theme="light"]) .gallery img, :root:not([data-theme="light"]) .entry-cover, :root:not([data-theme="light"]) .timeline-media img { filter: brightness(.94); }
  :root:not([data-theme="light"]) .brand img { background: #fff; border-radius: 12px; }
  :root:not([data-theme="light"]) .back-to-top { background: var(--btn); }
  :root:not([data-theme="light"]) .error-code { color: var(--gold); }
}

/* Calm motion: honour the visitor's system setting */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .btn:hover, .center-card:hover, .campaign-card:hover, .partner-card:hover, .timeline-card:hover, .back-to-top:hover { transform: none; }
}

/* Phones: the brand name may wrap (2 lines) so the theme, language and menu buttons always fit */
@media (max-width: 680px) {
  .brand { flex-shrink: 1; min-width: 0; }
  .brand-text { min-width: 0; }
  .brand-text strong { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
  .header-actions { gap: 6px; }
}
@media (max-width: 400px) {
  .brand img { width: 40px; height: 40px; }
  .brand-text strong { font-size: 12px; }
  .theme-toggle, .lang-switch, .menu-toggle { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
}

/* ── Article rich text (sanitized server-side; uses theme tokens, so dark mode works) ── */
.prose.prose-rich { white-space: normal; }
.prose-rich > :first-child { margin-top: 0; }
.prose-rich p { margin: 0 0 1em; }
.prose-rich h2 { margin: 1.6em 0 .6em; font-size: 1.35em; line-height: 1.45; color: var(--heading); }
.prose-rich h3 { margin: 1.3em 0 .5em; font-size: 1.15em; line-height: 1.45; color: var(--heading); }
.prose-rich ul, .prose-rich ol { margin: 0 0 1em; padding-inline-start: 1.6em; }
.prose-rich ul { list-style: disc; }
.prose-rich ol { list-style: decimal; }
.prose-rich li { margin: 0 0 .35em; }
.prose-rich li > p { margin: 0; }
.prose-rich blockquote { margin: 0 0 1.2em; padding: 10px 18px; border-inline-start: 4px solid var(--gold); background: var(--soft); border-radius: var(--radius-sm); color: var(--ink); }
.prose-rich blockquote > :last-child { margin-bottom: 0; }
.prose-rich strong { font-weight: 800; }
.prose-rich .ta-center { text-align: center; }
.prose-rich .ta-end { text-align: end; }
.prose-rich .ta-justify { text-align: justify; }
.prose-rich a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 2px; }
