/* شارح — طراحی پایه
   زبان طراحی: «نسخه‌ی خطیِ روشن‌شده» — کاغذ، مرکب و زر؛ شعله‌ی مشعلِ لوگو برای روشن کردنِ بیت‌ها.
   ساختار (ناوبری شیشه‌ای، اسلایدر، کارت‌ها) از Shaareh-UI. */

:root {
  color-scheme: light;
  --bg: #f5efe3;
  --bg-2: #ede3cf;
  --surface: #fffbf3;
  --surface-2: #f6eedd;
  --pill: rgb(255 251 243 / 0.72);
  --ink: #221b12;
  --ink-2: #4f4535;
  --muted: #7f725c;
  --line: #e4d8c0;
  --line-strong: #d1c09e;
  --hairline: rgb(154 106 34 / 0.28);
  --accent: #9a6a22;
  --accent-ink: #6f4a12;
  --accent-soft: #f1e2c4;
  --on-accent: #fffaf0;
  --lapis: #1f3b63;
  --turquoise: #14857f;
  --vermilion: #c8553d;
  --flame: linear-gradient(135deg, #f6cf6a, #e0573a);
  --flame-a: #f6cf6a;
  --flame-b: #e0573a;
  --hover: rgb(154 106 34 / 0.08);
  --shadow: 0 1px 2px rgb(60 40 10 / 0.06), 0 10px 30px rgb(60 40 10 / 0.08);
  --shadow-lg: 0 2px 6px rgb(60 40 10 / 0.08), 0 24px 60px rgb(60 40 10 / 0.16);
  --danger: #b3261e;
  --warn: #8a5300;

  /* صحنه‌ی پلیر — همیشه تیره، مثل سالنِ سینما */
  --stage-bg: #0e0b08;
  --stage-surface: #17120d;
  --stage-surface-2: #211a13;
  --stage-ink: #f2e9d8;
  --stage-muted: #a8987d;
  --stage-line: #2f271d;
  --gold: #dcaa52;
  --gold-soft: rgb(220 170 82 / 0.13);
  --player-accent: #dcaa52;

  --radius-3xl: 24px;
  --radius-2xl: 18px;
  --radius-xl: 12px;
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 76px;
  --header-h: 76px;
  --font-ui: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --font-verse: 'Noto Naskh Arabic', 'Vazirmatn', serif;
  --font-display: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif;
  --dir: rtl;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23dcaa52' stroke-opacity='.22'%3E%3Cpath d='M28 7l6.2 14.8L49 28l-14.8 6.2L28 49l-6.2-14.8L7 28l14.8-6.2z'/%3E%3Crect x='17' y='17' width='22' height='22' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
}

html.dark {
  color-scheme: dark;
  --bg: #110e0b;
  --bg-2: #17130f;
  --surface: #1b1612;
  --surface-2: #221c16;
  --pill: rgb(27 22 18 / 0.7);
  --ink: #f0e7d5;
  --ink-2: #cfc1a7;
  --muted: #9c8d73;
  --line: #2e261d;
  --line-strong: #43382a;
  --hairline: rgb(220 170 82 / 0.22);
  --accent: #dcaa52;
  --accent-ink: #e9c27a;
  --accent-soft: #2d2416;
  --on-accent: #1a1209;
  --lapis: #9db8df;
  --turquoise: #4cc9be;
  --vermilion: #ef7a5c;
  --hover: rgb(220 170 82 / 0.08);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.4), 0 24px 60px rgb(0 0 0 / 0.5);
  --danger: #f28b82;
  --warn: #f1c97a;
}

html[dir='ltr'] {
  --dir: ltr;
}

/* تا رسیدنِ ترجمه‌ها، متنِ فارسیِ پیش‌فرض دیده نشود */
html.i18n-pending body {
  visibility: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  font-family: var(--font-ui);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.85 var(--font-ui);
  overflow-x: hidden;
}

