/* =========================================================
   سایت استاد شیخ علی خدادادی — طرح «محراب نور»
   رنگ‌ها: سرمه‌ای شب و طلایی
   ========================================================= */

:root,
[data-theme="dark"] {
  /* حالت شب: مشکی و طلایی */
  --bg: #0B0B0C;
  --bg-deep: #050505;
  --card: #151515;
  --card-2: #101010;
  --line: #2F2A21;
  --line-soft: #211E18;
  --gold: #C9A55C;
  --gold-2: #E8CF92;
  --text: #F2EDE3;
  --muted: #B4AC9E;
  --faint: #8A8377;
  --on-gold: #0B0B0C;
  --live: #C62828;
  --ok: #2E7D5B;
  --shadow: 0 20px 44px -26px rgba(0, 0, 0, .9);
  --hdr: rgba(5, 5, 5, .92);
  --arch: #050505;
  --shade: linear-gradient(180deg, rgba(5,5,5,.05) 0%, rgba(5,5,5,.15) 55%, rgba(5,5,5,.55) 100%);
  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%23C9A55C' stroke-opacity='.10' stroke-width='1'%3E%3Crect x='28' y='28' width='40' height='40'/%3E%3Crect x='28' y='28' width='40' height='40' transform='rotate(45 48 48)'/%3E%3Cpath d='M0 48h20M76 48h20M48 0v20M48 76v20'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}

[data-theme="light"] {
  /* حالت روز: کرم و طلایی */
  --bg: #F8F5EE;
  --bg-deep: #F0E9DA;
  --card: #FFFFFF;
  --card-2: #FBF8F2;
  --line: #E2D6BC;
  --line-soft: #ECE4D2;
  --gold: #A07D33;
  --gold-2: #7A5B1E;
  --text: #1E1A14;
  --muted: #5F574A;
  --faint: #8A8170;
  --on-gold: #FFFFFF;
  --shadow: 0 22px 44px -30px rgba(90, 65, 20, .35);
  --hdr: rgba(255, 255, 255, .92);
  --arch: #F0E9DA;
  --shade: linear-gradient(180deg, rgba(248,245,238,0) 0%, rgba(248,245,238,.08) 60%, rgba(240,233,218,.4) 100%);
  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%23A07D33' stroke-opacity='.16' stroke-width='1'%3E%3Crect x='28' y='28' width='40' height='40'/%3E%3Crect x='28' y='28' width='40' height='40' transform='rotate(45 48 48)'/%3E%3Cpath d='M0 48h20M76 48h20M48 0v20M48 76v20'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light;
}

/* سرصفحه‌های داخلی هم از حالت روز/شب پیروی می‌کنند */
.dark-band { color: var(--text); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Vazirmatn, "Vazir", Tahoma, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  padding-bottom: 0;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.5; margin: 0; }
p { margin: 0 0 1em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; top: -60px; right: 16px; z-index: 100; background: var(--gold); color: var(--on-gold); padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.arabic, [lang="ar"] { font-family: Amiri, "Traditional Arabic", "Times New Roman", serif; }

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 24px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 700; font-size: 15px; line-height: 1.4;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, color .2s; text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { color: var(--on-gold); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 22%, transparent); }
.btn-outline { border-color: var(--gold); color: var(--gold-2); background: transparent; }
.btn-outline:hover { background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold-2); }
.btn-muted { background: var(--line-soft); color: var(--muted); cursor: default; font-weight: 500; }
.btn-muted:hover { transform: none; }
.btn-sm { min-height: 38px; padding: 6px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line-soft);
  background: transparent; color: var(--gold-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.icon-btn:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); border-color: var(--gold); }
.ic { flex-shrink: 0; }

/* ---------- سربرگ ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--hdr); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.header-row { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--gold-2); flex-shrink: 0; }
.brand-mark { color: var(--gold); display: inline-flex; }
.brand-photo { display: block; width: 76px; height: 76px; flex-shrink: 0; padding: 3px; border-radius: 50%; border: 1px solid var(--gold); box-shadow: 0 0 0 4px rgba(201,165,92,.14); }
.brand-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 18%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { font-size: 17px; font-weight: 800; color: var(--gold-2); }
.brand-text small { font-size: 12px; color: var(--muted); }
.main-nav { flex: 1; display: flex; justify-content: center; align-items: center; gap: 2px; flex-wrap: wrap; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; padding: 8px 11px; color: var(--text); font-size: 15px; border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-link:hover { color: var(--gold-2); }
.nav-link.is-active, .nav-drop.is-active > .nav-link { color: var(--gold-2); border-bottom-color: var(--gold); }
.caret { font-size: 11px; color: var(--gold); }
.nav-drop { position: relative; }
.drop-menu { position: absolute; top: 100%; right: 0; min-width: 210px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: none; z-index: 50; }
.drop-menu a { display: block; padding: 9px 14px; border-radius: 10px; color: var(--text); }
.drop-menu a:hover, .drop-menu a[aria-current] { background: var(--card-2); color: var(--gold-2); }
.nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu { display: block; }
.header-actions { display: flex; gap: 8px; }
.menu-btn { display: none; }
[data-theme="dark"] .when-light, [data-theme="light"] .when-dark { display: none; }

/* منوی کشویی موبایل */
.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(3, 8, 16, .6); }
.drawer-panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(330px, 86vw); background: var(--bg-deep); border-left: 1px solid var(--gold); padding: 18px; overflow-y: auto; animation: slideIn .25s ease; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--gold-2); }
.drawer-nav a { display: block; padding: 12px 10px; color: var(--text); border-bottom: 1px solid var(--line-soft); }
.drawer-group { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.drawer-group > span { display: block; padding: 4px 10px; color: var(--gold); font-size: 13px; }
.drawer-group a { border: 0; padding: 8px 22px; }

/* جستجو */
.search-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(3, 8, 16, .75); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; }
.search-box { width: min(720px, 100%); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; background: var(--card); border: 1px solid var(--gold); border-radius: 18px; color: var(--gold-2); }
.search-box input { flex: 1; border: 0; background: transparent; outline: none; font-size: 18px; color: var(--text); min-width: 0; }

/* ---------- عمومی بخش‌ها ---------- */
.section { padding: 88px 0 0; }
.section:last-of-type { padding-bottom: 88px; }
.section-band { margin-top: 88px; padding: 80px 0; background: var(--bg-deep); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-band + .section { padding-top: 88px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.section-head.is-center { flex-direction: column; align-items: center; text-align: center; }
.section-head .ornament { color: var(--gold); font-size: 13px; letter-spacing: 2px; }
.section-head h2 { font-size: clamp(24px, 3vw, 31px); color: var(--gold-2); font-weight: 800; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.more-link { font-weight: 600; font-size: 15px; }
.kicker { color: var(--gold); font-size: 14px; font-weight: 600; }
.meta { color: var(--faint); font-size: 13px; }

.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 280px)), 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); transition: border-color .25s, transform .25s; }
.card:hover { border-color: var(--gold); }
.card-body { padding: 18px 22px 22px; }
.card h3 { font-size: 20px; color: var(--gold-2); }
.card h3 a { color: inherit; }

.alert { padding: 14px 18px; border-radius: 14px; margin: 0 0 20px; border: 1px solid; }
.alert-ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 18%, transparent); }
.alert-error { border-color: var(--live); background: color-mix(in srgb, var(--live) 16%, transparent); }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }

