/* ==========================================================================
   ArchCo Child — Design Tokens & Components
   منبع توکن‌ها: design-system.md تیم طراحی (design-visual) — نسخه ۱.۳
   قانون: هیچ رنگ/فونت/فاصله‌ای در کامپوننت‌ها hardcode نشود؛ فقط var(--token).
   این فایل بعد از استایل والد (Avada) لود می‌شود؛ بنابراین با specificity پایین
   فقط متغیرها و کلاس‌های جدید را تعریف می‌کند و ظاهر موجود را نمی‌شکند.
   پیشوند کلاس‌های کامپوننت: «a-» (هم‌راستا با design-system.md، بدون تداخل با
   کلاس‌های fusion-* و awb-* قالب والد). توکن‌ها تنها در همین فایل تعریف می‌شوند.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1) توکن‌های طرح (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Brand — Petrol (آبی مهندسی) */
  --c-primary-50: #EAF2F5;
  --c-primary-100: #D2E3EA;
  --c-primary-200: #A6C7D4;
  --c-primary-300: #6FA3B6;
  --c-primary-400: #3F7E95;
  --c-primary-500: #1F5E77;
  --c-primary-600: #164B60;
  --c-primary-700: #123B4C;
  --c-primary-800: #0E2C39;
  --c-primary-900: #0A1F29;
  --c-primary: var(--c-primary-600);
  --c-primary-hover: var(--c-primary-700);

  /* Accent — Brass/Amber (فقط تأکید: آمار، آندرلاین، آیکون؛ نه پس‌زمینه دکمه اصلی) */
  --c-accent-100: #F7EBD6;
  --c-accent-300: #E2B96B;
  --c-accent-500: #C8862A;
  --c-accent-700: #8F5C16;

  /* Neutrals */
  --c-0: #FFFFFF;
  --c-25: #FAFBFC;
  --c-50: #F4F6F7;
  --c-100: #E8ECEE;
  --c-200: #D5DBDF;
  --c-300: #B6C0C6;
  --c-400: #8C99A1;
  --c-500: #67757E;
  --c-600: #4C5A63;
  --c-700: #35424A;
  --c-800: #222D34;
  --c-900: #0F161B;

  /* Text / surfaces */
  --c-text: #16232B;          /* 15:1 روی سفید */
  --c-text-muted: #56646D;    /* 6.1:1 روی سفید، 5.7:1 روی --c-50 → AA */
  --c-text-inverse: #F4F7F8;
  --c-bg: #FFFFFF;
  --c-bg-subtle: #F4F6F7;
  --c-bg-dark: #0E1A22;
  --c-border: #D5DBDF;
  --c-border-strong: #B6C0C6;

  /* Status */
  --c-success: #1E7A4D;
  --c-warning: #8F5C16;
  --c-error: #B42318;
  --c-info: var(--c-primary-600);

  /* Typography — فونت‌ها در functions.php فقط وقتی فایل woff2 موجود باشد
     با @font-face ثبت می‌شوند؛ در غیر این صورت fallback سیستم فعال است. */
  /* Estedad (SIL OFL) — فونت اصلی؛ بر پایهٔ آناتومی مدرن و فرم‌های هندسی، جايگزين وزيرمتن شد.
     Vazirmatn به‌عنوان fallback و برای حالت‌های بارگذاری‌نشده نگه داشته شده است. */
  --font-fa: "Estedad", "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-display: clamp(2rem, 4.5vw, 3.5rem);
  --lh-display: 1.12;
  --fs-h1: clamp(1.75rem, 3.2vw, 3rem);
  --lh-h1: 1.2;
  --fs-h2: clamp(1.5rem, 2.4vw, 2.25rem);
  --lh-h2: 1.3;
  --fs-h3: clamp(1.25rem, 1.8vw, 1.75rem);
  --lh-h3: 1.4;
  --fs-h4: 1.25rem;
  --lh-h4: 1.55;
  --fs-body-lg: 1.125rem;
  --lh-body: 1.9;   /* خط فارسی بلندتر */
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.8125rem;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --fw-black: 800;

  /* Spacing (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;
  --section-y: 96px;
  --section-y-mobile: 56px;

  /* Grid */
  --container-max: 1240px;
  --container-pad: 24px;
  --col-gap: 24px;
  --content-max: 720px;

  /* Radius / shadow / motion */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(15, 22, 27, 0.06);
  --shadow-sm: 0 2px 8px rgba(15, 22, 27, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 22, 27, 0.10);
  --shadow-focus: 0 0 0 3px rgba(31, 94, 119, 0.35);
  --dur-fast: 120ms;
  --dur: 200ms;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* حالت تاریک اختیاری (فاز بعد؛ با data-theme="dark" روی <html> فعال می‌شود) */
