/* =========================================================================
   نمایندگی‌های ما — Style System
   فونت: Vazirmatn | جهت: راست‌چین | تم: روشن
   ========================================================================= */

/* ---------- 1. Design Tokens ------------------------------------------- */
:root {
  color-scheme: light;

  /* Brand */
  --brand-900: #201468;
  --brand-700: #3730c9;
  --brand-600: #4338ea;
  --brand-500: #5b52f5;
  --brand-400: #8b84f9;
  --brand-100: #ece9ff;
  --brand-50:  #f5f4ff;

  --glow-cyan: #22d3ee;
  --glow-violet: #c084fc;

  --accent-500: #f5a524;
  --accent-600: #e08e0b;
  --accent-100: #fef1da;

  --success-500: #16a34a;
  --success-100: #dcfce8;
  --danger-500: #e0333f;
  --danger-100: #fde3e3;

  /* Neutrals */
  --ink-950: #0d1023;
  --ink-900: #14172c;
  --ink-800: #262a45;
  --ink-600: #565b7d;
  --ink-500: #767c9c;
  --ink-300: #c3c7dd;
  --ink-200: #dfe1ef;
  --ink-100: #eceefa;
  --surface: #ffffff;
  --surface-alt: #f7f7fd;
  --bg: #fbfbfe;
  --border: #e6e7f5;

  /* Typography */
  --font-fa: "Vazirmatn", "Vazir", "Tahoma", sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --fs-4xl: 3.75rem;

  /* Spacing (4/8pt rhythm) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px; --sp-32: 128px;

  /* Shape & elevation */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 44, 0.06), 0 1px 1px rgba(20, 23, 44, 0.04);
  --shadow-md: 0 8px 24px -8px rgba(32, 20, 104, 0.16), 0 2px 8px rgba(20, 23, 44, 0.06);
  --shadow-lg: 0 24px 60px -16px rgba(32, 20, 104, 0.28), 0 8px 24px -8px rgba(20, 23, 44, 0.1);
  --shadow-glow: 0 0 0 1px rgba(91, 82, 245, 0.1), 0 20px 45px -18px rgba(67, 56, 234, 0.45);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 180ms;
  --dur-base: 320ms;
  --dur-slow: 560ms;

  --container: 1240px;
  --header-h: 76px;
}

/* ---------- 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
/* Without this, any element that also sets its own `display` (flex/grid
   cards, toolbars, …) silently wins over the UA default for [hidden] —
   author rules beat user-agent ones at equal specificity — so toggling
   `el.hidden` from JS stops actually hiding it. Keep [hidden] absolute. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font-fa);
  font-size: var(--fs-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; right: var(--sp-4); top: -60px;
  background: var(--ink-950); color: #fff;
  padding: var(--sp-3) var(--sp-5); border-radius: var(--radius-sm);
  z-index: 1000; transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); }

/* ---------- 3. Type scale ------------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em;
  color: var(--brand-700); background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-pill);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-500); }

.section-head { max-width: 640px; margin-bottom: var(--sp-12); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-title {
  font-size: clamp(1.6rem, 1.15rem + 1.8vw, var(--fs-2xl));
  font-weight: 800; color: var(--ink-950); margin-block: var(--sp-4) var(--sp-3);
  letter-spacing: -0.01em;
}
.section-desc { color: var(--ink-600); font-size: var(--fs-md); line-height: 1.85; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-weight: 700; font-size: var(--fs-sm); white-space: nowrap;
  padding: var(--sp-4) var(--sp-6); border-radius: var(--radius-pill);
  min-height: 48px; transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--brand-600), var(--brand-900));
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { box-shadow: 0 26px 55px -16px rgba(67, 56, 234, .55); transform: translateY(-2px); }
.btn-ghost { color: var(--ink-900); background: var(--surface); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--brand-400); color: var(--brand-700); }
.btn-accent { color: var(--ink-950); background: linear-gradient(135deg, var(--accent-500), var(--accent-600)); box-shadow: 0 18px 34px -14px rgba(224, 142, 11, .55); }
.btn-accent:hover { transform: translateY(-2px); }
.btn-lg { padding: var(--sp-5) var(--sp-8); font-size: var(--fs-md); min-height: 56px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* =========================================================================
   4. Header / Navigation
   ========================================================================= */
