/* ==========================================================================
   جامعه ایرانی — سیستم طراحی «هفت‌رنگ»
   اطلس فرهنگی: هزار نقش، یک سرزمین
   RTL-first · logical properties · یک فایل، بدون وابستگی
   --------------------------------------------------------------------------
   فهرست:
     ۰۱ فونت‌ها
     ۰۲ توکن‌ها و پالت هفت‌رنگ
     ۰۳ ریست و پایه
     ۰۴ نقوش (SVG)
     ۰۵ دکمه‌ها و لینک‌ها
     ۰۶ سربرگ و ناوبری
     ۰۷ قهرمان (دیوار کاشی)
     ۰۸ بخش‌های عمومی و سربرگ صفحه
     ۰۹ رسانه و تصویر
     ۱۰ کارت‌ها (دروازه، پهنه، آیتم، جستار، ژرف، خبر)
     ۱۱ نقشهٔ پهنه‌ها
     ۱۲ بیت و نقل‌قول
     ۱۳ متن خواندنی (مقاله)
     ۱۴ پروفایل دانشنامه‌ای گروه‌ها
     ۱۵ فهرست‌های ویژه (شنیدن، گفتار، مقالات، چهره‌ها، اعتبار)
     ۱۶ ۴۰۴
     ۱۷ فوتر
     ۱۸ نمایش تدریجی (reveal)
     ۱۹ واکنش‌گرایی
   ========================================================================== */

/* ==========================================================================
   ۰۱ — فونت‌ها
   ========================================================================== */
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("../fonts/Estedad-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("../fonts/Estedad-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Estedad"; src: url("../fonts/Estedad-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

/* ==========================================================================
   ۰۲ — توکن‌ها و پالت هفت‌رنگ
   هر صفحه با data-theme و هر کارت با data-accent، رنگ‌های --a* را می‌گیرد.
   ========================================================================== */
:root {
  /* بوم */
  --c-bg: #FAF7F1;
  --c-bg-deep: #F3EEE3;
  --c-surface: #FFFFFF;
  --c-surface-alt: #F5F1E8;
  --c-text: #1E2422;
  --c-muted: #5A6470;
  --c-border: #E5DFD2;
  --c-border-soft: #EFEADF;
  --c-ink-deep: #0B2A2A;

  /* رنگ پایهٔ نشان (فیروزه) */
  --c-primary: #0E7C7B;
  --c-primary-dark: #0A5E5D;
  --c-primary-light: #E3F2F1;
  --c-gold: #C8871A;
  --c-gold-soft: #F4E4C4;

  /* پالت هفت‌رنگ — پیش‌فرض فیروزه */
  --a: #0E7C7B;
  --a-dark: #0A5E5D;
  --a-deep: #073F3E;
  --a-soft: #E2F1F0;
  --a-tint: #F2FAF9;

  /* تایپوگرافی */
  --font: "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-head: "Estedad", "Vazirmatn", Tahoma, sans-serif;
  --fs-base: 17px;
  --lh: 1.95;

  /* شکل */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 30px; --r-pill: 999px;
  --sh-sm: 0 1px 4px rgba(30,36,34,.05), 0 2px 12px rgba(30,36,34,.04);
  --sh-md: 0 6px 22px rgba(30,36,34,.09);
  --sh-lg: 0 16px 44px rgba(11,42,42,.16);
  --sh-a: 0 12px 32px color-mix(in srgb, var(--a) 22%, transparent);

  /* چیدمان */
  --container: 1200px;
  --reading: 740px;
  --gap: 26px;
  --sec-pad: 72px;
  --header-h: 74px;
}

/* --- هفت رنگ --- */
[data-theme="firoozeh"], [data-accent="firoozeh"] { --a:#0E7C7B; --a-dark:#0A5E5D; --a-deep:#073F3E; --a-soft:#E2F1F0; --a-tint:#F2FAF9; }
[data-theme="lajvard"],  [data-accent="lajvard"]  { --a:#2F5299; --a-dark:#233E76; --a-deep:#16264A; --a-soft:#E4EAF7; --a-tint:#F3F6FC; }
[data-theme="zafaran"],  [data-accent="zafaran"]  { --a:#B87A12; --a-dark:#8C5E0E; --a-deep:#5A3C08; --a-soft:#F8EBD1; --a-tint:#FDF7EC; }
[data-theme="khesht"],   [data-accent="khesht"]   { --a:#A2662C; --a-dark:#7C4C1D; --a-deep:#4E3013; --a-soft:#F3E7D8; --a-tint:#FBF5EE; }
[data-theme="mes"],      [data-accent="mes"]      { --a:#BE5535; --a-dark:#943E24; --a-deep:#5D2716; --a-soft:#F7E5DE; --a-tint:#FDF4F1; }
[data-theme="sarv"],     [data-accent="sarv"]     { --a:#2E7D4F; --a-dark:#215C39; --a-deep:#133823; --a-soft:#E1F0E7; --a-tint:#F2F9F5; }
[data-theme="anar"],     [data-accent="anar"]     { --a:#AF3049; --a-dark:#872338; --a-deep:#521523; --a-soft:#F7E1E6; --a-tint:#FDF3F5; }

/* ==========================================================================
   ۰۳ — ریست و پایه
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: var(--fs-base);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-block-start: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  line-height: var(--lh);
  color: var(--c-text);
  background: var(--c-bg);
  font-feature-settings: "ss01" 1;           /* ارقام فارسی */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  overflow-x: clip;
}

[dir="ltr"], code, .lat { font-feature-settings: "ss01" 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.42;
  margin: 0 0 .6em;
  color: var(--c-text);
  letter-spacing: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1.02rem; font-weight: 700; }

p { margin: 0 0 1.2rem; }
a { color: var(--a-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul { margin: 0 0 1.2rem; padding-inline-start: 1.4em; }
li { margin-block: .3em; }
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; }
figure { margin: 0; }
time { font-variant-numeric: tabular-nums; }

code { background: var(--c-surface-alt); padding: .1em .45em; border-radius: var(--r-sm); font-size: .9em; word-break: break-all; }

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

.container { max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.container.narrow { max-width: var(--reading); }

.skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  background: var(--a-dark); color: #fff; z-index: 300;
}
.skip-link:focus {
  position: fixed; inset-block-start: 12px; inset-inline-start: 12px;
  width: auto; height: auto; padding: 10px 18px; clip: auto; border-radius: var(--r-sm);
}

/* ==========================================================================
   ۰۴ — نقوش (SVG)
   ========================================================================== */
.tile-defs { position: absolute !important; width: 0; height: 0; overflow: hidden; }

.m-icon { flex: 0 0 auto; overflow: visible; }
.m-icon .dot { fill: currentColor; stroke: none; }
.m-icon .fill-soft { fill: currentColor; fill-opacity: .14; }
.m-icon .fill-none { fill: none; }

.m-orn { display: block; color: var(--a); opacity: .9; }
.m-band { display: block; width: 100%; color: var(--a); opacity: .5; }
.m-fleuron { display: block; color: var(--a); opacity: .75; margin-block-end: 14px; }
.m-fleuron svg { display: block; }

/* گل‌تقسیمِ وسط‌چین در ستون‌های خواندنی */
.narrow > .m-fleuron, .prose-section .m-fleuron { margin-inline: auto; }

/* ==========================================================================
   ۰۵ — دکمه‌ها و لینک‌های کنشی
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .74em 1.7em; border-radius: var(--r-pill);
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .16s cubic-bezier(.2,.7,.2,1), background .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--a); color: #fff; box-shadow: var(--sh-a); }
.btn-primary:hover { background: var(--a-dark); color: #fff; }
.btn-ghost { background: var(--c-surface); color: var(--a-dark); border-color: var(--c-border); }
.btn-ghost:hover { border-color: var(--a); color: var(--a-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.go-arrow { display: inline-block; transition: transform .22s cubic-bezier(.2,.7,.2,1); }
.go {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: .92rem; color: var(--a-dark);
}
a:hover .go-arrow, .go:hover .go-arrow { transform: translateX(-5px); }

.ext-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .9rem; color: var(--a-dark);
  border-block-end: 1px solid color-mix(in srgb, var(--a) 35%, transparent);
  padding-block-end: 2px;
}
.ext-link:hover { text-decoration: none; border-color: var(--a); }

/* ==========================================================================
   ۰۶ — سرلوحه و ناوبری
   ========================================================================== */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 120;
  border-block-end: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
/* پس‌زمینهٔ شیشه‌ای روی ::before است تا backdrop-filter برای پنلِ fixed منو
   containing block نسازد. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--c-bg) 90%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  transition: background .25s;
}
/* خطِ حاشیهٔ قالی بر لبهٔ بالا */
.site-header::after {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 3px;
  background: linear-gradient(90deg, var(--a) 0%, var(--c-gold) 50%, var(--a) 100%);
}
.site-header.scrolled { border-block-end-color: var(--c-border); box-shadow: 0 6px 24px rgba(30,36,34,.07); }
.site-header.scrolled::before { background: color-mix(in srgb, var(--c-surface) 93%, transparent); }
.header-inner { display: flex; align-items: center; gap: 22px; min-height: var(--header-h); }

/* نشان: شمسهٔ هشت‌پر */
.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--c-text); flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  position: relative; display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 auto; color: #fff;
  background: linear-gradient(140deg, var(--a) 0%, var(--a-dark) 55%, var(--a-deep) 100%);
  clip-path: polygon(50% 0%, 64.7% 14.4%, 85.4% 14.6%, 85.6% 35.3%, 100% 50%, 85.6% 64.7%, 85.4% 85.4%, 64.7% 85.6%, 50% 100%, 35.3% 85.6%, 14.6% 85.4%, 14.4% 64.7%, 0% 50%, 14.4% 35.3%, 14.6% 14.6%, 35.3% 14.4%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.brand:hover .brand-mark { transform: rotate(22.5deg); }
.brand-mark .m-icon { opacity: .96; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 900; font-size: 1.34rem; color: var(--c-text); }
.brand-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: .7rem; font-weight: 700; color: var(--a-dark); margin-block-start: 3px; }
.brand-tag::before { content: ""; width: 5px; height: 5px; background: var(--c-gold); transform: rotate(45deg); border-radius: 1px; }

.primary-nav { margin-inline-start: auto; min-width: 0; }
.nav-panel { display: flex; align-items: center; }
.nav-panel-kicker { display: none; }
.nav-list { display: flex; align-items: center; gap: 1px; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; }
.nav-list-secondary { margin-inline-start: 6px; padding-inline-start: 8px; border-inline-start: 1px solid var(--c-border); }
.nav-item { position: relative; margin: 0; }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px; position: relative;
  padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--c-text); font-weight: 500; font-size: .95rem; white-space: nowrap;
  transition: color .18s, background .18s;
}
.nav-icon, .nav-sub { display: none; }
.nav-link:hover { color: var(--a-dark); background: var(--a-tint); text-decoration: none; }
.nav-link::after {
  content: ""; position: absolute; inset-inline: 13px; inset-block-end: 4px; height: 2.5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--a), var(--c-gold));
  transform: scaleX(0); transform-origin: inline-start; transition: transform .24s cubic-bezier(.2,.7,.2,1);
}
.nav-link:hover::after { transform: scaleX(.5); }
.nav-link[aria-current="page"] { color: var(--a-dark); font-weight: 700; }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-dim .nav-link { color: var(--c-muted); font-size: .92rem; }
.nav-dim .nav-link[aria-current="page"] { color: var(--a-dark); }

.nav-toggle {
  display: none; align-items: center; gap: 9px; margin-inline-start: auto;
  height: 44px; padding: 0 14px 0 12px; border-radius: var(--r-pill);
  background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-text);
  font-family: var(--font-head); font-weight: 700; font-size: .86rem; cursor: pointer;
  box-shadow: var(--sh-sm); transition: border-color .2s, background .2s;
}
.nav-toggle:hover { border-color: var(--a); }
.nav-toggle-bars { display: flex; flex-direction: column; justify-content: center; gap: 4.5px; width: 20px; height: 20px; }
.nav-toggle-bars span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .26s, opacity .2s; transform-origin: center; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ==========================================================================
   ۰۷ — قهرمان: دیوار کاشی
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  min-height: clamp(520px, 76vh, 720px);
  display: flex; align-items: center;
  background: var(--a-deep);
  isolation: isolate;
}
.tile-wall {
  position: absolute; inset: 0; z-index: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr;
  gap: 3px; background: color-mix(in srgb, var(--a-deep) 80%, var(--c-gold)); /* بندکشی */
}
.tile { position: relative; overflow: hidden; }
/* درزِ نازکِ کاشی‌کاری میان خشت‌ها */
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a-deep) 55%, transparent);
}
.tile-photo picture, .tile-photo img { width: 100%; height: 100%; display: block; }
.tile-photo img { object-fit: cover; filter: saturate(.78) contrast(1.04); }
.tile-motif {
  display: grid; place-items: center;
  background: var(--a-deep);
  color: color-mix(in srgb, var(--c-gold) 82%, #fff);
}
.tile-motif[data-tone="0"] { background: var(--a-deep); }
.tile-motif[data-tone="1"] { background: color-mix(in srgb, var(--a-deep) 84%, #000); }
.tile-motif[data-tone="2"] { background: var(--a-dark); }
.tile-motif[data-tone="3"] { background: color-mix(in srgb, var(--a-deep) 86%, var(--c-gold)); }
.tile-motif .m-orn, .tile-motif .m-icon { opacity: .34; }

/* پرده: یک لایهٔ یکنواخت که موزاییک را آرام می‌کند،
   به‌علاوهٔ گوه‌ای غلیظ‌تر در سمت آغاز که متن روی آن می‌نشیند. */
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(275deg, color-mix(in srgb, var(--a-deep) 80%, transparent) 0%,
                            color-mix(in srgb, var(--a-deep) 66%, transparent) 36%,
                            transparent 66%),
    linear-gradient(180deg, color-mix(in srgb, var(--a-deep) 40%, transparent) 0%,
                            color-mix(in srgb, var(--a-deep) 18%, transparent) 30%,
                            color-mix(in srgb, var(--a-deep) 48%, transparent) 100%),
    color-mix(in srgb, var(--a-deep) 22%, transparent);
}
.hero-inner { position: relative; z-index: 2; padding-block: clamp(56px, 8vw, 96px); text-align: start; max-width: 100%; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-size: .84rem; font-weight: 700;
  color: #FBE6BC; background: rgba(200,135,26,.18);
  border: 1px solid rgba(200,135,26,.45);
  padding: 6px 18px; border-radius: var(--r-pill); margin: 0 0 20px;
}
.hero-title { color: #fff; max-width: 15ch; margin: 0 0 18px; font-size: clamp(2.2rem, 1.2rem + 4.4vw, 4rem); line-height: 1.24; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.hero-sub { color: #E4F0EF; max-width: 52ch; font-size: clamp(1rem, .95rem + .3vw, 1.14rem); line-height: 1.92; margin: 0 0 22px; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-block-start: 26px; }
.hero .btn-primary { background: var(--c-gold); color: #2A1B02; box-shadow: 0 12px 32px rgba(0,0,0,.28); }
.hero .btn-primary:hover { background: #E0A12E; color: #2A1B02; }
.hero .btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; border-color: #fff; }

/* ==========================================================================
   ۰۸ — بخش‌های عمومی و سربرگ صفحه
   ========================================================================== */
.section { padding-block: var(--sec-pad); }
.section-alt { background: var(--c-bg-deep); }
.section + .section-alt, .section-alt + .section { border-block-start: 1px solid var(--c-border-soft); }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-size: .8rem; font-weight: 700;
  letter-spacing: .05em; color: var(--a-dark); margin: 0 0 12px;
}
.kicker::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--c-gold); }

.card-kicker {
  font-family: var(--font-head); font-size: .74rem; font-weight: 700;
  letter-spacing: .04em; color: var(--a-dark); margin: 0 0 6px; opacity: .95;
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-block-end: 16px;
}
.section-head h2 { position: relative; margin: 0; padding-inline-start: 18px; }
.section-head h2::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block: .16em;
  width: 5px; border-radius: 4px;
  background: linear-gradient(180deg, var(--c-gold), var(--a));
}
.section-link { font-family: var(--font-head); font-weight: 700; color: var(--a-dark); font-size: .94rem; white-space: nowrap; }
.section-link:hover { text-decoration: none; }
.section-intro { color: var(--c-muted); max-width: 68ch; margin-block-end: 32px; }

/* سربرگ صفحات درونی */
.page-head {
  position: relative; overflow: hidden;
  background: linear-gradient(170deg, var(--a-tint) 0%, var(--c-bg) 72%);
  border-block-end: 1px solid var(--c-border-soft);
}
.page-head-inner {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 32px;
  padding-block: clamp(38px, 5vw, 62px);
}
.page-head h1 { margin: 0 0 .34em; }
.page-head .lead { color: var(--c-muted); max-width: 62ch; font-size: 1.06rem; margin: 0; }
.page-head-orn { color: var(--a); opacity: .32; pointer-events: none; }
.page-head-orn .m-orn { opacity: 1; }
.page-head-band { opacity: .55; }
.page-head-band .m-band { opacity: .55; }

/* خط تزیینی جداکننده */
.divider { height: 1px; max-width: var(--container); margin-inline: auto; background: linear-gradient(90deg, transparent, var(--c-gold), transparent); opacity: .5; }

/* بخش معرفی خانه */
.intro-section { text-align: center; }
.intro-section .kicker { justify-content: center; }
.intro-text { font-size: 1.1rem; color: var(--c-text); line-height: 1.95; max-width: 62ch; margin-inline: auto; }

/* نوارِ بیت */
.verse-band {
  background: var(--a-deep); color: #EAF3F2;
  padding-block: clamp(44px, 6vw, 72px);
  position: relative; overflow: hidden;
}
.verse-band::before,
.verse-band::after {
  content: ""; position: absolute; inset-inline: 0; height: 14px;
  background-image: repeating-linear-gradient(90deg, rgba(200,135,26,.5) 0 2px, transparent 2px 18px);
  opacity: .5;
}
.verse-band::before { inset-block-start: 0; }
.verse-band::after { inset-block-end: 0; }

/* ==========================================================================
   ۰۹ — رسانه و تصویر
   ========================================================================== */
.media {
  position: relative; overflow: hidden;
  border-radius: var(--r-md); background: var(--c-surface-alt);
}
.media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.6,.2,1); }
.media.r-16x9 { aspect-ratio: 16 / 9; }
.media.r-21x9 { aspect-ratio: 21 / 9; }
.media.r-4x3  { aspect-ratio: 4 / 3; }
.media.r-3x2  { aspect-ratio: 3 / 2; }
.media.r-4x5  { aspect-ratio: 4 / 5; }
.media.r-1x1  { aspect-ratio: 1 / 1; }
.media-ph {
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--a) 0%, var(--a-dark) 60%, var(--a-deep) 100%);
}
.media-ph .m-icon { opacity: .55; }

