/* ═══════════════════════════════════════════════════════════════════
   ERR Website — Shared Styles
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* ─── DESIGN TOKENS ──────────────────────────────────────────────── */
:root {
  /* Ink (text) */
  --ink:   #111827;
  --ink-2: #374151;
  --ink-3: #6B7280;
  --ink-4: #9CA3AF;

  /* Canvas (background) */
  --canvas:     #F8FAFD;
  --canvas-alt: #EEF2F8;
  --white:      #FFFFFF;

  /* Primary — blue-gray (logo palm). This is a darkened, WCAG-safe
     derivative of the logo's true palm color (#5B7CA6, see logo.svg /
     favicon.svg) — the lighter true value fails 4.5:1 contrast for the
     normal-size text and white-on-color buttons this token is used for
     throughout this file, so it's darkened here while staying in the same
     hue family. Rebranded 2026-08-06 from the previous royal blue #2347B5. */
  --p:    #4C6B94;
  --p-h:  #3D5676;
  --p-bg: #EEF2F6;
  --p-t:  #4C6B94;

  /* Accent — burnt orange (logo fingers). Same reasoning as --p above: a
     darkened, WCAG-safe derivative of the logo's true finger color
     (#F2A672), which is too light/pastel to pass contrast as text or a
     white-on-color button fill. Rebranded 2026-08-06 from golden amber
     #9B6A15. */
  --a:    #A6521C;
  --a-l:  #BF6428;
  --a-bg: #FDF3EC;

  /* Danger */
  --d:    #B91C1C;
  --d-bg: #FEF2F2;
  --d-t:  #991B1B;

  /* Success */
  --s:    #15803D;
  --s-bg: #F0FDF4;
  --s-t:  #166534;

  /* Borders */
  --border: rgba(76,107,148,.10);
  --border-strong: rgba(76,107,148,.22);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --sh:    0 4px 12px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
  --sh-lg: 0 12px 32px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);

  /* Typography */
  --t-xs:  0.75rem;
  --t-sm:  0.875rem;
  --t-md:  1rem;
  --t-lg:  1.125rem;
  --t-xl:  1.25rem;
  --t-2xl: 1.5rem;
  --t-3xl: 1.875rem;
  --t-4xl: 2.25rem;
  --t-5xl: 3rem;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 40px;
  --sp-2xl: 64px;
  --sp-3xl: 96px;

  /* Container */
  --max-w: 1140px;

  /* Nav */
  --nav-h: 64px;
}

/* ─── RESET & BASE ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html[lang=ar], html[dir=rtl] { direction: rtl; }
html[lang=en], html[dir=ltr] { direction: ltr; }

body {
  min-height: 100vh;
  line-height: 1.6;
  font-size: var(--t-md);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── LAYOUT ─────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

.section { padding: var(--sp-2xl) 0; }
.section-sm { padding: var(--sp-xl) 0; }

.section-head {
  margin-bottom: var(--sp-xl);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: var(--t-3xl);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.section-head p {
  color: var(--ink-3);
  font-size: var(--t-lg);
  max-width: 520px;
  line-height: 1.6;
}

.section-title-block { display: flex; flex-direction: column; gap: 6px; }

/* ─── URGENT BANNER ──────────────────────────────────────────────── */
#site-urgent {
  background: var(--d-bg);
  border-bottom: 1px solid rgba(185,28,28,.15);
  padding: 10px var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  font-size: var(--t-sm);
  color: var(--d-t);
  font-weight: 500;
  line-height: 1.5;
}

.urgent-pill {
  background: var(--d);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: .04em;
  flex-shrink: 0;
}

#site-urgent .ti { font-size: 16px; flex-shrink: 0; }

/* ─── NAVIGATION ─────────────────────────────────────────────────── */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(248,250,253,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--sh-sm);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: var(--t-lg);
  color: var(--p);
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-logo-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px; height: 34px;
  background: var(--p);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-icon .ti { font-size: 16px; color: #fff; }

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
}

.nav-links a {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: all .15s;
  white-space: nowrap;
}