/* نقش گره اسلامی پس‌زمینه */
.pattern-bg {
  position: absolute; inset: 0; opacity: .085; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%23C9A55C' stroke-width='1'%3E%3Crect x='28' y='28' width='40' height='40'/%3E%3Crect x='28' y='28' width='40' height='40' transform='rotate(45 48 48)'/%3E%3Cpath d='M0 48h20M76 48h20M48 0v20M48 76v20'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- هدر صفحه اصلی (محراب مسجد کوفه) ---------- */
.hero { position: relative; overflow: hidden; background: transparent; padding: 64px 16px 110px; }
.mihrab { position: relative; z-index: 1; max-width: 840px; margin: 0 auto; padding: 250px 96px 72px; text-align: center; }
.mihrab-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.mihrab-img, .mihrab-shade { position: absolute; inset: 0; clip-path: polygon(15.50% 100.00%, 15.50% 47.65%, 15.62% 45.43%, 15.99% 43.34%, 16.57% 41.36%, 17.36% 39.49%, 18.34% 37.73%, 19.48% 36.06%, 20.78% 34.48%, 22.22% 32.98%, 23.78% 31.57%, 25.44% 30.22%, 27.19% 28.94%, 29.00% 27.72%, 30.87% 26.55%, 32.77% 25.43%, 34.69% 24.34%, 36.61% 23.29%, 38.52% 22.26%, 40.39% 21.26%, 42.21% 20.27%, 43.97% 19.28%, 45.65% 18.30%, 47.22% 17.31%, 48.68% 16.31%, 50.00% 15.29%, 51.32% 16.31%, 52.78% 17.31%, 54.35% 18.30%, 56.03% 19.28%, 57.79% 20.27%, 59.61% 21.26%, 61.48% 22.26%, 63.39% 23.29%, 65.31% 24.34%, 67.23% 25.43%, 69.13% 26.55%, 71.00% 27.72%, 72.81% 28.94%, 74.56% 30.22%, 76.22% 31.57%, 77.78% 32.98%, 79.22% 34.48%, 80.52% 36.06%, 81.66% 37.73%, 82.64% 39.49%, 83.43% 41.36%, 84.01% 43.34%, 84.38% 45.43%, 84.50% 47.65%, 84.50% 100.00%); }
.mihrab-img { background-size: cover; background-position: center 30%; }
.mihrab-shade { background: var(--shade); }
.mihrab-inner { position: relative; }
.mihrab .star { color: var(--gold); margin: 0 auto 8px; display: inline-block; }
.hero-arabic { font-family: "Aref Ruqaa", Amiri, serif; font-size: clamp(28px, 4vw, 44px); line-height: 1.7; color: var(--gold-2); margin: 0 auto; max-width: 440px; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.hero-ref { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.hero-rule { width: 160px; height: 1px; background: var(--gold); margin: 26px auto; }
.hero h1 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; }
.hero-intro { color: var(--muted); font-size: 17px; margin: 8px 0 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- اسلایدر تک‌آیتمی (پوستر جلسات و سخنرانی‌ها) ---------- */
.car-row { display: flex; align-items: center; gap: 20px; }
.car-viewport { flex: 1; min-width: 0; display: flex; justify-content: center; }
.car-btn { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--gold); background: var(--card-2); color: var(--gold-2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.car-btn:hover { background: color-mix(in srgb, var(--gold) 18%, var(--card-2)); }
.car-slide { animation: carIn .55s ease; }
@keyframes carIn { from { opacity: 0; transform: translateY(8px); } }
.car-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.car-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: width .3s, background .3s; }
.car-dots button[aria-current="true"] { width: 28px; background: var(--gold); }
.car-count { position: absolute; top: 16px; left: 16px; padding: 3px 14px; border-radius: 999px; background: rgba(0,0,0,.72); border: 1px solid var(--gold); color: #E8CF92; font-size: 13px; z-index: 2; }
.poster-slide { position: relative; width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--gold); border-radius: 220px 220px 18px 18px; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(0,0,0,.8); }
.poster-media { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 3 / 4; background: var(--card-2); border: 0; padding: 0; cursor: zoom-in; border-bottom: 1px solid var(--line); overflow: hidden; color: var(--gold); }
.poster-media img { width: 100%; height: 100%; object-fit: cover; }
.poster-body { padding: 16px 24px 20px; text-align: center; }
.poster-body strong { display: block; font-size: 19px; color: var(--gold-2); }
.poster-body span { display: block; color: var(--muted); font-size: 15px; }
.speech-slide { width: 100%; display: flex; flex-wrap: wrap; background: var(--card); border: 1px solid var(--gold); border-radius: 22px; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(0,0,0,.8); }
.speech-slide-media { position: relative; flex: 3 1 420px; aspect-ratio: 16 / 9; background: var(--card-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.speech-slide-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play-badge.lg { width: 76px; height: 76px; box-shadow: 0 0 0 10px rgba(201,165,92,.22); z-index: 1; }
.speech-slide-body { flex: 2 1 300px; padding: 30px 32px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.speech-slide-body h3 { font-size: 27px; color: var(--gold-2); }
.speech-slide-body h3 a { color: inherit; }
.speech-slide-body .points { font-size: 16px; }

/* نوار امروز */
.today-wrap { position: relative; z-index: 2; margin-top: -46px; }
.today-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px 26px; box-shadow: var(--shadow); }
.today-date { display: flex; align-items: center; gap: 14px; }
.today-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--bg); border: 1px solid var(--gold); display: flex; align-items: center; justify-content: center; color: var(--gold-2); flex-shrink: 0; }
.today-date strong { display: block; font-size: 17px; }
.today-date .hijri { color: var(--gold-2); font-size: 15px; }
.today-sep { width: 1px; height: 44px; background: var(--line); }
.today-occ { flex: 1 1 280px; line-height: 1.6; }
.today-occ small { display: block; color: var(--muted); font-size: 13px; }
.today-occ strong { font-weight: 700; }

/* جلسه آنلاین */
.live-box { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 18px 26px; border-radius: 20px; border: 1px dashed var(--gold); background: var(--card-2); }
.live-box .info { flex: 1 1 280px; }
.live-box strong { display: block; font-size: 17px; }
.live-box span.desc { color: var(--muted); font-size: 14px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; background: var(--live); color: #fff; font-size: 13px; font-weight: 700; }
.live-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.live-pill.off { background: var(--line-soft); color: var(--muted); }
.live-pill.off::before { background: var(--faint); animation: none; }
@keyframes pulse { 50% { opacity: .3; } }

/* اسلایدر افقی */
.slider { position: relative; }
.slider-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, calc((100% - 72px) / 4)); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 12px; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track > * { scroll-snap-align: start; }
.slider-btns { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }

/* کارت محرابی جلسات */
.arch-card { background: var(--card); border: 1px solid var(--line); border-radius: 130px 130px 18px 18px; overflow: hidden; transition: border-color .25s, transform .25s; display: flex; flex-direction: column; }
.arch-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.arch-media { display: block; width: 100%; aspect-ratio: 3 / 4; background: var(--card-2); border: 0; padding: 0; cursor: zoom-in; border-bottom: 1px solid var(--line); overflow: hidden; }
.arch-media img { width: 100%; height: 100%; object-fit: cover; }
.arch-body { padding: 14px 20px 18px; }
.arch-body strong { display: block; }
.arch-body span { color: var(--muted); font-size: 14px; display: block; }

/* تب‌ها */
.tabs { display: inline-flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); flex-wrap: wrap; }
.tab { padding: 8px 20px; border-radius: 999px; border: 0; background: transparent; color: var(--text); cursor: pointer; font-size: 15px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; }
.tab[aria-selected="true"], .tab.is-active { background: var(--gold); color: var(--on-gold); font-weight: 700; }
.tab-panel[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 14px; background: transparent; cursor: pointer; }
.chip:hover { border-color: var(--gold); color: var(--gold-2); }
.chip.is-active { background: var(--gold); color: var(--on-gold); border-color: var(--gold); font-weight: 700; }

/* کارت سخنرانی */
.media-thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--card-2); overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .media-thumb img { transform: scale(1.04); }
.thumb-ph { color: var(--gold); opacity: .5; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.play-badge { position: absolute; width: 60px; height: 60px; border-radius: 50%; background: var(--gold); color: var(--on-gold); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px rgba(201, 165, 92, .25); transition: transform .25s; }
.play-badge.sm { width: 44px; height: 44px; box-shadow: 0 0 0 5px rgba(201, 165, 92, .25); }
.card:hover .play-badge { transform: scale(1.08); }
.points { margin: 8px 0 0; padding: 0 18px 0 0; color: var(--muted); font-size: 15px; }
.points li::marker { color: var(--gold); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.card-actions .meta { margin-right: auto; }

/* کتاب‌ها */
.book-card { text-align: center; padding: 30px 22px; display: flex; flex-direction: column; align-items: center; }
.book-cover { position: relative; width: 150px; aspect-ratio: 5 / 7; border-radius: 4px 12px 12px 4px; background: #3A1420; border: 2px solid #C9A55C; box-shadow: -8px 12px 26px -12px rgba(0, 0, 0, .7), inset 8px 0 10px -6px rgba(0, 0, 0, .5); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: Amiri, serif; font-size: 25px; line-height: 1.4; color: #E6CB8B; padding: 12px; margin: 0 auto 18px; transition: transform .3s; }
.book-cover small { font-size: 15px; }
.book-cover.has-img { background: none; border: 0; padding: 0; overflow: hidden; }
.book-cover.has-img img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .book-cover { transform: translateY(-4px) rotate(-1deg); }
.book-cover.lg { width: 260px; font-size: 34px; }
.book-card h3 { font-size: 20px; }
.book-card p { color: var(--muted); font-size: 14px; margin: 6px 0 16px; }
.buy-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.buy-price { padding-inline-start: 10px; border-inline-start: 1px solid color-mix(in srgb, currentColor 40%, transparent); font-weight: 800; white-space: nowrap; }
.book-detail { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.book-detail .side { flex: 0 0 280px; position: sticky; top: 100px; text-align: center; }
.book-detail .content { flex: 1 1 420px; min-width: 0; }
.book-detail .buy-buttons { justify-content: flex-start; }
.contact-note { margin-top: 18px; padding: 14px 18px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line-soft); color: var(--muted); font-size: 15px; }

/* متن غنی */
.prose { font-size: 17px; line-height: 2.05; }
.prose h3 { color: var(--gold-2); font-size: 21px; margin: 1.4em 0 .5em; }
.prose blockquote, .arabic-block { margin: 1.2em 0; padding: 22px 26px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); font-size: 25px; line-height: 2; color: var(--gold-2); text-align: center; }
.prose ul { padding-right: 22px; }
.prose li::marker { color: var(--gold); }
.prose a { text-decoration: underline; text-underline-offset: 4px; }

/* اعمال */
.amal-cat-card { display: block; padding: 26px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--text); transition: border-color .25s, transform .25s; }
.amal-cat-card:hover { border-color: var(--gold); transform: translateY(-3px); color: var(--text); }
.amal-cat-card .ic-wrap { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--gold); color: var(--gold-2); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.amal-cat-card strong { display: block; font-size: 20px; color: var(--gold-2); }
.amal-cat-card p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.amal-item { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; }
.amal-item .badge { flex-shrink: 0; width: 64px; text-align: center; padding: 8px 4px; border-radius: 14px; border: 1px solid var(--gold); color: var(--gold-2); font-size: 13px; line-height: 1.5; }
.amal-item .badge b { display: block; font-size: 20px; }
.amal-item h3 { font-size: 19px; }
.amal-item p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.hadith { margin: 32px 0 0; padding: 30px 34px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--gold); text-align: center; position: relative; }
.hadith .label { position: absolute; top: -14px; right: 50%; transform: translateX(50%); background: var(--bg); padding: 0 14px; color: var(--gold); font-size: 14px; font-weight: 700; }
.hadith p.arabic { font-size: clamp(22px, 2.6vw, 30px); color: var(--gold-2); line-height: 1.9; margin: 0; }
.hadith .tr { color: var(--text); margin: 10px 0 0; }
.hadith footer { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* خیریه */
.charity-row { display: flex; flex-wrap: wrap; gap: 28px; }
.charity-cta { flex: 1 1 360px; padding: 36px; border-radius: 22px; background: var(--card); border: 1px solid var(--gold); }
.charity-cta h2 { font-size: 30px; color: var(--gold-2); margin: 4px 0 10px; }
.charity-cta p { color: var(--muted); }
.charity-latest { flex: 2 1 520px; min-width: 0; }
.report-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.report-card:hover { border-color: var(--gold); }
.report-media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--card-2); border: 0; padding: 0; cursor: zoom-in; overflow: hidden; }
.report-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.report-card:hover .report-media img { transform: scale(1.05); }
.report-card figcaption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.report-card .desc { color: var(--muted); font-size: 14px; }