[data-theme="dark"] {
  --c-bg: #0B1418;
  --c-bg-subtle: #12202A;
  --c-text: #E8EEF1;
  --c-text-muted: #A9B8C0;
  --c-border: #243640;
  --c-border-strong: #33474F;
}

/* --------------------------------------------------------------------------
   2) پایه (Base) — حداقلی و محافظه‌کارانه برای هم‌زیستی با Avada
   -------------------------------------------------------------------------- */
/* پایه (Base) — محافظه‌کارانه برای هم‌زیستی با Avada.
   تایپوگرافی سراسری فقط وقتی اعمال می‌شود که کلاس `a-design` روی <body> باشد
   (کلید `design_base` در functions.php). این کار «فعال‌سازی تدریجی طرح» را ممکن
   می‌کند: اول کامپوننت‌های جدید در محدوده `.a-scope`، بعد کل سایت. */
body.a-design,
.a-scope,
.a-scope p,
.a-scope li,
.a-scope td,
.a-scope th,
.a-scope blockquote,
.a-scope label,
.a-scope figcaption {
  font-family: var(--font-fa);
}

/* ⚠️ رنگ متن فقط روی سطح ریشه تعریف می‌شود و به فرزندان ارث می‌رسد.
   اگر `color` روی `.a-scope p` یا `.a-scope h1..h6` تعریف شود (specificity 0,1,1)،
   رنگ‌های کامپوننتی تک‌کلاسی مثل `.a-card__text` (0,1,0)، `.a-project__title` و
   `.a-btn--primary` را بازنویسی می‌کند و متن روی زمینهٔ تیره نامرئی می‌شود.
   این ایراد در تست هارنس (۱۴۰۵/۰۹/۰۵) کشف و رفع شد. */
body.a-design,
.a-scope {
  color: var(--c-text);
  background-color: var(--c-bg);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* متن بدنه/لیست داخل .a-scope مستقل از کلید design_base (رفع ارث‌بری تایپوگرافی Avada) */
.a-scope p,
.a-scope li,
.a-scope blockquote,
.a-scope figcaption {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.a-scope h1,
.a-scope h2,
.a-scope h3,
.a-scope h4,
.a-scope h5,
.a-scope h6,
.a-scope .a-title {
  font-family: var(--font-fa);
  text-wrap: balance;
  margin-block: 0 var(--sp-4);
}

.a-scope h1,
.a-scope .a-h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: var(--fw-bold); }
.a-scope h2,
.a-scope .a-h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-bold); }
.a-scope h3,
.a-scope .a-h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-medium); }
.a-scope .a-display { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: var(--fw-black); }
.a-scope .a-lead { font-size: var(--fs-body-lg); line-height: var(--lh-body); color: var(--c-text-muted); max-width: 60ch; }
.a-scope .a-muted { color: var(--c-text-muted); }
.a-scope .a-small { font-size: var(--fs-sm); }
.a-scope .a-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* لینک‌ها با specificity صفر در :where تا هرگز رنگ دکمه/کارت را بازنویسی نکنند */
.a-scope :where(a) {
  color: var(--c-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease);
}
.a-scope :where(a):hover { color: var(--c-primary-hover); }

/* --------------------------------------------------------------------------
   2-ب) مدل جعبهٔ خودکفا (Box-sizing)
   مستقل از ریست قالب والد: بدون این قاعده اگر Avada ریست box-sizing ندهد،
   ارتفاع دکمه/فیلد (min-height + padding) از ۴۸px به ۷۴px می‌رسد و هدر را می‌شکند.
   -------------------------------------------------------------------------- */