.nav-links a:hover { background: var(--canvas-alt); color: var(--p); }
.nav-links a.active { background: var(--p-bg); color: var(--p); font-weight: 600; }
.nav-links a.donate-nav-link { background: var(--p); color: #fff; font-weight: 600; }
.nav-links a.donate-nav-link:hover { background: var(--p-h); color: #fff; }

/* Media dropdown (desktop only — .nav-links is hidden below 900px, mobile menu is flattened instead) */
.nav-item-group { position: relative; }

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}
.nav-dropdown-trigger:hover,
.nav-item-group.active .nav-dropdown-trigger { background: var(--canvas-alt); color: var(--p); }
.nav-item-group.active .nav-dropdown-trigger { background: var(--p-bg); font-weight: 600; }
.nav-dropdown-trigger .ti-chevron-down { font-size: 14px; transition: transform .15s; }
.nav-item-group.open .nav-dropdown-trigger .ti-chevron-down,
.nav-item-group:hover .nav-dropdown-trigger .ti-chevron-down { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  min-width: 190px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 950;
}
.nav-item-group.open .nav-dropdown-menu,
.nav-item-group:hover .nav-dropdown-menu { display: flex; }

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all .15s;
}
.nav-dropdown-menu a .ti { font-size: 15px; }
.nav-dropdown-menu a:hover { background: var(--canvas-alt); color: var(--p); }
.nav-dropdown-menu a.active { background: var(--p-bg); color: var(--p); font-weight: 600; }

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-inline-start: auto;
  flex-shrink: 0;
}

.btn-lang {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--white);
  transition: all .15s;
  white-space: nowrap;
}
.btn-lang:hover { border-color: var(--p); color: var(--p); }

.btn-getinvolved-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--p);
  background: transparent;
  border: 1px solid var(--p);
  padding: 5px 15px;
  border-radius: var(--r-sm);
  transition: all .15s;
  white-space: nowrap;
}
.btn-getinvolved-nav:hover { background: var(--p-bg); }

.btn-donate-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: #fff;
  background: var(--p);
  padding: 6px 16px;
  border-radius: var(--r-sm);
  transition: background .15s;
  white-space: nowrap;
}
.btn-donate-nav:hover { background: var(--p-h); }

.nav-hamburger {
  display: none;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 20px;
  border: 1px solid var(--border);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: var(--sp-sm);
  border-top: 1px solid var(--border);
  background: var(--white);
}
.nav-mobile a {
  padding: 11px var(--sp-md);
  font-size: var(--t-md);
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  min-height: 44px; /* touch-friendly */
}
.nav-mobile a:hover  { background: var(--canvas-alt); color: var(--p); }
.nav-mobile a.active { background: var(--p-bg); color: var(--p); font-weight: 600; }
.nav-mobile.open { display: flex; }

.nav-mobile-group-label {
  padding: 11px var(--sp-md) 4px;
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.nav-mobile a.nav-mobile-sub {
  padding-inline-start: calc(var(--sp-md) + 14px);
  gap: 8px;
}
.nav-mobile a.nav-mobile-sub .ti { font-size: 15px; }

.nav-mobile-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--sp-sm);
  padding: 11px var(--sp-md);
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--p);
  border: 1px solid var(--p);
  border-radius: var(--r-sm);
  min-height: 44px;
}
.nav-mobile-cta-primary {
  background: var(--p);
  color: #fff;
  margin-top: 8px;
}