/* بافتِ کاغذ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: 0.35;
  pointer-events: none;
}

html.dark body::before {
  opacity: 0.18;
  mix-blend-mode: screen;
}

main {
  flex: 1;
}

img,
video,
iframe {
  max-width: 100%;
}

a {
  color: var(--accent-ink);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: rgb(220 170 82 / 0.35);
}

.ic {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: none;
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* نقطه‌ی لوزیِ خوشنویسی — موتیفِ تکرارشونده */
.nuqta {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
  border-radius: 1px;
  flex: none;
}

/* ---------- ناوبری (Navbar) ---------- */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  padding: 12px 8px;
  pointer-events: none;
}

.nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-3xl);
  background: var(--pill);
  backdrop-filter: saturate(1.4) blur(22px);
  -webkit-backdrop-filter: saturate(1.4) blur(22px);
  box-shadow: 0 8px 26px rgb(40 26 8 / 0.1);
}

.nav-brand {
  gap: 4px;
  min-height: 54px;
  padding: 4px 14px 4px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand .logo {
  width: auto;
  height: 40px;
}

.logo-for-dark {
  display: none;
}

html.dark .logo-for-light {
  display: none;
}

html.dark .logo-for-dark {
  display: block;
}

.brand-name {
  padding-top: 8px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  white-space: nowrap;
}

.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 0;
  border-radius: var(--radius-2xl);
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.nav-burger:hover {
  background: var(--hover);
}

.nav-burger svg {
  width: 24px;
  height: 24px;
}

.nav-tools {
  order: 2;
  gap: 2px;
  min-height: 54px;
  padding: 4px 6px;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-2xl);
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.nav-icon-btn:hover {
  background: var(--hover);
  color: var(--ink);
}

.lang-btn img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1.5px var(--hairline);
}

.theme-btn .theme-ic {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
}

.theme-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.lang {
  position: relative;
}

.lang-menu {
  position: absolute;
  z-index: 60;
  top: 54px;
  inset-inline-start: -6px;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0s linear 0.2s;
}

.lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s, transform 0.2s;
}

.lang-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-xl);
  background: none;
  color: var(--ink-2);
  font-size: 14.5px;
  text-align: start;
  cursor: pointer;
}

.lang-menu button:hover {
  background: var(--hover);
  color: var(--ink);
}

.lang-menu button[aria-checked='true'] {
  color: var(--accent-ink);
  font-weight: 700;
}

.lang-menu img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.nav-menu {
  order: 1;
  pointer-events: auto;
}

.nav-links {
  gap: 30px;
  margin: 0;
  padding: 15px 26px;
  list-style: none;
}

.nav-links a {
  position: relative;
  display: block;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--accent-ink);
}

.nav-links a[aria-current='page']::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background: var(--flame);
  transform: rotate(45deg);
}

@media (max-width: 767px) {
  .nav-burger {
    display: inline-flex;
  }
  .brand .logo {
    height: 32px;
  }
  .brand-name {
    font-size: 20px;
  }
  .nav-menu {
    order: 3;
    width: 100%;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 300ms, opacity 300ms;
  }
  .nav-menu.open {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s linear 0s, opacity 300ms;
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
  }
  .nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-xl);
    font-size: 15px;
  }
  .nav-links a:hover {
    background: var(--hover);
  }
  .nav-links a[aria-current='page']::after {
    display: none;
  }
}

/* ---------- دکمه‌ها ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, black);
}

.btn-flame {
  background: var(--flame);
  color: #2a1606;
  box-shadow: 0 6px 22px rgb(224 87 58 / 0.32);
}

.btn-flame:hover {
  box-shadow: 0 8px 30px rgb(224 87 58 / 0.45);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--hover);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn .ic {
  width: 18px;
  height: 18px;
}

/* ---------- نوشته شدنِ بیت با جوهر (از راست به چپ) ---------- */

