/* ==========================================================================
   Afghan American Community Foundation of Georgia — Brand v2
   Tokens pulled directly from the official seal: navy ring + wordmark,
   Afghan-flag red/green in the handshake, gold divider star, olive laurel.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@500;600;700&family=Work+Sans:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&display=swap');

:root {
  --navy: #16305A;
  --navy-deep: #0E2140;
  --red: #C4212F;
  --green: #0B6E4F;
  --green-deep: #1F4A34;
  --gold: #C9A227;
  --ivory: #FAF7EF;
  --ivory-deep: #F1EBDA;
  --ink: #1C1C1C;
  --ink-soft: #52504A;
  --line: #DCD5C2;
  --white: #FFFFFF;

  --font-display: "Bitter", serif;
  --font-body: "Work Sans", sans-serif;
  --font-rtl: "Noto Naskh Arabic", serif;

  --radius: 4px;
  --max-w: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

/* RTL: Pashto / Dari share the same script family and never inherit
   an uppercase transform — Arabic script has no case, forcing caps
   on it just distorts the letterforms. */
html[dir="rtl"] body,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 {
  font-family: var(--font-rtl);
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { font-weight: 700; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .btn { text-transform: none; letter-spacing: 0; }
html[dir="rtl"] p, html[dir="rtl"] li { line-height: 1.95; }

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

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

[data-lang-block] { display: none; }
html[data-lang="en"] [data-lang-block="en"],
html[data-lang="ps"] [data-lang-block="ps"],
html[data-lang="da"] [data-lang-block="da"] { display: block; }
span[data-lang-block] { display: none; }
html[data-lang="en"] span[data-lang-block="en"],
html[data-lang="ps"] span[data-lang-block="ps"],
html[data-lang="da"] span[data-lang-block="da"] { display: inline; }

/* ---- Recurring signature motif: the gold star divider from the seal ---- */
.star-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  margin: 0 0 18px;
}
.star-divider::before,
.star-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.star-divider svg { width: 14px; height: 14px; flex-shrink: 0; }
.star-divider.left { justify-content: flex-start; }
.star-divider.left::after { display: none; }
.star-divider.left::before { display: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-sticky {
  position: sticky; top: 0; z-index: 45;
}
.site-topbar {
  background: var(--ivory-deep);
  border-bottom: 1px solid var(--line);
  border-top: 4px solid var(--green);
  direction: ltr;
}
.topbar-wrap { display: flex; justify-content: flex-end; padding: 7px 32px; max-width: 100%; margin: 0; }

.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap;
  max-width: 100%; margin: 0; padding-left: 32px; padding-right: 32px;
}
/* Header chrome (logo, nav, language switcher, donate button) stays in a
   fixed position regardless of language — only page content below mirrors
   for RTL. This keeps navigation predictable no matter which language
   a visitor has selected. */
html[dir="rtl"] .site-header .wrap { direction: ltr; }
html[dir="rtl"] .site-header .main-nav a { direction: rtl; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { width: 108px; height: 108px; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; letter-spacing: .01em; line-height: 1.3; max-width: 280px; color: var(--navy); }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 17px; margin: 0; padding: 0; }
.main-nav a {
  text-decoration: none; font-size: 14.5px; color: var(--ink-soft);
  border-bottom: 2px solid transparent; padding-bottom: 3px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.main-nav a:hover { color: var(--navy); border-color: var(--gold); }
.main-nav a.current { color: var(--navy); border-color: var(--green); font-weight: 600; }

.nav-cluster { display: flex; align-items: center; gap: 32px; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line); background: var(--white);
  border-radius: 6px; cursor: pointer; color: var(--navy);
  flex-shrink: 0;
}
.nav-toggle svg { width: 20px; height: 20px; }

.lang-switch { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--white); box-shadow: 0 1px 3px rgba(14,33,64,.08); flex-shrink: 0; }
.lang-switch button {
  display: flex; align-items: center; gap: 6px;
  border: none; background: transparent; font-family: var(--font-body);
  font-size: 13px; padding: 8px 13px; cursor: pointer; color: var(--ink-soft);
  white-space: nowrap; line-height: 1;
}
.lang-switch button + button { border-inline-start: 1px solid var(--line); }
.lang-switch button .flag { flex-shrink: 0; border-radius: 2px; display: block; }
.lang-switch button[aria-current="true"] { background: var(--navy); color: var(--white); border-radius: 24px; }