[class^="a-"],
[class*=" a-"],
[class^="a-"] *,
[class*=" a-"] *,
.a-scope,
.a-scope *,
.a-scope *::before,
.a-scope *::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   3) چیدمان (Layout)
   -------------------------------------------------------------------------- */
.a-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.a-section {
  padding-block: var(--section-y);
}
.a-section--subtle { background: var(--c-bg-subtle); }
.a-section--dark {
  background: var(--c-bg-dark);
  color: var(--c-text-inverse);
}
.a-section--dark .a-title,
.a-section--dark h2,
.a-section--dark h3 { color: var(--c-text-inverse); }

.a-grid {
  display: grid;
  gap: var(--col-gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.a-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.a-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* --------------------------------------------------------------------------
   4) اجزا (Components)
   -------------------------------------------------------------------------- */

/* --- دکمه‌ها --- */
.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;                    /* هدف لمسی ≥44px (WCAG 2.5.5) */
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-fa);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.a-btn:active { transform: translateY(1px); }
.a-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.a-btn--primary {
  background: var(--c-primary);
  color: var(--c-text-inverse);
}
.a-btn--primary:hover {
  background: var(--c-primary-hover);
  color: var(--c-text-inverse);
}

.a-btn--secondary {
  background: transparent;
  border-color: var(--c-border-strong);
  color: var(--c-text);
}
.a-btn--secondary:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.a-btn--ghost {
  background: transparent;
  color: var(--c-primary);
  padding-inline: var(--sp-3);
}
.a-btn--ghost:hover { background: var(--c-primary-50); }

.a-btn--on-dark {
  background: transparent;
  border-color: var(--c-text-inverse);
  color: var(--c-text-inverse);
}
.a-btn--on-dark:hover { background: var(--c-text-inverse); color: var(--c-bg-dark); }

/* --- کارت خدمت --- */
.a-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--c-0);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.a-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.a-card__title { font-size: var(--fs-h3); font-weight: var(--fw-bold); margin: 0; }
.a-card__text { color: var(--c-text-muted); margin: 0; }
.a-card__link {
  margin-top: auto;
  font-weight: var(--fw-medium);
  text-decoration: none;
}
.a-card__icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--c-primary-50);
  color: var(--c-primary);
}

/* --- کارت پروژه --- */
.a-project {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--c-bg-subtle);
  text-decoration: none;
}
.a-project img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--dur) var(--ease);
}
.a-project:hover img { transform: scale(1.03); }
.a-project__body {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  padding: var(--sp-5);
  background: linear-gradient(to top, rgba(14, 26, 34, 0.94) 0%, rgba(14, 26, 34, 0.72) 45%, rgba(14, 26, 34, 0) 100%);
  color: var(--c-text-inverse);
}
.a-project__title {
  margin: 0;
  font-size: var(--fs-h3);
  color: var(--c-text-inverse);
  text-shadow: 0 1px 2px rgba(10, 20, 28, .45);
  /* عنوان‌های بلند فارسی در کارت پروژه: حداکثر دو خط */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.a-project__meta { margin: 0; font-size: var(--fs-sm); color: var(--c-primary-100); }

/* --- بلوک آمار --- */
.a-stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding-block: var(--sp-4);
  border-block-start: 2px solid var(--c-accent-500); /* لهجه به‌صورت خط، نه پس‌زمینه */
}
.a-stat__value {
  font-family: var(--font-mono);
  font-size: var(--fs-display);
  font-weight: var(--fw-black);
  line-height: 1;
  color: var(--c-text);
}
.a-stat--on-dark .a-stat__value { color: var(--c-text-inverse); }
/* لیبل آمار روی زمینهٔ تیره: خاکستری muted کنتراست کافی ندارد (۲٫۸۹:۱) */
.a-stat--on-dark .a-stat__label { color: var(--c-primary-100); }
.a-stat__label { color: var(--c-text-muted); font-size: var(--fs-sm); }

/* --- بردکرامب --- */
.a-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  list-style: none;
  margin: 0;
  padding: 0;
}
.a-breadcrumb li { display: inline-flex; align-items: center; gap: var(--sp-2); }
.a-breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--c-border-strong);
}
.a-breadcrumb [aria-current="page"] { color: var(--c-text); }