/* فرم‌ها */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field .req { color: var(--gold); }
.input, .field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-deep); color: var(--text); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.8; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }
.field small { display: block; color: var(--faint); font-size: 13px; margin-top: 4px; }
.form-card { padding: 32px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }

/* پرسش و پاسخ */
.qa-item { border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin-bottom: 12px; overflow: hidden; }
.qa-item summary { cursor: pointer; list-style: none; padding: 18px 22px; display: flex; gap: 14px; align-items: flex-start; font-weight: 700; }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary .q { color: var(--gold); font-family: Amiri, serif; font-size: 24px; line-height: 1; }
.qa-item summary .t { flex: 1; }
.qa-item summary .plus { color: var(--gold); transition: transform .2s; }
.qa-item[open] summary .plus { transform: rotate(45deg); }
.qa-item .answer { padding: 0 22px 20px 22px; border-top: 1px solid var(--line-soft); padding-top: 16px; }

/* گالری */
.gallery-grid { columns: 4 240px; column-gap: 16px; }
.gallery-grid .g-item { break-inside: avoid; margin: 0 0 16px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--card-2); display: block; width: 100%; padding: 0; cursor: zoom-in; position: relative; }
.gallery-grid .g-item img { width: 100%; height: auto; transition: transform .5s; }
.gallery-grid .g-item:hover img { transform: scale(1.04); }
.gallery-grid .g-item span { position: absolute; bottom: 0; right: 0; left: 0; padding: 22px 12px 8px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); text-align: right; }