.page-hero { margin-block: 30px 8px; border-radius: var(--r-lg); box-shadow: var(--sh-md); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; margin-block-end: 24px; }
.media-grid .media { aspect-ratio: 3 / 2; }
.media-grid figure:hover .media img { transform: scale(1.05); }
.media-grid figcaption { margin-block-start: 9px; font-size: .88rem; font-weight: 500; color: var(--c-text); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(224px, 1fr)); gap: 18px; }
.gallery .media { aspect-ratio: 4 / 3; }
.gallery figure:hover .media img { transform: scale(1.06); }
.gallery figcaption {
  margin-block-start: 9px; font-size: .86rem; color: var(--c-muted);
  padding-inline-start: 11px; border-inline-start: 2px solid var(--c-gold);
}

/* ==========================================================================
   ۱۰ — کارت‌ها
   ========================================================================== */

/* --- دروازه‌های خانه --- */
.gateway-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--gap); }
.gateway {
  position: relative; display: flex; flex-direction: column;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm);
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s, border-color .28s;
}
.gateway::before {
  content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 4px; z-index: 3;
  background: linear-gradient(90deg, var(--a), var(--c-gold));
  transform: scaleX(0); transform-origin: inline-end; transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.gateway:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: color-mix(in srgb, var(--a) 40%, var(--c-border)); text-decoration: none; }
.gateway:hover::before { transform: scaleX(1); }
.gateway:hover .media img { transform: scale(1.07); }
.gateway-media { position: relative; }
.gateway-media .media { border-radius: 0; }
.gateway-icon {
  position: absolute; inset-block-end: -22px; inset-inline-start: 22px; z-index: 2;
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px;
  background: var(--c-surface); color: var(--a);
  border: 1px solid var(--c-border); box-shadow: var(--sh-sm);
  transition: transform .28s cubic-bezier(.2,.7,.2,1), background .28s, color .28s;
}
.gateway:hover .gateway-icon { transform: translateY(-4px) rotate(-6deg); background: var(--a); color: #fff; border-color: var(--a); }
.gateway-body { padding: 34px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.gateway-body h3 { margin: 0 0 .35em; font-size: 1.3rem; color: var(--c-text); }
.gateway-tag { color: var(--c-muted); font-size: .95rem; margin: 0 0 18px; flex: 1; }
.gateway .go { margin-block-start: auto; }

/* --- کارت پهنه --- */
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.zone-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r-lg); background: var(--c-surface); border: 1px solid var(--c-border);
  box-shadow: var(--sh-sm);
  transition: transform .26s cubic-bezier(.2,.7,.2,1), box-shadow .26s, border-color .26s;
}
.zone-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: color-mix(in srgb, var(--a) 45%, var(--c-border)); text-decoration: none; }
.zone-card:hover .media img { transform: scale(1.06); }
.zone-media { position: relative; }
.zone-media .media { border-radius: 0; }
.zone-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--a-deep) 55%, transparent)); pointer-events: none; }
.zone-badge {
  position: absolute; z-index: 2; inset-block-end: 14px; inset-inline-start: 16px;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  background: rgba(255,255,255,.94); color: var(--a); box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.zone-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.zone-card h3 { margin: 0 0 .3em; color: var(--c-text); font-size: 1.26rem; }
.zone-short { color: var(--c-muted); font-size: .94rem; margin: 0 0 16px; }
.zone-syms { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 18px; }
.zone-sym {
  display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--a-dark);
  background: var(--a-tint); border: 1px solid var(--c-border-soft); border-radius: var(--r-pill); padding: 4px 11px 4px 8px;
}
.zone-sym .m-icon { color: var(--a); }
.zone-card .go { margin-block-start: auto; }

/* نشانه‌های صفحهٔ پهنه */
.sym-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
.sym-chip {
  display: flex; align-items: center; gap: 14px; margin: 0;
  padding: 18px 20px; border-radius: var(--r-md);
  background: var(--c-surface); border: 1px solid var(--c-border);
  box-shadow: var(--sh-sm); font-weight: 500;
}
.sym-chip .m-icon { color: var(--a); }

/* --- کارت آیتم (جشن/ساز/کارگاه/دفتر) --- */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }
.entry-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: transform .26s cubic-bezier(.2,.7,.2,1), box-shadow .26s;
}
.entry-card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }
.entry-card:hover .media img { transform: scale(1.06); }
.entry-media { position: relative; }
.entry-media .media { border-radius: 0; }
.entry-motif-panel {
  display: grid; place-items: center; color: var(--a);
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--a) 10%, transparent), transparent 68%),
    var(--a-tint);
}
.entry-icon {
  position: absolute; inset-block-start: 14px; inset-inline-end: 14px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.92); color: var(--a);
  box-shadow: 0 2px 10px rgba(0,0,0,.14);
  backdrop-filter: blur(4px);
}
.entry-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.entry-body h3 { margin: 0 0 .45em; font-size: 1.22rem; }
.entry-body p { color: var(--c-muted); font-size: .96rem; margin: 0; }
.entry-body .verse-mini { margin-block: 0 14px; }