/* ─── HERO ───────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--p) 0%, #5C2708 100%);
  color: #fff;
  padding: var(--sp-3xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  max-width: 680px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: var(--t-sm);
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: var(--sp-lg);
  letter-spacing: .03em;
}

.hero h1 {
  font-size: clamp(var(--t-4xl), 5vw, var(--t-5xl));
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--sp-md);
  letter-spacing: -.02em;
}

.hero-sub {
  font-size: var(--t-xl);
  opacity: .85;
  line-height: 1.6;
  margin-bottom: var(--sp-xl);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

/* ─── BUTTONS ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--t-md);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--r);
  transition: all .15s;
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn .ti { font-size: 18px; }

.btn-primary {
  background: #fff;
  color: var(--p);
}
.btn-primary:hover { background: rgba(255,255,255,.9); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.btn-ghost:hover { background: rgba(255,255,255,.18); }

.btn-solid {
  background: var(--p);
  color: #fff;
}
.btn-solid:hover { background: var(--p-h); }

.btn-outline {
  background: transparent;
  color: var(--p);
  border: 1px solid var(--p);
}
.btn-outline:hover { background: var(--p-bg); }

.btn-sm {
  font-size: var(--t-sm);
  padding: 8px 16px;
}

/* ─── STAT CARDS ─────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-md);
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  box-shadow: var(--sh-sm);
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--sh); transform: translateY(-2px); }

.stat-icon {
  width: 42px; height: 42px;
  background: var(--p-bg);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-md);
}
.stat-icon .ti { font-size: 22px; color: var(--p); }

.stat-value {
  font-size: var(--t-4xl);
  font-weight: 800;
  color: var(--p);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--t-sm);
  color: var(--ink-3);
  font-weight: 500;
}

/* ─── PROGRAM CARDS ──────────────────────────────────────────────── */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-md);
}

.program-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl) var(--sp-lg);
  transition: all .2s;
}
.program-card:hover {
  border-color: var(--p);
  box-shadow: var(--sh);
  transform: translateY(-3px);
}

.prog-icon {
  width: 48px; height: 48px;
  background: var(--p-bg);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-lg);
}
.prog-icon .ti { font-size: 24px; color: var(--p); }

.program-card h3 {
  font-size: var(--t-lg);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.program-card p { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.6; }

/* ─── VALUES / PRINCIPLES LIST ───────────────────────────────────── */
.values-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.value-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-md) var(--sp-lg);
}
.value-icon {
  width: 36px; height: 36px;
  background: var(--p-bg);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.value-icon .ti { font-size: 18px; color: var(--p); }
.value-item p { font-size: var(--t-md); font-weight: 500; color: var(--ink-2); }

/* ─── ROOM CARDS ─────────────────────────────────────────────────── */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-md);
}

.room-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.room-card h3 { font-size: var(--t-lg); font-weight: 700; color: var(--ink); }
.room-card .region {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-sm);
  color: var(--ink-3);
}
.room-card .region .ti { font-size: 14px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
}
.badge-active { background: var(--s-bg); color: var(--s-t); }
.badge-inactive { background: var(--canvas-alt); color: var(--ink-4); }

/* ─── UPDATE CARDS ───────────────────────────────────────────────── */
.updates-list { display: flex; flex-direction: column; gap: var(--sp-md); }

.update-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg) var(--sp-xl);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--sp-lg);
  align-items: start;
}

.update-date {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--ink-4);
  padding-top: 3px;
}

.update-card h3 { font-size: var(--t-lg); font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.update-card p { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.7; }

/* ─── TRANSPARENCY / FINANCE TABLE ───────────────────────────────── */
.finance-table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
}

.finance-table thead {
  background: var(--canvas-alt);
  border-bottom: 1px solid var(--border);
}

.finance-table th {
  padding: 12px var(--sp-lg);
  font-weight: 600;
  color: var(--ink-2);
  text-align: start;
  font-size: var(--t-xs);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.finance-table td {
  padding: 14px var(--sp-lg);
  color: var(--ink-2);
  border-bottom: 1px solid var(--border);
}

.finance-table tr:last-child td { border-bottom: none; }
.finance-table tr:hover td { background: var(--canvas-alt); }

.finance-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
}
.type-income { background: var(--s-bg); color: var(--s-t); }
.type-expense { background: var(--d-bg); color: var(--d-t); }

/* ─── DONATE BLOCK ───────────────────────────────────────────────── */
.donate-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--sh);
}

.donate-box h2 { font-size: var(--t-3xl); font-weight: 700; margin-bottom: var(--sp-md); }
.donate-box p { color: var(--ink-3); margin-bottom: var(--sp-xl); }

.other-ways {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-md);
  margin-top: var(--sp-xl);
}

.other-way {
  background: var(--canvas-alt);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  text-align: center;
}

.other-way .ti { font-size: 28px; color: var(--p); }
.other-way span { font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }

