@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500&family=Inter:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  /* Color tokens — warm, grounded palette */
  --ink: #2A241D;
  --paper: #FAF8F3;
  --paper-warm: #F2ECDD;
  --brick: #7A3826;
  --brick-deep: #5E2A1C;
  --sage: #56644A;
  --sage-deep: #404C37;
  --stone: #8A7B63;
  --stone-light: #DDD5C2;
  --white: #FFFEFB;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}

img { max-width: 100%; display: block; }

a {
  color: var(--brick);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1.2em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  font-weight: 500;
  color: var(--brick);
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--stone-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  height: 42px;
  width: auto;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

nav.main-nav a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--ink);
  padding: 9px 10px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

nav.main-nav a:hover {
  background: var(--paper-warm);
  color: var(--brick);
}

nav.main-nav a.current {
  color: var(--brick);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 22px;
  border-radius: 7px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--brick);
  color: var(--white);
}
.btn-primary:hover { background: var(--brick-deep); color: var(--white); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn-sage {
  background: var(--sage);
  color: var(--white);
}
.btn-sage:hover { background: var(--sage-deep); color: var(--white); }

.nav-cta { flex-shrink: 0; }

.lang-switcher-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 6px;
  background: rgba(122, 56, 38, 0.07);
  border: 1.5px solid var(--brick);
  border-radius: 8px;
  padding: 4px 8px 4px 10px;
}

.lang-switcher-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--brick);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.lang-switcher-label svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.lang-switcher {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--brick);
  background: transparent;
  border: none;
  border-radius: 5px;
  padding: 4px 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.lang-switcher:hover { background: rgba(122, 56, 38, 0.10); }

.lang-switcher-wrap:hover {
  background: rgba(122, 56, 38, 0.12);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: 0.2s;
}

/* ---------- RTL support (Arabic) ---------- */

body.rtl {
  direction: rtl;
  text-align: right;
}

body.rtl .header-inner {
  flex-direction: row-reverse;
}

body.rtl nav.main-nav {
  flex-direction: row-reverse;
}

body.rtl .hero-actions,
body.rtl .cta-band,
body.rtl .cta-band-actions,
body.rtl .footer-grid,
body.rtl .footer-bottom,
body.rtl .prose-cols,
body.rtl .donate-options {
  direction: rtl;
}

body.rtl .field-note {
  border-left: none;
  border-right: 3px solid var(--ink);
  padding-left: 36px;
  padding-right: 36px;
  border-radius: 8px 0 0 8px;
}

body.rtl .quote-block {
  border-left: none;
  border-right: 3px solid var(--brick);
  padding-left: 0;
  padding-right: 28px;
}

html[lang="ar"] body {
  font-family: 'Noto Sans Arabic', var(--font-body);
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .hero-tagline,
html[lang="ar"] .eyebrow {
  font-family: 'Noto Sans Arabic', var(--font-display);
}

/* ---------- Hero (photo background) ---------- */

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  background-image: url('../images/hero-bridge-web.jpg');
  background-size: cover;
  background-position: center 65%;
  color: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 10, 0.15) 0%, rgba(20, 16, 10, 0.1) 40%, rgba(20, 16, 10, 0.72) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding-bottom: 56px;
}

.hero .eyebrow {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 16px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 4.6vw, 3.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.45);
}

.hero p.lead {
  font-size: 1.1rem;
  color: var(--white);
  max-width: 600px;
  margin-bottom: 32px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.45);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

/* Page hero (smaller, solid color, for inner pages) */
.page-header {
  padding: 52px 0 8px;
}

.page-header .eyebrow {
  margin-bottom: 10px;
}

.page-header h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 600;
  margin-bottom: 14px;
  max-width: 760px;
}

.page-header p {
  font-size: 1.05rem;
  color: #5A5042;
  max-width: 620px;
  margin-bottom: 0;
}

.page-hero {
  background-color: var(--paper-warm);
  background-image: url('../images/starfish-pattern.svg');
  background-repeat: repeat;
  background-size: 320px 320px;
  color: var(--ink);
  padding: 36px 0 40px;
  position: relative;
}

