/* ==========================================================================
   Land of Peace Center — Design System
   Shared stylesheet for English (LTR) and Arabic (RTL) pages.
   Uses CSS logical properties so one file serves both directions.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------ */
:root {
  /* Brand colors — extracted from the official logo vector */
  --green: #17A550;
  --green-dark: #0E7A3C;
  --green-tint: #E7F5EC;
  --taupe: #9E8A73;
  --taupe-dark: #7C6A56;
  --taupe-tint: #F3EEE7;

  --bg: #F8FAF7;
  --surface: #FFFFFF;
  --text: #252A27;
  --text-secondary: #66706A;
  --border: #E3E8E2;

  --font-en: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', 'Tajawal', 'Noto Sans Arabic', sans-serif;

  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(37, 42, 39, .06), 0 1px 6px rgba(37, 42, 39, .04);
  --shadow-md: 0 8px 24px rgba(37, 42, 39, .10);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---- Reset --------------------------------------------------------------*/
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-en);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body,
html[dir="rtl"] body { font-family: var(--font-ar); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text-secondary); }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }

h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem); letter-spacing: -.02em; color: var(--text); }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.25rem); letter-spacing: -.01em; color: var(--text); }
h3 { font-size: 1.25rem; color: var(--text); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .container { padding-inline: 32px; } }

section { padding-block: 64px; }
@media (min-width: 1024px) { section { padding-block: 96px; } }

.section-head { max-width: 680px; margin-block-end: 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--green-dark); font-weight: 700; font-size: .8125rem;
  letter-spacing: .06em; text-transform: uppercase; margin-block-end: 12px;
}
.eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--green); border-radius: 2px; }