.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 500;
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
/* The blur lives on a pseudo-element (not .site-header itself) because a
   `filter`/`backdrop-filter` on an element makes it the containing block for
   fixed-position descendants — which would break .main-nav's viewport-relative
   full-height mobile panel below. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(251, 251, 254, .72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }

.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); }

.brand { display: flex; align-items: center; gap: var(--sp-3); font-weight: 800; font-size: var(--fs-md); color: var(--ink-950); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-900));
  display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-md);
}
.brand-mark svg { width: 22px; height: 22px; }

.main-nav { display: flex; }
.main-nav ul { display: flex; align-items: center; gap: var(--sp-2); }
.main-nav a {
  display: inline-flex; align-items: center; padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-600);
  transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--brand-700); background: var(--brand-50); }
.main-nav a.is-active { color: var(--brand-700); background: var(--brand-100); }

.header-cta { display: flex; align-items: center; gap: var(--sp-3); }
.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: var(--radius-sm);
  align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--surface);
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink-900); border-radius: 2px;
  position: relative; transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base);
}
.nav-toggle::before { position: absolute; transform: translateY(-6px); }
.nav-toggle::after { position: absolute; 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); }

/* =========================================================================
   5. Hero — راست: تیتر | چپ: نقشه
   ========================================================================= */
.hero {
  position: relative;
  padding-block: calc(var(--header-h) + var(--sp-16)) var(--sp-24);
  overflow: clip;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-bg .blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
  will-change: transform;
}
.hero-bg .blob-1 { width: 520px; height: 520px; top: -160px; left: -120px; background: radial-gradient(circle, var(--brand-400), transparent 70%); }
.hero-bg .blob-2 { width: 460px; height: 460px; bottom: -180px; right: -100px; background: radial-gradient(circle, var(--glow-cyan), transparent 70%); opacity: .35; }
.hero-bg .blob-3 { width: 360px; height: 360px; top: 30%; right: 20%; background: radial-gradient(circle, var(--glow-violet), transparent 70%); opacity: .3; }
.hero-bg .grid-fade {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--ink-100) 1px, transparent 1px), linear-gradient(90deg, var(--ink-100) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 10%, transparent 75%);
  opacity: .55;
}

/* عنوان و توضیحات در یک ردیف بالا (وسط‌چین)، نقشه در ردیف بعدی با عرض کامل
   و بزرگ‌تر — به‌جای چیدمان قبلیِ نصف‌نصفِ متن/نقشه کنار هم. */
.hero .container {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-12);
}
.hero-copy { flex: none; width: 100%; max-width: 62ch; text-align: center; }
.hero-map-wrap { flex: none; width: 100%; min-width: 0; }
.hero-actions, .hero-stats { justify-content: center; }
.hero-lead { margin-inline: auto; }

.hero-title {
  font-size: clamp(2.1rem, 1.3rem + 3vw, var(--fs-4xl));
  font-weight: 800; line-height: 1.28; letter-spacing: -0.015em;
  color: var(--ink-950); margin-block: var(--sp-5) var(--sp-6);
}
.hero-title .word { display: inline-block; }
.hero-title .accent-text {
  background: linear-gradient(100deg, var(--brand-600), var(--glow-violet) 60%, var(--accent-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: var(--fs-md); color: var(--ink-600); max-width: 46ch; margin-bottom: var(--sp-8); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-bottom: var(--sp-10); }

.hero-stats { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.hero-stats .stat { min-width: 110px; }
.hero-stats .stat b {
  display: block; font-size: var(--fs-2xl); font-weight: 800; color: var(--ink-950);
  font-variant-numeric: tabular-nums;
}
.hero-stats .stat span { color: var(--ink-600); font-size: var(--fs-sm); }

/* --- Map card --- */
.map-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-8); box-shadow: var(--shadow-lg);
  width: 100%;
}
.map-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); gap: var(--sp-3); }
.map-card-head h2 { font-size: var(--fs-md); font-weight: 700; color: var(--ink-900); }
.map-legend { display: flex; align-items: center; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--ink-600); flex-wrap: wrap; }
.map-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.map-legend .lg-item.active i { background: var(--brand-500); }
.map-legend .lg-item.empty i { background: var(--ink-200); border: 1px solid var(--ink-300); }