/* ─── CONTACT FORM ───────────────────────────────────────────────── */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: var(--sp-lg); }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
}
.ci-icon {
  width: 40px; height: 40px;
  background: var(--p-bg);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.ci-icon .ti { font-size: 20px; color: var(--p); }
.contact-item h4 { font-size: var(--t-sm); font-weight: 600; color: var(--ink-3); margin-bottom: 3px; }
.contact-item p { font-size: var(--t-md); color: var(--ink-2); }

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  box-shadow: var(--sh-sm);
}

.f-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-md); }
.f-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
}
.f-label .ti { font-size: 14px; color: var(--ink-4); }

.f-input, .f-textarea, .f-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: var(--t-sm);
  font-family: inherit;
  color: var(--ink);
  background: var(--canvas);
  transition: border .15s, box-shadow .15s;
  resize: vertical;
}
.f-input:focus, .f-textarea:focus, .f-select:focus {
  outline: none;
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(124,45,18,.1);
}
.f-textarea { min-height: 120px; }
.f-input.invalid, .f-textarea.invalid, .f-select.invalid { border-color: #B91C1C; }

.btn-submit {
  width: 100%;
  background: var(--p);
  color: #fff;
  font-size: var(--t-md);
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s;
}
.btn-submit:hover { background: var(--p-h); }

/* ─── SAFETY NOTICE ──────────────────────────────────────────────── */
.safety-notice {
  background: var(--d-bg);
  border: 1px solid rgba(185,28,28,.15);
  border-radius: var(--r);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  margin-bottom: var(--sp-lg);
}
.safety-notice .ti { font-size: 18px; color: var(--d); flex-shrink: 0; margin-top: 2px; }
.safety-notice p { font-size: var(--t-sm); color: var(--d-t); line-height: 1.6; }

/* ─── ABOUT PAGE ─────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-2xl);
  align-items: start;
}

.about-lead {
  font-size: var(--t-xl);
  font-weight: 600;
  color: var(--p);
  line-height: 1.5;
  margin-bottom: var(--sp-lg);
  border-inline-start: 4px solid var(--p);
  padding-inline-start: var(--sp-md);
}

.about-body { font-size: var(--t-lg); color: var(--ink-2); line-height: 1.8; }

/* ─── FOOTER ─────────────────────────────────────────────────────── */
#site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.7);
  padding: var(--sp-2xl) 0 0;
  margin-top: var(--sp-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--sp-2xl);
  padding-bottom: var(--sp-2xl);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .brand-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--sp-md);
}

.footer-logo-img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }

.footer-brand p { font-size: var(--t-sm); line-height: 1.7; }

.footer-safety {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-lg);
  border-top: 1px solid rgba(255,255,255,.08);
}

.footer-social {
  display: flex;
  gap: 8px;
  margin-top: var(--sp-md);
}
.footer-social a {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  transition: all .15s;
}
.footer-social a:hover { background: var(--p); color: #fff; }
.footer-social a .ti { font-size: 16px; }

.footer-col h4 { font-size: var(--t-sm); font-weight: 700; color: #fff; margin-bottom: var(--sp-md); letter-spacing: .05em; text-transform: uppercase; }

.footer-col a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--t-sm);
  color: rgba(255,255,255,.6);
  margin-bottom: var(--sp-sm);
  transition: color .15s;
}
.footer-col a:hover { color: #fff; }
.footer-col a .ti { font-size: 13px; }

.safety-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
}
.safety-item .ti { font-size: 16px; color: rgba(255,255,255,.4); margin-top: 2px; flex-shrink: 0; }
.safety-item p { font-size: var(--t-sm); line-height: 1.6; }

.footer-bottom {
  text-align: center;
  padding: var(--sp-md);
  font-size: var(--t-xs);
  color: rgba(255,255,255,.3);
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ─── PAGE HERO (inner pages) ────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--p) 0%, #5C2708 100%);
  color: #fff;
  padding: var(--sp-2xl) 0 var(--sp-xl);
}

.page-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-sm);
  font-weight: 600;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: var(--sp-md);
}

.page-hero h1 {
  font-size: clamp(var(--t-3xl), 4vw, var(--t-5xl));
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--sp-md);
}

.page-hero p {
  font-size: var(--t-xl);
  opacity: .85;
  max-width: 560px;
  line-height: 1.6;
}