.bg-alt { background: var(--surface); border-block: 1px solid var(--border); }
.bg-tint { background: var(--green-tint); }
.bg-dark { background: #123424; color: #EAF3EC; }
.bg-dark p { color: #B9CCC0; }
.bg-dark h2, .bg-dark h3 { color: #fff; }

/* ---- Skip link ---------------------------------------------------------*/
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px;
  background: var(--green-dark); color: #fff; padding: 10px 18px;
  border-radius: var(--radius-sm); z-index: 1000; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---- Buttons -------------------------------------------------------------*/
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .9375rem;
  border: 1.5px solid transparent; cursor: pointer; transition: all .2s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:focus-visible { outline: 3px solid #9fe3bc; outline-offset: 2px; }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-tint); }
.btn-ghost { background: transparent; color: var(--green-dark); padding-inline: 4px; }
.btn-ghost::after { content: "\2192"; transition: transform .2s var(--ease); }
html[dir="rtl"] .btn-ghost::after { content: "\2190"; }
.btn-ghost:hover::after { transform: translateX(4px); }
html[dir="rtl"] .btn-ghost:hover::after { transform: translateX(-4px); }
.btn-on-dark { background: #fff; color: var(--green-dark); }
.btn-on-dark:hover { background: var(--green-tint); }
.btn-outline-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---- Header --------------------------------------------------------------*/
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(248, 250, 247, .92);
  backdrop-filter: blur(8px); border-block-end: 1px solid var(--border);
  transition: box-shadow .2s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { height: 42px; width: auto; }
.brand-name-ar { font-size: 1.05rem; color: var(--taupe-dark); }
.brand-name-en { font-size: .8rem; color: var(--green-dark); letter-spacing: .04em; text-transform: uppercase; }

.main-nav { display: none; }
@media (min-width: 1024px) {
  .main-nav { display: flex; align-items: center; gap: 4px; }
  .main-nav a {
    padding: 10px 14px; border-radius: 999px; font-size: .9375rem; font-weight: 600;
    color: var(--text-secondary); transition: all .15s var(--ease);
  }
  .main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--green-dark); background: var(--green-tint); }
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1.5px solid var(--border); border-radius: 999px; font-weight: 700; font-size: .875rem;
  color: var(--text);
}
.lang-switch:hover { border-color: var(--green); color: var(--green-dark); }
.header-cta { display: none; }
@media (min-width: 640px) { .header-cta { display: inline-flex; } }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--surface); cursor: pointer;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle::before { transform: translateY(-6px); }
.nav-toggle::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; gap: 2px; padding: 12px 0 20px; border-block-start: 1px solid var(--border);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a { padding: 13px 8px; border-radius: var(--radius-sm); font-weight: 600; }
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { background: var(--green-tint); color: var(--green-dark); }
.mobile-nav .header-cta { display: inline-flex; margin-block-start: 10px; }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }

/* ---- Breadcrumbs ---------------------------------------------------------*/
.breadcrumbs { padding-block: 18px; font-size: .875rem; color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--green-dark); }
.breadcrumbs .sep { margin-inline: 8px; opacity: .5; }
.breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---- Hero -----------------------------------------------------------------*/
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, #123424 0%, #1B5A3A 55%, #17A550 100%);
  color: #fff; padding-block: 88px 96px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(circle at 15% 20%, rgba(255,255,255,.08), transparent 40%),
                     radial-gradient(circle at 85% 75%, rgba(255,255,255,.10), transparent 45%);
}
.hero-leaf { position: absolute; inset-inline-end: -60px; top: -60px; width: 340px; opacity: .12; }
html[dir="rtl"] .hero-leaf { inset-inline-end: auto; inset-inline-start: -60px; }
.hero .container { position: relative; }
.hero-eyebrow { color: #BFEBD1; }
.hero-eyebrow::before { background: #BFEBD1; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero-lead { color: #D6ECE0; font-size: 1.125rem; max-width: 56ch; margin-block-end: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-sm { padding-block: 56px 64px; }
.hero-sm h1 { max-width: none; }

/* Page hero with photo well (placeholder treatment when no approved photo exists) */
.photo-well {
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--taupe-tint), var(--green-tint));
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--border);
}
.photo-well img { width: 100%; height: 100%; object-fit: cover; }
.photo-well.placeholder { color: var(--taupe-dark); }
.photo-well-label {
  position: absolute; inset-inline-start: 16px; bottom: 16px; background: rgba(255,255,255,.9);
  padding: 6px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.leaf-mark { width: 46px; height: 46px; color: var(--green); }

/* ---- Cards ------------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
.grid-5 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } .grid-5 { grid-template-columns: repeat(5, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-media { aspect-ratio: 4 / 3; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-block-end: 2px; }
.tag {
  display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: var(--green-tint); color: var(--green-dark);
}
.tag-taupe { background: var(--taupe-tint); color: var(--taupe-dark); }
.card-meta { font-size: .8125rem; color: var(--text-secondary); display: flex; gap: 10px; flex-wrap: wrap; }
.card h3 { font-size: 1.0625rem; margin-block-end: 4px; }
.card p { font-size: .9375rem; margin-block-end: 0; flex: 1; }
.card-link { margin-block-start: 10px; font-weight: 700; color: var(--green-dark); font-size: .9375rem; }

.icon-card { padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.icon-card .icon-wrap {
  width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--green-tint);
  display: flex; align-items: center; justify-content: center; margin-block-end: 16px; color: var(--green-dark);
}
.icon-card:nth-child(even) .icon-wrap { background: var(--taupe-tint); color: var(--taupe-dark); }

/* ---- Stat blocks -------------------------------------------------------- */
.stat { text-align: center; padding: 24px 16px; }
.stat .num { display: block; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.75rem); font-weight: 800; color: var(--green-dark); letter-spacing: -.02em; }
.stat .label { font-size: .875rem; color: var(--text-secondary); font-weight: 600; }
.stat-placeholder .num { color: var(--taupe-dark); font-size: 1rem; font-weight: 700; }

/* Numeric figures must stay in LTR reading order even inside RTL (Arabic) pages */
.stat:not(.stat-placeholder) .num,
.ltr-num,
a[href^="tel:"] {
  direction: ltr;
  unicode-bidi: isolate;
}
a[href^="tel:"] { display: inline-block; }