.iran-map-figure { position: relative; }
/* Scoped to #iranMap (the fetched map's mount point) and not the wider
   .iran-map-figure, so these rules never leak into the tooltip's own
   small icon <svg>s, which live in a sibling of #iranMap. */
#iranMap svg { width: 100%; height: auto; overflow: visible; }
#iranMap path {
  fill: var(--ink-200);
  stroke: var(--surface);
  stroke-width: 1.4;
  cursor: pointer;
  /* Skip the double-tap-to-zoom delay so a tap's pointerup fires promptly;
     panning/scrolling through the map is still allowed (unlike touch-action: none). */
  touch-action: manipulation;
  transition: fill var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out);
}
#iranMap path[data-has-rep="true"] { fill: var(--brand-400); }
/* No transform/scale here on purpose: scaling a path on :hover moves its own
   rendered edges, which — for a shape whose boundary sits close to the
   cursor after scaling around its fill-box center (true for most of these
   irregular province outlines) — can push that exact pixel back outside the
   shape, dropping :hover, un-scaling, and re-entering it again: an infinite
   hover/leave flicker with the mouse perfectly still, which reads as "the
   tooltip doesn't work" on desktop. drop-shadow is a purely visual filter —
   it never changes hit-testing — so it gives the same "lifted" feedback
   with zero risk of feeding back into :hover. */
#iranMap path:hover,
#iranMap path:focus-visible,
#iranMap path.is-active {
  fill: var(--brand-600);
  filter: drop-shadow(0 2px 5px rgba(17, 24, 39, .35));
  outline: none;
}
#iranMap path[data-has-rep="false"]:hover,
#iranMap path[data-has-rep="false"].is-active { fill: var(--accent-500); }

/* Province name labels, drawn as a <g> appended after the paths so they sit
   on top of every fill state. A white halo (stroke under the fill) keeps
   the dark navy text legible whether it's sitting on the light "no rep"
   gray or the brand-colored "has rep" fill. */
#iranMap .map-labels { direction: rtl; }
#iranMap .map-label,
#iranMap .map-label tspan {
  font-family: var(--font-fa);
  font-weight: 700;
  fill: var(--ink-900);
  paint-order: stroke fill;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2.25px;
  stroke-linejoin: round;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  user-select: none;
}

/* Numbered "pin" markers — one per province with an active representative,
   showing its count at a glance (see addProvinceMarkers in main.js). Sits
   above the name label, both drawn as a group so the load-in bounce
   animation scales from the pin's tip (its "planted" point on the map). */
#iranMap .map-pins { pointer-events: none; }
#iranMap .map-pin { transform-box: fill-box; transform-origin: center; }
#iranMap .map-pin-head {
  fill: var(--danger-500);
  stroke: #fff;
  stroke-width: 1.4px;
}
#iranMap .map-pin-tail { fill: var(--danger-500); }
#iranMap .map-pin-count {
  font-family: var(--font-fa);
  font-weight: 800;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: central;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.map-note { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-4); color: var(--ink-500); font-size: var(--fs-xs); }
.map-note svg { width: 16px; height: 16px; flex: none; color: var(--brand-600); }

