/* =====================================================================
   CART – Egyptian Animal Rescue Association
   THEME: all colours live here. Palette strictly from the logo: red #e52421, white, black (+ neutral grays).
   ===================================================================== */
:root {
  --c-accent: #e52421;        /* logo red – fills, buttons, icons (white text 4.56:1) */
  --c-accent-text: #b01a17;   /* logo red, deepened for small text on white/gray (AA ≥5.2:1 on #e0e0e0) */
  --c-accent-hover: #c41d1a;
  --c-accent-ink: #ffffff;    /* text on accent */
  --c-deep: #1a1a1a;          /* logo black – header, footer, dark bands */
  --c-deep-2: #222222;
  --c-on-deep: #ffffff;       /* text on deep */
  --c-on-deep-muted: #bdbdbd;
  --c-bg: #ececec;            /* light gray page background (dominant) */
  --c-surface: #ffffff;       /* cards/boxes only – stand out on gray */
  --c-soft: #e0e0e0;          /* mid light gray – alternate sections */
  --c-ink: #212121;           /* body text */
  --c-muted: #555555;         /* secondary text */
  --c-line: #d2d2d2;          /* borders */
  --c-focus: #2b6cb0;

  --font-en: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ar: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17,17,17,.06), 0 6px 20px rgba(17,17,17,.07);
  --wrap: 1180px;
}
:root { --font: var(--font-en); }
:root[lang="ar"] { --font: var(--font-ar); }