/* پنجره سفارش نسخه چاپی */
.modal { position: fixed; inset: 0; z-index: 96; background: rgba(3, 8, 16, .75); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: min(620px, 100%); padding: 32px; border-radius: 22px; background: var(--card); border: 1px solid var(--gold); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.modal-box h2 { color: var(--gold-2); font-size: 22px; margin: 2px 0 6px; padding-left: 44px; }
.modal-box .form { margin-top: 18px; }
.modal-close { position: absolute; top: 14px; left: 14px; }
.field input.is-bad, .field textarea.is-bad { border-color: var(--live); }
@media (max-width: 560px) { .modal { padding: 0; } .modal-box { min-height: 100%; border-radius: 0; border: 0; padding: 24px 18px; } }

/* لایت‌باکس */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(2, 6, 12, .93); display: flex; align-items: center; justify-content: center; padding: 60px 70px; }
.lb-stage { max-width: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 12px; }
.lb-close { position: absolute; top: 16px; left: 16px; color: #fff; border-color: rgba(255, 255, 255, .3); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; border-color: rgba(255, 255, 255, .3); }
.lb-prev { right: 14px; }
.lb-next { left: 14px; }
.lb-caption { position: absolute; bottom: 16px; right: 0; left: 0; text-align: center; color: #eee; padding: 0 24px; font-size: 15px; }

/* پخش‌کننده صوتی ثابت */
.player { position: fixed; bottom: 0; right: 0; left: 0; z-index: 60; background: color-mix(in srgb, var(--bg-deep) 96%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--gold); padding: 10px 0; }
.player-row { display: flex; align-items: center; gap: 12px; }
.player-cover { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--card); flex-shrink: 0; }
.player-toggle { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; border: 0; background: var(--gold); color: var(--on-gold); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.player .i-pause { display: none; }
.player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: inline-flex; }
.player-info { flex: 1; min-width: 0; }
.player-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.player-seek { width: 100%; accent-color: var(--gold); height: 18px; direction: ltr; }
.player-speed { min-width: 44px; height: 36px; border-radius: 10px; border: 1px solid var(--line-soft); background: transparent; color: var(--gold-2); cursor: pointer; }
body.has-player { padding-bottom: 76px; }

/* نوار پایین موبایل */
.bottom-nav { display: none; }

/* ---------- تقویم ---------- */
.cal-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.cal-main { flex: 2 1 560px; min-width: 0; }
.cal-side { flex: 1 1 300px; position: sticky; top: 96px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cal-head h2 { font-size: 24px; color: var(--gold-2); text-align: center; }
.cal-head small { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { text-align: center; color: var(--gold); font-size: 13px; padding: 6px 0; }
.cal-day { position: relative; min-height: 86px; padding: 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-soft); cursor: pointer; text-align: right; display: flex; flex-direction: column; gap: 2px; color: var(--text); transition: border-color .2s; }
.cal-day:hover { border-color: var(--gold); }
.cal-day.is-empty { background: transparent; border: 0; cursor: default; }
.cal-day .hd { font-size: 20px; font-weight: 800; line-height: 1.2; }
.cal-day .jd { font-size: 11px; color: var(--faint); }
.cal-day .dot { font-size: 11px; line-height: 1.4; color: var(--gold-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.cal-day.k-shahadat .dot { color: #E7A0A0; }
[data-theme="light"] .cal-day.k-shahadat .dot { color: #9B2C2C; }
.cal-day.is-today { border: 2px solid var(--gold); background: var(--card-2); }
.cal-day.is-selected { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.cal-day.is-fri .hd { color: var(--gold); }
.cal-panel { padding: 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--gold); }
.cal-panel h3 { color: var(--gold-2); font-size: 20px; }
.cal-panel .sub { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.cal-panel ul { list-style: none; padding: 0; margin: 0; }
.cal-panel li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.cal-panel li:last-child { border: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 6px; vertical-align: middle; }

/* ابجد */
.abjad-result { font-size: clamp(48px, 8vw, 84px); font-weight: 800; color: var(--gold-2); text-align: center; line-height: 1.3; }
.abjad-break { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; direction: rtl; }
.abjad-break span { display: inline-flex; flex-direction: column; align-items: center; min-width: 52px; padding: 8px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.abjad-break b { font-family: Amiri, serif; font-size: 26px; color: var(--gold-2); line-height: 1.3; }
.abjad-break small { color: var(--muted); }
.abjad-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.abjad-table div { text-align: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--card); }
.abjad-table b { display: block; font-family: Amiri, serif; font-size: 24px; color: var(--gold-2); }

/* سرصفحه صفحات داخلی */
.page-hero { position: relative; overflow: hidden; background: var(--bg-deep); padding: 56px 0 50px; text-align: center; border-bottom: 1px solid var(--gold); }
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); color: var(--gold-2); font-weight: 800; }
.page-hero p { color: var(--muted); margin: 6px auto 0; max-width: 640px; }

.page-section { padding: 56px 0 88px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.search-inline { display: flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 46px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); flex: 0 1 340px; }
.search-inline input { border: 0; background: transparent; outline: none; color: var(--text); width: 100%; min-height: 44px; }

/* سخنرانی تکی */
.speech-layout { display: flex; flex-wrap: wrap; gap: 36px; align-items: flex-start; }
.speech-main { flex: 2 1 560px; min-width: 0; }
.speech-side { flex: 1 1 300px; }
.video-box { border-radius: 20px; overflow: hidden; background: #000; border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.video-box video, .video-box iframe, .video-box img { width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.side-list a { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.side-list img, .side-list .ph { width: 92px; aspect-ratio: 16/9; border-radius: 10px; object-fit: cover; background: var(--card-2); flex-shrink: 0; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* زندگی‌نامه */
.bio-layout { display: flex; flex-wrap: wrap; gap: 44px; align-items: flex-start; }
.bio-photo { flex: 0 0 300px; max-width: 100%; }
.bio-photo .frame { border-radius: 160px 160px 20px 20px; overflow: hidden; border: 2px solid var(--gold); background: var(--card-2); aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.bio-photo .frame img { width: 100%; height: 100%; object-fit: cover; }
.bio-text { flex: 1 1 420px; min-width: 0; }

/* پاورقی */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--gold); padding: 56px 0 24px; margin-top: 0; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand strong { color: var(--gold-2); font-size: 19px; }
.footer-brand p { color: var(--muted); font-size: 14px; }
.footer-col h2 { font-size: 15px; color: var(--gold); margin-bottom: 10px; }
.footer-col a { display: flex; align-items: center; gap: 8px; color: var(--text); padding: 4px 0; font-size: 15px; }
.footer-col a:hover { color: var(--gold-2); }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 13px; text-align: center; }

/* انیمیشن ظاهر شدن */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease, border-color .25s; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation: none !important; }
}

/* نوار بارگذاری بین صفحات */
.page-progress { position: fixed; top: 0; right: 0; height: 3px; background: var(--gold); z-index: 100; width: 0; transition: width .3s; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1120px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-row { justify-content: space-between; }
  .slider-track { grid-auto-columns: minmax(240px, calc((100% - 48px) / 3)); }
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .slider-track { grid-auto-columns: minmax(230px, 70%); }
  .book-detail .side { position: static; flex: 1 1 100%; }
  .cal-side { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; padding-bottom: 72px; }
  body.has-player { padding-bottom: 146px; }
  .container { padding: 0 16px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 15px; }
  .header-actions [data-theme-toggle] { display: none; }
  .hero { padding: 28px 12px 84px; }
  .mihrab { padding: 150px 34px 40px; }
  .car-row { gap: 6px; }
  .car-btn { width: 40px; height: 40px; }
  .speech-slide-body { padding: 20px; }
  .speech-slide-body h3 { font-size: 22px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .today-sep { display: none; }
  .today-bar { padding: 16px 18px; }
  .today-bar .btn { flex: 1 1 100%; }
  .section { padding-top: 60px; }
  .section-band { margin-top: 60px; padding: 56px 0; }
  .charity-cta, .form-card { padding: 24px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; bottom: 0; right: 0; left: 0; z-index: 61; background: var(--bg-deep); border-top: 1px solid var(--gold); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; color: var(--muted); }
  .bottom-nav a.is-active { color: var(--gold-2); }
  .player { bottom: 66px; }
  .player-speed, .player-dl, .player-cover { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .lightbox { padding: 60px 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
  .cal-day { min-height: 64px; padding: 5px; }
  .cal-day .hd { font-size: 16px; }
  .cal-day .dot { -webkit-line-clamp: 1; line-clamp: 1; font-size: 10px; }
  .amal-item { padding: 18px; }
}
.carousel-poster .car-row { max-width: 620px; margin: 0 auto; }
[data-theme="light"] .hero-arabic { text-shadow: none; }

/* ================= چینش مدرن صفحه اصلی ================= */
.home-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 48px; align-items: center; padding-top: 44px; }
.mihrab-arch { position: relative; height: 600px; }
.mihrab-arch .mihrab-img, .mihrab-arch .mihrab-shade { position: absolute; inset: 0; }
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.hero-text h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; line-height: 1.35; }
.hero-text .hero-intro { margin: 0; color: var(--muted); font-size: 18px; max-width: 540px; }
.hero-text .hero-actions { justify-content: flex-start; }
.today-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 6px; }
.mini-card { padding: 16px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; line-height: 1.6; }
.mini-card small { color: var(--muted); font-size: 13px; }
.mini-card .hijri { color: var(--gold-2); font-weight: 700; }
.mini-card a { font-size: 14px; margin-top: 2px; }
.live-chip { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 18px; border: 1px dashed var(--gold); background: var(--card-2); color: var(--text); }
.live-chip:hover { color: var(--text); border-style: solid; }
.live-chip .info { flex: 1; display: flex; flex-direction: column; line-height: 1.5; }
.live-chip small { color: var(--muted); }
.live-chip .go { color: var(--gold-2); font-weight: 700; white-space: nowrap; }

.bento { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; padding-top: 24px; }
.home-hero + .bento { padding-top: 72px; }
.bcard { min-width: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.bcard-pad { padding: 24px; gap: 16px; }
.bcard-gold { border-color: var(--gold); }
.bcard.deep { background: var(--bg-deep); }
.bcard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.bcard-head.flat { padding: 0; border: 0; }
.bcard-head h2 { flex: 1; font-size: 21px; color: var(--gold-2); font-weight: 800; }
.tabs-sm .tab { min-height: 34px; padding: 4px 14px; font-size: 14px; }
.car-btn.sm { width: 40px; height: 40px; }
.bcard .carousel { flex: 1; display: flex; flex-direction: column; }
.bcard .speech-slide { border: 0; border-radius: 0; box-shadow: none; flex: 1; }
.bcard .speech-slide-media { flex: 3 1 340px; aspect-ratio: auto; min-height: 300px; }
.bcard .speech-slide-body { flex: 2 1 260px; padding: 22px 24px; }
.bcard .speech-slide-body h3 { font-size: 25px; }
.bcard .card-actions .more-link { margin-right: 6px; }
.bcard .car-dots { margin: 0 0 16px; }
.sessions-car { padding: 18px 20px 16px; gap: 12px; }
.sessions-car .poster-slide { max-width: none; border-radius: 150px 150px 14px 14px; box-shadow: none; }
.sessions-car .poster-media { aspect-ratio: 4 / 5; }
.sessions-car .car-count { top: auto; bottom: 86px; left: 50%; transform: translateX(-50%); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); transition: border-color .2s; }
.cat-tile:hover { border-color: var(--gold); color: var(--text); }
.cat-tile strong { color: var(--gold-2); }
.cat-tile small { color: var(--muted); font-size: 13px; }
.verse-box { margin: 0; padding: 22px 24px; border-radius: 18px; border: 1px solid var(--gold); text-align: center; background: var(--card-2); }
.verse-box .arabic { margin: 0; font-family: "Aref Ruqaa", Amiri, serif; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.8; color: var(--gold-2); }
.verse-box footer { color: var(--muted); font-size: 14px; margin-top: 4px; }
.muted-text { color: var(--muted); font-size: 15px; margin: 0; }
.report-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-tile { position: relative; height: 100px; border-radius: 12px; overflow: hidden; background: var(--card-2) center / cover no-repeat; border: 1px solid var(--line); display: flex; align-items: flex-end; color: #fff; }
.report-tile span { width: 100%; padding: 18px 10px 6px; font-size: 13px; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.report-tile:hover { border-color: var(--gold); color: #fff; }
.books-row { padding-top: 24px; }
.book-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.book-mini { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.book-mini:hover { border-color: var(--gold); color: var(--text); }
.book-mini strong { display: block; color: var(--gold-2); line-height: 1.5; }
.book-mini small { color: var(--muted); font-size: 12px; }
.book-cover.sm { width: 78px; margin: 0; font-size: 14px; padding: 6px; border-radius: 3px 8px 8px 3px; flex-shrink: 0; text-align: center; }
.book-cover.sm small { font-size: 11px; }
.quick-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding-top: 24px; padding-bottom: 72px; }
.quick-row a { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); color: var(--text); font-weight: 700; }
.quick-row a:hover { border-color: var(--gold); color: var(--gold-2); }
.quick-row .ic { color: var(--gold); }
@media (max-width: 900px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .mihrab-arch { height: 440px; max-width: 420px; width: 100%; margin: 0 auto; }
  .home-hero { gap: 28px; }
}
@media (max-width: 720px) {
  .today-cards { grid-template-columns: minmax(0, 1fr); }
  .hero-text .hero-actions .btn { flex: 1 1 auto; }
  .bcard .speech-slide-media { min-height: 200px; }
}
.bcard > .tab-panel:not([hidden]) { flex: 1; display: flex; flex-direction: column; }
.bcard .speech-slide-media { align-self: stretch; }
.bcard-pad .verse-box { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* ---- نسخه ۲ چینش: محراب بزرگ‌تر با ستون و حدیث روز، کتاب‌های بزرگ‌تر ---- */
.home-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.mihrab-arch { height: 760px; }
.mihrab-hshade { position: absolute; inset: 0; clip-path: polygon(15.50% 100.00%, 15.50% 47.65%, 15.62% 45.43%, 15.99% 43.34%, 16.57% 41.36%, 17.36% 39.49%, 18.34% 37.73%, 19.48% 36.06%, 20.78% 34.48%, 22.22% 32.98%, 23.78% 31.57%, 25.44% 30.22%, 27.19% 28.94%, 29.00% 27.72%, 30.87% 26.55%, 32.77% 25.43%, 34.69% 24.34%, 36.61% 23.29%, 38.52% 22.26%, 40.39% 21.26%, 42.21% 20.27%, 43.97% 19.28%, 45.65% 18.30%, 47.22% 17.31%, 48.68% 16.31%, 50.00% 15.29%, 51.32% 16.31%, 52.78% 17.31%, 54.35% 18.30%, 56.03% 19.28%, 57.79% 20.27%, 59.61% 21.26%, 61.48% 22.26%, 63.39% 23.29%, 65.31% 24.34%, 67.23% 25.43%, 69.13% 26.55%, 71.00% 27.72%, 72.81% 28.94%, 74.56% 30.22%, 76.22% 31.57%, 77.78% 32.98%, 79.22% 34.48%, 80.52% 36.06%, 81.66% 37.73%, 82.64% 39.49%, 83.43% 41.36%, 84.01% 43.34%, 84.38% 45.43%, 84.50% 47.65%, 84.50% 100.00%); background: var(--hshade); }
.mihrab-hadith { position: absolute; left: 22%; right: 22%; bottom: 7%; text-align: center; }
.mihrab-hadith .label { display: inline-block; padding: 2px 14px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-2); font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.mihrab-hadith .arabic { margin: 0; font-family: Amiri, serif; font-weight: 700; font-size: clamp(22px, 2.3vw, 30px); line-height: 1.7; color: var(--gold-2); }
.mihrab-hadith .tr { margin: 4px 0 0; font-size: 15px; color: var(--text); }
.mihrab-hadith .src { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.bcard-head h2.lg { font-size: 26px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 18px; }
.book-big { display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); transition: border-color .2s; }
.book-big:hover { border-color: var(--gold); }
.book-big .book-cover.md { width: 118px; margin: 0; font-size: 20px; flex-shrink: 0; }
.book-big .info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.book-big h3 { font-size: 19px; color: var(--gold-2); line-height: 1.5; }
.book-big h3 a { color: inherit; }
.book-big p { margin: 0; font-size: 14px; color: var(--muted); }
.book-big .buy-buttons { justify-content: flex-start; }
@media (max-width: 900px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .mihrab-arch { height: 560px; max-width: 480px; }
  .mihrab-hadith { left: 18%; right: 18%; }
}
@media (max-width: 720px) {
  .brand-photo { width: 56px; height: 56px; }
  .book-big { flex-direction: column; text-align: center; }
  .book-big .buy-buttons { justify-content: center; }
  .mihrab-hadith .tr { font-size: 13px; }
}
.bcard-pad .cat-grid { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.bcard-pad .cat-tile { justify-content: center; padding: 20px 22px; }
.bcard-pad .cat-tile strong { font-size: 19px; }
.bcard-pad .cat-tile small { font-size: 14px; }

/* ================= سربرگ جدید: منوی کشویی + حدیث روز ================= */
.header-row { min-height: 92px; gap: 20px; }
.header-start { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.menu-btn { display: inline-flex !important; width: 48px; height: 48px; border-color: var(--gold); }
.main-nav { display: none !important; }
.header-hadith { flex: 1; min-width: 0; text-align: center; padding: 6px 18px; border-inline: 1px solid var(--line-soft); }
.header-hadith .label { display: inline-block; font-size: 11px; font-weight: 700; color: var(--gold); letter-spacing: 0; margin-bottom: 2px; }
.header-hadith .arabic { margin: 0; font-family: Amiri, serif; font-weight: 700; font-size: 21px; line-height: 1.6; color: var(--gold-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-hadith small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { margin-right: auto; }
.drawer-panel { width: min(360px, 88vw); background: var(--bg); padding: 20px; }
.drawer-nav a { border-radius: 12px; border-bottom: 0; margin-bottom: 2px; font-size: 16px; }
.drawer-nav a:hover, .drawer-nav a.is-active { background: var(--card); color: var(--gold-2); }
.drawer-nav a.is-active { box-shadow: inset -3px 0 0 var(--gold); }
.drawer-group { border-bottom: 0; border-top: 1px solid var(--line-soft); margin-top: 6px; }
@media (max-width: 1000px) {
  .header-hadith .arabic { font-size: 17px; }
  .header-hadith small { display: none; }
}
@media (max-width: 720px) {
  .header-row { min-height: 72px; }
  .header-hadith { display: none; }
  .header-actions [data-theme-toggle] { display: inline-flex; }
  .menu-btn { width: 44px; height: 44px; }
}

/* ================= نسخه ۳: اطلاعیه جلسات داخل محراب ================= */
main[data-page="home"] { background-image: var(--girih); background-attachment: fixed; }
.mihrab-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.mihrab-row { display: flex; align-items: center; gap: 14px; width: 100%; }
.mihrab-row .mihrab-arch { flex: 1; min-width: 0; height: 760px; }
.mihrab-frame { pointer-events: none; }
.mihrab-shade { pointer-events: none; }
.mihrab-slide { position: absolute; inset: 0; animation: carIn .6s ease; }
.mihrab-blur { position: absolute; inset: 0; clip-path: polygon(15.50% 100.00%, 15.50% 47.65%, 15.62% 45.43%, 15.99% 43.34%, 16.57% 41.36%, 17.36% 39.49%, 18.34% 37.73%, 19.48% 36.06%, 20.78% 34.48%, 22.22% 32.98%, 23.78% 31.57%, 25.44% 30.22%, 27.19% 28.94%, 29.00% 27.72%, 30.87% 26.55%, 32.77% 25.43%, 34.69% 24.34%, 36.61% 23.29%, 38.52% 22.26%, 40.39% 21.26%, 42.21% 20.27%, 43.97% 19.28%, 45.65% 18.30%, 47.22% 17.31%, 48.68% 16.31%, 50.00% 15.29%, 51.32% 16.31%, 52.78% 17.31%, 54.35% 18.30%, 56.03% 19.28%, 57.79% 20.27%, 59.61% 21.26%, 61.48% 22.26%, 63.39% 23.29%, 65.31% 24.34%, 67.23% 25.43%, 69.13% 26.55%, 71.00% 27.72%, 72.81% 28.94%, 74.56% 30.22%, 76.22% 31.57%, 77.78% 32.98%, 79.22% 34.48%, 80.52% 36.06%, 81.66% 37.73%, 82.64% 39.49%, 83.43% 41.36%, 84.01% 43.34%, 84.38% 45.43%, 84.50% 47.65%, 84.50% 100.00%); background-size: cover; background-position: center; filter: blur(16px) brightness(.5) saturate(1.1); }
[data-theme="light"] .mihrab-blur { filter: blur(16px) brightness(1.15) saturate(.8); opacity: .55; }
.mihrab-poster { position: absolute; left: 20%; right: 20%; top: 21%; bottom: 17%; z-index: 3; border: 0; padding: 0; background: none; cursor: zoom-in; }
.mihrab-poster img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 24px rgba(0,0,0,.55)); }
.mihrab-caption { position: absolute; left: 18%; right: 18%; bottom: 3%; z-index: 3; text-align: center; display: flex; flex-direction: column; line-height: 1.55; }
.mihrab-caption .label { font-size: 12px; color: var(--gold); font-weight: 700; }
.mihrab-caption strong { font-size: 18px; color: var(--gold-2); }
.mihrab-caption small { font-size: 14px; color: var(--muted); }
.mihrab-wrap .car-dots { margin-top: 2px; }
.mihrab-more { font-size: 14px; }

/* سخنرانی‌های صوتی */
.audio-card .bcard-head h2 { display: flex; align-items: center; gap: 8px; }
.bcard-head h2 .ic { color: var(--gold); }
.audio-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--gold); color: var(--on-gold); display: inline-flex; align-items: center; justify-content: center; }
.audio-list { list-style: none; margin: 0; padding: 8px 12px; flex: 1; display: flex; flex-direction: column; }
.audio-list li { border-bottom: 1px solid var(--line-soft); }
.audio-list li:last-child { border-bottom: 0; }
.audio-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 8px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: right; border-radius: 12px; }
.audio-row:hover, .audio-row.is-playing { background: var(--card-2); }
.audio-thumb { position: relative; width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; background: var(--card-2) center / cover no-repeat; border: 1px solid var(--line); }
.audio-thumb .ap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); color: #E8CF92; border-radius: 12px; }
.audio-row.is-playing .audio-thumb .ap { background: rgba(201,165,92,.7); color: #0B0B0C; }
.audio-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.5; }
.audio-meta strong { color: var(--gold-2); font-size: 16px; }
.audio-meta small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audio-date { font-size: 12px; color: var(--faint); white-space: nowrap; }
.audio-more { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-top: 1px solid var(--line-soft); font-weight: 700; }
.audio-more:hover { background: var(--card-2); }

/* کاشی‌های اعمال: عکس پس‌زمینه هر دسته از پنل (دسته‌های اعمال ← عکس پس‌زمینه) */
.cat-tile.has-photo { justify-content: flex-end; background:
  linear-gradient(to top, color-mix(in srgb, var(--card-2) 92%, transparent) 0%, color-mix(in srgb, var(--card-2) 55%, transparent) 55%, color-mix(in srgb, var(--card-2) 15%, transparent)),
  var(--photo) center / cover no-repeat, var(--card-2); transition: border-color .2s, background-size .4s; }
.amal-cats .cat-grid { min-height: 0; }
.amal-cats .cat-tile { min-height: 150px; justify-content: flex-end; }
.amal-cats .car-dots { margin: 14px 0 0; }
.cat-pager { display: flex; gap: 6px; }
.cat-pager .icon-btn { width: 38px; height: 38px; }

/* صفحه کتاب: جلد کتاب در پس‌زمینه */
.book-cover-bg { position: fixed; inset: 0; z-index: -1; background-size: cover; background-position: center; filter: blur(8px) saturate(1.1); opacity: .32; transform: scale(1.06); }
.book-cover-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 0%, var(--bg) 85%); }
body.has-book-bg { background: var(--bg); }
body.has-book-bg .page-hero { background: transparent; }
body.has-book-bg main { position: relative; }
@media (max-width: 900px) {
  .mihrab-row .mihrab-arch { height: 600px; }
}
@media (max-width: 720px) {
  .mihrab-row { gap: 4px; }
  .mihrab-row .car-btn { width: 38px; height: 38px; }
  .mihrab-row .mihrab-arch { height: 500px; }
  .mihrab-caption strong { font-size: 15px; }
}

/* ================= نسخه ۴ ================= */
/* پوستر دقیقاً داخل قاب محراب */
.mihrab-row .mihrab-arch { margin-bottom: 78px; }
.mihrab-poster { left: 0; right: 0; top: 0; bottom: 0; clip-path: polygon(15.50% 100.00%, 15.50% 47.65%, 15.62% 45.43%, 15.99% 43.34%, 16.57% 41.36%, 17.36% 39.49%, 18.34% 37.73%, 19.48% 36.06%, 20.78% 34.48%, 22.22% 32.98%, 23.78% 31.57%, 25.44% 30.22%, 27.19% 28.94%, 29.00% 27.72%, 30.87% 26.55%, 32.77% 25.43%, 34.69% 24.34%, 36.61% 23.29%, 38.52% 22.26%, 40.39% 21.26%, 42.21% 20.27%, 43.97% 19.28%, 45.65% 18.30%, 47.22% 17.31%, 48.68% 16.31%, 50.00% 15.29%, 51.32% 16.31%, 52.78% 17.31%, 54.35% 18.30%, 56.03% 19.28%, 57.79% 20.27%, 59.61% 21.26%, 61.48% 22.26%, 63.39% 23.29%, 65.31% 24.34%, 67.23% 25.43%, 69.13% 26.55%, 71.00% 27.72%, 72.81% 28.94%, 74.56% 30.22%, 76.22% 31.57%, 77.78% 32.98%, 79.22% 34.48%, 80.52% 36.06%, 81.66% 37.73%, 82.64% 39.49%, 83.43% 41.36%, 84.01% 43.34%, 84.38% 45.43%, 84.50% 47.65%, 84.50% 100.00%); background: var(--arch); }
.mihrab-poster img { position: absolute; left: 15.5%; top: 15.3%; width: 69%; height: 84.7%; object-fit: cover; object-position: center 30%; filter: none; }
/* نسبت محراب = نسبت پوستر، تا پوستر کامل دیده شود و کش نیاید */
.mihrab-row .mihrab-arch { height: auto; aspect-ratio: 400 / 540; max-width: 520px; margin-inline: auto; }
@media (max-width: 900px) { .mihrab-row .mihrab-arch { height: auto; max-width: 440px; } }
@media (max-width: 720px) { .mihrab-row .mihrab-arch { height: auto; max-width: 360px; } }
.mihrab-caption { top: calc(100% + 10px); bottom: auto; left: 8%; right: 8%; }
.mihrab-wrap .car-dots { margin-top: -10px; }

/* صفحه کتاب: جلد واضح‌تر */
.book-cover-bg { filter: blur(2px) saturate(1.05); opacity: .62; transform: scale(1.02); }
.book-cover-bg::after { background: radial-gradient(ellipse at center, color-mix(in srgb, var(--bg) 25%, transparent) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 70%, var(--bg) 100%); }
body.has-book-bg .book-detail .content { background: color-mix(in srgb, var(--bg) 82%, transparent); padding: 24px; border-radius: 20px; backdrop-filter: blur(4px); }

/* پخش‌کننده داخل کارت صوتی */
body.has-inline-player #player { display: none !important; }
body.has-inline-player.has-player { padding-bottom: 0; }
.inline-player { margin: 12px 14px 0; padding: 14px 16px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--gold); display: flex; flex-direction: column; gap: 8px; }
.ip-head { display: flex; flex-direction: column; line-height: 1.5; }
.ip-now { font-size: 12px; color: var(--gold); font-weight: 700; }
.ip-title { font-size: 17px; color: var(--gold-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-seek { width: 100%; accent-color: var(--gold); direction: ltr; }
.ip-controls { display: flex; align-items: center; gap: 8px; }
.ip-controls .icon-btn { width: 40px; height: 40px; }
.ip-toggle { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--gold); color: var(--on-gold); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ip-toggle .i-pause { display: none; }
.inline-player.is-playing .i-play { display: none; }
.inline-player.is-playing .i-pause { display: inline-flex; }
.ip-speed { min-width: 42px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--gold-2); cursor: pointer; }
.audio-list li { display: flex; align-items: center; gap: 4px; }
.audio-list .audio-row { flex: 1; min-width: 0; }
.audio-dl { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--gold); border: 1px solid transparent; }
.audio-dl:hover { border-color: var(--gold); }
@media (max-width: 720px) {
  .mihrab-row .mihrab-arch { margin-bottom: 70px; }
  .ip-controls { flex-wrap: wrap; }
}
/* ================= مرحله ۱: سربرگ با حدیث متحرک + هیروی جدید ================= */
.header-row { min-height: 76px; }
.header-hadith { position: relative; flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; padding: 0; margin: 10px 0; border-inline: 1px solid var(--line-soft); }
.hadith-marquee { position: relative; width: 100%; height: 100%; min-height: 44px; overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); }
.hadith-track { position: absolute; top: 50%; left: 0; width: max-content; margin: 0; white-space: nowrap; display: flex; align-items: baseline; gap: 10px; animation: hadith-ltr var(--dur, 30s) linear infinite; }
.hadith-marquee:hover .hadith-track { animation-play-state: paused; }
.hadith-track .who { font-size: 14px; font-weight: 700; color: var(--gold); }
.header-hadith .hadith-track .arabic { overflow: visible; text-overflow: clip; font-family: Amiri, serif; font-weight: 700; font-size: 22px; line-height: 1.6; color: var(--gold-2); }
.hadith-track .tr { font-size: 14px; color: var(--muted); }
@keyframes hadith-ltr {
  from { left: 0; transform: translate(-100%, -50%); }
  to   { left: 100%; transform: translate(0, -50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hadith-track { left: auto; right: 12px; transform: translateY(-50%); }
}
@media (max-width: 720px) {
  .header-hadith { display: flex; }
  .hadith-track .who, .hadith-track .tr { font-size: 12px; }
  .header-hadith .hadith-track .arabic { font-size: 17px; }
  .header-actions { gap: 4px; }
}

/* عکس دایره‌ای استاد بالای متن هیرو */
.hero-photo { display: block; width: 250px; height: 250px; flex-shrink: 0; padding: 4px; border-radius: 50%; border: 1px solid var(--gold); box-shadow: 0 0 0 6px rgba(201,165,92,.14); }
.hero-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 18%; }
@media (max-width: 720px) {
  .hero-photo { width: 200px; height: 200px; }
}

/* نوشته‌ها و عکس استاد اول (راست در کامپیوتر، بالا در موبایل)، محراب بعد از آن */
.home-hero .hero-text { order: -1; }
@media (min-width: 901px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; padding-top: 24px; }
  .home-hero .mihrab-wrap { align-self: start; margin-top: -40px; }
  .home-hero .hero-text { margin-top: 40px; }
}