/* Tooltip */
.map-tooltip {
  position: absolute; z-index: 20; min-width: 220px; max-width: 260px;
  background: var(--ink-950); color: #fff; border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-lg);
  pointer-events: none; opacity: 0; transform: translate(-50%, -12px) scale(.92);
  transition: opacity var(--dur-fast) var(--ease-spring), transform var(--dur-fast) var(--ease-spring);
  left: 0; top: 0;
}
.map-tooltip.is-visible { opacity: 1; transform: translate(-50%, -18px) scale(1); pointer-events: auto; }
.map-tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; translate: -50% 0;
  border: 7px solid transparent; border-top-color: var(--ink-950);
}
.map-tooltip .tt-name { font-weight: 700; font-size: var(--fs-sm); margin-bottom: 2px; }
.map-tooltip .tt-count { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--brand-100); margin-bottom: var(--sp-3); }
.map-tooltip .tt-count b { color: #fff; font-variant-numeric: tabular-nums; }
.map-tooltip .tt-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700;
  color: var(--ink-950); background: #fff; padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-pill);
  width: 100%; justify-content: center; min-height: 40px; transition: transform var(--dur-fast) var(--ease-out);
}
.map-tooltip.state-empty .tt-link { background: var(--accent-500); color: var(--ink-950); }
.map-tooltip .tt-link:hover { transform: translateY(-1px); }
.map-tooltip .tt-link svg { width: 14px; height: 14px; }

/* =========================================================================
   6. Marquee / Trust strip
   ========================================================================= */
.trust-strip { padding-block: var(--sp-8); border-block: 1px solid var(--border); background: var(--surface-alt); overflow: hidden; }
.trust-strip .marquee { display: flex; gap: var(--sp-16); width: max-content; animation: marquee 28s linear infinite; }
.trust-strip .marquee span { font-weight: 700; color: var(--ink-500); font-size: var(--fs-sm); white-space: nowrap; display: inline-flex; align-items: center; gap: var(--sp-3); }
.trust-strip .marquee span svg { width: 18px; height: 18px; color: var(--brand-500); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .trust-strip .marquee { animation: none; overflow-x: auto; } }

/* =========================================================================
   7. Generic section spacing
   ========================================================================= */
.section { padding-block: var(--sp-24); }
.section-alt { background: var(--surface-alt); }
.reveal { opacity: 0; transform: translateY(28px); }
.js-ready .reveal { transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* =========================================================================
   8. Benefits grid
   ========================================================================= */
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--sp-6); }
.benefit-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-8); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.benefit-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--brand-100); }
.benefit-icon {
  width: 56px; height: 56px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); color: var(--brand-700);
  margin-bottom: var(--sp-5);
}
.benefit-icon svg { width: 28px; height: 28px; }
.benefit-card h3 { font-size: var(--fs-md); font-weight: 700; color: var(--ink-950); margin-bottom: var(--sp-2); }
.benefit-card p { color: var(--ink-600); font-size: var(--fs-sm); line-height: 1.85; }

/* =========================================================================
   9. Process steps
   ========================================================================= */
.process-list { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); counter-reset: step; }
.process-list::before {
  content: ""; position: absolute; top: 34px; right: 12.5%; left: 12.5%; height: 2px;
  background: repeating-linear-gradient(to left, var(--brand-200, var(--brand-100)) 0 10px, transparent 10px 18px);
}
.process-step { position: relative; background: transparent; text-align: center; }
.process-num {
  width: 68px; height: 68px; margin-inline: auto var(--sp-5); border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: var(--fs-lg);
  background: var(--surface); border: 2px solid var(--brand-200, var(--brand-100)); color: var(--brand-700);
  box-shadow: var(--shadow-sm); position: relative; z-index: 1;
}
.process-step:nth-child(1) .process-num { background: linear-gradient(135deg, var(--brand-500), var(--brand-900)); color: #fff; border-color: transparent; }
.process-step h3 { font-size: var(--fs-md); font-weight: 700; margin-bottom: var(--sp-2); color: var(--ink-950); }
.process-step p { font-size: var(--fs-sm); color: var(--ink-600); }

/* =========================================================================
   10. Testimonials
   ========================================================================= */
.testimonial-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.testimonial-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-8); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: var(--sp-4);
}
.testimonial-card .stars { display: flex; gap: 2px; color: var(--accent-500); }
.testimonial-card .stars svg { width: 16px; height: 16px; }
.testimonial-card p { color: var(--ink-800); font-size: var(--fs-sm); line-height: 1.9; }
.testimonial-person { display: flex; align-items: center; gap: var(--sp-3); margin-top: auto; }
.testimonial-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand-500), var(--glow-violet));
}
.testimonial-person b { display: block; font-size: var(--fs-sm); color: var(--ink-950); }
.testimonial-person span { font-size: var(--fs-xs); color: var(--ink-500); }