*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--c-ink); background: var(--c-bg); }
:root[lang="ar"] body { line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent-text); text-underline-offset: .2em; }
a:hover { color: var(--c-accent-hover); }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; border-radius: 4px; }
h1,h2,h3 { line-height: 1.25; margin: 0 0 .6em; color: var(--c-deep); }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
address { font-style: normal; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; margin-top: 2rem; }
.small { font-size: .92rem; color: var(--c-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; background: var(--c-accent); color: var(--c-accent-ink); padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { top: 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 46px; padding: .65em 1.4em; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font: inherit; font-weight: 700; transition: background .15s, color .15s, border-color .15s; }
.btn-sm { min-height: 38px; padding: .35em 1.1em; font-size: .95rem; }
.btn-accent { background: var(--c-accent); color: var(--c-accent-ink); }
.btn-accent:hover { background: var(--c-accent-hover); color: var(--c-accent-ink); }
.btn-ghost { border-color: currentColor; color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { border-color: var(--c-deep); color: var(--c-deep); background: transparent; }
.btn-outline:hover { background: var(--c-deep); color: var(--c-on-deep); }
.btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.link-arrow { font-weight: 700; text-decoration: none; }
.link-arrow::after { content: " →"; }
:root[dir="rtl"] .link-arrow::after { content: " ←"; }

/* Header */
.site-header { background: var(--c-deep); color: var(--c-on-deep); position: sticky; top: 0; z-index: 50; }
.header-in { display: flex; align-items: center; gap: 1rem; min-height: 68px; flex-wrap: wrap; }
.brand img { width: 112px; height: auto; }
.nav { margin-inline-start: auto; order: 3; }
.header-actions { display: flex; align-items: center; gap: .5rem; order: 2; margin-inline-start: auto; }
.nav-toggle { display: inline-flex; align-items: center; gap: .5rem; background: transparent; color: var(--c-on-deep); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: .35rem .9rem; font: inherit; font-size: .95rem; cursor: pointer; min-height: 38px; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; }
.burger::before { position: absolute; top: -6px; } .burger::after { position: absolute; top: 6px; }
@media (max-width: 479px) { .nav-toggle .burger + span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .nav-toggle { padding: .35rem .7rem; } .brand img { width: 96px; } .header-in { gap: .5rem; flex-wrap: nowrap; } .nav { order: 3; margin-inline-start: 0; } }
.nav-list { display: none; list-style: none; margin: 0; padding: 0; }
.nav-list.open { display: block; position: absolute; inset-inline: 0; top: 100%; background: var(--c-deep); padding: .5rem 1.25rem 1.25rem; border-top: 1px solid rgba(255,255,255,.1); }
.nav-list a { display: block; color: var(--c-on-deep); text-decoration: none; padding: .7rem .25rem; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-list a[aria-current="page"] { color: #fff; box-shadow: inset 3px 0 0 var(--c-accent); padding-inline-start: .75rem; }
:root[dir="rtl"] .nav-list a[aria-current="page"] { box-shadow: inset -3px 0 0 var(--c-accent); }
.lang-toggle { background: transparent; color: var(--c-on-deep); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; min-height: 38px; padding: .3rem .9rem; font-weight: 700; cursor: pointer; font-family: var(--font-ar), var(--font-en); }
:root[lang="ar"] .lang-toggle { font-family: var(--font-en); }
.lang-toggle:hover { background: rgba(255,255,255,.1); }
@media (min-width: 1040px) {
  .nav { order: 2; margin-inline-start: auto; }
  .header-actions { order: 3; margin-inline-start: 0; }
  .nav-toggle { display: none; }
  .nav-list, .nav-list.open { display: flex; position: static; background: none; padding: 0; border: 0; gap: .15rem; }
  .nav-list a { border: 0; padding: .45rem .7rem; border-radius: 8px; font-size: .97rem; }
  .nav-list a:hover { background: rgba(255,255,255,.08); }
  .nav-list a[aria-current="page"], :root[dir="rtl"] .nav-list a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--c-accent); padding-inline-start: .7rem; border-radius: 0; }
  .brand img { width: 128px; }
}

/* Hero */
.hero { position: relative; color: #fff; min-height: min(86vh, 760px); display: flex; align-items: flex-end; overflow: hidden; background: var(--c-deep); }
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-img, .hero-video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-video { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.hero.has-video .hero-video { opacity: 1; }
.hero-shade { background: linear-gradient(180deg, rgba(26,26,26,.05) 0%, rgba(26,26,26,.55) 55%, rgba(26,26,26,.92) 100%); }
.hero-in { position: relative; padding-block: 6rem 3rem; max-width: 760px; margin-inline-start: max(1.25rem, calc((100% - var(--wrap)) / 2)); }
.hero h1 { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.hero .lead { font-size: 1.12rem; color: var(--c-on-deep); }
.kicker { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .02em; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: .25rem .8rem; border-radius: 999px; margin-bottom: 1rem; }
@media (min-width: 900px) {
  .hero { align-items: center; }
  .hero-shade { background: linear-gradient(90deg, var(--c-deep) 0%, var(--c-deep) 40%, rgba(26,26,26,.55) 47%, rgba(26,26,26,0) 62%); }
  :root[dir="rtl"] .hero-shade { background: linear-gradient(270deg, var(--c-deep) 0%, var(--c-deep) 40%, rgba(26,26,26,.55) 47%, rgba(26,26,26,0) 62%); }
  .hero-in { max-width: 600px; }
  /* Desktop: photo/video fills the side opposite the text so faces are never covered.
     For a full-bleed video set .hero-media { inset-inline-start: 0; } */
  .hero-media { inset-inline-start: 40%; }
  .hero-img { object-position: 50% 35%; }
  .hero-in { padding-block: 4rem; }
}

/* Sections */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section.alt { background: var(--c-soft); }
.sec-head { max-width: 680px; margin-bottom: 2rem; }
.sec-head p { color: var(--c-muted); }
.page-head { background: var(--c-deep); color: var(--c-on-deep); padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-head h1 { color: #fff; margin: 0; }
.page-head .lead { color: var(--c-on-deep-muted); max-width: 760px; margin: .75rem 0 0; font-size: 1.1rem; }
.page-head.nf { min-height: 50vh; display: flex; align-items: center; }
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr .9fr; gap: 4rem; } }
.media-frame { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--c-soft); }
.media-frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.reg-badge { font-size: .92rem; color: var(--c-muted); border-inline-start: 4px solid var(--c-accent); padding-inline-start: .9rem; }

/* Cards & grids */
.grid { display: grid; gap: 1.25rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .grid-3, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-5 { grid-template-columns: repeat(5, 1fr); } }
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); }
.prog { padding: 1.5rem; }
.prog p { color: var(--c-muted); margin: 0; font-size: .97rem; }
.ico { width: 40px; height: 40px; padding: 8px; border-radius: 12px; fill: var(--c-accent); background: var(--c-accent-soft); margin-bottom: 1rem; }
.story { overflow: hidden; display: flex; flex-direction: column; }
.card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-img.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--c-deep), var(--c-deep-2)); }
.card-img.ph img { width: 42%; opacity: .9; }
.card-body { padding: 1.25rem 1.4rem 1.5rem; }
.card-date { font-size: .85rem; color: var(--c-muted); margin: 0 0 .35rem; font-weight: 600; }
.card-t a { color: var(--c-deep); text-decoration: none; }
.card-t a:hover { color: var(--c-accent-text); }
details.more summary { cursor: pointer; font-weight: 700; color: var(--c-accent-text); list-style: none; display: inline-block; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: " +"; }
details.more[open] summary::after { content: " –"; }
details.more > div { margin-top: .75rem; }