.ink-write {
  -webkit-mask-image: linear-gradient(to left, #000 45%, transparent 55%);
  mask-image: linear-gradient(to left, #000 45%, transparent 55%);
  -webkit-mask-size: 260% 100%;
  mask-size: 260% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  animation: ink-write 1.6s cubic-bezier(0.35, 0.1, 0.25, 1) forwards;
}

.ink-write.line-2 {
  animation-delay: 0.9s;
}

@keyframes ink-write {
  to {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }
}

/* ---------- اسلایدر صفحه‌ی اصلی ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #120e0a;
  color: #f5ead3;
}

.slides {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 0s linear 1s;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease;
}

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.35) saturate(0.9) brightness(0.85);
  transform: scale(1.06);
  transition: transform 9s ease-out;
}

.slide.is-active img {
  transform: scale(1);
}

.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 100%, rgb(224 120 50 / 0.25), transparent 70%),
    linear-gradient(to top, rgb(14 11 8 / 0.94), rgb(14 11 8 / 0.25) 55%, rgb(14 11 8 / 0.5));
}

.slide-caption {
  position: absolute;
  z-index: 2;
  inset-inline: 16px;
  bottom: 110px;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.slide-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
}

.slide-title {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 400;
  line-height: 2.1;
  color: #fbefd6;
  text-shadow: 0 2px 30px rgb(0 0 0 / 0.5);
}

html[lang='en'] .slide-title {
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1.4;
}

.slide-verse {
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto 22px;
  font-family: var(--font-verse);
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 2;
  color: #eadcc0;
}

.slide-verse .m1 {
  text-align: right;
}

.slide-verse .m2 {
  text-align: left;
}

.slide-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  border: 1px solid rgb(220 170 82 / 0.35);
  border-radius: 50%;
  background: rgb(14 11 8 / 0.4);
  backdrop-filter: blur(10px);
  color: #f5ead3;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-arrow:hover {
  background: rgb(220 170 82 / 0.25);
}

.hero-arrow svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.hero-arrow.prev {
  inset-inline-start: 18px;
}

.hero-arrow.next {
  inset-inline-end: 18px;
}

html[dir='rtl'] .hero-arrow svg {
  transform: scaleX(-1);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  bottom: 82px;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  background: rgb(245 234 211 / 0.4);
  transform: rotate(45deg);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.hero-dots button[aria-current='true'] {
  background: var(--gold);
  transform: rotate(45deg) scale(1.35);
}

/* دکمه‌ی پایین رفتن (ScrollToBottom) */
.scroll-down {
  position: absolute;
  z-index: 3;
  bottom: 22px;
  left: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-inline: auto;
  border: 1px solid rgb(220 170 82 / 0.35);
  border-radius: 50%;
  background: rgb(14 11 8 / 0.4);
  backdrop-filter: blur(10px);
  color: var(--gold);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(5px);
  }
}

/* ---------- فالِ شارح ---------- */

.fal {
  position: relative;
  margin-top: -1px;
  padding-block: 72px;
  overflow: hidden;
  background:
    radial-gradient(50% 70% at 50% 0%, rgb(224 120 50 / 0.16), transparent 70%),
    var(--stage-bg);
  color: var(--stage-ink);
}

.fal::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pattern);
  opacity: 0.35;
  mask-image: radial-gradient(70% 80% at 50% 40%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 80% at 50% 40%, #000, transparent);
  pointer-events: none;
}

.fal-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 48px;
  align-items: center;
}

.fal-copy .eyebrow {
  color: var(--gold);
}

.fal-copy h2 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 400;
  line-height: 2.1;
  color: #fbefd6;
}

html[lang='en'] .fal-copy h2 {
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1.4;
}

.fal-copy p {
  margin: 0 0 24px;
  color: var(--stage-muted);
  max-width: 30em;
}

/* کارتِ تذهیب‌شده */
.fal-card {
  position: relative;
  min-height: 300px;
  padding: 44px 40px 30px;
  border-radius: 6px;
  background:
    radial-gradient(80% 60% at 50% 0%, rgb(246 207 106 / 0.1), transparent 70%),
    #1a140e;
  box-shadow:
    0 0 0 1px rgb(220 170 82 / 0.55),
    0 0 0 7px #1a140e,
    0 0 0 8px rgb(220 170 82 / 0.3),
    0 30px 80px rgb(0 0 0 / 0.55);
  text-align: center;
}