/* =========================================================================
   11. Application form (multi-step)
   ========================================================================= */
.form-shell {
  max-width: 760px; margin-inline: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.form-progress { padding: var(--sp-8) var(--sp-8) 0; }
.progress-track { display: flex; align-items: center; gap: var(--sp-2); }
.progress-step {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); text-align: center;
}
.progress-step .bullet {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink-100); color: var(--ink-500); font-weight: 700; font-size: var(--fs-sm);
  border: 2px solid transparent; transition: all var(--dur-base) var(--ease-spring);
}
.progress-step .label { font-size: var(--fs-xs); color: var(--ink-500); font-weight: 600; }
.progress-line { flex: 1; height: 2px; background: var(--ink-100); margin-top: -22px; position: relative; }
.progress-step.is-done .bullet { background: var(--success-500); color: #fff; }
.progress-step.is-current .bullet { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; box-shadow: 0 0 0 6px var(--brand-50); }
.progress-step.is-current .label, .progress-step.is-done .label { color: var(--ink-900); }
.progress-step.is-done ~ .progress-line,
.progress-line.is-done { background: var(--success-500); }

.form-body { padding: var(--sp-8); }
.form-step { display: none; }
.form-step.is-active { display: block; animation: stepIn var(--dur-base) var(--ease-out); }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.step-heading { margin-bottom: var(--sp-6); }
.step-heading h3 { font-size: var(--fs-lg); font-weight: 800; color: var(--ink-950); margin-bottom: var(--sp-1); }
.step-heading p { color: var(--ink-600); font-size: var(--fs-sm); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.field.span-2 { grid-column: 1 / -1; }
.field label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-800); }
.field label .req { color: var(--danger-500); margin-inline-start: 2px; }
.field .hint { font-size: var(--fs-xs); color: var(--ink-500); }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4); background: var(--surface-alt); font-size: var(--fs-sm);
  min-height: 48px; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-300); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-500); background: var(--surface);
  box-shadow: 0 0 0 4px var(--brand-50);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger-500); background: var(--danger-100); }
.field-error { display: none; align-items: center; gap: 6px; color: var(--danger-500); font-size: var(--fs-xs); font-weight: 600; }
.field-error svg { width: 14px; height: 14px; flex: none; }
.field.has-error .field-error { display: flex; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); }
.choice-card { position: relative; }
.choice-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice-card .box {
  display: flex; align-items: center; gap: var(--sp-3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: var(--sp-4); font-size: var(--fs-sm); font-weight: 600;
  transition: all var(--dur-fast) var(--ease-out); background: var(--surface-alt);
}
.choice-card .box svg { width: 20px; height: 20px; color: var(--brand-600); flex: none; }
.choice-card input:checked + .box { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-100); }
.choice-card input:focus-visible + .box { outline: 3px solid var(--brand-500); outline-offset: 2px; }

.upload-box {
  border: 1.5px dashed var(--ink-300); border-radius: var(--radius-md); padding: var(--sp-8);
  text-align: center; background: var(--surface-alt); cursor: pointer; position: relative;
  transition: border-color var(--dur-fast), background-color var(--dur-fast);
}
.upload-box:hover, .upload-box.is-dragover { border-color: var(--brand-500); background: var(--brand-50); }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-box svg { width: 34px; height: 34px; color: var(--brand-600); margin-inline: auto; margin-bottom: var(--sp-3); }
.upload-box .file-name { margin-top: var(--sp-3); font-size: var(--fs-xs); font-weight: 700; color: var(--brand-700); }

.check-row { display: flex; align-items: flex-start; gap: var(--sp-3); background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-4); }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand-600); flex: none; }
.check-row label { font-size: var(--fs-sm); color: var(--ink-700); }
.check-row a { color: var(--brand-700); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.form-submit-error {
  display: flex; align-items: flex-start; gap: var(--sp-2); margin-top: var(--sp-4);
  background: var(--danger-100); color: #7a1c22; border-radius: var(--radius-sm);
  padding: var(--sp-4); font-size: var(--fs-sm); font-weight: 600;
}
.form-submit-error svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.review-summary { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.review-item { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-4); }
.review-item span { display: block; font-size: var(--fs-xs); color: var(--ink-500); margin-bottom: 2px; }
.review-item b { font-size: var(--fs-sm); color: var(--ink-950); }

.form-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-8); }
.form-actions .spacer { flex: 1; }