/* --- فرم --- */
.a-field { display: flex; flex-direction: column; gap: var(--sp-2); }
/* فیلدی که در فرم دوستونه باید تمام عرض بگیرد */
.a-field--full { grid-column: 1 / -1; }
.a-label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--c-text); }
.a-input,
.a-textarea,
.a-select {
  width: 100%;
  min-height: 48px;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  background: var(--c-0);
  color: var(--c-text);
  font-family: var(--font-fa);
  font-size: var(--fs-body);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.a-textarea { min-height: 140px; resize: vertical; }
.a-input::placeholder,
.a-textarea::placeholder { color: var(--c-400); }
.a-input:focus,
.a-textarea:focus,
.a-select:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: var(--shadow-focus);
}
.a-input[aria-invalid="true"],
.a-textarea[aria-invalid="true"] { border-color: var(--c-error); }
.a-error { color: var(--c-error); font-size: var(--fs-sm); }
.a-hint { color: var(--c-text-muted); font-size: var(--fs-xs); }

/* --- FAQ --- */
.a-faq { border-block-end: 1px solid var(--c-border); }
.a-faq__q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding-block: var(--sp-4);
  background: none;
  border: 0;
  font-family: var(--font-fa);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-medium);
  color: var(--c-text);
  text-align: start;
  cursor: pointer;
}
.a-faq__a { padding-block-end: var(--sp-4); color: var(--c-text-muted); }

/* --------------------------------------------------------------------------
   4-ب) هدر و هیرو — CSS در main.css، ساختار/شرط نمایش در Avada Layouts
   (کلاس‌ها از فیلد «CSS Class» همان Layout به عناصر داده می‌شوند)
   -------------------------------------------------------------------------- */

/* --- هدر ---
   ⚠️ `position: sticky` اینجا تعریف نمی‌شود؛ Avada sticky خودش `position: fixed` و
   کلاس `fusion-sticky-header` را اعمال می‌کند و sticky دوم باعث پرش layout می‌شود.
   ارتفاع تک‌منبع: ۷۲px دسکتاپ / ۶۴px موبایل (طبق design-system v1.3).
   نکته فاز بیلد: در حالت Transparent/Overlay اگر Avada اسکرول‌آفست تعریف کرد،
   روی همان Layout مقدار `min-height:0` (inline/CSS Class کمکی) لازم می‌شود — اینجا
   کلاس جدیدی اضافه نمی‌کنیم تا Class contract دست‌نخورده بماند. */
.a-header {
  min-height: 72px;
  background-color: var(--c-bg);
  box-shadow: var(--shadow-xs);
}
.a-header--transparent {
  background-color: transparent;
  box-shadow: none;
}
.a-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 72px; /* هم‌تراز با --header-h طراحی؛ محتوای هدر را عمودی وسط می‌کند */
}
.a-header__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.a-header__cta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-inline-start: auto;
}
@media (max-width: 1023px) {
  .a-header { min-height: 64px; }
  .a-header__inner { min-height: 64px; }
  /* موبایل: ناوبری و CTA در دراور Avada نمایش داده می‌شوند.
     اگر دراور سفارشی ساختید، این دو خط را حذف کنید. */
  .a-header__nav,
  .a-header__cta { display: none; }
}

/* --- هیرو ---
   سازگار با دو حالت: ۱) Container پس‌زمینه‌تصویری Avada روی .a-hero
   ۲) <img> جداگانه در .a-hero__media. اسکریم فقط با ::after و z-index:0
   تا .a-hero__content با z-index:1 بالای آن بماند. */
.a-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: min(88vh, 760px);
  background-color: var(--c-bg-dark); /* fallback پیش از بارگذاری تصویر */
  background-size: cover;
  background-position: center;
}
.a-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.a-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.a-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0; /* بالای تصویر، زیر محتوا */
  background: linear-gradient(
    to left,
    rgba(10, 31, 41, 0.72),
    rgba(10, 31, 41, 0.45) 55%,
    rgba(10, 31, 41, 0.25)
  );
  pointer-events: none;
}
/* اسکریم جهت‌آگاه: در RTL متن سمت راست و در LTR سمت چپ هیرو قرار می‌گیرد؛
   گرادیان باید به همان سمت غلیظ‌تر باشد وگرنه متن روی آسمان روشن کم‌کنتراست می‌شود. */