.btn {
  display: inline-block; font-family: var(--font-body); font-weight: 600;
  font-size: 14.5px; text-decoration: none; padding: 11px 24px;
  border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  transition: background .15s, transform .12s;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: #9C1A26; }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-ghost { background: transparent; border: none; padding: 0; color: var(--navy); text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
.btn-ghost:hover { color: var(--red); }

/* ==========================================================================
   Hero — full-bleed photo with a legibility scrim, matching the reference
   design: overlaid headline, pill buttons, accent word on the last line.
   ========================================================================== */
.hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 8%;
  z-index: 0;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--ivory) 0%, rgba(246,241,230,.94) 30%, rgba(246,241,230,.55) 55%, rgba(246,241,230,.1) 78%);
}
.hero .wrap { position: relative; z-index: 1; text-align: left; max-width: 100%; margin: 0; padding-left: 64px; padding-right: 64px; }
.hero-kicker {
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  color: var(--green); letter-spacing: .04em; margin: 0 0 16px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12;
  margin: 0 0 20px; color: var(--navy-deep); max-width: 14ch;
}
.hero h1 .accent-word { font-style: italic; font-weight: 500; color: var(--green); }
.hero p { font-size: 17px; color: var(--ink-soft); max-width: 48ch; margin: 0 0 32px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-ctas .btn { border-radius: 30px; padding: 13px 26px; display: inline-flex; align-items: center; gap: 8px; }
.hero-ctas .btn svg { width: 16px; height: 16px; }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-deep); }

html[dir="rtl"] .hero .wrap { text-align: right; }
html[dir="rtl"] .hero-bg::after { background: linear-gradient(270deg, var(--ivory) 0%, rgba(246,241,230,.94) 30%, rgba(246,241,230,.55) 55%, rgba(246,241,230,.1) 78%); }
html[dir="rtl"] .hero h1 { max-width: 100%; }
html[dir="rtl"] .hero p { max-width: 56ch; }

/* ==========================================================================
   Section shell
   ========================================================================== */
