/* پردیس — استایل صفحه‌های عمومی (RTL، فارسی) */
@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-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;
}

:root {
  --bg: #f8f5ef;
  --surface: #ffffff;
  --ink: #292420;
  --muted: #6f6457;
  --line: #e7dfd1;
  --accent: #b3542e;
  --accent-dark: #93431f;
  --accent-soft: #f6e7de;
  --teal: #2e6e68;
  --teal-soft: #e1edea;
  --ok: #2f7a46;
  --ok-soft: #e2f0e6;
  --err: #b3382e;
  --err-soft: #f7e3e0;
  --info: #3a5a9c;
  --info-soft: #e5ebf6;
  --warn: #a66a00;
  --warn-soft: #f7ecd7;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(41, 36, 32, 0.07);
  --font: "Vazirmatn", "Tahoma", sans-serif;
  /* فوتر و دکمه‌های چسبان — در حالت تیره بازنویسی می‌شوند */
  --footer-bg: #241f1b;
  --footer-ink: #d8d0c4;
  --footer-muted: #b7ac9d;
  --footer-line: #3d3730;
  --footer-btn-bg: #322b25;
  --footer-btn-line: #453c34;
  --field-bg: #ffffff;
  color-scheme: light;
}

/* ---------- حالت تیره ----------
   دو راه فعال‌شدن دارد و هر دو یک نتیجه را می‌دهند:
   ۱) خودکار: اگر مرورگر کاربر تیره باشد (پیش‌فرض، بدون جاوااسکریپت)
   ۲) دستی: دکمهٔ ماه/خورشید در هدر، data-theme روی <html> می‌گذارد */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #211d19;
    --surface: #2b2620;
    --ink: #ece5da;
    --muted: #b3a898;
    --line: #3e372f;
    --accent: #d97b4f;
    --accent-dark: #e6926a;
    --accent-soft: #3c2e24;
    --teal: #5aa39b;
    --teal-soft: #263634;
    --ok: #6cc088;
    --ok-soft: #223529;
    --err: #e2766c;
    --err-soft: #3d2823;
    --info: #8fabdd;
    --info-soft: #28303f;
    --warn: #d9a441;
    --warn-soft: #39301e;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    --footer-bg: #191512;
    --footer-ink: #cfc7bb;
    --footer-muted: #a89d8e;
    --footer-line: #322c26;
    --footer-btn-bg: #2b2620;
    --footer-btn-line: #3e372f;
    --field-bg: #211d19;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .badge--muted { background: #38322a; color: var(--muted); }
  :root:not([data-theme="light"]) .btn:hover { background: #4ab5aa; }
}
[data-theme="dark"] {
  --bg: #211d19;
  --surface: #2b2620;
  --ink: #ece5da;
  --muted: #b3a898;
  --line: #3e372f;
  --accent: #d97b4f;
  --accent-dark: #e6926a;
  --accent-soft: #3c2e24;
  --teal: #5aa39b;
  --teal-soft: #263634;
  --ok: #6cc088;
  --ok-soft: #223529;
  --err: #e2766c;
  --err-soft: #3d2823;
  --info: #8fabdd;
  --info-soft: #28303f;
  --warn: #d9a441;
  --warn-soft: #39301e;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  --footer-bg: #191512;
  --footer-ink: #cfc7bb;
  --footer-muted: #a89d8e;
  --footer-line: #322c26;
  --footer-btn-bg: #2b2620;
  --footer-btn-line: #3e372f;
  --field-bg: #211d19;
  color-scheme: dark;
}
[data-theme="dark"] .badge--muted { background: #38322a; color: var(--muted); }
[data-theme="dark"] .btn:hover { background: #4ab5aa; }
[data-theme="dark"] .pfield input,
[data-theme="dark"] .pfield select,
[data-theme="dark"] .pfield textarea { background: var(--field-bg); }
[data-theme="dark"] .pfield input:focus,
[data-theme="dark"] .pfield select:focus,
[data-theme="dark"] .pfield textarea:focus { outline-color: var(--accent); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.page {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.9;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.6; font-weight: 800; }
h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 720px; }

.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.skip-link {
  position: absolute; right: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus { right: 8px; color: #fff; }

/* ---------- buttons & badges ---------- */
.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  border: 1px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.7;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: #27615c; color: #fff; }
.btn--accent { background: var(--accent); border-color: var(--accent); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--ghost { background: transparent; color: var(--teal); }
.btn--ghost:hover { background: var(--teal-soft); }
.btn--sm { padding: 5px 14px; font-size: 0.85rem; }
.btn--lg { padding: 12px 28px; font-size: 1.05rem; }
.btn--block { display: block; width: 100%; text-align: center; }
.btn--nav { padding: 6px 14px; font-size: 0.85rem; }

.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 1px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--info-soft);
  color: var(--info);
}
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--err { background: var(--err-soft); color: var(--err); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--muted { background: #eee9df; color: var(--muted); }
.badge--accent { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brandmark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.pmark { flex: 0 0 auto; display: block; }
.ico {
  width: 1.05em; height: 1.05em; vertical-align: -0.18em;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.mark {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  border-radius: 12px;
  font-size: 1.4rem; font-weight: 800;
  flex: 0 0 auto;
}
.brandmark-text { display: flex; flex-direction: column; line-height: 1.5; }
.brandmark-text strong { font-size: 1.15rem; font-weight: 800; }
.brandmark-text small { color: var(--muted); font-size: 0.75rem; }

.nav-toggle, .nav-burger { display: none; }
.site-nav { display: flex; align-items: center; gap: 6px; margin-inline-start: 12px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); font-weight: 700; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.95rem; }
.site-nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }
/* دکمهٔ روشن/تیره: با فاصلهٔ خودکار، لوگو راست و دکمه/منو چپ */
.theme-toggle { margin-inline-start: auto; flex: 0 0 auto; }

@media (max-width: 900px) {
  .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    cursor: pointer;
  }
  .nav-burger span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; border-radius: 2px; }
  .nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
  .nav-toggle:checked ~ .site-nav {
    display: flex; position: absolute; top: 72px; right: 0; left: 0;
    flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; gap: 4px;
  }
  .site-nav { display: none; }
  .header-inner { position: relative; }
  /* دکمهٔ روشن/تیره همیشه بیرون از منو و در دسترس می‌ماند؛ burger بعد از آن */
  .theme-toggle { margin-inline-start: auto; flex: 0 0 auto; }
  .nav-burger { margin-inline-start: 8px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--accent); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(46, 110, 104, 0.55) 0, transparent 45%),
    radial-gradient(circle at 10% 85%, rgba(185, 138, 47, 0.45) 0, transparent 40%),
    linear-gradient(160deg, #b3542e 0%, #96431f 100%);
}
.hero-inner { position: relative; padding: clamp(48px, 9vw, 96px) 20px; text-align: center; }
.hero-title { color: #fff; font-size: clamp(1.7rem, 5.5vw, 3rem); margin: 0 0 12px; }
.hero-sub { color: rgba(255, 255, 255, 0.92); font-size: clamp(1rem, 2.5vw, 1.2rem); margin: 0 auto 24px; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.7); background: transparent; }
.hero .btn--ghost:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- sections ---------- */
.section { padding: clamp(28px, 5vw, 56px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.lead { font-size: 1.05rem; color: var(--muted); margin: 8px 0 0; }
.link-more { font-weight: 700; font-size: 0.9rem; }
.link-more--muted { color: var(--muted); }

.intro-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: center; }
.intro-side { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
@media (max-width: 760px) { .intro-grid { grid-template-columns: 1fr; } }

/* ---------- event cards ---------- */
.event-card--featured {
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.event-card__media { background: var(--accent-soft); min-height: 240px; }
.event-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-card__body { padding: 24px 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.event-card__badges { display: flex; gap: 8px; flex-wrap: wrap; }
.event-card__title { margin: 0; }
.event-meta { list-style: none; padding: 0; margin: 0; font-size: 0.95rem; }
.event-meta li { padding: 3px 0; }
.meta-key { color: var(--muted); font-weight: 700; }
.event-meta--lg { font-size: 1.02rem; }
.event-card__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 760px) { .event-card--featured { grid-template-columns: 1fr; } }

.event-list { display: flex; flex-direction: column; gap: 14px; }
.event-row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.event-row__media { width: 120px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; background: var(--accent-soft); flex: 0 0 auto; }
.event-row__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-row__title { margin: 4px 0; font-size: 1.05rem; }
.event-row__title a { color: var(--ink); }
.event-row__title a:hover { color: var(--accent-dark); }
.event-row__actions { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
@media (max-width: 700px) {
  .event-row { grid-template-columns: 1fr; }
  .event-row__media { width: 100%; height: 150px; }
  .event-row__actions { flex-direction: row; flex-wrap: wrap; }
}

.event-hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); margin-top: 16px;
}
.event-hero__media { background: var(--accent-soft); min-height: 280px; }
.event-hero__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-hero__body { padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.event-hero__body h1 { margin: 4px 0; }
@media (max-width: 820px) { .event-hero { grid-template-columns: 1fr; } }

/* ---------- cards grids ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.brand-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.brand-card__logo {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
  background: var(--teal-soft); display: flex; align-items: center; justify-content: center;
}
.brand-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-card__initial { font-size: 2rem; font-weight: 800; color: var(--teal); }
.brand-card__title { margin: 0; font-size: 1.05rem; }
.brand-card__title a { color: var(--ink); }
.brand-card__title a:hover { color: var(--accent-dark); }
.brand-card__desc { color: var(--muted); font-size: 0.88rem; margin: 0; }
.brand-card__link { font-size: 0.82rem; font-weight: 700; color: var(--teal); }
.brand-card__link:hover { color: var(--accent-dark); }
.brand-card__ig { display: inline-flex; align-items: center; gap: 6px; color: var(--info); font-size: 0.85rem; font-weight: 700; }

/* --- brand public page --- */
.brand-hero {
  display: grid; grid-template-columns: 140px 1fr; gap: 22px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.brand-hero__logo {
  width: 140px; height: 140px; border-radius: 50%; overflow: hidden;
  background: var(--teal-soft); display: flex; align-items: center; justify-content: center;
}
.brand-hero__logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-hero__logo .brand-card__initial { font-size: 3rem; font-weight: 800; color: var(--teal); }
.brand-hero__body h2 { margin: 0 0 6px; }
.brand-hero__excerpt { color: var(--muted); margin: 0 0 14px; }
.brand-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section--brand-intro { padding-top: 8px; }
.gallery--brand { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
@media (max-width: 640px) {
  .brand-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.news-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; color: var(--ink);
}
.news-card:hover { border-color: var(--accent); }
.news-card__img { width: 100%; height: 150px; object-fit: cover; }
.news-card__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.news-card__date { color: var(--muted); font-size: 0.8rem; }
.news-card__title { margin: 0; font-size: 1rem; }

.news-row {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
}
.news-row__media { width: 150px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; }
.news-row__media img { width: 100%; height: 100%; object-fit: cover; }
.news-row__title { margin: 4px 0; font-size: 1.05rem; }
.news-row__title a { color: var(--ink); }
@media (max-width: 700px) { .news-row { grid-template-columns: 1fr; } }

.archive-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.archive-mini a {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px; color: var(--ink);
}
.archive-mini a:hover { border-color: var(--accent); }
.archive-mini .muted { font-size: 0.85rem; }

/* ---------- about ---------- */
.page-head { padding: clamp(24px, 4vw, 44px) 0 8px; }
.page-head .lead { margin-top: 6px; }
.stats-strip { display: flex; gap: 14px; flex-wrap: wrap; margin: 20px 0 8px; }
.stats-strip .stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 22px; display: flex; align-items: baseline; gap: 8px;
}
.stats-strip .stat strong { font-size: 1.4rem; color: var(--accent-dark); }
.stats-strip .stat span:last-child { color: var(--muted); font-size: 0.85rem; }

.about-section {
  display: grid; grid-template-columns: 1fr; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin: 16px 0;
}
.about-section__media img { border-radius: var(--radius-sm); max-height: 320px; object-fit: cover; }
.about-section__body h2 { margin-top: 0; }

.rich-text p { margin: 0 0 14px; }
.rich-text h3 { margin: 18px 0 8px; }
.rich-text ul, .rich-text ol { padding-inline-start: 24px; margin: 0 0 14px; }
.rich-text blockquote {
  margin: 14px 0; padding: 8px 18px; border-inline-start: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: var(--radius-sm);
}

.empty-note {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 22px; text-align: center; color: var(--muted);
}

/* ---------- breadcrumbs & article ---------- */
.breadcrumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); margin: 18px 0; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent-dark); }
.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); margin: 12px 0 40px; }
.article__head { margin-bottom: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.article__head h1 { margin: 0 0 6px; }
.article__img { border-radius: var(--radius-sm); margin: 14px 0; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery-item { margin: 0; }
.gallery-item a { display: block; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.gallery-item img { width: 100%; height: 170px; object-fit: cover; display: block; transition: transform 0.2s; }
.gallery-item a:hover img { transform: scale(1.04); }
.gallery-item figcaption { font-size: 0.8rem; color: var(--muted); padding: 6px 2px; }

/* ---------- forms ---------- */
.event-context {
  background: var(--teal-soft); border-radius: var(--radius-sm);
  padding: 12px 18px; margin: 14px 0 20px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline;
}
.event-context__label { font-weight: 800; color: var(--teal); }

.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 32px); margin-bottom: 40px;
  display: flex; flex-direction: column; gap: 16px;
}
.pfield { display: flex; flex-direction: column; gap: 6px; }
.pfield label { font-weight: 700; font-size: 0.95rem; }
.pfield input, .pfield select {
  font-family: var(--font); font-size: 1rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; background: #fff;
}
.pfield input:focus, .pfield select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.pfield--error input, .pfield--error select { border-color: var(--err); }
.perr { color: var(--err); font-size: 0.83rem; font-weight: 700; }
.req { color: var(--err); }

.hp-field { position: absolute; right: -9999px; opacity: 0; height: 0; overflow: hidden; }

.pfield textarea {
  font-family: var(--font); font-size: 1rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; background: #fff; resize: vertical;
}
.pfield textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.pfield--error textarea { border-color: var(--err); }

/* terms of participation (participant form) */
.terms-box {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.terms-box__title { margin: 0; font-size: 1rem; }
.terms-box__body {
  max-height: 240px; overflow-y: auto;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: var(--surface); padding: 10px 14px;
}
.terms-check { align-items: flex-start; }
.terms-check input { margin-top: 6px; flex: 0 0 auto; }
.terms-check--error span { color: var(--err); font-weight: 700; }

.privacy-note { color: var(--muted); font-size: 0.85rem; background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; }
.consent-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg); }
.consent-text { margin: 0 0 10px; font-size: 0.9rem; color: var(--ink); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.closed-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 5vw, 48px); text-align: center; margin-bottom: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.closed-card__msg { font-size: 1.1rem; font-weight: 700; margin: 0; }

/* ---------- alerts & footer ---------- */
.flashes { margin-top: 14px; }
.alert { border-radius: var(--radius-sm); padding: 12px 18px; margin-bottom: 10px; font-weight: 700; font-size: 0.92rem; }
.alert--ok { background: var(--ok-soft); color: var(--ok); }
.alert--err { background: var(--err-soft); color: var(--err); }
.alert--info { background: var(--info-soft); color: var(--info); }

.site-footer { background: var(--footer-bg); color: var(--footer-ink); margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; padding: 44px 20px 24px; }
.brandmark--footer { color: #fff; }
.brandmark--footer .brandmark-text small { color: var(--footer-muted); }
.footer-text { color: var(--footer-muted); font-size: 0.9rem; }
.footer-title { color: #fff; font-size: 1rem; margin: 0 0 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--footer-ink); }
.footer-links a:hover { color: #fff; }
.footer-contact li { font-size: 0.9rem; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--footer-btn-bg); border: 1px solid var(--footer-btn-line);
  color: var(--footer-ink); border-radius: 999px; padding: 6px 14px;
  font-size: 0.85rem; font-weight: 700;
}
.social-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-bottom { border-top: 1px solid var(--footer-line); padding: 16px 20px; color: var(--footer-muted); font-size: 0.8rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- error page ---------- */
.error-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; gap: 10px; }
.error-page__code { font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 800; color: var(--accent); line-height: 1; }
.error-page__title { margin: 0; }
.error-page__msg { color: var(--muted); max-width: 460px; margin: 0; }
.error-page__actions { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- دکمهٔ روشن/تیره ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.theme-toggle:hover { background: var(--accent-soft); border-color: var(--accent); }
.theme-toggle .ico { width: 1.25em; height: 1.25em; }
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

/* ---------- تم‌های فصلی (سبک: فقط چند متغیر + یک المان تزئینی) ----------
   کلاس روی <html> می‌نشیند (theme-yalda و…)؛ در حالت تیره هم کار می‌کنند. */

/* نوار باریک تزئینی بالای صفحه — تنها المان اضافهٔ هر تم */
.theme-bar {
  height: 4px;
  background: var(--theme-bar, none);
}

/* نشان آب‌رنگ (واترمارک) هر تم در گوشهٔ هیرو — SVG داخل خود CSS؛
   هیچ درخواست شبکه‌ای اضافه نمی‌شود */
.theme-yalda .hero-fallback::after,
.theme-nowruz .hero-fallback::after,
.theme-summer .hero-fallback::after,
.theme-autumn .hero-fallback::after,
.theme-winter .hero-fallback::after {
  content: "";
  position: absolute;
  inset-inline-end: 5%;
  bottom: 4%;
  width: clamp(90px, 16vw, 210px);
  aspect-ratio: 1 / 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.4;
  pointer-events: none;
}
.theme-yalda .hero-fallback::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23d4a03c' d='M26 5h12l-2 7h-8z'/%3E%3Ccircle cx='32' cy='39' r='18' fill='%23d4a03c'/%3E%3Cpath fill='%237e1f2b' d='M32 26c3-6 9-9 15-8-3 5-8 8-13 9z'/%3E%3C/svg%3E");
}
.theme-nowruz .hero-fallback::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23a8d95b' d='M31 58V32h2v26z'/%3E%3Cpath fill='%23a8d95b' d='M32 38C31 24 21 15 7 15c1 14 11 23 24 23z'/%3E%3Cpath fill='%23d4a03c' d='M33 32c1-11 9-19 22-19-1 11-9 19-22 19z'/%3E%3C/svg%3E");
}
.theme-summer .hero-fallback::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='13' fill='%23fbbf24'/%3E%3Cpath stroke='%23fbbf24' stroke-width='4' stroke-linecap='round' fill='none' d='M32 5v9M32 50v9M5 32h9M50 32h9M12 12l7 7M45 45l7 7M52 12l-7 7M19 45l-7 7'/%3E%3C/svg%3E");
}
.theme-autumn .hero-fallback::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23e8930c' d='M32 7C18 20 13 36 32 57 51 36 46 20 32 7z'/%3E%3Cpath stroke='%237c3a0d' stroke-width='2.5' fill='none' d='M32 12v40'/%3E%3C/svg%3E");
}
.theme-winter .hero-fallback::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath stroke='%23cfe0f5' stroke-width='3.5' stroke-linecap='round' fill='none' d='M32 6v52M8 19l48 26M56 19L8 45'/%3E%3C/svg%3E");
}