/* ─── LOADING / ERROR / EMPTY STATES ─────────────────────────────── */
.loading-state, .error-state, .placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: var(--sp-3xl) var(--sp-lg);
  text-align: center;
  color: var(--ink-4);
}

.loading-state .ti, .placeholder .ph-icon .ti {
  font-size: 40px;
  margin-bottom: var(--sp-sm);
}

.error-state { color: var(--d-t); }
.error-state .ti { font-size: 40px; margin-bottom: var(--sp-sm); color: var(--d); }
.error-state strong { font-size: var(--t-lg); }
.error-state p { font-size: var(--t-sm); }

.ph-icon {
  width: 64px; height: 64px;
  background: var(--canvas-alt);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-sm);
}
.placeholder p { font-size: var(--t-md); font-weight: 500; }
.placeholder span { font-size: var(--t-sm); }

/* ─── PHOTO PLACEHOLDER (temporary — swap for real photos) ──────────
   Dashed-border icon blocks marking where real photography will go
   once available. Safe to delete per-instance once a real photo is
   dropped in — see CLAUDE.md "Open items → Logo, branding assets,
   photos". Distinct from .placeholder above (that one is the JS
   "no data yet" empty-state for live Sheet-backed sections). ────── */
.photo-placeholder {
  background: linear-gradient(135deg, var(--p-bg) 0%, var(--canvas-alt) 100%);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-lg);
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--sp-sm);
  padding: var(--sp-lg);
}
.photo-placeholder .ti { font-size: 40px; color: var(--p); opacity: .45; }
.photo-placeholder span {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-3);
  max-width: 420px;
  line-height: 1.5;
}
@media (max-width: 640px) { .photo-placeholder { height: 160px; } }

/* ─── PHOTO BANNER (real photo, replaces .photo-placeholder once a
   photo is available for that spot) ──────────────────────────────── */
.photo-banner {
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 220px;
  border: 1px solid var(--border);
}
.photo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 640px) { .photo-banner { height: 160px; } }

/* Portrait-oriented source photo — a wide short crop crushes it down to an
   unrecognisable sliver, so show it at its own aspect ratio instead. */
.photo-banner.is-portrait {
  height: auto;
  max-width: 360px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin { display: inline-block; animation: spin .8s linear infinite; }

/* ─── LIVE BADGE ─────────────────────────────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--s-bg);
  color: var(--s-t);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(21,128,61,.15);
}
.live-badge .ti { font-size: 12px; }

/* ─── TOAST ──────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  inset-inline-end: 24px;
  z-index: 2000;
  background: var(--ink);
  color: #fff;
  font-size: var(--t-sm);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 99px;
  box-shadow: var(--sh-lg);
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .ti { color: #4ade80; font-size: 16px; }
.toast-error { background: #B91C1C; }
.toast-success { background: #15803D; }

/* ── Inline form alerts ─────────────────────────────────────────────
   A single result message under a form (like contact.html's submit
   button) needs to be impossible to miss even when it's just plain
   text sitting quietly on the page — these give it a colored box
   instead of relying on font color alone. */
.form-alert {
  display: none;
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: var(--t-sm);
  font-weight: 600;
  border: 1.5px solid transparent;
}
.form-alert.show { display: block; }
.form-alert-error   { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }
.form-alert-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.form-alert-success { background: #F0FDF4; border-color: #BBF7D0; color: #15803D; }

/* ─── GET INVOLVED ───────────────────────────────────────────────── */
.involve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-lg);
}

.involve-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  transition: all .2s;
}
.involve-card:hover { box-shadow: var(--sh); transform: translateY(-3px); border-color: var(--border-strong); }

.involve-icon {
  width: 48px; height: 48px;
  background: var(--p-bg);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-lg);
}
.involve-icon .ti { font-size: 24px; color: var(--p); }

.involve-card h3 { font-size: var(--t-xl); font-weight: 700; margin-bottom: 8px; }
.involve-card p { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.7; }

/* ─── CANVAS-ALT SECTION BG ──────────────────────────────────────── */
.section-alt { background: var(--canvas-alt); }

/* ─── MEDIA QUERIES ──────────────────────────────────────────────── */

/* Prevent all horizontal overflow */
html, body { overflow-x: hidden; }