/* CTA band */
.cta-band { background: var(--c-deep); color: var(--c-on-deep); }
.cta-band h2 { color: #fff; }
.cta-in { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 900px) { .cta-in { grid-template-columns: 1.4fr auto; } }

/* Contact strip */
.contact-strip { background: var(--c-soft); padding-block: 2.5rem; }
.cs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.cs-list li { display: flex; gap: .75rem; align-items: flex-start; }
.cs-list .ico { flex: none; width: 36px; height: 36px; margin: 0; }
@media (min-width: 900px) { .cs-list { grid-template-columns: 1.5fr 1fr 1fr; } }

/* About */
.timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 3px solid var(--c-accent); }
.timeline li { position: relative; padding-inline-start: 1.5rem; padding-bottom: 1.5rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -9px; top: .45em; width: 15px; height: 15px; border-radius: 50%; background: var(--c-surface); border: 3px solid var(--c-accent); }
.tl-t { font-weight: 800; color: var(--c-deep); margin: 0 0 .2rem; }
.person { padding: 1.5rem; max-width: 420px; }
.role { color: var(--c-accent-text); font-weight: 700; margin: 0 0 .25rem; }
.pname { font-size: 1.25rem; font-weight: 700; margin: 0; color: var(--c-deep); }
.dl { margin: 0; display: grid; gap: 0; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.dl-row { display: grid; gap: .25rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--c-line); }
.dl-row:last-child { border-bottom: 0; }
.dl dt { font-size: .88rem; color: var(--c-muted); font-weight: 600; }
.dl dd { margin: 0; font-weight: 600; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
@media (min-width: 700px) { .dl-row { grid-template-columns: 240px 1fr; align-items: center; } }

/* Mission */
.statement { font-size: 1.2rem; font-weight: 600; color: var(--c-deep); border-inline-start: 4px solid var(--c-accent); padding-inline-start: 1.1rem; margin-bottom: 2.5rem; }
.svc { padding-inline-start: 1.2rem; }
.svc li { margin-bottom: .5rem; }
.prog-row { display: grid; gap: 1.75rem; align-items: center; margin-bottom: 3.5rem; }
.prog-row:last-child { margin-bottom: 0; }
@media (min-width: 900px) { .prog-row { grid-template-columns: 1fr 1fr; gap: 3.5rem; } .prog-row.rev > figure { order: 2; } }
.num { font-weight: 800; color: var(--c-accent-text); font-size: 1.1rem; margin: 0 0 .25rem; }
.note { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 10px; padding: 1rem 1.1rem; font-size: .97rem; }

/* Help */
.bank { padding: 1.5rem; }
.bank .dl { box-shadow: none; }
.copy { font: inherit; font-size: .8rem; font-weight: 700; border: 1px solid var(--c-line); background: var(--c-bg); color: var(--c-deep); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; min-height: 30px; }
.copy:hover { border-color: var(--c-deep); }
.checks { list-style: none; padding: 0; display: grid; gap: .6rem; }
@media (min-width: 700px) { .checks { grid-template-columns: 1fr 1fr; } }
.checks li { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 10px; padding: .75rem 1rem; padding-inline-start: 2.6rem; position: relative; }
.checks li::before { content: "✓"; position: absolute; inset-inline-start: 1rem; color: var(--c-accent-text); font-weight: 800; }

/* Contact */
.contact-grid { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } .map-ph { grid-column: 1 / -1; } }
.c-card { padding: 1.5rem; }
.c-card h2 { font-size: 1.15rem; margin-top: 1rem; }
.c-card h2:first-child { margin-top: 0; }
.big { font-size: 1.15rem; font-weight: 700; }
.name-line { font-weight: 700; color: var(--c-deep); }
.addr-ar { font-family: var(--font-ar); }
.addr-en { font-family: var(--font-en); color: var(--c-muted); }
.map-ph { min-height: 280px; border: 2px dashed var(--c-muted); border-radius: var(--radius); display: grid; place-content: center; text-align: center; padding: 2rem; background: repeating-linear-gradient(45deg, var(--c-soft), var(--c-soft) 12px, var(--c-bg) 12px, var(--c-bg) 24px); }
.map-ph p { font-weight: 700; color: var(--c-accent-hover); }