/* ================= مرحله ۲: سخنرانی‌ها + کارت‌های شفاف صفحه اول ================= */
/* فلش‌های < > روی تصویر کلیپ (صفحه اول) */
.speech-slide-media .media-link { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: inherit; }
.car-arrow { position: absolute; top: 50%; z-index: 3; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 1px solid rgba(232,207,146,.6); background: rgba(0,0,0,.4); color: #E8CF92; display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: .85; transition: opacity .2s, background .2s, color .2s; }
.car-arrow:hover { opacity: 1; background: rgba(201,165,92,.9); color: #0B0B0C; }
.car-arrow.prev { right: 14px; }
.car-arrow.next { left: 14px; }
@media (max-width: 720px) {
  .car-arrow { width: 38px; height: 38px; margin-top: -19px; }
  .car-arrow.prev { right: 8px; }
  .car-arrow.next { left: 8px; }
}

/* صفحه سخنرانی: قاب ویدئو */
.media-stage { position: relative; }
.stage-video { position: relative; }
.stage-dl { position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(0,0,0,.5); border-color: rgba(232,207,146,.55); color: #E8CF92; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.stage-dl:hover { background: rgba(201,165,92,.9); color: #0B0B0C; }

/* کلید صوت / ویدئو */
.speech-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.media-switch { display: inline-flex; align-items: center; padding: 4px; border-radius: 999px; border: 1px solid var(--gold); background: var(--card-2); }
.media-switch button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--gold-2); font: inherit; font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.media-switch button.is-on { background: var(--gold); color: var(--on-gold); }
.media-switch button:disabled { opacity: .35; cursor: not-allowed; }
.media-switch .sep { color: var(--gold); font-size: 20px; padding: 0 2px; opacity: .7; }

/* فهرست کناری با «بیشتر» و اسکرول */
.speech-side .side-title { color: var(--gold-2); font-size: 19px; margin-bottom: 6px; }
.sp-list { list-style: none; margin: 0; padding: 0; }
.sp-list a { border-radius: 12px; padding: 10px 8px; }
.sp-list a:hover { background: var(--card); }
.sp-list a.is-current { background: var(--card); box-shadow: inset -3px 0 0 var(--gold); }
.sp-list a.is-current strong { color: var(--gold-2); }
.side-scroll.is-open { max-height: 560px; overflow-y: auto; padding-left: 6px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }

/* اشتراک‌گذاری: فقط کپی لینک و اشتراک */
.share-row { align-items: center; margin-top: 28px; }
.share-label { color: var(--muted); font-size: 14px; }
.share-row .icon-btn { position: relative; border-color: var(--gold); }
.icon-btn.is-done { color: var(--gold); }
.icon-btn.is-done::after { content: attr(data-done); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 4px 10px; border-radius: 8px; background: var(--gold); color: var(--on-gold); font-size: 12px; font-weight: 700; pointer-events: none; }


/* ================= مرحله ۳ ================= */
/* صفحه اول: عکس کلیپ کوچک‌تر با فاصله از لبه‌های قاب + پخش کلیپ همان‌جا */
.bcard .speech-slide-media { flex: 3 1 320px; align-self: stretch; aspect-ratio: auto; min-height: 260px; margin: 12px; border-radius: 16px; border: 1px solid var(--line); }
.bcard .speech-slide-body { padding-inline-end: 22px; }
button.media-link { border: 0; padding: 0; background: transparent; font: inherit; cursor: pointer; }
button.media-link:hover .play-badge { transform: scale(1.08); }
.inline-video { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; background: #000; object-fit: contain; }
@media (max-width: 720px) {
  .bcard .speech-slide-media { margin: 14px 14px 0; }
}

/* صفحه سخنرانی: قاب صوت جمع‌وجور */
.stage-audio { border-radius: 20px; overflow: hidden; border: 1px solid var(--gold); background: var(--card-2); }
.stage-art { display: flex; align-items: center; gap: 18px; padding: 18px; }
.stage-art-img { width: 220px; max-width: 42%; height: auto; flex-shrink: 0; border-radius: 12px; border: 1px solid var(--line); display: block; }
.stage-art-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; line-height: 1.6; }
.stage-art-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: 13px; font-weight: 700; }
.stage-art-title { color: var(--gold-2); font-size: 21px; font-weight: 800; }
.stage-art-date { color: var(--muted); font-size: 13px; }
.stage-audio .inline-player { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
@media (max-width: 560px) {
  .stage-art { flex-direction: column; align-items: stretch; text-align: center; }
  .stage-art-img { width: 100%; max-width: none; }
}

/* قاب صوت صفحه سخنرانی: فقط اسم صوت + پلیر */
.stage-audio .inline-player { border-top: 0; padding: 18px 20px; }
.stage-audio .ip-now { display: none; }
.stage-audio .ip-title { font-size: 20px; font-weight: 800; white-space: normal; }

/* ================= مرحله ۹ ================= */
/* عنوان «تألیفات استاد» خودش لینک صفحه کتابخانه است */
.bcard-head h2 .head-link { color: inherit; }
.bcard-head h2 .head-link:hover { color: var(--gold); }

/* تألیفات صفحه اول: فقط جلد و نام؛ با بردن موس کتاب بالا می‌آید و پرده معرفی روی جلد باز می‌شود */
.book-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 28px 20px; padding-top: 10px; }
.book-tile { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--text); text-align: center; }
.book-tile:hover { color: var(--text); }
.book-tile-cover { position: relative; display: block; width: min(100%, 190px); transition: transform .35s cubic-bezier(.2, .7, .3, 1); }
.book-tile .book-cover.md { width: 100%; margin: 0; font-size: 22px; transition: box-shadow .35s; }
.book-tile-veil { position: absolute; inset: 0; overflow: hidden; border-radius: 4px 12px 12px 4px; pointer-events: none; }
.book-tile-veil .veil-in { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 16px 14px; background: linear-gradient(to top, rgba(14, 8, 6, .96) 0%, rgba(14, 8, 6, .9) 62%, rgba(14, 8, 6, .55) 100%); color: #F3E6C8; text-align: right; transform: translateY(101%); transition: transform .35s cubic-bezier(.2, .7, .3, 1) .08s; }
.book-tile-veil strong { color: #E6CB8B; font-size: 15px; line-height: 1.5; }
.book-tile-veil .veil-in > span { font-size: 13px; line-height: 1.8; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 7; line-clamp: 7; -webkit-box-orient: vertical; }
.book-tile-name { color: var(--gold-2); font-weight: 700; font-size: 16px; line-height: 1.5; transition: opacity .25s; }
.book-tile:hover .book-tile-cover, .book-tile:focus-visible .book-tile-cover, .book-tile.is-open .book-tile-cover { transform: translateY(-10px); }
.book-tile:hover .book-cover, .book-tile:focus-visible .book-cover, .book-tile.is-open .book-cover { box-shadow: -10px 22px 34px -14px rgba(0, 0, 0, .75), inset 8px 0 10px -6px rgba(0, 0, 0, .5); }
.book-tile:hover .veil-in, .book-tile:focus-visible .veil-in, .book-tile.is-open .veil-in { transform: none; }
.book-tile:hover .book-tile-name, .book-tile:focus-visible .book-tile-name, .book-tile.is-open .book-tile-name { opacity: .55; }
@media (prefers-reduced-motion: reduce) {
  .book-tile-cover, .book-tile-veil .veil-in { transition: none; }
}

/* فرم نذر: دکمه تا پر شدن فیلدهای ستاره‌دار غیرفعال است */
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn:disabled:hover { transform: none; }
[data-nazr-hint] { margin-top: 8px; }

/* ================= مرحله ۱۰: پلیر صوتی جدید ================= */
/* چیدمان مثل پلیرهای معتبر: پخش/توقف و جابجایی سمت چپ، زمان و سرعت و دانلود سمت راست */

/* نوار پیشرفت: بخش پخش‌شده طلایی، بقیه کم‌رنگ (--p را جاوااسکریپت تنظیم می‌کند) */
.kh-range { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0; padding: 0; background: transparent; cursor: pointer; direction: ltr; accent-color: var(--gold); }
.kh-range:focus { outline: none; }
.kh-range::-webkit-slider-runnable-track { height: 5px; border-radius: 999px; background: linear-gradient(to right, var(--gold) var(--p), color-mix(in srgb, var(--muted) 28%, transparent) var(--p)); }
.kh-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -4.5px; border-radius: 50%; border: 0; background: var(--gold-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent); transform: scale(.8); transition: transform .15s; }
.kh-range:hover::-webkit-slider-thumb, .kh-range:focus-visible::-webkit-slider-thumb { transform: scale(1.1); }
.kh-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 45%, transparent); }
.kh-range::-moz-range-track { height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 28%, transparent); }
.kh-range::-moz-range-progress { height: 5px; border-radius: 999px; background: var(--gold); }
.kh-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 0; background: var(--gold-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent); }