/* ─── HOMEPAGE ADDITIONS ─────────────────────────────────────────── */

/* Updates home grid */
.updates-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}
.update-card {
  background: var(--white);
  border-radius: var(--r);
  border: 0.5px solid var(--border);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  transition: box-shadow .2s;
}
.update-card:hover { box-shadow: var(--sh); }
.update-date {
  font-size: var(--t-xs);
  color: var(--ink-4);
  font-weight: 500;
}
.update-card h3 {
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.update-card > p {
  font-size: var(--t-sm);
  color: var(--ink-2);
  line-height: 1.7;
  flex: 1;
}
.update-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--p-bg);
  color: var(--p-t);
  font-size: var(--t-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  width: fit-content;
}

/* Partners strip */
.partners-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.partners-label {
  text-align: center;
  font-size: var(--t-xs);
  color: var(--ink-4);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-lg);
}
.partners-logos {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.partner-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 108px;
  padding: var(--sp-md) var(--sp-md);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  cursor: default;
  transition: background .2s, transform .2s;
}
a.partner-item { cursor: pointer; }
.partner-item:hover,
.partner-item:focus-visible {
  background: var(--canvas-alt);
  transform: translateY(-3px);
  outline: none;
}
.partner-item .ti {
  font-size: 26px;
  color: var(--ink-4);
  transition: color .2s;
}
.partner-item.is-award .ti { color: var(--a); }
.partner-item:hover .ti,
.partner-item:focus-visible .ti { color: var(--p); }
.partner-item.is-award:hover .ti,
.partner-item.is-award:focus-visible .ti { color: var(--a); }

/* Icon badge — partner logos are icon+name only for now; real logo images
   would need to come from the separate management tool project. */
.partner-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.partner-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner-name {
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: .01em;
  transition: color .2s;
}
.partner-item:hover .partner-name,
.partner-item:focus-visible .partner-name { color: var(--ink); }

.partner-note {
  font-size: 11px;
  color: var(--ink-4);
  text-align: center;
  line-height: 1.4;
  max-width: 130px;
}

.partners-divider {
  width: 1px;
  align-self: stretch;
  margin: 0 var(--sp-sm);
  background: var(--border);
}
@media (max-width: 700px) {
  .partners-divider { display: none; width: 100%; }
}

/* Newsletter strip */
.newsletter-strip {
  background: var(--a);
  padding: var(--sp-2xl) 0;
}
.newsletter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2xl);
  align-items: center;
}
.newsletter-brand-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: var(--t-sm);
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.4);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: var(--sp-md);
  width: fit-content;
}
.newsletter-inner h2 {
  font-size: var(--t-2xl);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--sp-sm);
}
.newsletter-inner > div > p {
  font-size: var(--t-sm);
  color: rgba(255,255,255,.85);
  line-height: 1.7;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.newsletter-form input[type="email"] {
  padding: 12px var(--sp-md);
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,.4);
  background: var(--white);
  font-family: 'Cairo', sans-serif;
  font-size: var(--t-sm);
  color: var(--ink);
  width: 100%;
}
.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.3);
}
.newsletter-form input::placeholder { color: var(--ink-4); }
/* On the newsletter strip's solid amber background, the submit button
   flips to the same white-bg/colored-text pattern used by .btn-primary
   on the page's other solid-color band (the CTA section) — an amber
   button would otherwise disappear into the matching background. */
.btn-amber {
  background: #fff;
  color: var(--a);
  padding: 12px var(--sp-lg);
  border-radius: var(--r);
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: var(--t-sm);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s, transform .15s;
  width: 100%;
}
.btn-amber:hover { background: rgba(255,255,255,.9); transform: translateY(-1px); }
.nl-success {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--s-t);
  font-weight: 600;
  font-size: var(--t-md);
  padding: var(--sp-md);
  background: var(--s-bg);
  border-radius: var(--r);
  box-shadow: var(--sh-lg);
}
.nl-success .ti { font-size: 22px; }