.page-hero-inner { position: relative; z-index: 1; max-width: 700px; }
.page-hero h1 { color: var(--ink); font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 600; }
.page-hero p { color: #5A5042; font-size: 1.08rem; max-width: 560px; margin-bottom: 0; }
.page-hero .eyebrow { color: var(--brick); margin-bottom: 16px; }

/* Pill buttons for photo-hero use */
.btn-pill {
  border-radius: 999px;
  padding: 15px 30px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}


/* ---------- Field note (signature element) ----------
   A typed-record aside, not a metrics dashboard. Numbers are
   embedded in sentences with a source line, like a citation in
   a report someone actually wrote, not a KPI tile. */

.field-note {
  border-left: 3px solid var(--ink);
  background: var(--white);
  padding: 30px 36px;
  border-radius: 0 8px 8px 0;
}

.field-note .eyebrow { margin-bottom: 14px; }

.field-note p {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 14px;
}

.field-note p:last-of-type { margin-bottom: 0; }

.field-note .source {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--stone);
  letter-spacing: 0.02em;
}

.field-note .source a { color: var(--stone); text-decoration: underline; text-underline-offset: 2px; }
.field-note .source a:hover { color: var(--brick); }

/* County tally — a short, plainspoken list, not a stat-tile grid */

.tally {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--stone-light);
}

.tally-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.8fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--stone-light);
  align-items: baseline;
}

.tally-county {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}

.tally-figure {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--brick-deep);
  font-weight: 600;
}

.tally-note {
  font-size: 0.92rem;
  color: var(--stone);
}

/* ---------- Sections ---------- */

section { padding: 44px 0; }

/* Prevent stacked section padding from creating oversized gaps.
   Two adjacent sections would otherwise combine to 104px of dead space. */
section + section { padding-top: 0; }

/* A tinted band still needs internal padding so its content isn't flush
   against the color edge, but far less than a full section's worth. */
section + .section-alt,
.section-alt + section,
section + .section-dark,
.section-dark + section { padding-top: 34px; }

.section-tight + .section-alt,
.section-alt + .section-tight { padding-top: 24px; }

/* Trim the bottom of a tinted band to match its reduced top. */
.section-alt, .section-dark { padding-bottom: 34px; }

.section-tight { padding: 34px 0; }

.section-alt { background: var(--paper-warm); }

.section-dark {
  background: var(--ink);
  color: var(--paper);
}
.section-dark h2 { color: var(--white); }
.section-dark p { color: #E8E2D3; }

.section-head {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-top: 10px;
}

/* ---------- Prose columns (replaces card-grid for explanatory content) ---------- */

.prose-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
}

.prose-cols h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.prose-cols p { color: #3A4450; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--white);
  border: 1px solid var(--stone-light);
  border-radius: 10px;
  padding: 28px;
}

.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { font-size: 0.95rem; color: #5A5042; margin-bottom: 14px; }
.card a.card-link { font-weight: 600; font-size: 0.92rem; }
.card a.card-link::after { content: " \2192"; }

/* ---------- Board list (plain, no cards) ---------- */

.board-list {
  display: flex;
  flex-direction: column;
}

.board-list-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--stone-light);
}

.board-list-item:first-child {
  padding-top: 0;
}

.board-list-item:last-child {
  border-bottom: none;
}

.board-list-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.board-list-name h3 {
  font-size: 1.18rem;
  margin: 0;
}

.board-role {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--stone);
  font-weight: 500;
}

.board-list-item p {
  font-size: 0.96rem;
  color: #5A5042;
  margin-bottom: 0;
  max-width: 640px;
}

/* ---------- Quote ---------- */

.quote-block {
  border-left: 3px solid var(--brick);
  padding-left: 28px;
  margin: 0;
  max-width: 700px;
}

.quote-block p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
}

.quote-block cite {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--sage);
  color: var(--white);
  border-radius: 14px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.cta-band h2 { color: var(--white); margin-bottom: 8px; font-size: 1.8rem; }
.cta-band p { color: #DCEAE4; margin-bottom: 0; max-width: 440px; }

.cta-band-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-outline-light {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.6);
  color: var(--white);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: var(--white); color: var(--white); }