.form-success { display: none; padding: var(--sp-16) var(--sp-8); text-align: center; }
.form-success.is-active { display: block; animation: stepIn var(--dur-slow) var(--ease-spring); }
.success-icon {
  width: 84px; height: 84px; border-radius: 50%; margin-inline: auto var(--sp-6);
  display: grid; place-items: center; background: var(--success-100); color: var(--success-500);
}
.success-icon svg { width: 40px; height: 40px; }
.form-success h3 { font-size: var(--fs-xl); font-weight: 800; margin-bottom: var(--sp-3); color: var(--ink-950); }
.form-success p { color: var(--ink-600); max-width: 44ch; margin-inline: auto; margin-bottom: var(--sp-8); }

/* =========================================================================
   12. FAQ accordion
   ========================================================================= */
.faq-list { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--sp-3); }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6); font-weight: 700; font-size: var(--fs-sm); color: var(--ink-900); text-align: right;
}
.faq-q .chev { width: 20px; height: 20px; flex: none; transition: transform var(--dur-base) var(--ease-spring); color: var(--brand-600); }
.faq-item.is-open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur-base) var(--ease-out); }
.faq-a-inner { padding: 0 var(--sp-6) var(--sp-5); color: var(--ink-600); font-size: var(--fs-sm); line-height: 1.9; }

/* =========================================================================
   13. CTA banner
   ========================================================================= */
.cta-banner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; padding: var(--sp-16);
  background: linear-gradient(120deg, var(--brand-900), var(--brand-600) 60%, var(--glow-violet));
  text-align: center; color: #fff;
}
.cta-banner::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 40%), radial-gradient(circle at 85% 75%, rgba(255,255,255,.14), transparent 45%);
}
.cta-banner > * { position: relative; }
.cta-banner h2 { font-size: var(--fs-2xl); font-weight: 800; margin-bottom: var(--sp-3); }
.cta-banner p { color: rgba(255,255,255,.85); max-width: 52ch; margin-inline: auto; margin-bottom: var(--sp-8); }
.cta-banner .btn-primary { background: #fff; color: var(--brand-800, var(--brand-700)); box-shadow: 0 20px 40px -18px rgba(0,0,0,.4); }

/* =========================================================================
   14. Footer
   ========================================================================= */
.site-footer { background: var(--surface-alt); border-top: 1px solid var(--border); position: relative; overflow: hidden; }
.footer-wave { display: block; width: 100%; height: 64px; margin-top: -1px; color: var(--surface-alt); }
.footer-top { padding-block: var(--sp-16); display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--sp-10); }
.footer-brand p { color: var(--ink-600); font-size: var(--fs-sm); margin-block: var(--sp-4); max-width: 34ch; }
.footer-col h4 { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-950); margin-bottom: var(--sp-4); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer-col a { color: var(--ink-600); font-size: var(--fs-sm); transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--brand-700); }
.footer-contact li { display: flex; align-items: flex-start; gap: var(--sp-3); color: var(--ink-600); font-size: var(--fs-sm); }
.footer-contact svg { width: 18px; height: 18px; flex: none; color: var(--brand-600); margin-top: 2px; }
.social-row { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--ink-700);
  transition: all var(--dur-fast) var(--ease-out);
}
.social-row a:hover { background: var(--brand-600); color: #fff; border-color: transparent; transform: translateY(-3px); }
.social-row svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-block: var(--sp-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--ink-500);
}
.footer-bottom-links { display: flex; gap: var(--sp-5); }
.footer-bottom-links a:hover { color: var(--brand-700); }

.to-top {
  position: fixed; inset-inline-end: var(--sp-6); bottom: var(--sp-6); z-index: 400;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink-950); color: #fff; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: all var(--dur-base) var(--ease-spring);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top svg { width: 20px; height: 20px; }