/* ---------- یلدا (شب چله) ---------- */
.theme-yalda {
  --accent: #a32633;
  --accent-dark: #8a1e2a;
  --accent-soft: #f7e2e0;
  --theme-dot: #a32633;
  --theme-bar: linear-gradient(90deg, #a32633, #d4a03c, #a32633);
}
[data-theme="dark"].theme-yalda,
[data-theme="dark"] .theme-yalda {
  --accent: #d96a75;
  --accent-dark: #e88f98;
  --accent-soft: #3c2426;
}
.theme-yalda .hero-fallback {
  background:
    radial-gradient(circle at 12% 78%, rgba(164, 52, 56, 0.50) 0, transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(212, 160, 60, 0.40) 0, transparent 42%),
    linear-gradient(160deg, #7e1f2b 0%, #5c1620 100%);
}

/* ---------- نوروز ---------- */
.theme-nowruz {
  --accent: #2f7a46;
  --accent-dark: #276139;
  --accent-soft: #e2f0e6;
  --theme-dot: #2f7a46;
  --theme-bar: linear-gradient(90deg, #2f7a46, #7ab648, #d4a03c);
}
[data-theme="dark"].theme-nowruz,
[data-theme="dark"] .theme-nowruz {
  --accent: #7bcf96;
  --accent-dark: #9adfae;
  --accent-soft: #22342a;
}
.theme-nowruz .hero-fallback {
  background:
    radial-gradient(circle at 15% 80%, rgba(47, 122, 70, 0.55) 0, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(212, 160, 60, 0.35) 0, transparent 40%),
    linear-gradient(160deg, #2f7a46 0%, #1f5a35 100%);
}

/* ---------- تابستان ---------- */
.theme-summer {
  --accent: #0e7490;
  --accent-dark: #0b5f76;
  --accent-soft: #ddf0f5;
  --theme-dot: #0e7490;
  --theme-bar: linear-gradient(90deg, #0e7490, #38bdf8, #f59e0b);
}
[data-theme="dark"].theme-summer,
[data-theme="dark"] .theme-summer {
  --accent: #4cc0dd;
  --accent-dark: #7bd4e8;
  --accent-soft: #1d333c;
}
.theme-summer .hero-fallback {
  background:
    radial-gradient(circle at 80% 15%, rgba(56, 189, 248, 0.45) 0, transparent 42%),
    radial-gradient(circle at 15% 85%, rgba(245, 158, 11, 0.35) 0, transparent 38%),
    linear-gradient(160deg, #0e7490 0%, #0a5a70 100%);
}

/* ---------- پاییز ---------- */
.theme-autumn {
  --accent: #9a5b12;
  --accent-dark: #82490d;
  --accent-soft: #f6e8d8;
  --theme-dot: #b45309;
  --theme-bar: linear-gradient(90deg, #b45309, #d97706, #9a3412);
}
[data-theme="dark"].theme-autumn,
[data-theme="dark"] .theme-autumn {
  --accent: #dda45c;
  --accent-dark: #eab876;
  --accent-soft: #362a1b;
}
.theme-autumn .hero-fallback {
  background:
    radial-gradient(circle at 18% 75%, rgba(180, 83, 9, 0.50) 0, transparent 40%),
    radial-gradient(circle at 82% 25%, rgba(154, 52, 18, 0.40) 0, transparent 42%),
    linear-gradient(160deg, #9a5b12 0%, #7c3a0d 100%);
}

/* ---------- زمستان ---------- */
.theme-winter {
  --accent: #43618e;
  --accent-dark: #375074;
  --accent-soft: #e4eaf4;
  --theme-dot: #43618e;
  --theme-bar: linear-gradient(90deg, #64748b, #93b4e0, #64748b);
}
[data-theme="dark"].theme-winter,
[data-theme="dark"] .theme-winter {
  --accent: #89a9d8;
  --accent-dark: #a5c0e6;
  --accent-soft: #232d3d;
}
.theme-winter .hero-fallback {
  background:
    radial-gradient(circle at 85% 18%, rgba(147, 180, 224, 0.45) 0, transparent 44%),
    radial-gradient(circle at 12% 82%, rgba(100, 116, 139, 0.45) 0, transparent 40%),
    linear-gradient(160deg, #43618e 0%, #31486a 100%);
}

/* احترام به تنظیمات حرکت‌کاهشی کاربر */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