/* Responsive — homepage additions */
@media (max-width: 900px) {
  .updates-home-grid { grid-template-columns: 1fr; }
  .newsletter-inner  { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .partners-logos    { gap: var(--sp-xl); }
}

/* ── Tablet 900px ── */
@media (max-width: 900px) {
  .nav-links    { display: none; }
  .nav-hamburger { display: flex; }

  /* Allow logo to shrink and truncate instead of pushing layout */
  .nav-logo {
    font-size: var(--t-md);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .about-grid,
  .contact-wrap   { grid-template-columns: 1fr; }
  .footer-grid    { grid-template-columns: 1fr 1fr; gap: var(--sp-xl); }
  .update-card    { grid-template-columns: 1fr; gap: var(--sp-sm); }
  .update-date    { padding-top: 0; }

  .hero { padding: var(--sp-2xl) 0; }
  .hero-sub { font-size: var(--t-lg); }

  .section  { padding: var(--sp-xl) 0; }
  .section-sm { padding: var(--sp-lg) 0; }

  .section-head h2 { font-size: var(--t-2xl); }
}

/* ── Phone 600px ── */
@media (max-width: 600px) {
  :root {
    --sp-lg:  16px;
    --sp-xl:  28px;
    --sp-2xl: 40px;
    --sp-3xl: 56px;
  }

  .container { padding: 0 14px; }

  /* Nav */
  .nav-logo {
    font-size: var(--t-sm);
    max-width: 160px;
  }
  .btn-donate-nav,
  .btn-getinvolved-nav { display: none; } /* hidden — both are in the mobile menu as full-width CTAs */

  /* Urgent banner — allow text to wrap */
  #site-urgent {
    flex-wrap: wrap;
    font-size: 12px;
    padding: 8px 14px;
  }
  #site-urgent .ti { display: none; } /* strip icon to save space */

  /* Hero */
  .hero { padding: var(--sp-xl) 0; }
  .hero h1 { font-size: var(--t-3xl); letter-spacing: -.01em; }
  .hero-sub { font-size: var(--t-sm); margin-bottom: var(--sp-lg); }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn { justify-content: center; }

  /* Page hero */
  .page-hero { padding: var(--sp-xl) 0 var(--sp-lg); }
  .page-hero h1 { font-size: var(--t-2xl); }
  .page-hero p  { font-size: var(--t-md); }

  /* Sections */
  .section    { padding: var(--sp-xl) 0; }
  .section-sm { padding: var(--sp-lg) 0; }
  .section-head { margin-bottom: var(--sp-lg); }
  .section-head h2 { font-size: var(--t-xl); }

  /* Stats */
  .stats-row { grid-template-columns: 1fr 1fr; gap: var(--sp-sm); }
  .stat-card { padding: var(--sp-md); }
  .stat-value { font-size: var(--t-2xl); }
  .stat-icon { width: 34px; height: 34px; margin-bottom: var(--sp-sm); }
  .stat-icon .ti { font-size: 18px; }

  /* Programs */
  .programs-grid { grid-template-columns: 1fr; gap: var(--sp-sm); }
  .program-card  { padding: var(--sp-lg); }

  /* Rooms */
  .rooms-grid { grid-template-columns: 1fr; }

  /* Updates */
  .update-card { padding: var(--sp-md); }

  /* Values */
  .value-item { padding: var(--sp-sm) var(--sp-md); }

  /* About */
  .about-lead { font-size: var(--t-lg); }
  .about-body { font-size: var(--t-md); }

  /* Contact */
  .form-card { padding: var(--sp-lg); }
  .contact-wrap { gap: var(--sp-lg); }

  /* Donate */
  .donate-box { padding: var(--sp-lg); }
  .donate-box h2 { font-size: var(--t-2xl); }
  .other-ways { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-lg); }
  #site-footer { padding: var(--sp-xl) 0 0; margin-top: var(--sp-2xl); }

  /* Buttons */
  .btn { font-size: var(--t-sm); padding: 10px 18px; }
  .btn-sm { font-size: 12px; padding: 7px 12px; }
}

/* ── Very small phones 380px ── */
@media (max-width: 380px) {
  .stats-row { grid-template-columns: 1fr; }
  .other-ways { grid-template-columns: 1fr; }
  .nav-logo { max-width: 130px; font-size: 12px; }
  .hero h1 { font-size: var(--t-2xl); }
}