/* =========================================================================
   15. Representatives listing page (representatives.html)
   ========================================================================= */
.reps-hero {
  position: relative; padding-block: calc(var(--header-h) + var(--sp-12)) var(--sp-16);
  background: linear-gradient(180deg, var(--brand-50), var(--bg) 70%);
  overflow: clip;
}
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-500); margin-bottom: var(--sp-6); }
.breadcrumb a { color: var(--ink-500); transition: color var(--dur-fast); }
.breadcrumb a:hover { color: var(--brand-700); }
.breadcrumb .sep { width: 14px; height: 14px; color: var(--ink-300); flex: none; }
.breadcrumb .current { color: var(--ink-900); font-weight: 700; }

.reps-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-8); flex-wrap: wrap; }
.reps-title-row { display: flex; align-items: center; gap: var(--sp-4); }
.reps-title-row .province-pin {
  width: 56px; height: 56px; border-radius: var(--radius-md); flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-900)); color: #fff; box-shadow: var(--shadow-md);
}
.reps-title-row .province-pin svg { width: 28px; height: 28px; }
.reps-title h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, var(--fs-2xl)); font-weight: 800; color: var(--ink-950); }
.reps-title p { color: var(--ink-600); font-size: var(--fs-sm); margin-top: 2px; }

.reps-stats { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.reps-stat-chip {
  display: flex; align-items: center; gap: var(--sp-3); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-5); box-shadow: var(--shadow-sm);
}
.reps-stat-chip svg { width: 20px; height: 20px; color: var(--brand-600); flex: none; }
.reps-stat-chip b { display: block; font-size: var(--fs-md); font-weight: 800; color: var(--ink-950); font-variant-numeric: tabular-nums; }
.reps-stat-chip span { font-size: var(--fs-xs); color: var(--ink-500); }

/* Toolbar: search + filters */
.reps-toolbar {
  display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-8);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--sp-3); box-shadow: var(--shadow-sm);
}
.reps-search { position: relative; flex: 1 1 240px; }
.reps-search svg {
  position: absolute; inset-inline-start: var(--sp-4); top: 50%; translate: 0 -50%;
  width: 18px; height: 18px; color: var(--ink-500); pointer-events: none;
}
.reps-search input {
  width: 100%; border: 1.5px solid transparent; background: var(--surface-alt); border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4); padding-inline-start: calc(var(--sp-4) * 2 + 18px);
  font-size: var(--fs-sm); min-height: 48px; transition: border-color var(--dur-fast), background-color var(--dur-fast);
}
.reps-search input:focus { outline: none; border-color: var(--brand-500); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-50); }
/* AJAX-in-flight indicator for a live search box (all-representatives.html)
   — sits on the opposite side from the search icon so it never overlaps
   typed text, and is purely visual (no layout shift when it appears). */
.reps-search-spinner {
  position: absolute; inset-inline-end: var(--sp-4); top: 50%; translate: 0 -50%;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--brand-100); border-top-color: var(--brand-600);
  animation: reps-spin .7s linear infinite;
}
@keyframes reps-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .reps-search-spinner { animation: none; } }
.reps-toolbar select {
  flex: 1 1 170px; border: 1.5px solid transparent; background: var(--surface-alt); border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); min-height: 48px; color: var(--ink-800);
  transition: border-color var(--dur-fast);
}
.reps-toolbar select:focus { outline: none; border-color: var(--brand-500); }

/* Grid + cards */
.reps-results-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.reps-results-bar p { color: var(--ink-600); font-size: var(--fs-sm); }
.reps-results-bar b { color: var(--ink-950); font-variant-numeric: tabular-nums; }
.reps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-6); }

/* Per-province sections on the "همه نمایندگان" directory
   (all-representatives.html) — a heading followed by that province's own
   .reps-grid, repeated once per province present in the current results. */