/* ---- Values / list rows -------------------------------------------------*/
.value-row { display: flex; gap: 16px; padding-block: 20px; border-block-end: 1px solid var(--border); }
.value-row:last-child { border-block-end: none; }
.value-num { font-weight: 800; color: var(--green); font-size: 1.125rem; min-width: 2ch; }

/* ---- Timeline / process steps ------------------------------------------ */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step { position: relative; padding-inline-start: 52px; }
html[dir="rtl"] .step { padding-inline-start: 0; padding-inline-end: 52px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; inset-inline-start: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
html[dir="rtl"] .step::before { inset-inline-start: auto; inset-inline-end: 0; }

/* ---- Forms ----------------------------------------------------------------*/
.field { margin-block-end: 18px; }
.field label { display: block; font-weight: 700; font-size: .9375rem; margin-block-end: 6px; }
.field .req { color: var(--green-dark); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font: inherit; background: var(--surface); color: var(--text); transition: border-color .15s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-error { color: #B3261E; font-size: .8125rem; margin-block-start: 6px; display: none; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #B3261E; }
.field.has-error .field-error { display: block; }
.form-status { display: none; padding: 14px 16px; border-radius: var(--radius-sm); margin-block-end: 20px; font-weight: 600; }
.form-status.is-success { display: block; background: var(--green-tint); color: var(--green-dark); }
.form-status.is-error { display: block; background: #FBEAE9; color: #8C1D18; }

/* ---- Filters --------------------------------------------------------------*/
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-block-end: 32px; }
.filter-btn {
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface);
  font-weight: 600; font-size: .875rem; cursor: pointer; transition: all .15s var(--ease);
}
.filter-btn:hover { border-color: var(--green); }
.filter-btn.is-active { background: var(--green); border-color: var(--green); color: #fff; }
[data-filterable][hidden] { display: none; }

/* ---- Footer ----------------------------------------------------------------*/
.site-footer { background: #10281B; color: #C7D9CD; padding-block: 56px 28px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-block-end: 14px; }
.footer-brand img { height: 38px; filter: brightness(0) invert(1); opacity: .95; }
.site-footer h4 { color: #fff; font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; margin-block-end: 16px; }
.site-footer ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer a:hover { color: #fff; }
.site-footer .desc { font-size: .9375rem; max-width: 34ch; }
.social-row { display: flex; gap: 10px; margin-block-start: 16px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; transition: all .15s var(--ease);
}
.social-row a:hover { background: var(--green); border-color: var(--green); }
.footer-bottom {
  border-block-start: 1px solid rgba(255,255,255,.12); margin-block-start: 40px; padding-block-start: 24px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: .8125rem;
}
.footer-bottom a:hover { color: #fff; }
.footer-links { display: flex; gap: 18px; flex-direction: row; }

/* ---- Misc utility -----------------------------------------------------------*/
.center { text-align: center; margin-inline: auto; }
.placeholder-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700;
  color: var(--taupe-dark); background: var(--taupe-tint); padding: 4px 10px; border-radius: 999px;
}
.two-col { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }
html[dir="rtl"] .two-col.reverse { direction: ltr; }
html[dir="rtl"] .two-col.reverse > * { direction: rtl; }

.logo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: stretch; }
@media (min-width: 640px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .logo-grid { grid-template-columns: repeat(4, 1fr); } }
.partner-tile {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: 20px 14px; display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; font-size: .875rem; color: var(--text-secondary); min-height: 92px;
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

.cta-band { text-align: center; }
.cta-band h2 { max-width: 30ch; margin-inline: auto; }
.cta-band p { max-width: 52ch; margin-inline: auto; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-block-start: 24px; }

.doc-card { display: flex; align-items: center; gap: 16px; }
.doc-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--taupe-tint);
  color: var(--taupe-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.doc-actions { display: flex; gap: 10px; margin-block-start: 12px; flex-wrap: wrap; }