[dir=ltr] .a-hero::after {
  background: linear-gradient(
    to right,
    rgba(10, 31, 41, 0.72),
    rgba(10, 31, 41, 0.45) 55%,
    rgba(10, 31, 41, 0.25)
  );
}

.a-hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  padding-block: var(--sp-9);
  color: var(--c-text-inverse);
}
.a-hero__title {
  margin: 0 0 var(--sp-3);
  /* تیتر هیرو: اندازهٔ مهارشده و وزن ۷۰۰ تا در دسکتاپ حداکثر دو خط شود */
  font-size: clamp(1.75rem, 2.9vw, 2.625rem);
  line-height: 1.28;
  font-weight: var(--fw-bold);
  color: inherit;
}
.a-hero__lead {
  max-width: 60ch;
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  color: inherit;
}
.a-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* رفع تداخل specificity با قواعد عمومی `.a-scope h1` و `.a-scope p`
   (بدون این دو قاعده، عنوان و لید هیرو تیره روی تصویر تیره رندر می‌شدند). */
.a-hero .a-hero__title,
.a-hero .a-hero__lead {
  color: var(--c-text-inverse);
}
.a-hero .a-hero__lead {
  color: rgba(244, 247, 248, 0.92); /* کمی ملایم‌تر از عنوان، همچنان کنتراست AA */
}
@media (max-width: 767px) {
  .a-hero { min-height: min(72vh, 560px); }
  .a-hero__actions { flex-direction: column; }
  .a-hero__actions .a-btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   4-ج) کامپوننت‌های تکمیلی (طبق design-system.md §۷)
   این بخش شکاف «سند ۲۰ کامپوننت / کد ۱۰ کامپوننت» را می‌بندد تا فاز بیلد
   مجبور به اختراع استایل نشود. همه از توکن‌های موجود استفاده می‌کنند.
   -------------------------------------------------------------------------- */

/* --- ۷-۱ نوار ابزاری بالایی --- */
.a-utility {
  background: var(--c-primary-900);
  color: var(--c-primary-100);
  font-size: var(--fs-xs);
}
.a-utility__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 38px;
  flex-wrap: wrap;
}
.a-utility__list {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.a-utility :where(a) { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: var(--sp-2); }
.a-utility :where(a):hover { color: var(--c-0); text-decoration: underline; }
/* هدف لمسی حداقل ۲۴×۲۴ برای سوییچ زبان (WCAG 2.2 — 2.5.8) */
.a-utility .a-lang > * {
  min-width: 30px; min-height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  padding-inline: var(--sp-2);
}
.a-utility .a-lang { display: flex; gap: 2px; background: rgba(255, 255, 255, .1); border-radius: var(--radius-sm); padding: 2px; }
.a-utility .a-lang [aria-current="true"],
.a-utility .a-lang .is-active {
  background: var(--c-0); color: var(--c-primary-900); font-weight: var(--fw-bold);
  padding: 0 var(--sp-2); border-radius: var(--radius-xs);
}

/* --- ۷-۵ الگوی عنوان بخش --- */
.a-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-block-end: var(--sp-6);
  flex-wrap: wrap;
}
.a-section-head__text { max-width: 62ch; }
.a-section-head .a-h2 { margin-block: var(--sp-2) 0; }
.a-section-head .a-lead { margin-block: var(--sp-3) 0; }
.a-eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--c-accent-700); letter-spacing: .01em;
}
.a-eyebrow::before {
  content: ""; width: 24px; height: 2px; background: var(--c-accent-500); flex: none;
}
.a-section--dark .a-eyebrow { color: var(--c-accent-300); }

/* --- ۷-۹ نوار لوگوی کارفرمایان --- */
.a-clients {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: var(--sp-6) var(--sp-7);
  justify-content: center;
}
.a-clients__caption { flex: none; font-size: var(--fs-sm); color: var(--c-text-muted); }
.a-clients__item {
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--c-600); filter: grayscale(1); opacity: .85;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease), filter var(--dur) var(--ease);
}
.a-clients__item:hover { color: var(--c-primary); filter: none; opacity: 1; }
.a-clients__item img { max-height: 44px; width: auto; display: block; }