/* پلیر داخل صفحه (کارت صوتی صفحه اول و صفحه سخنرانی) */
.inline-player { gap: 12px; padding: 18px 20px 14px; border-radius: 20px; border-color: color-mix(in srgb, var(--gold) 60%, transparent); background: linear-gradient(155deg, color-mix(in srgb, var(--gold) 11%, var(--card-2)) 0%, var(--card-2) 55%); box-shadow: var(--shadow); }
.ip-head { flex-direction: row; align-items: center; gap: 14px; }
.ip-cover { width: 58px; height: 58px; flex-shrink: 0; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.ip-meta { min-width: 0; display: flex; flex-direction: column; line-height: 1.55; }
.ip-now { display: inline-flex; align-items: center; gap: 8px; }
.ip-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.ip-eq i { width: 3px; height: 35%; border-radius: 2px; background: var(--gold); }
.inline-player.is-playing .ip-eq i { animation: ip-eq .8s ease-in-out infinite alternate; }
.inline-player.is-playing .ip-eq i:nth-child(2) { animation-delay: -.5s; }
.inline-player.is-playing .ip-eq i:nth-child(3) { animation-delay: -.25s; }
@keyframes ip-eq { from { height: 25%; } to { height: 100%; } }
.ip-seekrow, .player-seekrow { display: flex; align-items: center; gap: 10px; }
.ip-cur, .ip-dur, .player-cur, .player-dur { min-width: 36px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ip-dur, .player-dur { text-align: right; }
.ip-controls { justify-content: space-between; gap: 12px; flex-wrap: nowrap; }
.ip-transport, .ip-extra { display: flex; align-items: center; gap: 6px; }
.ip-transport { gap: 10px; }
.ip-skip { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, color .2s; }
.ip-skip:hover { background: color-mix(in srgb, var(--gold) 15%, transparent); color: var(--gold-2); }
.ip-toggle { width: 56px; height: 56px; box-shadow: 0 10px 22px -10px var(--gold); transition: transform .15s, box-shadow .15s; }
.ip-toggle:hover { transform: scale(1.06); }
.ip-toggle:active { transform: scale(.96); }
.ip-toggle .i-play { display: inline-flex; margin-left: 3px; }
.ip-speed, .player-speed { min-width: 48px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--gold-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .2s; }
.ip-speed:hover, .player-speed:hover { border-color: var(--gold); }
@media (max-width: 720px) {
  .ip-controls { flex-wrap: nowrap; }
  .inline-player { padding: 16px 14px 12px; }
}
/* صفحه سخنرانی: فقط اسم صوت + پلیر */
.stage-audio .ip-cover { display: none; }

/* پلیر ثابت پایین صفحه */
.player { padding: 8px 0; box-shadow: 0 -12px 30px -20px rgba(0, 0, 0, .7); }
.player-row { gap: 14px; }
.player-toggle { width: 48px; height: 48px; box-shadow: 0 8px 18px -10px var(--gold); transition: transform .15s; }
.player-toggle:hover { transform: scale(1.06); }
.player-toggle .i-play { display: inline-flex; margin-left: 2px; }
.player.is-playing .player-toggle .i-play { display: none; }
.player-cover { width: 44px; height: 44px; }
.player-cover.is-blank { display: none; }
.player-info { display: flex; flex-direction: column; gap: 2px; }
.player-title { text-align: left; }
.player-extra { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
@media (max-width: 720px) {
  .player-row { gap: 10px; }
  .player-cur, .player-dur { min-width: 0; font-size: 11px; }
}

/* ================= قفسه کتاب‌های صفحه اول با فلش چپ و راست ================= */
.shelf-wrap { position: relative; }
.shelf-wrap.has-more { padding: 0 56px; }
.shelf-wrap .book-shelf { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 20px) / 4); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 14px 2px 10px; }
.shelf-wrap .book-shelf::-webkit-scrollbar { display: none; }
.shelf-wrap .book-tile { scroll-snap-align: start; }
.shelf-arrow { position: absolute; top: 40%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 1px solid var(--gold); background: var(--card-2); color: var(--gold-2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s, color .2s, opacity .2s; }
.shelf-arrow:hover { background: var(--gold); color: var(--on-gold); }
.shelf-arrow:disabled { opacity: .3; cursor: default; background: var(--card-2); color: var(--gold-2); }
.shelf-arrow.prev { right: 0; }
.shelf-arrow.next { left: 0; }
@media (max-width: 900px) {
  .shelf-wrap .book-shelf { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
}
@media (max-width: 560px) {
  .shelf-wrap.has-more { padding: 0 40px; }
  .shelf-wrap .book-shelf { grid-auto-columns: calc((100% - 20px) / 2); }
  .shelf-arrow { width: 36px; height: 36px; margin-top: -18px; }
}
/* ================= نسخه ۱۳ ================= */
/* صفحه کتاب: با بردن موس روی جلد، کل جلد (پشت و رو) کمی بالا می‌آید و بزرگ نمایش داده می‌شود */
.book-detail .side { z-index: 6; }
.book-zoom { position: relative; display: block; width: max-content; margin: 0 auto 18px; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 4px 12px 12px 4px; }
.book-zoom .book-cover { margin: 0; transition: transform .35s, box-shadow .35s; }
.book-zoom-full {
  position: absolute; top: 50%; inset-inline-start: 0; z-index: 2; width: min(660px, calc(100vw - 48px));
  border-radius: 10px; overflow: hidden; border: 2px solid var(--gold); background: #000;
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .85); pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(-50%) translateY(18px) scale(.94); transform-origin: right center;
  transition: opacity .35s, transform .45s cubic-bezier(.2, .8, .2, 1), visibility 0s .45s;
}
.book-zoom-full img { display: block; width: 100%; height: auto; }
.book-zoom:hover .book-zoom-full, .book-zoom:focus-visible .book-zoom-full {
  opacity: 1; visibility: visible; transform: translateY(-50%) translateY(-22px) scale(1); transition-delay: 0s;
}
.book-zoom:hover .book-cover, .book-zoom:focus-visible .book-cover { transform: translateY(-6px); }
@media (max-width: 860px) {
  .book-zoom-full { inset-inline-start: 50%; transform: translate(50%, -50%) translateY(18px) scale(.94); transform-origin: center; }
  .book-zoom:hover .book-zoom-full, .book-zoom:focus-visible .book-zoom-full { transform: translate(50%, -50%) translateY(-22px) scale(1); }
}
@media (hover: none) { .book-zoom-full { display: none; } }
@media (prefers-reduced-motion: reduce) { .book-zoom-full { transition: opacity .2s; } }/* صفحه اول: عنوان همه بخش‌ها لینک به صفحه همان بخش */
.bcard-head h2 .head-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: color .2s; }
.bcard-head h2 .head-link:hover .ic, .bcard-head h2 .head-link:focus-visible .ic { color: var(--gold-2); }
/* کارت تاریخ امروز در صفحه اول: لینک به تقویم */
.mini-card-link { color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.mini-card-link:hover, .mini-card-link:focus-visible { border-color: var(--gold); transform: translateY(-2px); }


/* موبایل: جلد کتاب‌های صفحه اول بزرگ‌تر و معرفی کامل روی جلد */
@media (max-width: 560px) {
  .shelf-wrap .book-shelf { grid-auto-columns: 78%; }
  .book-tile-cover { width: min(100%, 300px); }
  .book-tile-name { font-size: 17px; }
  .book-tile.is-open .book-tile-veil { pointer-events: auto; }
  .book-tile-veil .veil-in { justify-content: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .book-tile-veil .veil-in > span { font-size: 14px; display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; }
}