.fal-card::before,
.fal-card::after {
  content: '';
  position: absolute;
  top: -5px;
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
}

.fal-card::before {
  left: 50%;
  margin-left: -4.5px;
}

.fal-card::after {
  top: auto;
  bottom: -5px;
  left: 50%;
  margin-left: -4.5px;
}

.fal-flame {
  display: block;
  width: 34px;
  height: 46px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 0 14px rgb(246 160 70 / 0.7));
  animation: flicker 2.8s ease-in-out infinite;
  transform-origin: 50% 100%;
}

@keyframes flicker {
  0%,
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
  25% {
    transform: scale(1.04, 0.97) rotate(-1.5deg);
  }
  50% {
    transform: scale(0.97, 1.05) rotate(1deg);
    opacity: 0.92;
  }
  75% {
    transform: scale(1.03, 0.98) rotate(-0.5deg);
  }
}

.fal-verse {
  display: flex;
  flex-direction: column;
  min-height: 112px;
  margin: 0 0 6px;
  font-family: var(--font-verse);
  font-size: clamp(19px, 2.3vw, 25px);
  line-height: 2.1;
  color: #fbefd6;
}

.fal-verse .m1 {
  text-align: right;
}

.fal-verse .m2 {
  text-align: left;
}

.fal-verse .prose {
  text-align: justify;
}

.fal-placeholder {
  display: grid;
  place-items: center;
  min-height: 112px;
  color: var(--stage-muted);
  font-size: 15px;
}

.fal-source {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13.5px;
}

.fal-source .nuqta {
  width: 5px;
  height: 5px;
  background: var(--gold);
}

.fal-note {
  margin: 0 auto 18px;
  max-width: 34em;
  color: var(--stage-muted);
  font-size: 14px;
}

.fal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.fal .btn-ghost {
  border-color: rgb(220 170 82 / 0.4);
  color: var(--stage-ink);
}

.fal .btn-ghost:hover {
  background: rgb(220 170 82 / 0.1);
}

.fal-card.drawing .fal-flame {
  animation: flicker 0.35s ease-in-out infinite;
}

@media (max-width: 860px) {
  .fal-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .fal-card {
    padding: 38px 22px 26px;
  }
}

/* ---------- بخش‌ها ---------- */

.section {
  padding-block: 64px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: 28px;
  font-weight: 800;
}

.section-head p {
  margin: 4px 0 0;
  max-width: 46em;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: currentColor;
  transform: rotate(45deg);
}

/* جدول‌کشیِ زرین: جداکننده‌ی بخش‌ها */
.jadval {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 18px;
  color: var(--accent);
}

.jadval::before,
.jadval::after {
  content: '';
  flex: 1;
  height: 4px;
  border-block: 1px solid var(--hairline);
}

.jadval img {
  height: 28px;
  width: auto;
  opacity: 0.85;
}

/* فیلترها */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.chip {
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(300px, 100%);
  margin-inline-start: auto;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: none;
  background: none;
}

.search-box .ic {
  color: var(--muted);
}

/* شبکه‌ی ویدیوها (VideosSection) */
.videos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-block: 28px;
}

@media (max-width: 960px) {
  .videos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .videos {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* کارت ویدیو (VideoItem) */
.video-item {
  --hue: 35;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.vi-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  padding: 5px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--surface);
}

.vi-media img,
.vi-cover {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 11px;
  object-fit: cover;
  transition: filter 0.4s, transform 0.4s;
}

.vi-media img {
  filter: sepia(0.25) saturate(0.95);
}

.video-item:hover .vi-media img {
  filter: none;
}

.vi-cover {
  display: grid;
  place-items: center;
  background:
    var(--pattern),
    radial-gradient(120% 100% at 85% 0%, hsl(var(--hue) 42% 30%), hsl(var(--hue) 38% 11%) 72%);
  background-size: 56px 56px, auto;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 2.2;
}

.vi-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: auto;
  border: 1px solid rgb(220 170 82 / 0.5);
  border-radius: 50%;
  background: rgb(14 11 8 / 0.6);
  backdrop-filter: blur(6px);
  color: var(--gold);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s, transform 0.2s;
}