.social-follow-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.share-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Forms / Donate ---------- */

.donate-panel {
  background: var(--white);
  border: 1px solid var(--stone-light);
  border-radius: 12px;
  padding: 36px;
}

.donate-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0 28px;
}

.donate-amount {
  background: var(--paper-warm);
  border: 1.5px solid var(--stone-light);
  border-radius: 8px;
  padding: 18px 10px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}

.donate-amount small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.74rem;
  color: var(--stone);
  margin-top: 6px;
}

.mail-card {
  background: var(--paper-warm);
  border-radius: 10px;
  padding: 26px 28px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.7;
}

.embed-frame {
  border: 1px solid var(--stone-light);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}

.embed-frame iframe { display: block; width: 100%; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

/* Field label for grouped inputs (radios), matching the <label> look */
.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Override the block/full-width form defaults for radio options */
.contact-form .radio-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
  font-weight: 500;
  font-size: 0.92rem;
  background: var(--white);
  border: 1.5px solid var(--stone-light);
  border-radius: 7px;
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.contact-form .radio-option:hover { border-color: var(--brick); }

.contact-form .radio-option input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: var(--brick);
  cursor: pointer;
}

.contact-form .radio-option:has(input:checked) {
  border-color: var(--brick);
  background: rgba(122, 56, 38, 0.06);
}

.field-hint {
  font-size: 0.82rem;
  color: var(--stone);
  margin: 10px 0 0;
}

.field-hint-error {
  color: var(--brick);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 12px 14px;
  border: 1.5px solid var(--stone-light);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
}

.contact-form textarea { resize: vertical; min-height: 130px; }

.info-card {
  background: var(--paper-warm);
  border-radius: 10px;
  padding: 26px 28px;
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 10px;
}

.info-card p { margin-bottom: 6px; font-size: 0.96rem; }

.social-row {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 16px;
  border: 1.5px solid var(--stone-light);
  border-radius: 7px;
  color: var(--ink);
}

.social-row a:hover { border-color: var(--brick); color: var(--brick); }

/* ---------- Footer ---------- */

footer {
  background: var(--ink);
  color: #C9BFA9;
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-light);
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-grid a {
  display: block;
  color: #C9BFA9;
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.footer-grid a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  font-size: 0.84rem;
  color: var(--stone-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Resource list ---------- */

.resource-list {
  display: grid;
  gap: 14px;
}

.resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--stone-light);
  border-radius: 10px;
  padding: 20px 26px;
}

.resource-row .resource-text h3 { font-size: 1.02rem; margin-bottom: 4px; }
.resource-row .resource-text p { font-size: 0.9rem; color: var(--stone); margin-bottom: 0; }
.resource-row .resource-tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: rgba(60,110,94,0.12);
  padding: 5px 10px;
  border-radius: 5px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1050px) {
  /* Header overflow fix: hide lang label text on mobile, keep globe + select */
  .lang-switcher-label span[data-i18n="lang_label"] { display: none; }
  .lang-switcher-wrap { margin-left: 4px; padding: 3px 6px 3px 8px; }
  .lang-switcher { font-size: 0.78rem; padding: 3px 2px; }

  /* Prevent header from exceeding viewport */
  .site-header { overflow: hidden; }
  .header-inner { flex-wrap: nowrap; min-width: 0; }
  .brand img { height: 34px; }
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--stone-light);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 20px 16px;
    gap: 4px;
  }
  nav.main-nav.nav-open { display: flex; }
  nav.main-nav a { padding: 12px 10px; }
  .site-header { position: relative; }
  .mobile-toggle { display: block; }
  .prose-cols { grid-template-columns: 1fr; gap: 28px; }
  .tally-row { grid-template-columns: 1fr; gap: 4px; }
  .card-grid { grid-template-columns: 1fr; }
  .board-list-item { padding: 22px 0; }
  .donate-options { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .hero { padding: 64px 0 90px; }
  section { padding: 40px 0; }
  .donate-options { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .resource-row { flex-direction: column; align-items: flex-start; }
}