/* --- ۷-۱۰ بلوک اعتماد / ISO --- */
.a-trust {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.a-trust__item {
  background: var(--c-0);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: var(--sp-4);
  text-align: center;
}
.a-trust__item:hover { border-color: var(--c-primary-200); box-shadow: var(--shadow-xs); }
.a-trust__label { display: block; font-weight: var(--fw-bold); color: var(--c-text); font-size: var(--fs-sm); }
.a-trust__meta { display: block; color: var(--c-text-muted); font-size: var(--fs-xs); margin-block-start: 2px; }

/* --- ۷-۱۱ کارت تیم --- */
.a-team { display: flex; flex-direction: column; gap: var(--sp-3); }
.a-team__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--c-primary-50);
  display: grid; place-items: center;
}
.a-team__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.a-team__monogram {
  font-size: clamp(3rem, 7vw, 5rem); font-weight: var(--fw-black);
  color: var(--c-primary-300); letter-spacing: -.03em; line-height: 1;
}
.a-team__name { margin: 0; font-size: var(--fs-h4); font-weight: var(--fw-bold); }
.a-team__role { margin: 0; font-size: var(--fs-sm); color: var(--c-text-muted); }
.a-team__link { font-size: var(--fs-sm); text-decoration: none; }

/* --- ۷-۱۲ نظر کارفرما --- */
.a-testimonial {
  background: var(--c-0);
  border: 1px solid var(--c-border);
  border-inline-start: 3px solid var(--c-accent-500);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
}
.a-testimonial__quote {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  color: var(--c-text);
}
.a-testimonial__author { margin: 0; font-size: var(--fs-sm); color: var(--c-text-muted); }
.a-testimonial__author b { color: var(--c-text); font-weight: var(--fw-medium); }

/* --- ۷-۱۳ نوار CTA --- */
.a-cta-band {
  background: var(--c-bg-dark);
  color: var(--c-text-inverse);
  padding-block: var(--sp-9);
}
.a-cta-band__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-6); flex-wrap: wrap;
}
.a-cta-band .a-h2 { color: var(--c-text-inverse); margin: 0 0 var(--sp-2); }
.a-cta-band p { margin: 0; color: var(--c-primary-100); }
.a-cta-band__actions { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.a-cta-band__phone { color: var(--c-text-inverse); text-decoration: none; font-weight: var(--fw-medium); }

/* --- ۷-۱۵ فوتر --- */
.a-footer { background: var(--c-bg-dark); color: var(--c-primary-100); font-size: var(--fs-sm); }
.a-footer__inner { padding-block: var(--sp-8) var(--sp-6); }
.a-footer__grid {
  display: grid; gap: var(--sp-7);
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  padding-block-end: var(--sp-6);
}
.a-footer .a-h4,
.a-footer .a-footer__title,
.a-footer h5 { color: var(--c-text-inverse); font-size: var(--fs-body); margin: 0 0 var(--sp-4); font-weight: var(--fw-medium); }
.a-footer :where(a) { color: var(--c-primary-100); text-decoration: none; display: block; padding-block: 5px; }
.a-footer :where(a):hover { color: var(--c-0); text-decoration: underline; }
.a-footer p { margin: 0; line-height: var(--lh-body); max-width: 34ch; }
.a-footer__brand { display: flex; align-items: center; gap: var(--sp-3); margin-block-end: var(--sp-4); }
.a-footer__brand b { color: var(--c-0); font-size: var(--fs-body-lg); }
.a-footer__contact { display: flex; gap: var(--sp-2); align-items: start; padding-block: 5px; line-height: 1.8; }
.a-footer__contact svg { width: 15px; height: 15px; margin-block-start: 6px; flex: none; color: var(--c-accent-300); }
.a-footer__bottom {
  border-block-start: 1px solid rgba(255, 255, 255, .1);
  padding-block: var(--sp-4);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--c-300);
}
.a-footer__social { display: flex; gap: var(--sp-2); }
.a-footer__social a {
  width: 32px; height: 32px; display: grid; place-items: center; padding: 0;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-sm);
}
.a-footer__social a:hover { background: var(--c-0); color: var(--c-primary-900); border-color: var(--c-0); }
.a-footer__social svg { width: 14px; height: 14px; }