.reps-group { margin-bottom: var(--sp-12); }
.reps-group:last-child { margin-bottom: 0; }
.reps-group-title {
  display: flex; align-items: baseline; gap: var(--sp-3); flex-wrap: wrap;
  margin-bottom: var(--sp-5); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border);
}
.reps-group-name { font-size: var(--fs-lg); font-weight: 800; color: var(--ink-950); }
.reps-group-count { font-size: var(--fs-sm); color: var(--ink-500); font-variant-numeric: tabular-nums; }

.rep-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-6); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: var(--sp-4);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.rep-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-100); }
.rep-card-head { display: flex; align-items: center; gap: var(--sp-3); }
.rep-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: var(--fs-md); color: #fff; background: linear-gradient(135deg, var(--brand-500), var(--glow-violet));
}
.rep-card-head h3 { font-size: var(--fs-md); font-weight: 700; color: var(--ink-950); }
.rep-badge {
  display: inline-flex; align-items: center; margin-top: 4px; font-size: var(--fs-xs); font-weight: 600;
  color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-100);
  padding: 2px var(--sp-3); border-radius: var(--radius-pill);
}
.rep-meta { display: flex; flex-direction: column; gap: var(--sp-2); }
.rep-meta li { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--ink-600); }
.rep-meta svg { width: 16px; height: 16px; flex: none; color: var(--ink-400, var(--ink-500)); margin-top: 2px; }
.rep-actions { display: flex; gap: var(--sp-3); margin-top: auto; padding-top: var(--sp-2); }
.rep-actions .btn { flex: 1; padding-block: var(--sp-3); font-size: var(--fs-xs); }

/* Empty / no-match states */
.reps-empty {
  max-width: 560px; margin-inline: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--sp-10); text-align: center; box-shadow: var(--shadow-md);
}
.reps-empty .reps-empty-icon {
  width: 64px; height: 64px; border-radius: 50%; margin-inline: auto var(--sp-5); display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-600);
}
.reps-empty .reps-empty-icon svg { width: 30px; height: 30px; }
.reps-empty h2 { font-size: var(--fs-lg); font-weight: 800; color: var(--ink-950); margin-bottom: var(--sp-3); }
.reps-empty p { color: var(--ink-600); margin-bottom: var(--sp-8); }
.reps-empty .btn-row { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

/* =========================================================================
   16. Responsive
   ========================================================================= */
@media (max-width: 1080px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .testimonial-track { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 40;
    background: var(--surface); padding: var(--sp-6); box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform var(--dur-base) var(--ease-out), opacity calc(var(--dur-base) * 0.6) linear, visibility 0s linear var(--dur-base);
    visibility: hidden;
  }
  .main-nav.is-open {
    transform: translateY(0); opacity: 1; pointer-events: auto; visibility: visible;
    transition: transform var(--dur-base) var(--ease-out), opacity calc(var(--dur-base) * 0.6) linear;
  }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: var(--sp-1); }
  .main-nav a { padding: var(--sp-4); font-size: var(--fs-md); }
  .nav-toggle { display: inline-flex; }
  .header-cta .btn span { display: none; }

  /* چیدمان ستون/وسط‌چین هیرو دیگر اینجا نیست — از این پس پیش‌فرض همه‌ی
     اندازه‌هاست (نقشه در ردیف کامل، متن بالای آن)، نه فقط موبایل. */

  .process-list { grid-template-columns: 1fr 1fr; }
  .process-list::before { display: none; }
  .field-grid { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: 1fr; }

  .reps-hero-top { flex-direction: column; align-items: flex-start; }
  .reps-stats { width: 100%; }
  .reps-stat-chip { flex: 1; }
}

@media (max-width: 720px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .testimonial-track { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: var(--sp-8); }
  .process-list { grid-template-columns: 1fr; }
  .cta-banner { padding: var(--sp-10) var(--sp-5); }
  :root { --header-h: 68px; }

  .reps-grid { grid-template-columns: 1fr; }
  .reps-toolbar select { flex-basis: 100%; }
}

@media (max-width: 480px) {
  .container { padding-inline: var(--sp-4); }
  .form-body, .form-progress { padding-inline: var(--sp-5); }
  .progress-step .label { display: none; }
  .form-actions { flex-wrap: wrap; }
}