/* Footer */
.site-footer { background: var(--c-deep); color: var(--c-on-deep); padding-top: 3rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.3fr 1.2fr .8fr; gap: 3rem; } }
.f-brand img { width: 150px; margin-bottom: 1rem; }
.f-name small { color: var(--c-on-deep-muted); }
.f-name span[lang="ar"] { font-family: var(--font-ar); font-weight: 700; }
.f-name span[lang="en"] { font-family: var(--font-en); font-weight: 600; }
.f-reg { color: var(--c-on-deep-muted); font-size: .88rem; }
.f-h { color: #fff; font-size: .95rem; margin: 1rem 0 .3rem; text-transform: uppercase; letter-spacing: .04em; }
:root[lang="ar"] .f-h { text-transform: none; letter-spacing: 0; }
.f-h:first-child { margin-top: 0; }
.f-links { list-style: none; padding: 0; margin: 0 0 .5rem; columns: 2; }
.f-links a { text-decoration: none; color: var(--c-on-deep); line-height: 2; }
.f-links a:hover { color: #fff; text-decoration: underline; }
.f-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-block: 1.25rem; color: var(--c-on-deep-muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
.f-bottom p { margin: 0; }

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

/* =====================================================================
   INNER PAGES – redesign (banners, cards, timeline, animations)
   Uses the same palette variables defined at the top of this file.
   ===================================================================== */
:root { --c-accent-soft: #fde8e7; --c-cream: #ececec; --shadow-lg: 0 2px 6px rgba(17,17,17,.08), 0 18px 40px rgba(17,17,17,.14); }

/* Page banner */
.page-banner { position: relative; color: #fff; background: var(--c-deep); overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; }
.pb-media, .pb-shade { position: absolute; inset: 0; }
.pb-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.pb-shade { background: linear-gradient(180deg, rgba(26,26,26,.35) 0%, rgba(26,26,26,.7) 55%, rgba(26,26,26,.95) 100%); }
.pb-in { position: relative; padding-block: 4.5rem 2.5rem; }
.page-banner h1 { color: #fff; margin: .35rem 0 .4rem; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.pb-sub { color: var(--c-on-deep); font-size: 1.15rem; max-width: 640px; margin: 0; }
.page-banner::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--c-accent), transparent 70%); }
:root[dir="rtl"] .page-banner::after { background: linear-gradient(270deg, var(--c-accent), transparent 70%); }
@media (min-width: 900px) {
  .page-banner { min-height: 380px; align-items: center; }
  .pb-shade { background: linear-gradient(90deg, rgba(26,26,26,.95) 0%, rgba(26,26,26,.75) 40%, rgba(26,26,26,.15) 85%); }
  :root[dir="rtl"] .pb-shade { background: linear-gradient(270deg, rgba(26,26,26,.95) 0%, rgba(26,26,26,.75) 40%, rgba(26,26,26,.15) 85%); }
  .pb-in { padding-block: 4rem; }
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; font-size: .9rem; color: var(--c-on-deep-muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: .4rem; opacity: .6; }
.crumbs a { color: #fff; text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

/* Shared bits */
.eyebrow { color: var(--c-accent-text); font-weight: 800; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 .5rem; display: flex; gap: .4rem; align-items: center; }
:root[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 1rem; }
.h-lead { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 700; line-height: 1.45; }
.badge { display: inline-block; background: var(--c-accent-soft); color: var(--c-accent-hover); font-weight: 800; font-size: .8rem; padding: .2rem .7rem; border-radius: 999px; margin: 0 0 .4rem; }
.sec-lead { font-size: 1.15rem; color: var(--c-muted); max-width: 760px; margin-bottom: 2rem; }
.divider { height: 0; border: 0; position: relative; }
.divider::before { content: ""; position: absolute; inset-inline: 0; top: -1px; height: 26px; background: var(--c-soft); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.media-frame.tilt { box-shadow: var(--shadow-lg); position: relative; }
.media-frame.tilt img { aspect-ratio: 4 / 3.2; }
.ico-lg { width: 56px; height: 56px; padding: 12px; border-radius: 16px; fill: #fff; background: var(--c-accent); flex: none; }
.ico-xl { width: 64px; height: 64px; padding: 14px; border-radius: 50%; fill: #fff; background: var(--c-accent); flex: none; }
.card { transition: transform .2s ease, box-shadow .2s ease; }
.pcard:hover, .vcard:hover, .ccard:hover, .story:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cta-band { background: linear-gradient(135deg, var(--c-deep) 0%, var(--c-deep-2) 100%); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(229,36,33,.35), transparent 70%); inset-inline-end: -120px; top: -160px; }
.cta-band .wrap { position: relative; }
.two-col { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.4fr 1fr; gap: 4rem; align-items: start; } }

/* Mission quote */
.quote-card { margin: 0; background: var(--c-surface); border-radius: 22px; padding: 2rem 2rem 1.75rem; box-shadow: var(--shadow-lg); border-top: 6px solid var(--c-accent); position: relative; }
.q-ico { width: 54px; height: 54px; fill: var(--c-accent); opacity: .9; margin-bottom: .25rem; }
:root[dir="rtl"] .q-ico { transform: scaleX(-1); }
.q-text { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; color: var(--c-deep); line-height: 1.6; }
.quote-card footer { color: var(--c-muted); font-size: .92rem; font-weight: 600; border-top: 1px solid var(--c-line); padding-top: .75rem; }

/* Programs grid */
.pgrid { grid-template-columns: 1fr; }
@media (min-width: 640px) { .pgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .pgrid { grid-template-columns: repeat(3, 1fr); } }
.pcard { overflow: hidden; display: flex; flex-direction: column; }
.pcard-media { position: relative; }
.pcard-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.pcard-media .ico { position: absolute; bottom: -20px; inset-inline-start: 1.25rem; margin: 0; width: 46px; height: 46px; background: var(--c-accent); fill: #fff; box-shadow: 0 6px 14px rgba(229,36,33,.35); }
.pcard-body { padding: 1.9rem 1.4rem 1.5rem; }
.pcard-s { font-weight: 700; color: var(--c-deep); }
.pcard-body p:last-child { color: var(--c-muted); font-size: .97rem; margin: 0; }

/* About: timeline v2, chairman, official panel */
.timeline.v2 { border: 0; position: relative; padding-inline-start: 2.25rem; }
.timeline.v2::before { content: ""; position: absolute; inset-inline-start: 11px; top: .4rem; bottom: .4rem; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--c-accent), rgba(229,36,33,.25)); }
.timeline.v2 li { padding: 1rem 1.2rem; padding-inline-start: 1.2rem; margin-bottom: 1rem; background: var(--c-surface); border-radius: 12px; box-shadow: var(--shadow); }
.timeline.v2 li::before { display: none; }
.tl-dot { position: absolute; inset-inline-start: -2.25rem; top: 1.25rem; width: 25px; height: 25px; border-radius: 50%; background: var(--c-surface); border: 5px solid var(--c-accent); box-shadow: 0 0 0 4px var(--c-soft); }
.timeline.v2 li p:last-child { margin: 0; color: var(--c-muted); }
.person-card { display: flex; gap: 1rem; align-items: center; padding: 1.5rem; border-inline-start: 6px solid var(--c-accent); }
.avatar { width: 72px; height: 72px; padding: 16px; border-radius: 50%; background: var(--c-deep); fill: var(--c-on-deep); flex: none; }
.official { padding: 0; overflow: hidden; border-top: 6px solid var(--c-deep); box-shadow: var(--shadow-lg); }
.official-head { display: flex; gap: 1rem; align-items: center; padding: 1.5rem 1.5rem 1rem; background: linear-gradient(180deg, var(--c-soft), var(--c-surface)); }
.official-head h2 { margin: 0; }
.official .dl { border: 0; border-radius: 0; }
.official .dl-row:nth-child(odd) { background: #f7f7f7; }
.official .dl dd { color: var(--c-deep); }

/* Help: donate card, volunteer grid */
.donate-card { display: grid; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); background: linear-gradient(135deg, var(--c-deep), var(--c-deep-2)); color: var(--c-on-deep); }
@media (min-width: 900px) { .donate-card { grid-template-columns: 1.35fr 1fr; } }
.dc-main { padding: clamp(1.5rem, 4vw, 2.5rem); }
.dc-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.dc-head h2 { color: #fff; margin: 0; }
.dc-media { margin: 0; min-height: 260px; }
.dc-media img { width: 100%; height: 100%; object-fit: cover; }
.dl-dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.dl-dark .dl-row { border-color: rgba(255,255,255,.12); }
.dl-dark dt { color: var(--c-on-deep-muted); }
.dl-dark dd { color: #fff; font-size: 1.1rem; }
.dl-dark .copy { background: var(--c-accent); color: #fff; border-color: transparent; }
.dl-dark .copy:hover { background: var(--c-accent-hover); }
.dc-note { color: var(--c-on-deep-muted); font-size: .92rem; margin: 1rem 0 0; }
.vgrid { grid-template-columns: 1fr; }
@media (min-width: 560px) { .vgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .vgrid { grid-template-columns: repeat(3, 1fr); } }
.vcard { padding: 1.4rem; display: flex; gap: 1rem; align-items: center; }
.vcard .ico { margin: 0; flex: none; }
.vcard p { margin: 0; font-weight: 600; color: var(--c-deep); }

/* Contact */
.addr-hero { display: flex; gap: 1.5rem; align-items: flex-start; padding: clamp(1.5rem, 4vw, 2.5rem); border-inline-start: 6px solid var(--c-accent); box-shadow: var(--shadow-lg); margin-bottom: 1.5rem; flex-wrap: wrap; }
.addr-hero address { flex: 1 1 300px; }
.addr-hero .addr-ar { font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 700; color: var(--c-deep); margin-bottom: .5rem; }
.addr-hero .addr-en { font-size: 1.05rem; }
.cgrid { margin-bottom: 1.5rem; }
.ccard { padding: 1.5rem; }
.ccard h2 { font-size: 1.1rem; margin-bottom: .4rem; }
.ccard p { margin: 0; }
.break { overflow-wrap: anywhere; }
.map-ph.v2 { border: 2px dashed rgba(17,17,17,.35); background: radial-gradient(circle at 30% 30%, var(--c-surface), var(--c-soft)); gap: .5rem; justify-items: center; min-height: 300px; }
.map-ph.v2 h2 { margin: .5rem 0 0; }

/* Stories: featured */
.featured { display: grid; overflow: hidden; box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .featured { grid-template-columns: 1.1fr 1fr; } }
.feat-img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.feat-img.ph { display: grid; place-items: center; background: linear-gradient(135deg, var(--c-deep), var(--c-deep-2)); }
.feat-img.ph img { width: 45%; }
.feat-body { padding: clamp(1.5rem, 4vw, 2.5rem); }
.feat-body h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }

/* Entrance animations (only when JS is on and motion is allowed) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } .card:hover { transform: none; } }

/* map embed */
.map-box { grid-column: 1 / -1; background: var(--c-surface); border-radius: var(--radius); padding: 1.25rem; box-shadow: 0 10px 30px rgba(0,0,0,.08); text-align: center; }
.map-frame { width: 100%; height: 380px; border: 0; border-radius: calc(var(--radius) - 4px); display: block; margin: .75rem 0 1rem; }
@media (max-width: 600px) { .map-frame { height: 300px; } }
/* location right under detailed address */
.addr-loc{margin-top:.9rem}
.addr-loc .btn{display:inline-flex;align-items:center;gap:.4rem}
.addr-hero + .map-box{margin-top:1.25rem;margin-bottom:2rem}
/* association name leads the hero */
.hero .hero-name{font-size:clamp(2.1rem,5.2vw,3.6rem);line-height:1.15;margin-bottom:.35rem}
.hero .hero-aka{font-weight:700;letter-spacing:.02em;color:#ffffff;margin:0 0 .9rem;font-size:1.05rem}
:root[dir="rtl"] .hero .hero-aka{text-align:right}
.hero .hero-tag{font-size:clamp(1.15rem,2.2vw,1.45rem);font-weight:600;color:#fff;margin:0 0 .6rem}
.center-btns{justify-content:center;margin-top:1rem}
/* vaccination gallery (mission) + team field photo (about) */
.vacc-gallery{margin-top:3rem}
.vacc-gallery h3{font-size:clamp(1.3rem,2.4vw,1.6rem);margin:0 0 .35rem}
.vg-note{color:var(--c-muted);margin:0 0 1.1rem}
.vg-grid{list-style:none;margin:0;padding:0;display:grid;gap:.75rem;grid-template-columns:repeat(2,1fr)}
.vg-item{margin:0;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);background:var(--c-soft)}
.vg-img{display:block;width:100%;height:100%;aspect-ratio:1/1;object-fit:cover}
.vg-main{grid-column:1 / -1}
.vg-main .vg-img{aspect-ratio:4/3;object-position:50% 45%}
@media (min-width:980px){
 .vg-grid{grid-template-columns:repeat(4,1fr);gap:1rem}
 .vg-main{grid-column:span 2;grid-row:span 2}
 .vg-main{position:relative}
 .vg-main .vg-img{position:absolute;inset:0;aspect-ratio:auto}
}
.team-photo{margin:2.5rem auto 0;max-width:900px}
.team-photo figcaption{margin-top:.75rem;color:var(--c-muted);font-size:.97rem;text-align:center}
/* CART logo beside the association name in the home hero */
.hero-id{display:flex;flex-direction:column;align-items:flex-start;gap:.9rem;margin-bottom:.4rem}
.hero-logo{display:block;height:84px;width:auto;max-width:100%;padding:.55rem .8rem;background:rgba(26,26,26,.62);border-radius:var(--radius);box-shadow:0 6px 18px rgba(0,0,0,.28)}
.hero-id-text{min-width:0}
@media (min-width:900px){
 .hero-id{gap:1.1rem}
 .hero-logo{height:112px;padding:.55rem .75rem}
}
.hero .hero-reg{margin:.15rem 0 .8rem}
/* Phones only (<768px): inset rounded photo on top (uncovered), big two-tone name (logo white + red) below on black */
@media (max-width: 767.98px) {
  .hero { display: block; min-height: 0; background: #1a1a1a; }
  .hero-media { position: relative; inset: auto; margin: 1rem 1rem 0; height: clamp(220px, 46vh, 420px);
    border-radius: var(--radius); overflow: hidden; }
  .hero-shade { display: none; }
  .hero-img, .hero-video { object-position: 50% 22%; }
  .hero-in { margin: 0; max-width: none; padding: 1.75rem 1rem 2.5rem; }
  .hero-logo { box-shadow: none; background: transparent; padding: 0; height: 76px; }
  .hero .hero-name { font-size: clamp(2.4rem, 11.5vw, 2.8rem); line-height: 1.08; font-weight: 800; text-shadow: none; margin-bottom: .7rem; }
  .hero .hero-name .hn-a, .hero .hero-name .hn-b { display: block; }
  :root[dir="rtl"] .hero .hero-name { font-size: clamp(2.2rem, 10vw, 2.6rem); line-height: 1.2; }
  .hero .hero-reg { font-size: .78rem; }
  .hero .hero-name .hn-b { color: #e52421; }   /* logo red; 3.8:1 on #1a1a1a – passes AA for large text */
  .hero .hero-tag { font-size: 1.2rem; }
  .hero .lead { font-size: 1.05rem; color: #e6e6e6; }
}

/* ---------- Home: stepped transition hero → page (soft black → #262626 → #d2d2d2 → #ececec) ---------- */
.hero + .section { background: #262626; color: var(--c-on-deep); }                 /* white 15.1:1 */
.hero + .section h2, .hero + .section h3 { color: var(--c-on-deep); }
.hero + .section .reg-badge { color: #e0e0e0; }                                     /* 11.5:1; red border 3.3:1 (non-text ≥3) */
.hero + .section a { color: var(--c-on-deep); }                                     /* logo reds fail on #262626 → white */
.hero + .section a:hover { color: #ff8a87; }                                        /* light logo-red tint, 6.7:1 */
.hero + .section :focus-visible { outline-color: var(--c-on-deep); }                /* #2b6cb0 is only 2.8:1 here */
.hero + .section + .section.alt { background: #d2d2d2; }                            /* ink 10.7, muted #555 4.9, #b01a17 4.6 */

/* MOCK A – "في النص" (middle gray). Load AFTER css/style.css. Logo colours only. Hero untouched (--c-deep stays #1a1a1a). */
:root {
  --c-bg: #c9c9c9;          /* medium gray page */
  --c-soft: #bdbdbd;        /* alternate sections (one step darker) */
  --c-surface: #f4f4f4;     /* off-white cards */
  --c-line: #b0b0b0;
  --c-ink: #212121;         /* 9.7 on page, 8.6 on alt, 14.6 on cards */
  --c-muted: #4a4a4a;       /* 5.35 on page, 4.72 on alt, 8.06 on cards (#555 would fail on #bdbdbd: 3.97) */
  --c-accent-text: #8f1512; /* small red text: 4.89 on #bdbdbd, 5.6 on #c9c9c9 (#b01a17 fails on both) */
  --c-focus: #1f4f86;       /* 4.43 on #bdbdbd (#2b6cb0 only 2.88) */
}
/* steps: hero #1a1a1a → #262626 (unchanged) → alt #bdbdbd */
.hero + .section + .section.alt { background: var(--c-soft); }
/* CTA band: mid charcoal so the dark band is a softer step, not a jump back to black */
.cta-band { background: linear-gradient(135deg, #2e2e2e 0%, #3a3a3a 100%); }   /* white 11.4–12.5, #bdbdbd 6.05 */
.official .dl-row:nth-child(odd) { background: #ebebeb; }
/* dark areas: visible focus */
.site-header :focus-visible, .site-footer :focus-visible, .cta-band :focus-visible, .hero :focus-visible, .page-banner :focus-visible, .donate-card :focus-visible { outline-color: #ffffff; }
/* pre-existing gap: .btn-primary (contact "Open in Google Maps") had no style */
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-hover); color: #fff; }

/* ---------- Home: program cards link to their mission-page section (whole card clickable) ---------- */
.prog { position: relative; }
.prog h3 a.card-link { color: inherit; text-decoration: none; }
.prog h3 a.card-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }   /* stretched link */
.prog:hover, .prog:focus-within { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--c-accent); }
.prog:hover h3 a.card-link { text-decoration: underline; text-decoration-color: var(--c-accent); text-underline-offset: .25em; }
.prog h3 a.card-link:focus-visible { outline: none; }
.prog h3 a.card-link:focus-visible::after { outline: 3px solid var(--c-focus); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .prog:hover, .prog:focus-within { transform: none; } }
/* mission targets clear the sticky header */
.pcard[id], #vaccination { scroll-margin-top: 92px; }

/* ---------- Unified e-system number (registration badge + footer) ---------- */
.reg-badge { margin: 0 0 1em; }
.reg-badge p { margin: 0; }
.reg-badge .reg-uni { margin-top: .4rem; font-weight: 700; }
.reg-uni bdi, .f-unified bdi, .dl dd bdi.mono { unicode-bidi: isolate; letter-spacing: .04em; white-space: nowrap; }
.f-unified { margin-top: -.4rem; font-weight: 600; }

/* ---------- Images everywhere (image plan v1, 20 Oct 2026) ---------- */
/* Home "What we do" cards: photo on top */
.prog.has-img { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.prog-media { background: var(--c-soft); }
.prog-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.prog-body { padding: 1.25rem 1.25rem 1.4rem; }
/* Dark photo bands: donate CTA (H2) + visit/contact strip (H3) */
.cta-band.has-img, .contact-strip.has-img { position: relative; overflow: hidden; isolation: isolate; }
.band-media, .band-shade { position: absolute; inset: 0; z-index: -2; }
.band-shade { z-index: -1; background: linear-gradient(90deg, rgba(26,26,26,.92) 0%, rgba(26,26,26,.8) 50%, rgba(26,26,26,.62) 100%); }
:root[dir="rtl"] .band-shade { background: linear-gradient(270deg, rgba(26,26,26,.92) 0%, rgba(26,26,26,.8) 50%, rgba(26,26,26,.62) 100%); }
.band-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.cta-band.has-img::before { z-index: -1; }
.contact-strip.has-img { background: var(--c-deep); color: var(--c-on-deep); padding-block: 3.25rem; }
.contact-strip.has-img h2 { color: #fff; }
.contact-strip.has-img a { color: #fff; }
.contact-strip.has-img a:hover { color: #ff8a87; }
.contact-strip.has-img :focus-visible { outline-color: #fff; }
.contact-strip.has-img .ico { background: var(--c-accent); fill: #fff; }
/* About: chairman card shows the CART logo (no personal photo); history side photo */
.avatar-logo { display: grid; place-items: center; padding: 10px; }
.avatar-logo img { width: 100%; height: auto; }
.side-photo { margin-top: 1.5rem; }
/* Help: volunteer cards with photo */
.vcard.has-img { padding: 0; overflow: hidden; flex-direction: column; align-items: stretch; gap: 0; }
.vcard-media { background: var(--c-soft); }
.vcard-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.vcard-body { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem 1.25rem; }
.vcard-body .ico { margin: 0; flex: none; }
/* Contact: shelter photo inside the address card */
.ah-media { margin: 0; flex: 1 1 280px; max-width: 420px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); align-self: stretch; }
.ah-media img { width: 100%; height: 100%; min-height: 220px; aspect-ratio: 4 / 3; object-fit: cover; }
/* 404 */
.nf-in { display: grid; gap: 2rem; align-items: center; }
.nf-media { margin: 0; max-width: 300px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.nf-media img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
@media (min-width: 800px) { .nf-in { grid-template-columns: 1fr 300px; } }
@media (max-width: 799.98px) { .nf-media { max-width: 240px; } }

/* ---- Social: Facebook + Instagram (logo colours only) ---- */
.f-social { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.f-social a { display: inline-flex; align-items: center; gap: .5rem; color: var(--c-on-deep); text-decoration: none; line-height: 2; }
.f-social a:hover, .f-social a:focus-visible { color: #fff; text-decoration: underline; }
.f-ico { width: 30px; height: 30px; padding: 6px; border-radius: 8px; fill: #fff; background: var(--c-accent); flex: none; }
.f-handle { unicode-bidi: isolate; color: var(--c-on-deep-muted); }
.ico-pair { display: flex; gap: .5rem; }
.soc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.soc-list a { overflow-wrap: anywhere; }
.sec-head .link-arrow + .link-arrow, .center .link-arrow + .link-arrow { margin-inline-start: 1.25rem; }