section { padding: 78px 0; }
section.tinted { background: var(--ivory-deep); }
section.navy {
  background: var(--navy-deep);
  color: #E9E3D2;
}
.section-head { max-width: 640px; margin: 0 0 42px; }
.section-head.center { max-width: 640px; }
.eyebrow { display: block; font-size: 16px; font-weight: 600; color: var(--red); margin: 0 0 10px; letter-spacing: 1.1px; }
h2.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(25px, 3vw, 34px); margin: 0 0 14px; color: var(--navy-deep);
}
section.navy h2.section-title { color: var(--white); }
.section-lede { color: var(--ink-soft); font-size: 16.5px; max-width: 60ch; }
section.navy .section-lede { color: #C7C0AA; }

/* ==========================================================================
   Mission
   ========================================================================== */
.mission { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.mission-quote {
  font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1.45;
  color: var(--navy-deep); border-inline-start: 3px solid var(--gold); padding-inline-start: 20px; margin: 0;
}

/* ==========================================================================
   Programs
   ========================================================================== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.program-card { background: var(--white); padding: 32px 28px; }
.program-card h3 { font-family: var(--font-display); font-size: 18.5px; margin: 0 0 10px; color: var(--navy-deep); }
.program-card p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.program-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ivory-deep); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.program-icon svg { width: 20px; height: 20px; }

/* ==========================================================================
   Impact stats
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
.stat { text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 38px; font-weight: 700; color: var(--gold); }
.stat span { font-size: 14.5px; color: #C7C0AA; }

/* ==========================================================================
   Commitment values
   ========================================================================== */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.value { border-top: 2px solid var(--gold); padding-top: 16px; }
.value:nth-child(even) { border-top-color: var(--green); }
.value h3 { font-family: var(--font-display); font-size: 18px; margin: 0 0 8px; color: var(--navy-deep); }
.value p { margin: 0; font-size: 15px; color: var(--ink-soft); }

/* ==========================================================================
   Get involved
   ========================================================================== */
.involve-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.involve-card { background: var(--white); border: 1px solid var(--line); padding: 34px 28px; border-radius: 4px; }
.involve-card h3 { font-family: var(--font-display); font-size: 19px; margin: 0 0 10px; color: var(--navy-deep); }
.involve-card p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 22px; }

/* ==========================================================================
   Leadership
   ========================================================================== */
.leaders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.leader { text-align: center; }
.leader-photo {
  width: 148px; height: 148px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 18px; border: 3px solid var(--ivory-deep);
}
.leader-photo img { width: 100%; height: 100%; object-fit: cover; }
.leader-photo.seal {
  background: var(--navy); display: flex; align-items: center; justify-content: center;
}
.leader-photo.seal img { width: 62%; height: 62%; object-fit: contain; }
.leader h3 { font-family: var(--font-display); font-size: 18px; margin: 0 0 4px; color: var(--navy-deep); }
.leader .role { font-size: 14px; color: var(--red); margin: 0 0 12px; font-weight: 600; }
.leader p.bio { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.leader blockquote { font-family: var(--font-display); font-size: 16px; line-height: 1.5; color: var(--navy-deep); margin: 0; font-style: normal; }

/* ==========================================================================
   Homepage leadership quote (CEO photo + blockquote)
   ========================================================================== */
.ceo { display: grid; grid-template-columns: 140px 1fr; gap: 32px; align-items: center; }
.ceo img { border-radius: 50%; width: 140px; height: 140px; object-fit: cover; flex-shrink: 0; }
.ceo blockquote {
  margin: 0 0 14px; font-family: var(--font-display); font-size: 22px;
  line-height: 1.45; color: var(--navy-deep); font-style: normal;
}
.ceo cite { font-style: normal; color: var(--ink-soft); font-size: 14.5px; display: block; }
@media (max-width: 640px) {
  .ceo { grid-template-columns: 1fr; text-align: center; }
  .ceo img { margin: 0 auto; }
}

/* ==========================================================================
   Donate band (Zeffy)
   ========================================================================== */
.donate-band {
  background: var(--red); color: var(--white); text-align: center;
  border-radius: 4px; padding: 52px 36px;
}
.donate-band h2 { font-family: var(--font-display); font-size: clamp(24px,3vw,32px); margin: 0 0 14px; }
.donate-band p { max-width: 56ch; margin: 0 auto 28px; color: #F6DCDC; font-size: 16.5px; }
.donate-band .btn-primary { background: var(--white); color: var(--red); }
.donate-band .btn-primary:hover { background: #F3E9CE; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer.site-footer { background: var(--navy-deep); color: #C7C0AA; padding: 60px 0 26px; border-top: 4px solid var(--green); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; padding-bottom: 42px; border-bottom: 1px solid rgba(199,192,170,.18); }
.footer-top h4 { color: var(--gold); font-size: 14px; margin: 0 0 16px; font-weight: 600; }
.footer-top ul { list-style: none; margin: 0; padding: 0; }
.footer-top li { margin-bottom: 9px; font-size: 14.5px; }
.footer-top a { text-decoration: none; color: #C7C0AA; }
.footer-top a:hover { color: var(--white); }
.footer-brand { display: flex; align-items: flex-start; gap: 14px; }
.footer-brand img { width: 96px; height: 96px; flex-shrink: 0; }
.footer-brand p { font-size: 14px; color: #A8A186; max-width: 32ch; margin: 8px 0 0; }
.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12.5px;
  color: #8B8570;
}
.footer-bottom > span { display: block; }
.footer-legal { border-inline-start: 1px solid rgba(199,192,170,.3); padding-inline-start: 20px; }
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .hero .wrap { padding-left: 22px; padding-right: 22px; }
  .form-shell { padding: 26px 20px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }
  .footer-legal { border-inline-start: none; padding-inline-start: 0; }
  .topbar-wrap { padding: 6px 16px; }
  .lang-switch button { padding: 7px 8px; font-size: 12px; gap: 4px; }
  .lang-switch .flag { width: 15px; height: 10px; }
  .site-header .wrap { padding-left: 16px; padding-right: 16px; }
  .brand img { width: 68px; height: 68px; }
  .brand-name { font-size: 12.5px; max-width: 170px; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 16px rgba(14,33,64,.08);
    padding: 8px 0;
    z-index: 50;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav li { border-top: 1px solid var(--line); }
  .main-nav li:first-child { border-top: none; }
  .main-nav a {
    display: block; padding: 14px 28px; border-bottom: none;
  }
  .main-nav a.current { background: var(--ivory-deep); }
  html[dir="rtl"] .main-nav a { direction: rtl; text-align: right; }
  .mission { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(2, 1fr); }
  .involve-grid { grid-template-columns: 1fr; }
  .leaders { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Interior page header (About, Programs, Leadership, etc.)
   ========================================================================== */
.page-header { padding: 56px 0 48px; text-align: left; border-bottom: 1px solid var(--line); }
.page-header .eyebrow { display: block; }
.page-header h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(28px, 3.6vw, 42px); color: var(--navy-deep); margin: 0 0 14px; }
.page-header p { color: var(--ink-soft); max-width: 60ch; margin: 0; font-size: 16.5px; }
html[dir="rtl"] .page-header { text-align: right; }

.page-header.photo {
  position: relative;
  padding: 100px 0;
  background-size: cover;
  background-position: center 15%;
  border-bottom: none;
}
.page-header.photo::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,33,64,.82), rgba(14,33,64,.9));
}
.page-header.photo .wrap { position: relative; z-index: 1; }
.page-header.photo .eyebrow { color: var(--gold); }
.page-header.photo h1 { color: var(--white); }
.page-header.photo p { color: #D9D2BF; }

.eyebrow-green { color: var(--green) !important; }

/* ==========================================================================
   Forms (Request Assistance / Become a Volunteer)
   ========================================================================== */
.form-shell { max-width: 680px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 44px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 14.5px; font-weight: 600; color: var(--navy-deep); margin-bottom: 7px; }
.field .hint { font-size: 13px; color: var(--ink-soft); margin-top: 5px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 15.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px; padding: 11px 13px; background: var(--ivory);
}
html[dir="rtl"] .field input, html[dir="rtl"] .field select, html[dir="rtl"] .field textarea { font-family: var(--font-rtl); }
.field textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-note { background: var(--ivory-deep); border-inline-start: 3px solid var(--gold); padding: 14px 18px; font-size: 14.5px; color: var(--ink-soft); margin-bottom: 30px; border-radius: 2px; }
.form-submit { width: 100%; text-align: center; font-size: 16px; padding: 14px; }

/* ==========================================================================
   News / events cards
   ========================================================================== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-card { background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.news-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.news-card .body { padding: 22px; }
.news-card .date { font-size: 13px; color: var(--red); font-weight: 600; margin: 0 0 8px; }
.news-card h3 { font-family: var(--font-display); font-size: 17.5px; margin: 0; color: var(--navy-deep); }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-item { display: flex; gap: 14px; margin-bottom: 24px; }
.contact-item .icon { width: 38px; height: 38px; border-radius: 50%; background: var(--ivory-deep); color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 16px; color: var(--navy-deep); }
.contact-item p { margin: 0; color: var(--ink-soft); font-size: 15px; }

@media (max-width: 900px) {
  .field-row { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Form submission feedback (Formspree AJAX)
   ========================================================================== */
.fs-success, .fs-error {
  display: none;
  border-radius: 4px;
  padding: 26px 28px;
  font-size: 15.5px;
  line-height: 1.6;
}
.fs-success {
  background: #EAF3EC;
  border: 1px solid var(--green);
  color: var(--green-deep);
}
.fs-success h3 { font-family: var(--font-display); font-size: 19px; margin: 0 0 8px; color: var(--green-deep); }
.fs-error {
  background: #FBEAEA;
  border: 1px solid var(--red);
  color: #7A1D26;
  margin-bottom: 22px;
}