/* --- کارت جستار --- */
.essay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--gap); }
.essay-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: transform .26s cubic-bezier(.2,.7,.2,1), box-shadow .26s, border-color .26s;
}
.essay-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: color-mix(in srgb, var(--a) 40%, var(--c-border)); text-decoration: none; }
.essay-card:hover .media img { transform: scale(1.06); }
.essay-card .media { border-radius: 0; }
.essay-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.essay-body h3 { margin: 0 0 .45em; font-size: 1.26rem; color: var(--c-text); }
.essay-body p { color: var(--c-muted); font-size: .96rem; margin: 0 0 18px; flex: 1; }

/* --- کارت لایهٔ ژرف --- */
.deep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.deep-card {
  display: flex; align-items: center; gap: 20px; padding: 24px 26px;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--a-deep), color-mix(in srgb, var(--a-deep) 80%, #000));
  color: #EAF3F2; border: 1px solid transparent;
  box-shadow: var(--sh-md);
  transition: transform .26s cubic-bezier(.2,.7,.2,1), box-shadow .26s;
}
.deep-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); text-decoration: none; color: #fff; }
.deep-icon { flex: 0 0 auto; color: color-mix(in srgb, var(--c-gold) 78%, #fff); opacity: .9; }
.deep-body { flex: 1; min-width: 0; }
.deep-card .card-kicker { color: color-mix(in srgb, var(--c-gold) 80%, #fff); }
.deep-body h3 { margin: 0 0 .3em; color: #fff; font-size: 1.18rem; }
.deep-body p { margin: 0; color: #BDD4D2; font-size: .93rem; line-height: 1.8; }
.deep-card .go-arrow { color: var(--c-gold); font-size: 1.3rem; }
.deep-card:hover .go-arrow { transform: translateX(-5px); }

/* --- کارت خبر/تازه‌ها --- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.news-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: transform .26s cubic-bezier(.2,.7,.2,1), box-shadow .26s;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }
.news-card:hover .media img { transform: scale(1.05); }
.news-card .media { border-radius: 0; }
.news-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.news-date {
  display: inline-block; align-self: flex-start;
  font-size: .78rem; color: var(--a-dark);
  background: var(--a-soft); padding: 3px 12px; border-radius: var(--r-pill); margin-block-end: 12px;
}
.news-card h3 { margin: 0 0 .45em; font-size: 1.14rem; }
.news-card h3 a { color: var(--c-text); }
.news-card h3 a:hover { color: var(--a-dark); text-decoration: none; }
.news-card p { color: var(--c-muted); font-size: .94rem; margin: 0 0 16px; flex: 1; }
.more { font-family: var(--font-head); font-weight: 700; color: var(--a-dark); font-size: .9rem; display: inline-flex; align-items: center; gap: 7px; }
.more:hover { text-decoration: none; }
.more:hover .go-arrow { transform: translateX(-5px); }

/* فهرست تازه‌ها (جستارها) */
.latest-list { list-style: none; padding: 0; margin: 0; counter-reset: n; }
.latest-list li {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: baseline;
  padding-block: 20px; border-block-start: 1px solid var(--c-border-soft); margin: 0;
}
.latest-list li:first-child { border-block-start: 0; }
.latest-list time { font-size: .82rem; color: var(--c-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.latest-list a { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--c-text); }
.latest-list a:hover { color: var(--a-dark); }
.latest-list p { margin: .35em 0 0; color: var(--c-muted); font-size: .92rem; }

/* ==========================================================================
   ۱۱ — نقشهٔ پهنه‌ها
   ========================================================================== */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 30px; align-items: start; }
.map-wrap {
  position: relative; border-radius: var(--r-xl);
  background: #DCE9ED; box-shadow: var(--sh-lg);
}
.iran-map { display: block; width: 100%; height: auto; border-radius: var(--r-xl); font-family: var(--font); }

.mp-neighbors path { fill: #F1EBDD; stroke: #DED4BF; stroke-width: .8; stroke-linejoin: round; }
.mp-lakes path { fill: #D9E8ED; stroke: #BCD3DA; stroke-width: .8; }
.mp-neighbor-labels text { font-size: 13px; font-weight: 500; fill: #A0977F; text-anchor: middle; pointer-events: none; }
.mp-silhouette { fill: #FFFDF8; pointer-events: none; }

.map-zone { cursor: pointer; }
.map-shape {
  fill: color-mix(in srgb, var(--a) 36%, #FFFDF8);
  transition: fill .28s cubic-bezier(.2,.7,.2,1), transform .28s cubic-bezier(.2,.7,.2,1), filter .28s;
  transform-box: fill-box; transform-origin: center;
}
.mp-prov-borders { fill: none; stroke: rgba(255,255,255,.75); stroke-width: .8; stroke-linejoin: round; pointer-events: none; }
.mp-zone-borders { fill: none; stroke: #FBF8F1; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.mp-outer { fill: none; stroke: #3E6968; stroke-width: 1.3; stroke-linejoin: round; pointer-events: none; }

.map-sea { font-family: var(--font-head); font-size: 17px; font-weight: 600; fill: #6C90A0; pointer-events: none; }
.map-sea-sm { font-size: 11px; font-weight: 500; }

.mp-labels { pointer-events: none; }
.map-label-group { transition: opacity .25s; }
.iran-map.has-hover .map-label-group:not(.is-hover) { opacity: .55; }
.map-label-badge { fill: #fff; stroke: var(--a); stroke-width: 1.6; opacity: .96; transition: fill .25s, stroke .25s; }
.map-label-icon { color: var(--a-dark); transition: color .25s; }
.map-label-group.is-hover .map-label-badge { fill: var(--a); }
.map-label-group.is-hover .map-label-icon { color: #fff; }
.map-label {
  font-family: var(--font-head); font-size: 18px; font-weight: 700; fill: var(--a-deep);
  paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 3.5px; stroke-linejoin: round;
}

.map-zone:hover .map-shape,
.map-zone.is-hover .map-shape,
.map-zone:focus-visible .map-shape {
  fill: var(--a);
  transform: translateY(-4px);
  filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--a) 55%, transparent));
}
.iran-map.has-hover .map-zone:not(.is-hover) .map-shape { fill: color-mix(in srgb, var(--a) 20%, #FFFDF8); }
.map-zone:focus { outline: none; }
.map-zone:focus-visible .map-shape { stroke: var(--a-deep); stroke-width: 2.5; }

.mp-compass text { font-family: var(--font-head); font-size: 13px; font-weight: 700; fill: #4B6C6B; text-anchor: middle; }
.mp-compass .m-orn { color: #4B6C6B; opacity: .55; }
.mp-north { fill: var(--c-gold); }
.mp-cartouche rect { fill: rgba(250,247,241,.94); stroke: var(--c-gold); stroke-width: 1; }
.mp-cart-title { font-family: var(--font-head); font-size: 17px; font-weight: 800; fill: var(--c-ink-deep); }
.mp-cart-sub { font-family: var(--font-head); font-size: 12px; font-weight: 600; fill: #8C5E0E; }
.mp-scale { stroke: #4B6C6B; stroke-width: 1.5; fill: none; }
.mp-scale-t { font-size: 11px; fill: #4B6C6B; }
.mp-frame { fill: none; stroke: var(--c-gold); stroke-width: 1.2; opacity: .75; pointer-events: none; }
.mp-frame-in { stroke-width: .6; opacity: .5; }
.mp-corner { color: var(--c-gold); opacity: .45; pointer-events: none; }

/* راهنمای شناور */
.map-tip {
  position: absolute; z-index: 20; pointer-events: none;
  max-width: 270px; padding: 14px 18px;
  background: var(--c-surface); color: var(--c-text);
  border: 1px solid var(--c-border); border-inline-start: 4px solid var(--a);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
  font-size: .9rem; line-height: 1.75;
}
.map-tip[hidden] { display: none; }
.tip-title { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--a-dark); }
.tip-short { display: block; color: var(--c-muted); font-size: .86rem; margin-block-end: 8px; }
.tip-syms { list-style: none; padding: 0; margin: 0 0 8px; }
.tip-syms li { position: relative; padding-inline-start: 15px; font-size: .84rem; color: var(--c-text); margin: .2em 0; }
.tip-syms li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .72em; width: 6px; height: 6px; border-radius: 2px; background: var(--c-gold); transform: rotate(45deg); }
.tip-hint { display: block; font-size: .76rem; color: var(--a-dark); font-weight: 700; }

/* راهنمای کنار نقشه */
.map-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.map-legend li { margin: 0; }
.map-legend a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--c-surface); border: 1px solid var(--c-border);
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s, border-color .2s;
}
.map-legend a:hover { text-decoration: none; transform: translateX(-4px); border-color: var(--a); box-shadow: var(--sh-sm); }
.legend-swatch { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto; background: color-mix(in srgb, var(--a) 36%, #FFFDF8); color: var(--a-deep); }
.legend-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.legend-title { font-family: var(--font-head); font-weight: 700; font-size: .95rem; color: var(--c-text); }
.legend-short { font-size: .78rem; color: var(--c-muted); }
.map-legend .go-arrow { color: var(--a); }

/* ==========================================================================
   ۱۲ — بیت و نقل‌قول
   ========================================================================== */
.verse { margin: 0 0 22px; padding: 0; border: 0; }
.verse p {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: 6px 18px; margin: 0;
  font-family: var(--font-head); font-weight: 600;
  font-size: 1.16rem; line-height: 1.9; color: var(--a-dark);
}
.hemistich { display: inline-block; }
.verse-sep {
  display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  background: var(--c-gold); transform: rotate(45deg); opacity: .85;
}
.verse footer {
  margin-block-start: 8px; text-align: center;
  font-family: var(--font); font-size: .84rem; font-weight: 500; color: var(--c-muted);
}
.verse footer::before { content: "— "; }

.hero-verse { margin-block: 26px 0; }
.hero-verse p { justify-content: flex-start; color: #F3E3C4; font-size: 1.1rem; }
.hero-verse footer { text-align: start; color: #C9DCDA; }

.band-verse p { color: #fff; font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); }
.band-verse footer { color: #A9C6C4; }
.band-verse .verse-sep { background: var(--c-gold); }

.verse-mini p { justify-content: flex-start; font-size: .96rem; color: var(--a-dark); gap: 4px 12px; }
.verse-mini footer { text-align: start; font-size: .78rem; }

/* ==========================================================================
   ۱۳ — متن خواندنی (مقاله)
   ========================================================================== */
.breadcrumb { background: var(--c-bg-deep); border-block-end: 1px solid var(--c-border-soft); font-size: .86rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; list-style: none; margin: 0; padding: 0; padding-block: 12px; }
.breadcrumb li { margin: 0; }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--a-dark); }
.breadcrumb li[aria-current="page"] { color: var(--c-text); font-weight: 700; }
.breadcrumb li + li::before { content: "/"; color: var(--c-border); margin-inline-end: 9px; }

.reading { padding-block: clamp(36px, 5vw, 60px); }
.reading .container { max-width: var(--reading); }

.article-head { margin-block-end: 26px; padding-block-end: 22px; border-block-end: 2px solid var(--a-soft); }
.article-head h1 { font-size: clamp(1.8rem, 1.3rem + 1.9vw, 2.5rem); margin-block-end: .3em; }
.badge {
  display: inline-block; font-family: var(--font-head); font-size: .76rem; font-weight: 700;
  color: var(--a-dark); background: var(--a-soft);
  border-radius: var(--r-pill); padding: 5px 15px; margin-block-end: 14px;
}
.standfirst { font-size: 1.14rem; line-height: 1.92; color: var(--c-muted); font-weight: 500; margin: 12px 0 0; }

.article-figure { margin-block: 6px 30px; border-radius: var(--r-lg); box-shadow: var(--sh-md); }

.prose { font-size: 1.05rem; }
.prose h2 {
  font-size: 1.42rem; margin-block: 1.9em .65em; color: var(--a-dark);
  position: relative; padding-inline-start: 16px;
}
.prose h2::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block: .2em;
  width: 4px; border-radius: 3px; background: linear-gradient(180deg, var(--c-gold), var(--a));
}
.prose h3 { font-size: 1.14rem; margin-block: 1.5em .5em; }
.prose > *:first-child { margin-block-start: 0; }
.prose ul { padding-inline-start: 0; list-style: none; }
.prose ul li { position: relative; padding-inline-start: 1.75em; margin-block: .55em; }
.prose ul li::before {
  content: ""; position: absolute; inset-inline-start: .25em; inset-block-start: .78em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--c-gold); transform: rotate(45deg);
}
.prose blockquote {
  margin: 1.6em 0; padding: 18px 22px;
  background: var(--a-tint); border-inline-start: 4px solid var(--a);
  border-radius: var(--r-sm); color: var(--a-dark);
}
.prose blockquote p:last-child { margin-block-end: 0; }

.pullquote, .prose .pullquote {
  margin: 34px 0; padding: 26px 30px;
  background: linear-gradient(160deg, var(--a-soft), var(--a-tint));
  border: 0; border-inline-start: 5px solid var(--c-gold);
  border-radius: var(--r-md);
}
.pullquote blockquote { margin: 0; padding: 0; background: none; border: 0; }
.pullquote p {
  margin: 0; font-family: var(--font-head); font-weight: 700;
  font-size: 1.28rem; line-height: 1.75; color: var(--a-dark);
}

.note, .note-box {
  padding: 16px 20px; border-radius: var(--r-md);
  background: var(--a-tint); border: 1px solid color-mix(in srgb, var(--a) 18%, var(--c-border));
  color: var(--a-dark); font-size: .95rem; margin-block: 24px;
}
.contact-note { margin-block-start: 32px; }

.prose-section { background: var(--c-bg-deep); }
.prose-section .m-fleuron { margin-block-end: 24px; }

.extras { margin-block-start: 46px; padding-block-start: 30px; border-block-start: 1px solid var(--c-border); }
.extras .section-head h2 { font-size: 1.4rem; }

/* ==========================================================================
   ۱۴ — پروفایل دانشنامه‌ای گروه‌ها
   ========================================================================== */
.groups-section .section-intro { margin-block-end: 8px; }

.group {
  padding-block: 46px 12px;
  border-block-start: 1px solid var(--c-border);
  scroll-margin-block-start: calc(var(--header-h) + 24px);
}
.group:first-of-type { border-block-start: 0; }
.group.is-hidden { display: none; }

.group-top { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 40px; align-items: center; margin-block-end: 28px; }
.group:nth-of-type(even) .group-media { order: 2; }
.group-media .media { border-radius: var(--r-lg); box-shadow: var(--sh-md); }
.group-top:hover .group-media .media img { transform: scale(1.04); }
.group-head-text h3 { margin: 0 0 10px; color: var(--a-dark); font-size: 1.65rem; }
.group-rule { display: block; width: 66px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--c-gold), var(--a)); margin-block-end: 15px; }
.group-meta { margin: 0 0 12px; color: var(--c-muted); font-size: .88rem; }
.group-intro { font-size: 1.03rem; margin: 0; }
.group-highlight {
  margin: 18px 0 0; padding-inline-start: 17px;
  border-inline-start: 3px solid var(--c-gold);
  font-family: var(--font-head); font-weight: 600; font-size: 1.06rem;
  color: var(--a-dark); line-height: 1.82;
}

.group-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-block-end: 22px; }
.group-col h4 { font-size: 1.02rem; margin: 0 0 .7em; padding-inline-start: 13px; border-inline-start: 3px solid var(--c-gold); }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-inline-start: 1.7em; margin-block: .5em; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .72em; width: 9px; height: 9px; border-radius: 2px; background: var(--a); transform: rotate(45deg); }

.group-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 0 0 22px; }
.group-facts > div { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 14px 18px; }
.group-facts dt { font-family: var(--font-head); font-weight: 700; color: var(--a-dark); font-size: .8rem; margin-block-end: 4px; }
.group-facts dd { margin: 0; font-size: .9rem; }

.group-figures { margin-block-end: 20px; }
.group-figures h4 { font-size: 1.02rem; margin: 0 0 13px; padding-inline-start: 13px; border-inline-start: 3px solid var(--a); }
.mini-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 13px; }
.mini-figure { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 13px 17px; }
.mf-name { display: block; font-family: var(--font-head); font-weight: 700; color: var(--a-dark); margin-block-end: 3px; }
.mf-note { display: block; font-size: .86rem; color: var(--c-muted); line-height: 1.75; }

.did-you-know {
  display: flex; gap: 15px; align-items: flex-start;
  background: linear-gradient(170deg, #FBF1DA, var(--c-bg));
  border: 1px solid #EBD9AE; border-radius: var(--r-md);
  padding: 17px 21px; margin-block-end: 8px;
}
.dyk-label {
  flex: 0 0 auto; font-family: var(--font-head); font-weight: 800; font-size: .76rem;
  color: #8C5E0E; background: rgba(200,135,26,.2);
  border-radius: var(--r-pill); padding: 5px 14px; margin-block-start: 3px; white-space: nowrap;
}
.did-you-know p { margin: 0; font-size: .95rem; line-height: 1.85; }

/* ناوبری پهنهٔ پیشین/پسین */
.zone-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-block: 20px 60px; }
.pager-link {
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 24px; border-radius: var(--r-md);
  background: var(--c-surface); border: 1px solid var(--c-border);
  box-shadow: var(--sh-sm);
  transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s, border-color .22s;
}
.pager-link:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--a); text-decoration: none; }
.pager-next { text-align: start; }
.pager-prev { text-align: end; }
.pager-lbl { font-size: .78rem; color: var(--c-muted); }
.pager-title { font-family: var(--font-head); font-weight: 700; color: var(--a-dark); }

/* ==========================================================================
   ۱۵ — فهرست‌های ویژه
   ========================================================================== */

/* --- بشنوید --- */
.listen-section { background: var(--c-bg-deep); }
.listen-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.listen-item {
  display: flex; flex-direction: column; margin: 0;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: 22px 24px; box-shadow: var(--sh-sm);
  transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s;
}
.listen-item:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.listen-meta { display: flex; flex-direction: column; gap: 8px; margin-block-end: 10px; }
.zone-chip {
  align-self: flex-start; font-size: .74rem; font-weight: 700;
  color: var(--a-dark); background: var(--a-soft);
  border-radius: var(--r-pill); padding: 3px 12px;
}
.listen-title { margin: 0; font-size: 1.1rem; color: var(--c-text); }
.listen-desc { color: var(--c-muted); font-size: .92rem; margin: 0 0 16px; flex: 1; }
.listen-item .ext-link { align-self: flex-start; margin-block-start: auto; }

/* --- گفتارها --- */
.talk-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.talk {
  display: flex; flex-direction: column; margin: 0;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: 24px; box-shadow: var(--sh-sm);
  transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s;
}
.talk:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.talk-body { flex: 1; }
.talk-title { font-size: 1.08rem; margin: 0 0 6px; color: var(--c-text); }
.talk-speaker { font-size: .84rem; color: var(--a-dark); font-weight: 700; margin: 0 0 9px; }
.talk-desc { font-size: .92rem; color: var(--c-muted); margin: 0 0 16px; }
.talk .ext-link { align-self: flex-start; }

/* --- مقالات --- */
.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 30px 26px; }
.cat-btn {
  font-family: var(--font-head); font-size: .93rem; font-weight: 700;
  color: var(--c-text); background: var(--c-surface);
  border: 2px solid var(--c-border); border-radius: var(--r-pill);
  padding: 7px 20px; cursor: pointer; transition: all .18s;
}
.cat-btn:hover { border-color: var(--a); color: var(--a-dark); }
.cat-btn.is-active { background: var(--a); color: #fff; border-color: var(--a); }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.art-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-sm);
  transition: transform .22s cubic-bezier(.2,.7,.2,1), box-shadow .22s;
}
.art-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.art-card.is-hidden { display: none; }
.art-card h3 { font-size: 1.1rem; margin: 0 0 .5em; }
.art-card p { color: var(--c-muted); font-size: .92rem; margin: 0; }
.tag {
  display: inline-block; font-size: .76rem; font-weight: 700;
  color: var(--a-dark); background: var(--a-soft);
  border-radius: var(--r-pill); padding: 3px 13px; margin-block-end: 11px;
}

/* --- چهره‌ها --- */
.figures-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.figure {
  display: flex; align-items: center; gap: 15px; margin: 0;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-inline-start: 4px solid var(--c-gold);
  border-radius: var(--r-md); padding: 15px 19px; box-shadow: var(--sh-sm);
  transition: transform .2s, box-shadow .2s;
}
.figure:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.figure-avatar {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; color: #fff;
  background: linear-gradient(140deg, var(--a), var(--a-dark));
}
.figure-text { display: flex; flex-direction: column; min-width: 0; }
.figure-name { font-family: var(--font-head); font-weight: 700; color: var(--a-dark); margin-block-end: 2px; }
.figure-note { color: var(--c-muted); font-size: .9rem; line-height: 1.7; }

/* --- اعتبار تصاویر --- */
.credit-list { list-style: none; padding: 0; margin-block: 34px 60px; display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.credit-list li {
  margin: 0; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); overflow: hidden; font-size: .86rem; box-shadow: var(--sh-sm);
}
.cr-thumb { border-radius: 0; }
.cr-body { padding: 13px 17px; display: flex; flex-direction: column; gap: 5px; }
.cr-title { font-family: var(--font-head); font-weight: 700; color: var(--a-dark); }
.cr-meta { color: var(--c-muted); font-size: .82rem; }
.credit-list a { word-break: break-all; font-size: .82rem; }

/* ==========================================================================
   ۱۶ — ۴۰۴
   ========================================================================== */
.error-page { text-align: center; padding-block: clamp(60px, 10vw, 110px); }
.error-orn { display: flex; justify-content: center; color: var(--a); opacity: .3; margin-block-end: 22px; }
.error-page .kicker { justify-content: center; }
.error-page h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.error-page .lead { color: var(--c-muted); font-size: 1.06rem; max-width: 50ch; margin-inline: auto; }
.error-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-block-start: 30px; }
.error-links li { margin: 0; }
.error-links a {
  display: inline-block; padding: 9px 20px;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-pill); font-weight: 500; color: var(--c-text);
  transition: all .18s;
}
.error-links a:hover { background: var(--a); border-color: var(--a); color: #fff; text-decoration: none; }

/* ==========================================================================
   ۱۷ — فوتر
   ========================================================================== */
.site-footer { background: var(--c-ink-deep); color: #D5E4E3; margin-block-start: 60px; position: relative; }
.footer-band { color: var(--c-gold); opacity: .45; }
.footer-band .m-band { opacity: 1; height: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1.15fr; gap: 46px; padding-block: 52px 44px; }
.footer-brand { margin-block-end: 16px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.footer-about p { color: #A9C2C1; font-size: .94rem; max-width: 44ch; }
.footer-orn { color: var(--c-gold); opacity: .5; }
.footer-h { font-family: var(--font-head); font-size: 1rem; color: #fff; margin: 0 0 15px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-block: 9px; }
.footer-links a { color: #A9C2C1; font-size: .93rem; }
.footer-links a:hover { color: #fff; }
.footer-email { color: #A9C2C1; font-size: .93rem; overflow-wrap: anywhere; }
.footer-email a { color: #EFC471; }
.socials { display: flex; flex-wrap: wrap; gap: 9px; margin-block-start: 16px; }
.social-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.07); color: #D5E4E3;
  font-size: .85rem; font-weight: 500; transition: all .18s;
}
.social-pill:hover { background: var(--a); color: #fff; transform: translateY(-2px); text-decoration: none; }
.social-pill svg { width: 16px; height: 16px; flex: 0 0 auto; }
.footer-bottom { background: rgba(0,0,0,.28); padding-block: 15px; font-size: .84rem; color: #8CA6A5; text-align: center; }

/* ==========================================================================
   ۱۸ — نمایش تدریجی
   ========================================================================== */
.js [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 65ms);
  will-change: opacity, transform;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   ۱۹ — واکنش‌گرایی
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --sec-pad: 58px; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 119; margin: 0;
    background: color-mix(in srgb, var(--c-bg) 94%, transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .28s ease, transform .32s cubic-bezier(.2,.7,.2,1), visibility .32s;
  }
  .primary-nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav-panel { display: block; max-width: 760px; margin-inline: auto; padding: 26px 22px 56px; }
  .nav-panel-kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: .8rem; font-weight: 700; color: var(--a-dark); margin: 0 0 16px; }
  .nav-panel-kicker::before { content: ""; width: 26px; height: 2px; background: var(--c-gold); }
  .nav-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: stretch; }
  .nav-item { opacity: 0; transform: translateY(10px); }
  .primary-nav.open .nav-item { animation: navIn .45s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i, 0) * 45ms); }
  .nav-item:nth-child(1) { --i: 0; } .nav-item:nth-child(2) { --i: 1; } .nav-item:nth-child(3) { --i: 2; }
  .nav-item:nth-child(4) { --i: 3; } .nav-item:nth-child(5) { --i: 4; } .nav-item:nth-child(6) { --i: 5; }
  .nav-list-secondary { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 18px 0 0; border: 0; border-block-start: 1px solid var(--c-border); }
  .nav-list-secondary .nav-item { --i: 6; }
  .nav-link {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%;
    padding: 18px 16px 16px; border-radius: var(--r-lg); white-space: normal;
    background: var(--c-surface); border: 1px solid var(--c-border); box-shadow: var(--sh-sm);
    font-size: 1rem;
  }
  .nav-link::after { display: none; }
  .nav-link:hover, .nav-link[aria-current="page"] { background: var(--a-tint); border-color: color-mix(in srgb, var(--a) 55%, var(--c-border)); }
  .nav-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--a-soft); color: var(--a-dark); }
  .nav-link[aria-current="page"] .nav-icon { background: var(--a); color: #fff; }
  .nav-text { display: flex; flex-direction: column; gap: 2px; }
  .nav-lbl { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--c-text); }
  .nav-sub { display: block; font-size: .8rem; color: var(--c-muted); line-height: 1.6; }
  .nav-dim .nav-link { color: var(--c-text); font-size: 1rem; }
  .nav-list-secondary .nav-link { flex-direction: row; align-items: center; height: auto; padding: 10px 18px 10px 12px; border-radius: var(--r-pill); gap: 8px; }
  .nav-list-secondary .nav-icon { width: 30px; height: 30px; border-radius: 9px; }
  .nav-list-secondary .nav-icon .m-icon { width: 18px; height: 18px; }
  .nav-list-secondary .nav-sub { display: none; }
  .nav-list-secondary .nav-lbl { font-size: .95rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-about { grid-column: 1 / -1; }
}
@keyframes navIn { to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; gap: 20px; }
  .map-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .page-head-inner { grid-template-columns: 1fr; gap: 22px; }
  .page-head-orn { display: none; }
  .group-top { grid-template-columns: 1fr; gap: 24px; }
  .group:nth-of-type(even) .group-media { order: 0; }
  .group-cols { grid-template-columns: 1fr; gap: 20px; }
  .deep-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .deep-card .go-arrow { align-self: flex-end; }
}

@media (max-width: 760px) {
  html { font-size: 16px; }
  :root { --sec-pad: 46px; --gap: 20px; }
  .hero { min-height: clamp(460px, 82vh, 620px); }
  .tile-wall { grid-template-columns: repeat(3, 1fr); }
  .hero-title { max-width: 100%; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .media.r-21x9 { aspect-ratio: 16 / 9; }
  .page-hero { border-radius: var(--r-md); }
  .zone-pager { grid-template-columns: 1fr; }
  .pager-prev, .pager-next { text-align: start; }
  .latest-list li { grid-template-columns: 1fr; gap: 6px; }
  .map-wrap { border-radius: var(--r-lg); }
  .iran-map { border-radius: var(--r-lg); }
  .map-tip { display: none !important; }
  .map-label { font-size: 22px; }
  .mp-neighbor-labels, .mp-cartouche { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding-block: 40px 32px; }
  .did-you-know { flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
  .tile-wall { grid-template-columns: repeat(2, 1fr); }
  .gateway-body { padding: 32px 20px 22px; }
  .verse p { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

@media print {
  .site-header, .site-footer, .breadcrumb, .nav-toggle, .hero-cta, .map-tip { display: none !important; }
  body { background: #fff; }
  .section { padding-block: 20px; }
}

/* ==========================================================================
   ۲۰ — غنای فرهنگی: نشان، الگوهای گره، حاشیهٔ قالی، طاق، سرلوحه، کتیبه، هفت‌رنگ
   ========================================================================== */
:root {
  --pat-star-soft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpolygon points='28,2 34.5,12.3 46.4,9.6 43.7,21.5 54,28 43.7,34.5 46.4,46.4 34.5,43.7 28,54 21.5,43.7 9.6,46.4 12.3,34.5 2,28 12.3,21.5 9.6,9.6 21.5,12.3' fill='none' stroke='%238C5E0E' stroke-opacity='.09'/%3E%3Cpath d='M0 0h8M48 0h8M0 56h8M48 56h8M0 0v8M0 48v8M56 0v8M56 48v8' stroke='%238C5E0E' stroke-opacity='.09'/%3E%3C/svg%3E");
}
.tile-defs { color: var(--a); }

/* --- نشان --- */
.brand-mark {
  width: 52px; height: 52px; background: none; clip-path: none; border-radius: 50%; color: var(--a);
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--a) 40%, transparent));
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.brand:hover .brand-mark { transform: rotate(45deg); }
.m-logo { display: block; width: 100%; height: 100%; }
.footer-brand .brand-mark { width: 48px; height: 48px; color: var(--a); filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tag { color: var(--c-gold); }
.logo-xl { width: 150px; height: 150px; color: var(--a); filter: drop-shadow(0 14px 30px color-mix(in srgb, var(--a) 38%, transparent)); }
.error-orn { opacity: 1; margin-block-end: 26px; }

/* --- لایهٔ الگو --- */
.pat-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--a); opacity: .07; z-index: 0; }
.pat-layer.pat-gold { opacity: .09; }

/* --- سربرگ صفحه: بافت، گوشه‌های اسلیمی، حاشیهٔ قالی --- */
.page-head { position: relative; overflow: hidden; isolation: isolate; }
.page-head > .container, .page-head-band { position: relative; z-index: 1; }
.ph-corner { position: absolute; inset-block-start: 14px; color: var(--c-gold); opacity: .6; z-index: 1; pointer-events: none; line-height: 0; }
.ph-corner-a { inset-inline-start: 14px; transform: scaleX(-1); }
.ph-corner-b { inset-inline-end: 14px; }
.page-head-band { opacity: 1; color: var(--a); line-height: 0; }
.m-rug { display: block; color: var(--a); opacity: .8; }

/* --- قاب طاقی (طاق ایرانی) --- */
.media.arch, .page-hero, .article-figure, .group-media .media {
  background: transparent; box-shadow: none; overflow: visible; border-radius: 0;
  filter: drop-shadow(0 14px 26px rgba(11,42,42,.18));
}
.media.arch picture, .page-hero picture, .article-figure picture, .group-media .media picture {
  display: block; height: 100%; overflow: hidden;
  clip-path: url(#clip-arch); border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.media.arch picture { border-radius: 0 0 8px 8px; }
.page-hero { margin-block: 34px 8px; }

/* دروازه: طاق بر دیوار کاشی */
.gateway-media { position: relative; padding: 16px 16px 0; background: var(--a-tint); overflow: hidden; isolation: isolate; }
.gateway-media .pat-layer { opacity: .13; }
.gateway-media .media { position: relative; z-index: 1; }
.gateway-icon { z-index: 3; }

/* --- سرلوحه --- */
.m-headpiece { display: block; margin: 0 auto 18px; color: var(--c-gold); max-width: 100%; height: auto; }

/* --- کتیبه (بیت) --- */
.verse-band {
  position: relative; isolation: isolate;
  background: linear-gradient(160deg, var(--a-deep), color-mix(in srgb, var(--a-deep) 72%, #101E44));
  border-block: 3px double color-mix(in srgb, var(--c-gold) 70%, transparent);
}
.verse-band::before, .verse-band::after { display: none; }
.verse-band .container { position: relative; z-index: 1; }
.kitabeh {
  position: relative; max-width: 880px; margin-inline: auto; padding: 30px 44px;
  border: 1px solid color-mix(in srgb, var(--c-gold) 78%, transparent);
  outline: 1px solid color-mix(in srgb, var(--c-gold) 40%, transparent); outline-offset: 6px;
  background: color-mix(in srgb, var(--a-deep) 55%, transparent);
}
.kitabeh::before, .kitabeh::after {
  content: ""; position: absolute; inset-block-start: 50%; width: 11px; height: 11px;
  background: var(--c-gold); transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 0 3px var(--a-deep);
}
.kitabeh::before { inset-inline-start: -6px; }
.kitabeh::after { inset-inline-end: -6px; }
.kitabeh .verse { margin: 0; }

/* --- هفت‌رنگ --- */
.haft-rang { display: flex; justify-content: center; align-items: center; gap: 20px; position: relative; padding: 20px 0 6px; }
.haft-rang::before {
  content: ""; position: absolute; inset-inline: 18%; inset-block-start: 50%; margin-top: 7px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold) 25%, var(--c-gold) 75%, transparent);
}
.haft-rang span {
  position: relative; width: 12px; height: 12px; transform: rotate(45deg); background: var(--a);
  box-shadow: 0 0 0 3px var(--c-bg), 0 0 0 4px color-mix(in srgb, var(--a) 55%, transparent);
}

/* --- قهرمان: نقش‌مایهٔ بزرگ و کتیبهٔ کیکر --- */
.hero-mark { position: absolute; z-index: 1; inset-block-start: 50%; inset-inline-start: -160px; transform: translateY(-50%); color: var(--c-gold); opacity: .085; pointer-events: none; line-height: 0; }
.hero-mark .m-orn { color: inherit; opacity: 1; }
.hero-kicker {
  padding: 0; border: 0; border-radius: 0; background: var(--c-gold);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
}
.hero-kicker > span {
  display: block; margin: 1.5px; padding: 6px 28px; background: var(--a-deep); color: #FBE6BC;
  clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 11px 100%, 0 50%);
}

/* --- کیکر: لوزی پایانی --- */
.kicker::after { content: ""; width: 6px; height: 6px; background: var(--c-gold); transform: rotate(45deg); flex: 0 0 auto; }

/* --- گوشه‌های طلایی کارت‌ها در هاور --- */
.entry-card, .essay-card, .zone-card, .news-card, .listen-item, .talk, .art-card { position: relative; }
.entry-card::before, .essay-card::before, .zone-card::before, .news-card::before, .listen-item::before, .talk::before, .art-card::before,
.entry-card::after, .essay-card::after, .zone-card::after, .news-card::after, .listen-item::after, .talk::after, .art-card::after {
  content: ""; position: absolute; z-index: 3; width: 16px; height: 16px;
  border: 1.5px solid var(--c-gold); opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s cubic-bezier(.2,.7,.2,1);
}
.entry-card::before, .essay-card::before, .zone-card::before, .news-card::before, .listen-item::before, .talk::before, .art-card::before {
  inset-block-start: 9px; inset-inline-start: 9px; border-inline-end: 0; border-block-end: 0; transform: translate(4px, 4px);
}
.entry-card::after, .essay-card::after, .zone-card::after, .news-card::after, .listen-item::after, .talk::after, .art-card::after {
  inset-block-end: 9px; inset-inline-end: 9px; border-inline-start: 0; border-block-start: 0; transform: translate(-4px, -4px);
}
.entry-card:hover::before, .essay-card:hover::before, .zone-card:hover::before, .news-card:hover::before, .listen-item:hover::before, .talk:hover::before, .art-card:hover::before,
.entry-card:hover::after, .essay-card:hover::after, .zone-card:hover::after, .news-card:hover::after, .listen-item:hover::after, .talk:hover::after, .art-card:hover::after { opacity: .95; transform: none; }

/* --- لایهٔ ژرف: بافت طلایی --- */
.deep-card { position: relative; isolation: isolate; overflow: hidden; }
.deep-card > :not(.pat-layer) { position: relative; z-index: 1; }
.deep-card .pat-layer { position: absolute; z-index: 0; opacity: .1; }

/* --- فوتر: بافت شش‌ضلعی و حاشیهٔ قالی --- */
.site-footer { position: relative; isolation: isolate; background: linear-gradient(180deg, var(--c-ink-deep), #071D1C); }
.site-footer > .container, .footer-bottom, .footer-band { position: relative; z-index: 1; }
.site-footer .pat-layer { opacity: .07; }
.footer-band { color: var(--c-gold); opacity: 1; line-height: 0; }
.footer-band .m-rug { color: var(--c-gold); opacity: .75; }

/* --- بخش‌های بافت‌دار --- */
.section-alt, .prose-section, .listen-section { background-color: var(--c-bg-deep); background-image: var(--pat-star-soft); }
.primary-nav .pat-layer { display: none; }

/* --- دکمه‌ها: نخ طلا --- */
.btn-primary { box-shadow: var(--sh-a), inset 0 0 0 1.5px rgba(255,255,255,.28); }
.hero .btn-primary { box-shadow: 0 12px 32px rgba(0,0,0,.28), inset 0 0 0 1.5px rgba(255,255,255,.45); }
.btn-ghost { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-gold) 40%, transparent); }

/* --- سرلوحهٔ سایت: خط دوتایی --- */
.site-header::after { height: 4px; background: linear-gradient(90deg, var(--a), var(--c-gold) 30%, var(--a) 50%, var(--c-gold) 70%, var(--a)); }

@media (max-width: 1024px) {
  .brand-mark { width: 46px; height: 46px; }
  .primary-nav { isolation: isolate; }
  .primary-nav .pat-layer { display: block; opacity: .06; }
  .nav-panel { position: relative; z-index: 1; }
}
@media (max-width: 760px) {
  .ph-corner, .hero-mark { display: none; }
  .kitabeh { padding: 22px 20px; }
  .haft-rang { gap: 12px; }
  .gateway-media { padding: 12px 12px 0; }
}

/* ==========================================================================
   ۲۱ — روایت‌های پهنه‌ها (بلاگ) و نشان‌واره‌های ستاره‌ای
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.post-grid-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.post-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: transform .26s cubic-bezier(.2,.7,.2,1), box-shadow .26s, border-color .26s;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: color-mix(in srgb, var(--a) 45%, var(--c-border)); text-decoration: none; }
.post-card:hover .media img { transform: scale(1.06); }
.post-media { position: relative; }
.post-media .media { border-radius: 0; }
.post-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--a-deep) 28%, transparent), transparent 40%); pointer-events: none; }
.post-zone {
  position: absolute; z-index: 2; inset-block-start: 12px; inset-inline-start: 12px;
  font-family: var(--font-head); font-size: .74rem; font-weight: 700; color: #fff;
  background: color-mix(in srgb, var(--a) 88%, #000); padding: 4px 13px; border-radius: var(--r-pill);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.post-body { padding: 20px 22px 20px; display: flex; flex-direction: column; flex: 1; }
.post-body h3 { margin: 0 0 .4em; font-size: 1.18rem; color: var(--c-text); }
.post-body > p { color: var(--c-muted); font-size: .94rem; margin: 0 0 16px; flex: 1; }
.post-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.post-foot time { font-size: .78rem; color: var(--c-muted); }
.post-card::before, .post-card::after {
  content: ""; position: absolute; z-index: 3; width: 16px; height: 16px;
  border: 1.5px solid var(--c-gold); opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s cubic-bezier(.2,.7,.2,1);
}
.post-card::before { inset-block-start: 9px; inset-inline-end: 9px; border-inline-start: 0; border-block-end: 0; transform: translate(-4px, 4px); }
.post-card::after { inset-block-end: 9px; inset-inline-start: 9px; border-inline-end: 0; border-block-start: 0; transform: translate(4px, -4px); }
.post-card:hover::before, .post-card:hover::after { opacity: .95; transform: none; }

/* صفحهٔ روایت */
.post .post-meta { display: flex; align-items: center; gap: 14px; margin-block-start: 16px; }
.post .post-meta time { font-size: .84rem; color: var(--c-muted); }
.post .zone-chip { text-decoration: none; }
.post .zone-chip:hover { background: var(--a); color: #fff; }
.tag-list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { margin: 0; font-size: .8rem; font-weight: 700; color: var(--a-dark); background: var(--a-soft); padding: 4px 13px; border-radius: var(--r-pill); }
.tag-list li::before { content: "#"; opacity: .5; margin-inline-end: 3px; }
.back-link { margin-block-start: 22px; font-family: var(--font-head); font-weight: 700; }
.back-link a { display: inline-flex; align-items: center; gap: 8px; }
.posts-section .section-intro { margin-block-end: 28px; }

/* --- نشان‌واره‌های ستاره‌ای (هم‌خانوادهٔ نشان اصلی) --- */
.gateway-icon, .zone-badge, .legend-swatch, .nav-icon, .entry-icon {
  clip-path: polygon(50% 0%, 64.7% 14.4%, 85.4% 14.6%, 85.6% 35.3%, 100% 50%, 85.6% 64.7%, 85.4% 85.4%, 64.7% 85.6%, 50% 100%, 35.3% 85.6%, 14.6% 85.4%, 14.4% 64.7%, 0% 50%, 14.4% 35.3%, 14.6% 14.6%, 35.3% 14.4%);
  border-radius: 0; border: 0; box-shadow: none; backdrop-filter: none;
  background: linear-gradient(140deg, var(--a), var(--a-dark)); color: #fff;
}
.gateway-icon { width: 62px; height: 62px; inset-block-end: -26px; inset-inline-start: 20px; }
.gateway:hover .gateway-icon { transform: translateY(-4px) rotate(22.5deg); background: linear-gradient(140deg, #E2B457, #B8801A); color: #2A1B02; }
.zone-badge { width: 52px; height: 52px; }
.legend-swatch { width: 42px; height: 42px; }
.entry-icon { width: 44px; height: 44px; inset-block-start: 12px; inset-inline-end: 12px; }
.nav-link[aria-current="page"] .nav-icon { background: linear-gradient(140deg, #E2B457, #B8801A); color: #2A1B02; }
.brand-mark { color: #0F3F4C; }
.brand:hover .brand-mark { transform: rotate(45deg) scale(1.04); }
.logo-xl { color: #0F3F4C; }

/* ==========================================================================
   ۲۲ — هم‌سفر: ویجت گفت‌وگو (نسخهٔ ۲)
   ========================================================================== */
:root { --pat-star-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpolygon points='28,2 34.5,12.3 46.4,9.6 43.7,21.5 54,28 43.7,34.5 46.4,46.4 34.5,43.7 28,54 21.5,43.7 9.6,46.4 12.3,34.5 2,28 12.3,21.5 9.6,9.6 21.5,12.3' fill='none' stroke='%23F3DFAE' stroke-opacity='.16'/%3E%3C/svg%3E"); }
.hs { position: fixed; inset-block-end: 22px; inset-inline-end: 22px; z-index: 200; font-family: var(--font); }

/* --- لانچر: نشان شناور + حباب دعوت --- */
.hs-launch { display: flex; align-items: center; gap: 12px; transition: opacity .2s; }
.hs-hint {
  position: relative; max-width: 270px; padding: 10px 16px; text-align: start;
  border: 1px solid var(--c-border); border-radius: 16px; background: var(--c-surface); color: var(--c-text);
  font-family: var(--font-head); font-weight: 600; font-size: .9rem; line-height: 1.55;
  box-shadow: var(--sh-lg); cursor: pointer; opacity: 0; transform: translateX(-10px) scale(.96); pointer-events: none;
  transition: opacity .4s, transform .4s cubic-bezier(.2,.7,.2,1);
}
.hs-hint b { color: var(--a-dark); }
.hs-hint::after {
  content: ""; position: absolute; inset-block-start: 50%; inset-inline-end: -7px; width: 12px; height: 12px;
  background: var(--c-surface); border-inline-end: 1px solid var(--c-border); border-block-end: 1px solid var(--c-border);
  transform: translateY(-50%) rotate(45deg);
}
.hs-hint.is-in { opacity: 1; transform: none; pointer-events: auto; }
.hs-launcher { position: relative; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; }
.hs-launcher-mark {
  display: block; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--a) 48%, transparent), 0 0 0 3px var(--c-bg), 0 0 0 5px var(--c-gold);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
  animation: hsFloat 4.5s ease-in-out infinite;
}
.hs-launcher-mark svg { display: block; width: 100%; height: 100%; }
.hs-launcher:hover .hs-launcher-mark { transform: scale(1.07) rotate(-10deg); animation-play-state: paused; }
.hs-launcher-ring { position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--c-gold); opacity: 0; pointer-events: none; }
.hs-launcher.is-pulse .hs-launcher-ring { animation: hsPulse 2.2s ease-out 3; }
@keyframes hsFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes hsPulse { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
.hs.is-open .hs-launch { opacity: 0; pointer-events: none; }

/* --- پس‌زمینهٔ حالت بزرگ --- */
.hs-backdrop { position: fixed; inset: 0; z-index: 199; background: rgba(11,42,42,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.hs-backdrop[hidden] { display: none; }

/* --- پنل --- */
.hs-panel {
  position: absolute; inset-block-end: 0; inset-inline-end: 0; z-index: 201;
  width: min(480px, calc(100vw - 32px)); height: min(760px, calc(100vh - 44px));
  display: flex; flex-direction: column;
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-xl);
  box-shadow: 0 30px 70px rgba(11,42,42,.3); overflow: hidden; isolation: isolate;
  opacity: 0; transform: translateY(20px) scale(.94); transform-origin: bottom left;
  transition: opacity .28s ease, transform .34s cubic-bezier(.2,.7,.2,1);
}
.hs-panel.is-open { opacity: 1; transform: none; }
.hs-panel[hidden] { display: none; }
.hs.is-large .hs-panel {
  position: fixed; inset: 50% auto auto 50%;
  width: min(980px, calc(100vw - 40px)); height: min(880px, calc(100vh - 40px));
  transform: translate(-50%, -50%) scale(.96);
}
.hs.is-large .hs-panel.is-open { transform: translate(-50%, -50%); }

.hs-head {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 12px;
  color: #FFF6E4; background: linear-gradient(140deg, var(--a), var(--a-deep));
  background-image: var(--pat-star-gold), linear-gradient(140deg, var(--a), var(--a-deep));
  border-block-end: 3px double color-mix(in srgb, var(--c-gold) 75%, transparent);
}
.hs-avatar { display: block; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.hs-avatar svg { display: block; width: 100%; height: 100%; }
.hs-title { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.hs-title strong { font-family: var(--font-head); font-size: 1.14rem; font-weight: 800; }
.hs-title span { font-size: .76rem; color: #F3DFAE; display: inline-flex; align-items: center; }
.hs-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #5BE0A8; margin-inline-end: 6px; box-shadow: 0 0 0 2px rgba(91,224,168,.3); }
.hs-ib { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #FFF6E4; cursor: pointer; transition: background .18s, transform .18s; }
.hs-ib:hover { background: rgba(255,255,255,.24); transform: translateY(-1px); }

.hs-body { flex: 1; overflow-y: auto; padding: 18px 14px 8px; display: flex; flex-direction: column; gap: 14px; background: var(--c-bg); background-image: var(--pat-star-soft); overscroll-behavior: contain; scroll-behavior: smooth; }
.hs-msg { position: relative; display: flex; align-items: flex-end; gap: 8px; max-width: 92%; }
.hs-msg.hs-user { align-self: flex-end; flex-direction: row-reverse; }
.hs-msg.hs-assistant { align-self: flex-start; }
.hs-msg-avatar { display: block; width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; }
.hs-msg-avatar svg { display: block; width: 100%; height: 100%; }
.hs-bubble { position: relative; padding: 11px 15px; border-radius: 18px; font-size: .95rem; line-height: 1.85; box-shadow: var(--sh-sm); animation: hsIn .3s ease both; }
@keyframes hsIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hs-assistant .hs-bubble { background: var(--c-surface); border: 1px solid var(--c-border); border-start-start-radius: 4px; color: var(--c-text); }
.hs-user .hs-bubble { background: linear-gradient(140deg, var(--a), var(--a-dark)); color: #fff; border-start-end-radius: 4px; }
.hs-bubble p { margin: 0 0 .55em; } .hs-bubble p:last-child { margin: 0; }
.hs-bubble ul { margin: .3em 0 .55em; padding-inline-start: 1.2em; }
.hs-bubble li { margin: .22em 0; }
.hs-bubble h4 { font-family: var(--font-head); font-size: 1rem; margin: .55em 0 .3em; color: var(--a-dark); }
.hs-bubble a { color: var(--a-dark); font-weight: 700; border-block-end: 1px solid color-mix(in srgb, var(--a) 40%, transparent); }
.hs-bubble a:hover { text-decoration: none; border-color: var(--a); }
.hs-error .hs-bubble { background: #FBEDEA; border-color: #EBC6BF; color: #7A2F22; }
.hs-notice .hs-bubble { background: #FFF6E4; border-color: #E9D3A6; color: #6A4A10; }
.hs-guard .hs-bubble { border-inline-start: 4px solid var(--c-gold); background: #FFFBF2; }
.hs-guard-lbl { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-head); font-size: .72rem; font-weight: 700; color: #8C5E0E; background: rgba(200,135,26,.15); border-radius: var(--r-pill); padding: 2px 10px; margin-block-end: 6px; }
.hs-retry { display: block; margin-block-start: 8px; padding: 5px 14px; border: 1px solid #C97A6A; border-radius: var(--r-pill); background: #fff; color: #7A2F22; font-family: var(--font-head); font-weight: 700; font-size: .82rem; cursor: pointer; }
.hs-copy { position: absolute; inset-block-start: -8px; inset-inline-end: 6px; z-index: 2; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--c-border); border-radius: 50%; background: var(--c-surface); color: var(--c-muted); cursor: pointer; opacity: 0; transition: opacity .2s, color .2s; }
.hs-msg:hover .hs-copy, .hs-copy:focus-visible { opacity: 1; }
.hs-copy:hover { color: var(--a-dark); }
.hs-dots { display: inline-flex; gap: 5px; padding: 4px 2px; vertical-align: middle; }
.hs-dots i { width: 8px; height: 8px; background: var(--a); transform: rotate(45deg); opacity: .35; animation: hsDot 1.1s infinite ease-in-out; }
.hs-dots i:nth-child(2) { animation-delay: .18s; } .hs-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes hsDot { 0%, 100% { opacity: .3; transform: rotate(45deg) scale(.85); } 50% { opacity: 1; transform: rotate(45deg) scale(1.05); } }
.hs-typing-lbl { margin-inline-start: 10px; font-size: .8rem; color: var(--c-muted); vertical-align: middle; }

/* منابع زیر پاسخ */
.hs-sources { margin-block-start: 10px; padding-block-start: 9px; border-block-start: 1px dashed var(--c-border); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hs-sources-lbl { font-family: var(--font-head); font-size: .72rem; font-weight: 700; color: var(--c-muted); }
.hs-src { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); background: var(--a-tint); color: var(--a-dark); border: 1px solid color-mix(in srgb, var(--a) 25%, var(--c-border)); text-decoration: none; transition: background .18s; }
.hs-src:hover { background: var(--a-soft); text-decoration: none; }
.hs-src svg { color: var(--c-gold); }

.hs-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 14px 10px; background: var(--c-bg); }
.hs-chips[hidden] { display: none; }
.hs-chip { padding: 6px 13px; border: 1px solid var(--c-border); border-radius: var(--r-pill); background: var(--c-surface); color: var(--a-dark); font-family: var(--font); font-size: .82rem; cursor: pointer; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-gold) 30%, transparent); transition: background .18s, border-color .18s, transform .18s; }
.hs-chip:hover { background: var(--a-tint); border-color: var(--a); transform: translateY(-1px); }

.hs-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 14px; background: var(--c-surface); border-block-start: 1px solid var(--c-border-soft); font-size: .76rem; color: var(--c-muted); }
.hs-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; color: var(--c-text); font-weight: 500; }
.hs-switch input { position: absolute; opacity: 0; pointer-events: none; }
.hs-switch-track { position: relative; width: 34px; height: 20px; border-radius: var(--r-pill); background: var(--c-border); transition: background .2s; flex: 0 0 auto; }
.hs-switch-track::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.hs-switch input:checked + .hs-switch-track { background: var(--a); }
.hs-switch input:checked + .hs-switch-track::after { transform: translateX(-14px); }
.hs-switch input:focus-visible + .hs-switch-track { outline: 3px solid var(--a-soft); }
.hs-kbd { display: none; }

.hs-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--c-surface); }
.hs-input { flex: 1; resize: none; min-height: 46px; max-height: 160px; padding: 11px 14px; border: 1px solid var(--c-border); border-radius: 14px; background: var(--c-bg); font: inherit; font-size: .95rem; line-height: 1.6; color: var(--c-text); outline: none; transition: border-color .18s, box-shadow .18s; }
.hs-input:focus { border-color: var(--a); box-shadow: 0 0 0 3px var(--a-soft); }
.hs-input:disabled { opacity: .7; }
.hs-send {
  display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(140deg, var(--a), var(--a-dark));
  clip-path: polygon(50% 0%, 64.7% 14.4%, 85.4% 14.6%, 85.6% 35.3%, 100% 50%, 85.6% 64.7%, 85.4% 85.4%, 64.7% 85.6%, 50% 100%, 35.3% 85.6%, 14.6% 85.4%, 14.4% 64.7%, 0% 50%, 14.4% 35.3%, 14.6% 14.6%, 35.3% 14.4%);
  transition: transform .2s cubic-bezier(.2,.7,.2,1), background .2s;
}
.hs-send:hover { transform: rotate(22.5deg) scale(1.06); }
.is-busy .hs-send { background: linear-gradient(140deg, #B23B2E, #7A2F22); }
.hs-foot { margin: 0; padding: 6px 14px 10px; font-size: .72rem; color: var(--c-muted); text-align: center; background: var(--c-surface); }

/* حالت بزرگ: فضای بیشتر، خط بزرگ‌تر */
.hs.is-large .hs-body { padding: 26px 30px 12px; gap: 18px; }
.hs.is-large .hs-msg { max-width: 84%; }
.hs.is-large .hs-bubble { font-size: 1.03rem; padding: 14px 20px; }
.hs.is-large .hs-chips, .hs.is-large .hs-tools, .hs.is-large .hs-form { padding-inline: 30px; }
.hs.is-large .hs-head { padding: 16px 22px 16px 16px; }
body.hs-large { overflow: hidden; }

@media (min-width: 641px) { .hs-kbd { display: inline; } }
@media (max-width: 640px) {
  .hs { inset-block-end: 14px; inset-inline-end: 14px; }
  .hs-hint, .hs-expand { display: none; }
  .hs-launcher { width: 62px; height: 62px; }
  .hs-launcher-mark { width: 58px; height: 58px; }
  .hs-panel { position: fixed; inset: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; transform: translateY(30px); }
  .hs-panel.is-open { transform: none; }
  body.hs-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-panel, .hs-launcher-mark, .hs-send, .hs-hint { transition: none; animation: none; }
  .hs-dots i, .hs-bubble { animation: none; opacity: 1; }
}
@media print { .hs { display: none; } }

/* --- هم‌سفر: افزوده‌های نسخهٔ ۳ (حلقهٔ طلایی، دکمهٔ بزرگ‌تر، دستگیرهٔ اندازه، جست‌وجو) --- */
.hs-launcher::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 18%, #E9C77E 25%, transparent 32% 68%, #E9C77E 75%, transparent 82%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: hsSpin 5s linear infinite;
}
.hs-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 14px; flex: 0 0 auto;
  border: 1px solid rgba(243,223,174,.4); border-radius: var(--r-pill); background: rgba(255,255,255,.1);
  color: #FFF6E4; font-family: var(--font-head); font-weight: 700; font-size: .8rem; cursor: pointer;
  transition: background .18s, transform .18s, border-color .18s;
}
.hs-pill:hover { background: rgba(255,255,255,.22); border-color: rgba(243,223,174,.75); transform: translateY(-1px); }
.hs-ib[aria-pressed="true"] { background: rgba(243,223,174,.3); box-shadow: inset 0 0 0 1px rgba(243,223,174,.6); }
.hs-head { user-select: none; }
.hs-grip { position: absolute; inset-block-start: 3px; inset-inline-start: 3px; display: grid; place-items: center; width: 20px; height: 20px; color: #F3DFAE; opacity: .55; cursor: nesw-resize; transform: scaleX(-1); transition: opacity .2s; }
.hs-grip:hover { opacity: 1; }
.hs.is-large .hs-grip { display: none; }
.hs.is-resizing, .hs.is-resizing * { user-select: none; }
.hs.is-resizing .hs-panel { transition: none; }

.hs-searchbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--c-surface); border-block-end: 1px solid var(--c-border); }
.hs-searchbar[hidden], .hs-results[hidden] { display: none; }
.hs-q { flex: 1; height: 44px; padding: 0 14px; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-bg); font: inherit; font-size: .95rem; color: var(--c-text); }
.hs-q:focus { outline: none; border-color: var(--a); box-shadow: 0 0 0 3px var(--a-soft); }
.hs-q-count { font-size: .76rem; color: var(--c-muted); white-space: nowrap; }
.hs-results { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--c-bg); background-image: var(--pat-star-soft); overscroll-behavior: contain; }
.hs-res { position: relative; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: 14px; background: var(--c-surface); box-shadow: var(--sh-sm); animation: hsIn .25s ease both; }
.hs-res:hover { border-color: color-mix(in srgb, var(--a) 45%, var(--c-border)); }
.hs-res-main { display: block; color: var(--c-text); text-decoration: none; }
.hs-res-main:hover { text-decoration: none; }
.hs-res-kind { font-family: var(--font-head); font-size: .72rem; font-weight: 700; color: var(--a-dark); }
.hs-res-main strong { display: block; margin: 2px 0 4px; font-family: var(--font-head); font-size: .98rem; color: var(--c-text); }
.hs-res-main p { margin: 0; font-size: .86rem; line-height: 1.8; color: var(--c-muted); }
.hs-res mark { background: rgba(224,169,74,.3); color: inherit; border-radius: 3px; padding: 0 2px; }
.hs-res-ask { display: inline-flex; align-items: center; margin-block-start: 8px; padding: 4px 12px; border: 1px solid color-mix(in srgb, var(--a) 40%, var(--c-border)); border-radius: var(--r-pill); background: var(--a-tint); color: var(--a-dark); font-family: var(--font-head); font-weight: 700; font-size: .78rem; cursor: pointer; }
.hs-res-ask:hover { background: var(--a); color: #fff; }
.hs-res-empty { padding: 26px 8px; text-align: center; color: var(--c-muted); font-size: .92rem; }
.hs-res-hints { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-block-start: 12px; }
.hs.is-searching .hs-body, .hs.is-searching .hs-chips, .hs.is-searching .hs-tools, .hs.is-searching .hs-form, .hs.is-searching .hs-foot { display: none !important; }
.hs.is-large .hs-searchbar, .hs.is-large .hs-results { padding-inline: 30px; }
@media (max-width: 640px) { .hs-pill { display: none; } .hs-grip { display: none; } }
@media (prefers-reduced-motion: reduce) { .hs-launcher::after { animation: none; } }

/* ==========================================================================
   ۲۳ — قهرمان v3: دیوار زندهٔ کاشی، لوح شیشه‌ای، عنوان چرخان، هفت پهنه، کتیبهٔ روان
   ========================================================================== */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.hero-v3 { --mx: 50%; --my: 50%; --px: 0; --py: 0; min-height: clamp(640px, 92vh, 880px); padding-block-end: 62px; background: #06222A; }

/* --- دیوار: کاشی‌ها با بندکشی --- */
.hero-v3 .tile-wall {
  inset: -14px; gap: 6px; padding: 6px; background: #0A2630;
  grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr;
  translate: calc(var(--px) * 1px) calc(var(--py) * 1px); transition: translate .5s cubic-bezier(.2,.7,.2,1);
}
.hero-v3 .tile { border-radius: 4px; cursor: pointer; translate: calc(var(--px) * var(--d, 1) * .5px) calc(var(--py) * var(--d, 1) * .5px); transition: translate .6s cubic-bezier(.2,.7,.2,1), outline-color .3s; outline: 2px solid transparent; outline-offset: -2px; }
.hero-v3 .tile::after { box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 -24px 40px rgba(0,0,0,.18); }
.hero-v3 .tile:hover { outline-color: rgba(233,199,126,.85); }
.hero-v3 .tile.is-moving { z-index: 4; outline-color: rgba(233,199,126,.95); box-shadow: 0 18px 40px rgba(0,0,0,.45); }

/* عکس‌ها: زنده و گرم */
.hero-v3 .tile-photo picture { position: absolute; inset: 0; }
.hero-v3 .tile-photo picture.is-next { opacity: 0; z-index: 1; transition: opacity 1.3s ease; }
.hero-v3 .tile-photo picture.is-next.is-in { opacity: 1; }
.hero-v3 .tile-photo img { filter: saturate(.95) contrast(1.05); transform-origin: center; animation: hsKenBurns 24s ease-in-out infinite alternate; will-change: transform; transition: filter .5s; }
.hero-v3 .tile-photo:hover img { filter: saturate(1.1) contrast(1.08) brightness(1.08); }
@keyframes hsKenBurns { from { transform: scale(1.03) translate(0, 0); } to { transform: scale(1.16) translate(2.5%, -2%); } }

/* کاشی‌های لعابی: لاجورد، فیروزه، خشت، انار — با گرهٔ طلایی */
.hero-v3 .tile-motif {
  --k: #1F4E8C; display: grid; place-items: center; color: #F6E2B0;
  background:
    radial-gradient(110% 90% at 28% 16%, rgba(255,255,255,.24), transparent 52%),
    var(--pat-star-gold),
    radial-gradient(130% 120% at 50% 45%, color-mix(in srgb, var(--k) 86%, #fff) 0%, var(--k) 55%, color-mix(in srgb, var(--k) 58%, #000) 100%);
}
.hero-v3 .tile-motif[data-tone="0"] { --k: #1F4E8C; }
.hero-v3 .tile-motif[data-tone="1"] { --k: #0F7E7C; }
.hero-v3 .tile-motif[data-tone="2"] { --k: #A0652A; }
.hero-v3 .tile-motif[data-tone="3"] { --k: #8A2E43; }
.hero-v3 .tile-motif .m-icon, .hero-v3 .tile-motif .m-orn { opacity: .95; color: #F6E2B0; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.hero-v3 .tile-motif .m-icon { animation: hsGlow 6s ease-in-out infinite; }
.hero-v3 .tile:nth-child(odd) .m-icon { animation-delay: -3s; }
.hero-v3 .tile-orn .m-orn { animation: hsSpin 80s linear infinite; }
@keyframes hsGlow { 0%, 100% { opacity: .78; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes hsSpin { to { transform: rotate(360deg); } }

/* جاروی نور روی دیوار */
.hero-v3 .tile-wall::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,246,228,.14) 50%, transparent 60%);
  background-size: 260% 100%; background-repeat: no-repeat; animation: hsSweep 14s ease-in-out infinite;
}
@keyframes hsSweep { 0% { background-position: 140% 0; } 55%, 100% { background-position: -40% 0; } }

/* پرده: سبک؛ فقط پشت لوح تیره‌تر */
.hero-v3 .hero-scrim {
  pointer-events: none;
  background:
    linear-gradient(270deg, rgba(4,30,36,.55) 0%, rgba(4,30,36,.32) 40%, rgba(4,30,36,.1) 72%, rgba(4,30,36,.04) 100%),
    linear-gradient(180deg, rgba(4,30,36,.35) 0%, transparent 20%, transparent 70%, rgba(4,30,36,.5) 100%);
}
/* فانوس: نور گرم دنبال ماوس */
.hero-lantern {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(circle 340px at var(--mx) var(--my), rgba(255,236,190,.28) 0%, rgba(255,236,190,.08) 45%, transparent 72%);
  mix-blend-mode: screen;
}
.hero.is-hover .hero-lantern { opacity: 1; }

/* --- متن مستقیم روی دیوار کاشی (بی‌لوح، بی‌قاب) --- */
.hero-v3 .hero-scrim {
  background:
    linear-gradient(270deg, rgba(3,24,30,.7) 0%, rgba(3,24,30,.52) 26%, rgba(3,24,30,.22) 50%, rgba(3,24,30,0) 70%),
    linear-gradient(180deg, rgba(3,24,30,.3) 0%, transparent 16%, transparent 76%, rgba(3,24,30,.42) 100%);
}
/* مه ملایم فقط پشت متن: جزئیات شلوغ عکس‌ها نرم می‌شود ولی رنگ و شکلشان پیداست */
.hero-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  -webkit-backdrop-filter: blur(2.5px) saturate(1.05); backdrop-filter: blur(2.5px) saturate(1.05);
  -webkit-mask-image: linear-gradient(270deg, #000 0%, #000 28%, transparent 55%);
  mask-image: linear-gradient(270deg, #000 0%, #000 28%, transparent 55%);
}
.hero-v3 .hero-inner { width: 100%; max-width: var(--container); position: relative; z-index: 4; display: flex; justify-content: flex-start; padding-block: 56px; pointer-events: none; translate: calc(var(--px) * -.25px) calc(var(--py) * -.25px); transition: translate .6s cubic-bezier(.2,.7,.2,1); }
.hero-copy { width: min(600px, 100%); pointer-events: auto; }
.hero-v3 .hero-kicker {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 0;
  background: none; border: 0; border-radius: 0; clip-path: none;
  font-family: var(--font-head); font-size: .92rem; font-weight: 700; color: #F3DFAE;
  text-shadow: 0 1px 10px rgba(0,0,0,.6);
}
.hero-v3 .hero-kicker > span { display: inline; margin: 0; padding: 0; background: none; clip-path: none; color: inherit; }
.hero-v3 .hero-kicker::before { content: ""; width: 36px; height: 2px; border-radius: 2px; background: #E0A94A; box-shadow: 0 1px 6px rgba(0,0,0,.4); }
.hero-v3 .hero-kicker::after { content: ""; width: 7px; height: 7px; background: #E0A94A; transform: rotate(45deg); }
.hero-v3 .hero-title { max-width: none; margin: 0 0 18px; font-size: clamp(2.5rem, 1.2rem + 4.2vw, 4.4rem); line-height: 1.24; color: #fff; text-shadow: none; }
.ht-a, .ht-b { color: #fff; filter: drop-shadow(0 4px 20px rgba(0,0,0,.55)) drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.ht-b { display: block; }
.ht-rot { display: inline-grid; justify-items: start; vertical-align: bottom; filter: drop-shadow(0 4px 18px rgba(0,0,0,.5)); }
.ht-w {
  grid-area: 1 / 1; white-space: nowrap;
  background: linear-gradient(100deg, #F6DFA0 15%, #FFF6DC 45%, #E0A94A 85%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(45%); filter: blur(4px);
  transition: opacity .55s ease, transform .65s cubic-bezier(.2,.7,.2,1), filter .55s;
  animation: hsShimmer 7s linear infinite;
}
.ht-w.is-on { opacity: 1; transform: none; filter: none; }
.ht-w.is-out { opacity: 0; transform: translateY(-45%); filter: blur(4px); }
@keyframes hsShimmer { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } }
.hero-v3 .hero-sub {
  max-width: 44ch; margin: 0 0 30px; font-size: clamp(1.02rem, .96rem + .3vw, 1.14rem); font-weight: 500; line-height: 1.95;
  color: #F1F7F6; text-shadow: 0 1px 14px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.45);
}
.hero-v3 .hero-cta { margin: 0; }
.hero-v3 .btn-ghost { background: rgba(3,24,30,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* --- کتیبهٔ روان: بیت‌ها بر نوار لاجوردی --- */
.hero-frieze {
  position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 5; height: 62px; overflow: hidden;
  display: flex; align-items: center; isolation: isolate;
  background: linear-gradient(180deg, #13366B, #0B2248);
  border-block: 3px double rgba(217,166,74,.85);
  box-shadow: 0 -12px 30px rgba(0,0,0,.28);
}
.hero-frieze::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--pat-star-gold); opacity: .9; }
.hero-frieze::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, #0B2248 0%, transparent 8%, transparent 92%, #0B2248 100%); }
.hf-track { display: flex; width: max-content; animation: hfScroll 90s linear infinite; }
.hero-frieze:hover .hf-track { animation-play-state: paused; }
.hf-set { display: flex; align-items: center; flex: 0 0 auto; }
.hf-verse { display: inline-flex; align-items: baseline; gap: 12px; padding-inline: 28px; white-space: nowrap; }
.hf-text { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; color: #F6E2B0; }
.hf-poet { font-size: .8rem; color: #A9BCE0; }
.hf-poet::before { content: "— "; }
.hf-orn { display: inline-flex; color: #D9A64A; }
@keyframes hfScroll { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* --- ورود --- */
.hero-v3 .hero-kicker, .hero-v3 .hero-title, .hero-v3 .hero-sub, .hero-v3 .hero-cta { animation: hsRise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-v3 .hero-title { animation-delay: .12s; } .hero-v3 .hero-sub { animation-delay: .26s; } .hero-v3 .hero-cta { animation-delay: .4s; }
@keyframes hsRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (max-width: 1024px) {
  .hero-v3 .hero-inner { justify-content: center; }
}
@media (max-width: 760px) {
  .hero-v3 { min-height: clamp(560px, 86vh, 760px); padding-block-end: 54px; }
  .hero-v3 .tile-wall { grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; }
  .hero-v3 .hero-inner { padding-block: 34px 40px; }
  .hero-v3 .hero-scrim { background: linear-gradient(180deg, rgba(3,24,30,.45) 0%, rgba(3,24,30,.6) 45%, rgba(3,24,30,.72) 100%); }
  .hero-veil { -webkit-mask-image: none; mask-image: none; -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); }
  .hero-v3 .hero-sub { max-width: none; }
  .hero-frieze { height: 52px; }
  .hf-text { font-size: .98rem; }
  .hero-lantern { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-v3 .tile-wall, .hero-v3 .tile, .hero-v3 .hero-inner { translate: 0 0; transition: none; }
  .hero-v3 .tile-photo img, .hero-v3 .tile-orn .m-orn, .hero-v3 .tile-motif .m-icon, .hero-v3 .tile-wall::after,
  .ht-w, .hf-track,
  .hero-v3 .hero-kicker, .hero-v3 .hero-title, .hero-v3 .hero-sub, .hero-v3 .hero-cta { animation: none; }
  .ht-w { transition: none; filter: none; }
  .hero-lantern { display: none; }
  .hf-track { justify-content: center; width: 100%; }
  .hf-set + .hf-set { display: none; }
  .hf-set .hf-verse:nth-child(n+3), .hf-set .hf-orn:nth-child(n+2) { display: none; }
}

/* فوتر: پیوندهای رسمی */
.footer-grid { grid-template-columns: 1.5fr 1fr 1.45fr; }
.footer-official a { display: inline-flex; align-items: center; gap: 6px; }
.footer-official a::after { content: "↗"; font-size: .75em; opacity: .55; }