.vi-play .ic {
  width: 28px;
  height: 28px;
}

.video-item:hover .vi-play,
.video-item:focus-visible .vi-play {
  opacity: 1;
  transform: none;
}

.vi-badge,
.vi-dur {
  position: absolute;
  bottom: 14px;
  padding: 1px 9px;
  border-radius: 6px;
  background: rgb(14 11 8 / 0.7);
  color: #f5ead3;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.8;
}

.vi-badge {
  inset-inline-start: 14px;
}

.vi-badge.is-aparat {
  background: #ea1d5d;
  color: #fff;
}

.vi-dur {
  inset-inline-end: 14px;
  unicode-bidi: isolate;
}

.vi-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 10px;
  padding: 6px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.video-item:hover .vi-title {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.vi-title h3 {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.75;
}

.vi-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.vi-meta .nuqta {
  width: 4px;
  height: 4px;
  background: var(--accent);
}

.empty-note {
  grid-column: 1 / -1;
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
}

/* چطور کار می‌کند */
.how {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how li {
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2xl);
  background: var(--surface);
}

.how-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 800;
  transform: rotate(45deg);
}

.how-num > span {
  transform: rotate(-45deg);
}

.how h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.how p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 800px) {
  .how {
    grid-template-columns: 1fr;
  }
}

/* جعبه‌ی آپارات */
.aparat-box {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-2xl);
  background: var(--surface);
}

.aparat-box h2 {
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 800;
}

.aparat-box p {
  margin: 0;
  color: var(--muted);
}

.aparat-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.aparat-form input {
  flex: 1 1 260px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  direction: ltr;
  text-align: left;
}

.form-msg {
  flex-basis: 100%;
  min-height: 1.5em;
  margin: 0;
  color: var(--danger);
  font-size: 13.5px;
}

@media (max-width: 800px) {
  .aparat-box {
    grid-template-columns: 1fr;
  }
}

/* صفحه‌های متنی (دربارهٔ ما) */
.page {
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 64px;
}

.prose-card {
  position: relative;
  max-width: 820px;
  margin-inline: auto;
  padding: 40px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
  box-shadow:
    0 0 0 6px var(--surface),
    0 0 0 7px var(--hairline),
    var(--shadow);
}

.prose-card + .prose-card {
  margin-top: 36px;
}

.prose-card .about-logo {
  display: block;
  height: 120px;
  width: auto;
  margin: 0 auto 18px;
}

.prose-card h1 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 400;
  line-height: 2.1;
  text-align: center;
}

html[lang='en'] .prose-card h1 {
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1.4;
}

.prose-card h2 {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 800;
}

.prose-card p {
  color: var(--ink-2);
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.contact-list a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.contact-list .ic {
  color: var(--accent);
}

.contact-list span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.6;
}

.contact-list small {
  overflow: hidden;
  color: var(--muted);
  direction: ltr;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- پانویس ---------- */

.site-footer {
  position: relative;
  margin-top: 24px;
  padding-block: 40px 28px;
  border-top: 1px solid var(--hairline);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 540px;
}

.footer-brand img {
  flex: none;
  width: auto;
  height: 56px;
}

.footer-brand b {
  display: block;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.9;
}

.footer-brand p {
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.footer-links a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-ink);
}

.footer-meta {
  flex-basis: 100%;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
}

/* ---------- پیام کوتاه ---------- */

.site-toast {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  left: 50%;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity 0.25s, transform 0.25s;
}

.site-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-state {
  padding: 80px 20px;
  text-align: center;
}

.empty-state h1 {
  margin-bottom: 8px;
  font-size: 24px;
}

.empty-state p {
  margin: 0 0 24px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