/* --- ۷-۱۸ نوار فیلتر (chip) --- */
.a-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.a-chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 36px; padding: var(--sp-1) var(--sp-4);
  border: 1px solid var(--c-border-strong); border-radius: var(--radius-pill);
  background: transparent; color: var(--c-text); font-family: var(--font-fa);
  font-size: var(--fs-sm); text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.a-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.a-chip[aria-current="true"],
.a-chip.is-active { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-text-inverse); }

/* --- ۷-۱۹ صفحه‌بندی --- */
.a-pager { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.a-pager__item {
  min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 var(--sp-3); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  color: var(--c-text); text-decoration: none; font-size: var(--fs-sm);
}
.a-pager__item:hover { border-color: var(--c-primary); color: var(--c-primary); }
.a-pager__item[aria-current="page"] { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-text-inverse); }

/* --- ۷-۲۰ بازگشت به بالا --- */
.a-to-top {
  position: fixed; inset-block-end: var(--sp-5); inset-inline-start: var(--sp-5);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--c-0); color: var(--c-primary); border: 1px solid var(--c-border);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-md); z-index: 40;
}
.a-to-top:hover { background: var(--c-primary); color: var(--c-0); }

/* --- مشخصات پروژه (Case study) --- */
.a-spec {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 0; padding: var(--sp-5);
  background: var(--c-bg-subtle);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}
.a-spec > div { display: flex; flex-direction: column; gap: 2px; }
.a-spec dt { font-size: var(--fs-xs); color: var(--c-text-muted); margin: 0; }
.a-spec dd { margin: 0; font-weight: var(--fw-medium); color: var(--c-text); }

/* --- فرآیند گام‌به‌گام --- */
.a-steps { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.a-steps__item { position: relative; padding-block-start: var(--sp-6); border-block-start: 2px solid var(--c-border); }
.a-steps__num {
  display: block; font-size: var(--fs-sm); font-weight: var(--fw-bold);
  color: var(--c-accent-700); margin-block-end: var(--sp-2);
}
.a-steps__title { margin: 0 0 var(--sp-2); font-size: var(--fs-h4); }
.a-steps__text { margin: 0; color: var(--c-text-muted); font-size: var(--fs-sm); }

/* --- گالری تصاویر پروژه --- */
.a-gallery { display: grid; gap: var(--sp-3); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.a-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); }
.a-gallery--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.a-gallery--wide img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

/* --- ریسپانسیو کامپوننت‌های تکمیلی --- */
@media (max-width: 1023px) {
  .a-footer__grid { grid-template-columns: 1fr 1fr; }
  .a-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .a-utility__inner { justify-content: center; padding-block: var(--sp-2); }
  .a-utility__list { flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
  .a-section-head { align-items: start; }
  .a-cta-band { padding-block: var(--sp-7); }
  .a-cta-band__inner { flex-direction: column; align-items: start; }
  .a-footer__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .a-footer__bottom { flex-direction: column; text-align: center; }
  .a-gallery, .a-gallery--wide { grid-template-columns: 1fr; }
  .a-to-top { inset-block-end: var(--sp-4); inset-inline-start: var(--sp-4); }
}

/* --- جدول‌های محتوایی (خدمات، مشخصات، مقالات) --- */
/* --- دکمهٔ گوتنبرگ (بلوک core/button) هم‌ظاهر با سیستم طراحی --- */
.a-scope .wp-block-buttons { margin-block: var(--sp-5); }
.a-scope .wp-block-button__link,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--c-primary);
  color: var(--c-text-inverse);
  font-family: var(--font-fa);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.a-scope .wp-block-button__link:hover,
.wp-block-button__link:hover { background: var(--c-primary-hover); color: var(--c-text-inverse); }
.a-scope .wp-block-button__link:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.a-table,
.a-scope .wp-block-table table,
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  margin-block: var(--sp-4);
}
.a-table th,
.a-scope .wp-block-table th,
.wp-block-table th {
  background: var(--c-bg-subtle);
  color: var(--c-text);
  font-weight: var(--fw-bold);
  text-align: start;
  padding: var(--sp-3) var(--sp-4);
  border-block-end: 2px solid var(--c-border);
  white-space: nowrap;
}
.a-table td,
.a-scope .wp-block-table td,
.wp-block-table td {
  padding: var(--sp-3) var(--sp-4);
  border-block-end: 1px solid var(--c-border);
  vertical-align: top;
  line-height: 1.8;
}
.a-table tbody tr:hover,
.a-scope .wp-block-table tbody tr:hover,
.wp-block-table tbody tr:hover { background: var(--c-25); }
/* اسکرول افقی جدول در موبایل (بدون شکستن چیدمان) */
.a-scope .wp-block-table,
.wp-block-table { max-width: 100%; overflow-x: auto; }

/* --------------------------------------------------------------------------
   5) ابزارهای کمکی / دسترس‌پذیری
   -------------------------------------------------------------------------- */
.a-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
/* لینک پرش به محتوا — نام رسمی در Class contract: `.a-skip` (نام قدیمی به‌عنوان alias حفظ شد) */
.a-skip,
.a-skip-link {
  position: absolute;
  inset-inline-start: var(--sp-4);
  inset-block-start: -100px;
  z-index: 9999;
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-primary);
  color: var(--c-text-inverse);
  border-radius: var(--radius-sm);
  transition: inset-block-start var(--dur-fast) var(--ease);
}
.a-skip:focus,
.a-skip-link:focus { inset-block-start: var(--sp-4); }

/* نام کوتاه جایگزین برای .a-visually-hidden (اختیاری) */
.a-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --------------------------------------------------------------------------
   6) واکنش‌گرایی (Responsive)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .a-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  :root {
    --section-y: var(--section-y-mobile);
    --container-pad: 16px;
  }
  .a-grid,
  .a-grid--2,
  .a-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .a-card { padding: var(--sp-4); }
  .a-hero__content { padding-block: var(--sp-7); }
}

/* --------------------------------------------------------------------------
   7) RTL
   -------------------------------------------------------------------------- */
[dir="rtl"] .a-project__body { text-align: start; }
[dir="rtl"] .a-breadcrumb li:not(:last-child)::after { content: "\2039"; } /* ‹ */

/* --------------------------------------------------------------------------
   8) چاپ (اختیاری، سبک)
   -------------------------------------------------------------------------- */
@media print {
  .a-section--dark { background: #fff !important; color: #000 !important; }
  .a-btn, .a-project__body { display: none !important; }
}


/* تصویر شاخص مطالعهٔ موردی — در همهٔ الگوهای صفحه یکسان */
.case-hero {
  display: block;
  width: 100%;
  max-height: 560px;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* لینک‌دار شدن کل کارت (هاب خدمات) */
.a-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease;
}
.a-card--link:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(10, 28, 38, .12); }

/* نوار آمار (درباره ما) */
.a-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--sp-5);
}

/* =============================================================================
   v1.5 — تایپوگرافی سراسری روی سایت زنده (اولویت قطعی)
   دلیل: افزونهٔ قدیمی فونت (parsi-font) با CSS پراولویت خود، فونت Vazir را روی
   body/تیترها اعمال می‌کرد و قاعدهٔ body.a-design را خنثی می‌ساخت.
   ========================================================================== */
body.a-design,
body.a-design .fusion-body,
body.a-design .fusion-wrapper,
body.a-design .fusion-title,
body.a-design h1,
body.a-design h2,
body.a-design h3,
body.a-design h4,
body.a-design h5,
body.a-design h6,
body.a-design p,
body.a-design li,
body.a-design a,
body.a-design button,
body.a-design input,
body.a-design select,
body.a-design textarea,
body.a-design .fusion-text,
body.a-design .fusion-post-content,
body.a-design .fusion-menu-item-text {
  font-family: var(--font-fa) !important;
}

/* =============================================================================
   v1.6 — پالایش هیرو برای صفحهٔ اصلی زنده (کارت‌های شیشه‌ای آمار)
   ========================================================================== */
.a-hero .a-stat {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-md, 12px);
  padding: var(--sp-4, 16px) var(--sp-5, 20px);
  backdrop-filter: blur(6px);
}
.a-hero .a-stats { gap: var(--sp-3, 12px); }
.a-hero__title { letter-spacing: -0.01em; }
.a-clients { gap: var(--sp-3, 12px); flex-wrap: wrap; }
