
:root {
  --ink: #0b0c10;
  --ink2: #111318;
  --card: #161820;
  --card2: #1c1f2a;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.1);
  --ruby: #c0392b;
  --ruby2: #e74c3c;
  --ruby-glow: rgba(192,57,43,0.25);
  --teal: #1a8c8c;
  --teal2: #22b8b8;
  --teal-glow: rgba(26,140,140,0.2);
  --silver: #b0bec5;
  --silver2: #cfd8dc;
  --muted: #5a6070;
  --muted2: #7a8090;
  --white: #f0f2f5;
  --accent: #4fc3f7;
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}

body {
  background: var(--ink);
  color: var(--white);
  font-family: 'Vazirmatn', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── POETRY BG ─── */
.poetry-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.poetry-line {
  position: absolute;
  width: 200%;
  right: -50%;
  font-family: 'Scheherazade New', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  color: var(--ruby);
  opacity: 0;
  white-space: nowrap;
  animation: drift 28s linear infinite;
  letter-spacing: 0.12em;
  text-align: center;
  filter: blur(0.3px);
}
.poetry-line:nth-child(1)  { top:4%;   animation-delay:0s;    opacity:0 }
.poetry-line:nth-child(2)  { top:11%;  animation-delay:-4.5s  }
.poetry-line:nth-child(3)  { top:18%;  animation-delay:-9s    }
.poetry-line:nth-child(4)  { top:25%;  animation-delay:-13s   }
.poetry-line:nth-child(5)  { top:32%;  animation-delay:-17s   }
.poetry-line:nth-child(6)  { top:39%;  animation-delay:-21s   }
.poetry-line:nth-child(7)  { top:46%;  animation-delay:-2s    }
.poetry-line:nth-child(8)  { top:53%;  animation-delay:-6.5s  }
.poetry-line:nth-child(9)  { top:60%;  animation-delay:-11s   }
.poetry-line:nth-child(10) { top:67%;  animation-delay:-15.5s }
.poetry-line:nth-child(11) { top:74%;  animation-delay:-19.5s }
.poetry-line:nth-child(12) { top:81%;  animation-delay:-23.5s }
.poetry-line:nth-child(13) { top:88%;  animation-delay:-1.5s  }
.poetry-line:nth-child(14) { top:95%;  animation-delay:-8s    }

@keyframes drift {
  0%   { opacity:0;    transform:translateX(30%)  }
  6%   { opacity:0.07 }
  50%  { opacity:0.07 }
  94%  { opacity:0.07 }
  100% { opacity:0;    transform:translateX(-130%) }
}

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: overlay;
}

/* ─── RADIAL GLOW ─── */
.radial-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(192,57,43,0.12) 0%, transparent 65%);
  z-index: 1;
  pointer-events: none;
  animation: glowPulse 8s ease-in-out infinite;
}
@keyframes glowPulse {
  0%,100% { opacity:0.7; transform:translateX(-50%) scale(1) }
  50%      { opacity:1;   transform:translateX(-50%) scale(1.1) }
}

/* ─── NAV ─── */
nav.top-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 68px;
  background: rgba(11,12,16,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ruby), #7b1a10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Scheherazade New', serif;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 0 16px var(--ruby-glow);
  flex-shrink: 0;
}
.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.logo-sub {
  font-size: 0.65rem;
  color: var(--muted2);
  font-weight: 400;
  display: block;
}

/* Nav tabs pill style */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px;
}
.nav-tabs a {
  display: block;
  padding: 0.38rem 1.1rem;
  border-radius: 40px;
  color: var(--muted2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.25s;
  white-space: nowrap;
}
.nav-tabs a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.07);
}
.nav-tabs a.active {
  background: var(--ruby);
  color: #fff;
  box-shadow: 0 2px 12px var(--ruby-glow);
}

/* ─── LIGHT THEME ─── */
body.light-theme {
  --ink: #f0ede8;
  --ink2: #e6e2db;
  --card: #ffffff;
  --card2: #f5f2ed;
  --border: rgba(0,0,0,0.10);
  --border2: rgba(0,0,0,0.18);
  --silver: #374151;
  --silver2: #111827;
  --muted: #6b7280;
  --muted2: #4b5563;
  --white: #0f172a;
  --accent: #1e40af;
}
body.light-theme nav.top-nav {
  background: rgba(240,237,232,0.95);
}
body.light-theme .logo-text { color: #0f172a; }
body.light-theme .logo-sub { color: #4b5563; }
body.light-theme .nav-tabs a { color: #374151; }
body.light-theme .nav-tabs a:hover { color: #0f172a; background: rgba(0,0,0,0.06); }
body.light-theme .nav-tabs { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); }
body.light-theme .section-title { color: #0f172a; }
body.light-theme .section-eyebrow { color: var(--ruby); }
body.light-theme .audio-title { color: #0f172a; }
body.light-theme .audio-meta { color: #4b5563; }
body.light-theme .news-title { color: #0f172a; }
body.light-theme .news-excerpt { color: #4b5563; }
body.light-theme .qnav-label { color: #0f172a; }
body.light-theme .qnav-count { color: #4b5563; }
body.light-theme .occasion-name { color: #0f172a; }
body.light-theme .occasion-date { color: #4b5563; }
body.light-theme .hero-title {
  background: linear-gradient(135deg, #0f172a 30%, var(--ruby));
  -webkit-background-clip: text;
  background-clip: text;
}
body.light-theme .hero-sub { color: #374151; }
body.light-theme .hero-poem { color: rgba(15,23,42,0.7); }
body.light-theme .hero-poem em { color: rgba(15,23,42,0.9); }
body.light-theme .about-heading { color: #0f172a; }
body.light-theme .about-text { color: #374151; }
body.light-theme .stat-num { color: var(--ruby); }
body.light-theme .stat-lbl { color: #4b5563; }
body.light-theme .info-label { color: #4b5563; }
body.light-theme .info-val { color: #0f172a; }
body.light-theme footer { background: #e6e2db; border-color: rgba(0,0,0,0.1); }
body.light-theme .footer-logo { color: var(--ruby); }
body.light-theme .footer-copy { color: #4b5563; }
body.light-theme .more-btn { color: var(--ruby); border-color: rgba(192,57,43,0.4); }
body.light-theme .more-btn:hover { background: var(--ruby); color: #fff; }
body.light-theme .poetry-line {
  color: var(--ruby);
  opacity: 0;
}
body.light-theme .grain-overlay { opacity: 0.015; mix-blend-mode: multiply; }
body.light-theme .radial-glow {
  background: radial-gradient(ellipse, rgba(192,57,43,0.07) 0%, transparent 65%);
}

/* Auth area */
.nav-auth { display:flex; align-items:center; gap:0.7rem; position:relative; }

/* ─── THEME TOGGLE BUTTON ─── */
.btn-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 1.1rem;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.06);
  color: var(--silver2);
  border-radius: 50px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.btn-theme-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192,57,43,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-theme-toggle:hover {
  border-color: var(--ruby);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--ruby-glow);
}
.btn-theme-toggle:hover::before { opacity: 1; }
.btn-theme-toggle:active { transform: scale(0.97); }

.theme-icon {
  font-size: 1rem;
  transition: transform 0.5s ease;
  display: inline-block;
}
.btn-theme-toggle:hover .theme-icon {
  transform: rotate(20deg) scale(1.2);
}
.theme-label { font-size: 0.82rem; }

body.light-theme .btn-theme-toggle {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.15);
  color: #2d3748;
}
body.light-theme .btn-theme-toggle:hover {
  border-color: var(--ruby);
  color: var(--ruby);
  background: rgba(192,57,43,0.07);
}

/* User avatar button */
.user-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border2);
  border-radius: 50px;
  padding: 5px 12px 5px 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Vazirmatn', sans-serif;
}
.user-btn:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--ruby));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.user-name { font-size: 0.85rem; font-weight: 600; color: var(--white); }
.user-chevron { font-size: 0.65rem; color: var(--muted); margin-right: 2px; }

/* Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: none;
  z-index: 300;
}
.user-dropdown.open { display: block; }

.dropdown-header {
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--ruby));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.dropdown-username { font-size: 0.95rem; font-weight: 700; }
.dropdown-email { font-size: 0.75rem; color: var(--muted2); }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.2rem;
  color: var(--silver);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  background: none;
  width: 100%;
  font-family: 'Vazirmatn', sans-serif;
  text-align: right;
}
.dropdown-item:hover { background: rgba(255,255,255,0.05); color: var(--white); }
.dropdown-item.danger { color: #e74c3c; }
.dropdown-item.danger:hover { background: rgba(231,76,60,0.1); }
.dropdown-item span:first-child { font-size: 1rem; }

/* ─── SEARCH BAR ─── */
.nav-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border2);
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  transition: all 0.3s ease;
  width: 240px;
  position: relative;
}
.nav-search:focus-within {
  border-color: var(--ruby);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px var(--ruby-glow);
  width: 290px;
}
.search-icon-inline {
  width: 16px;
  height: 16px;
  color: var(--muted2);
  flex-shrink: 0;
  transition: color 0.2s;
}
.nav-search:focus-within .search-icon-inline { color: var(--ruby); }

.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.83rem;
  width: 100%;
  min-width: 0;
}
.search-input::placeholder { color: var(--muted); }

.search-clear {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  display: none;
  transition: color 0.2s;
  flex-shrink: 0;
}
.search-clear:hover { color: var(--ruby); }
.search-input:not(:placeholder-shown) ~ .search-clear { display: block; }

/* دکمه ذره‌بین موبایل */
.btn-search-mobile {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-search-mobile svg {
  width: 17px;
  height: 17px;
  color: var(--silver2);
  transition: color 0.2s;
}
.btn-search-mobile:hover { border-color: var(--ruby); background: rgba(192,57,43,0.1); }
.btn-search-mobile:hover svg { color: var(--ruby); }
.btn-search-mobile.active { border-color: var(--ruby); background: rgba(192,57,43,0.12); }
.btn-search-mobile.active svg { color: var(--ruby); }

/* پنل سرچ موبایل */
.mobile-search-panel {
  display: none;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: rgba(11,12,16,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  z-index: 199;
  animation: slideDown 0.22s ease;
}
.mobile-search-panel.open { display: block; }
@keyframes slideDown {
  from { opacity:0; transform:translateY(-8px) }
  to   { opacity:1; transform:translateY(0) }
}
.mobile-search-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border2);
  border-radius: 50px;
  padding: 0.5rem 1rem;
}
.mobile-search-inner:focus-within {
  border-color: var(--ruby);
  box-shadow: 0 0 0 3px var(--ruby-glow);
}
.mobile-search-inner svg {
  width: 16px; height: 16px;
  color: var(--muted2);
  flex-shrink: 0;
}
.mobile-search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.9rem;
  width: 100%;
}
.mobile-search-input::placeholder { color: var(--muted); }

/* light theme overrides */
body.light-theme .nav-search { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.15); }
body.light-theme .nav-search:focus-within { background: #fff; }
body.light-theme .search-input { color: #0f172a; }
body.light-theme .mobile-search-panel { background: rgba(240,237,232,0.98); border-color: rgba(0,0,0,0.12); }
body.light-theme .mobile-search-inner { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.15); }
body.light-theme .mobile-search-input { color: #0f172a; }
@keyframes liveDot{0%,100%{opacity:1;transform:scale(1)}50%{opacity:0.5;transform:scale(0.7)}}
@keyframes dropIn{from{opacity:0;transform:translateY(-8px) scale(0.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.srp-popular-tag{padding:0.25rem 0.7rem;border-radius:20px;background:rgba(255,255,255,0.05);border:1px solid var(--border2);color:var(--muted2);font-size:0.74rem;cursor:pointer;transition:all 0.18s;font-family:'Vazirmatn',sans-serif;}
.srp-popular-tag:hover{border-color:var(--ruby);color:var(--white);background:rgba(192,57,43,0.1);}
body.light-theme .srp-popular-tag{background:rgba(0,0,0,0.04);border-color:rgba(0,0,0,0.1);color:#4b5563;}
body.light-theme .srp-popular-tag:hover{color:#0f172a;border-color:var(--ruby);}
body.light-theme #searchPanel{box-shadow:0 20px 60px rgba(0,0,0,0.12);}


.hamburger { display:none; flex-direction:column; gap:5px; cursor:pointer; padding:4px; border:none; background:none; }
.hamburger span { display:block; width:24px; height:2px; background:var(--silver2); border-radius:2px; transition:0.3s; }

/* ─── MODAL ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  margin: 1rem;
  position: relative;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity:0; transform:translateY(20px) scale(0.96) }
  to   { opacity:1; transform:translateY(0) scale(1) }
}

.modal-close {
  position: absolute;
  top: 1rem; left: 1rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: none;
  color: var(--muted2);
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.07); color: var(--white); }

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--white);
}
.modal-sub { font-size: 0.85rem; color: var(--muted2); margin-bottom: 1.8rem; }

.modal-tabs {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.5rem;
}
.modal-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted2);
  transition: all 0.25s;
  border: none;
  background: none;
  font-family: 'Vazirmatn', sans-serif;
}
.modal-tab.active { background: var(--ruby); color: #fff; }

.form-group { margin-bottom: 1rem; }
.form-label { display:block; font-size:0.8rem; color:var(--muted2); margin-bottom:0.4rem; font-weight:500; }

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--white);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--ruby); }
.form-input::placeholder { color: var(--muted); }

.btn-submit {
  width: 100%;
  padding: 0.8rem;
  background: var(--ruby);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s;
  box-shadow: 0 4px 20px var(--ruby-glow);
}
.btn-submit:hover { background: var(--ruby2); }

/* Profile modal extra */
.profile-avatar-big {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--ruby));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto 1.2rem;
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem 4rem;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(192,57,43,0.15);
  border: 1px solid rgba(192,57,43,0.4);
  border-radius: 50px;
  font-size: 0.8rem;
  color: #ff8a80;
  margin-bottom: 1.8rem;
  letter-spacing: 0.06em;
}
.hero-badge::before { content:''; width:6px; height:6px; border-radius:50%; background:#ff8a80; animation:blink 1.5s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }

.hero-title {
  font-family: 'Scheherazade New', serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, #fff 30%, rgba(192,57,43,0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted2);
  margin-bottom: 3rem;
  font-weight: 300;
}

.hero-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto 2.5rem;
  width: 100%;
}
.hero-divider::before,.hero-divider::after {
  content:'';
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(192,57,43,0.5), transparent);
}
.hero-divider-icon {
  font-family: 'Scheherazade New', serif;
  font-size: 1.4rem;
  color: rgba(192,57,43,0.7);
}

.hero-poem {
  max-width: 660px;
  margin: 0 auto;
  font-family: 'Scheherazade New', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  line-height: 2.8;
  color: rgba(240,242,245,0.65);
}
.hero-poem em {
  color: rgba(240,242,245,0.85);
  font-style: normal;
  display: block;
  animation: fadeUp 0.8s ease both;
}
.hero-poem em:nth-child(1){animation-delay:0.1s}
.hero-poem em:nth-child(2){animation-delay:0.3s}
.hero-poem em:nth-child(3){animation-delay:0.5s}
.hero-poem em:nth-child(4){animation-delay:0.7s}
.hero-poem em:nth-child(5){animation-delay:0.9s;color:rgba(192,57,43,0.9)}
.hero-poem em:nth-child(6){animation-delay:1.1s;color:rgba(192,57,43,0.9)}

@keyframes fadeUp {
  from{opacity:0;transform:translateY(12px)}
  to{opacity:1;transform:translateY(0)}
}

/* ─── PAGE WRAPPER ─── */
.page-wrap { position:relative; z-index:2; }

/* ─── SECTIONS ─── */
section { padding: 5rem 2rem; }

.section-header { text-align:center; margin-bottom:3rem; }
.section-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ruby);
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: block;
}
.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
}
.section-line {
  width: 40px;
  height: 3px;
  background: var(--ruby);
  border-radius: 2px;
  margin: 0.9rem auto 0;
}

/* ─── QUICK NAV ─── */
#nav-cards { background: var(--ink2); }

.qnav-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.qnav-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.qnav-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192,57,43,0.08), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.qnav-card:hover {
  transform: translateY(-6px);
  border-color: rgba(192,57,43,0.3);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(192,57,43,0.15);
}
.qnav-card:hover::before { opacity:1 }

.qnav-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(192,57,43,0.12);
  border: 1px solid rgba(192,57,43,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s;
}
.qnav-card:hover .qnav-icon {
  background: rgba(192,57,43,0.2);
  border-color: rgba(192,57,43,0.4);
}
.qnav-label { font-size: 0.92rem; font-weight: 600; }
.qnav-count { font-size: 0.72rem; color: var(--muted2); }

/* ─── SOUNDS ─── */
#sounds { background: var(--ink); }

.sounds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.audio-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.audio-card::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ruby);
  transform: scaleY(0);
  border-radius: 0 14px 14px 0;
  transition: transform 0.25s;
}
.audio-card:hover { background: var(--card2); border-color: var(--border2); transform: translateX(3px); }
.audio-card:hover::after { transform: scaleY(1); }

.audio-play {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ruby), #7b1a10);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--ruby-glow);
  transition: transform 0.2s;
}
.audio-card:hover .audio-play { transform: scale(1.1); }
.audio-play svg { width:18px; height:18px; fill:#fff; margin-right:-2px; }

.audio-body { flex:1; min-width:0; }
.audio-title { font-size:0.95rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:0.2rem; }
.audio-meta  { font-size:0.78rem; color:var(--muted2); }

.audio-new {
  font-size: 0.65rem;
  padding: 0.2rem 0.55rem;
  background: rgba(192,57,43,0.2);
  border: 1px solid rgba(192,57,43,0.4);
  border-radius: 20px;
  color: #ff8a80;
  flex-shrink: 0;
}

.more-btn {
  display: block;
  width: fit-content;
  margin: 2.5rem auto 0;
  padding: 0.75rem 2.5rem;
  border: 1px solid var(--border2);
  color: var(--silver);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 50px;
  transition: all 0.25s;
  font-weight: 500;
}
.more-btn:hover { border-color: var(--ruby); color: var(--white); background: rgba(192,57,43,0.08); }

/* ─── VIDEOS ─── */
#videos { background: var(--ink2); }

.slider-wrap {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.slider-outer {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border2);
}
.slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}

.vslide {
  min-width: 100%;
  text-decoration: none;
  display: block;
  position: relative;
}

.vslide-thumb {
  aspect-ratio: 16/9;
  background: var(--card);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vslide-emoji { font-size: 6rem; opacity: 0.3; }
.vslide-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,12,16,0.95) 0%, rgba(11,12,16,0.2) 50%, transparent);
}
.vslide-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(192,57,43,0.85);
  border: 2px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 40px rgba(192,57,43,0.5);
  transition: all 0.3s;
}
.vslide:hover .vslide-play { transform: translate(-50%,-50%) scale(1.12); background: var(--ruby2); }
.vslide-play svg { width:26px; height:26px; fill:#fff; margin-right:-3px; }

.vslide-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem 1.8rem;
}
.vslide-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.3rem; color: #fff; }
.vslide-meta  { font-size: 0.82rem; color: rgba(255,255,255,0.55); }

/* Slider controls */
.sarrow {
  position: absolute;
  top: 38%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(11,12,16,0.8);
  border: 1px solid var(--border2);
  color: var(--silver);
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  user-select: none;
}
.sarrow:hover { background: var(--ruby); border-color: var(--ruby); color: #fff; }
.sarrow.prev { right: calc(100% + 14px); }
.sarrow.next { left:  calc(100% + 14px); }

.sdots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 1.5rem;
}
.sdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  cursor: pointer;
  transition: all 0.25s;
}
.sdot.active { background: var(--ruby); transform: scale(1.3); }

/* ─── EVENTS ─── */
#events { background: var(--ink); }

.events-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.event-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.3rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}
.event-row:hover { background: var(--card2); border-color: rgba(192,57,43,0.3); transform: translateX(-4px); }

.event-cal {
  min-width: 52px;
  text-align: center;
  background: rgba(192,57,43,0.12);
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: 10px;
  padding: 0.5rem;
}
.event-day   { font-size: 1.4rem; font-weight: 700; color: var(--ruby2); line-height: 1; display: block; }
.event-month { font-size: 0.65rem; color: var(--muted2); font-weight: 500; }

.event-body { flex:1; }
.event-title { font-size:0.95rem; font-weight:600; margin-bottom:0.2rem; }
.event-loc   { font-size:0.78rem; color:var(--muted2); }
.event-arr   { color:var(--muted); font-size:1rem; margin-right: auto; }

/* ─── ABOUT ─── */
#about {
  background: linear-gradient(to bottom, var(--ink2), var(--ink));
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

.about-text-block {}
.about-heading {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--white);
}
.about-text {
  font-size: 0.95rem;
  line-height: 2;
  color: var(--muted2);
  margin-bottom: 1rem;
}
.about-quote {
  font-family: 'Scheherazade New', serif;
  font-size: 1.1rem;
  color: rgba(192,57,43,0.75);
  border-right: 3px solid var(--ruby);
  padding-right: 1rem;
  margin-top: 1.5rem;
  line-height: 2;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem;
  text-align: center;
}
.stat-num { font-size: 1.8rem; font-weight: 700; color: var(--ruby2); display: block; }
.stat-lbl { font-size: 0.75rem; color: var(--muted2); margin-top: 0.2rem; }

/* Info card */
.about-info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.info-card-header {
  background: linear-gradient(135deg, rgba(192,57,43,0.15), rgba(192,57,43,0.05));
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.info-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(192,57,43,0.15);
  border: 1px solid rgba(192,57,43,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.info-card-title { font-size: 1rem; font-weight: 700; }
.info-card-sub   { font-size: 0.75rem; color: var(--muted2); }

.info-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.info-row:last-child { border-bottom: none; }
.info-row:hover { background: rgba(255,255,255,0.02); }
.info-icon { font-size: 1.1rem; width:24px; text-align:center; flex-shrink:0; }
.info-body {}
.info-label { font-size: 0.72rem; color: var(--muted); font-weight:500; }
.info-val   { font-size: 0.92rem; font-weight: 600; color: var(--white); }

/* ─── FOOTER ─── */
footer {
  background: #070809;
  border-top: 1px solid var(--border);
  padding: 2rem 2rem;
  text-align: center;
}
.footer-logo { font-family:'Scheherazade New',serif; font-size:1.3rem; color:var(--ruby); margin-bottom:0.4rem; }
.footer-copy  { font-size:0.78rem; color:var(--muted); }

/* ─── REVEAL ─── */
.reveal { opacity:0; transform:translateY(20px); transition:opacity 0.65s ease, transform 0.65s ease; }
.reveal.vis { opacity:1; transform:translateY(0); }

/* ─── BOTTOM NAV BAR ─── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: 64px;
  background: rgba(11,12,16,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border2);
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--muted2);
  padding: 6px 10px;
  border-radius: 12px;
  transition: all 0.2s;
  min-width: 52px;
  flex: 1;
}
.bnav-item:hover, .bnav-item.active {
  color: var(--ruby2);
  background: rgba(192,57,43,0.1);
}
.bnav-icon { font-size: 1.25rem; line-height: 1; }
.bnav-label { font-size: 0.62rem; font-weight: 600; white-space: nowrap; }

/* ─── NEWS SLIDER ─── */
#news { background: var(--ink2); }

.news-slider-wrap {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.news-slider-outer {
  overflow: hidden;
  border-radius: 16px;
}
.news-slider-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
  gap: 0;
}
.news-slide {
  min-width: calc(100% / 3);
  padding: 0 8px;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  display: block;
}
.news-card:hover {
  border-color: rgba(192,57,43,0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.news-thumb {
  aspect-ratio: 16/9;
  background: var(--card2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}
.news-thumb-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,12,16,0.85) 0%, transparent 60%);
}
.news-thumb-date {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(192,57,43,0.85);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}
.news-body {
  padding: 1rem 1.1rem;
}
.news-cat {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ruby2);
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: block;
}
.news-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.news-excerpt {
  font-size: 0.78rem;
  color: var(--muted2);
  line-height: 1.7;
}
.news-sarrow {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(11,12,16,0.85);
  border: 1px solid var(--border2);
  color: var(--silver);
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  user-select: none;
}
.news-sarrow:hover { background: var(--ruby); border-color: var(--ruby); color:#fff; }
.news-sarrow.prev { right: calc(100% + 10px); }
.news-sarrow.next { left:  calc(100% + 10px); }
.news-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 1.5rem;
}
.news-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--muted);
  cursor: pointer;
  transition: all 0.25s;
}
.news-dot.active { background: var(--ruby); transform: scale(1.3); }

/* ─── OCCASIONS (مناسبت‌ها) ─── */
#occasions { background: var(--ink); }
.occasions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.occasion-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.occasion-card::before {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--ruby), var(--teal));
  border-radius: 0 16px 16px 0;
  transform: scaleY(0);
  transition: transform 0.3s;
}
.occasion-card:hover {
  background: var(--card2);
  border-color: rgba(192,57,43,0.3);
  transform: translateX(-3px);
}
.occasion-card:hover::before { transform: scaleY(1); }

.occasion-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(192,57,43,0.1);
  border: 1px solid rgba(192,57,43,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all 0.3s;
}
.occasion-card:hover .occasion-icon-wrap {
  background: rgba(192,57,43,0.18);
  border-color: rgba(192,57,43,0.4);
}
.occasion-body { flex: 1; min-width: 0; }
.occasion-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.25rem; }
.occasion-date { font-size: 0.75rem; color: var(--muted2); }
.occasion-arr { color: var(--muted); font-size: 0.9rem; }

/* ─── RESPONSIVE ─── */
@media(max-width:900px){
  .qnav-grid { grid-template-columns: repeat(4, 1fr); }
  .about-grid { grid-template-columns:1fr; gap:2.5rem; }
  .hamburger { display:none !important; }
  .bottom-nav { display: block; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .news-slide { min-width: 75%; }
  .news-sarrow.prev { right: auto; left: 4px; }
  .news-sarrow.next { left: auto; right: 4px; }
  .sarrow.prev { right: auto; left: 4px; }
  .sarrow.next { left: auto; right: 4px; }
  /* hide nav tabs — they exist in bottom nav */
  .nav-tabs { display:none !important; }
  /* hide desktop search, show mobile search button */
  .nav-search { display:none !important; }
  .btn-search-mobile { display:flex !important; }
  /* keep theme label visible at tablet size */
  .theme-label { display:inline !important; font-size:0.82rem; }
}
@media(max-width:600px){
  .qnav-grid { grid-template-columns: repeat(3, 1fr); }
  .about-stats { grid-template-columns:1fr 1fr; }
  .news-slide { min-width: 90%; }
  nav.top-nav { padding: 0 1rem; gap:0.5rem; }
  .logo-text { font-size:0.9rem; }
  .logo-sub { font-size:0.6rem; }
  /* hide theme label text, keep only icon */
  .theme-label { display:none !important; }
  .btn-theme-toggle { padding: 0.4rem 0.65rem; }
  .theme-icon { font-size:1.1rem; }
}
/* --- Modern Bottom Navigation Design --- */
:root {
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-text: #2d3436;
    --nav-accent: #0984e3; /* رنگ آبی برای آیتم فعال */
    --nav-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
}
/* ─── بخش پخش زنده داخل صفحه اصلی ─── */
#live-section {
    background: var(--ink2);
    padding: 3rem 2rem;
}

.live-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

body.light-theme .live-container {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
}

/* نشان پخش زنده بالای کادر */
.live-badge-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.live-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--live);
}

/* عنوان مراسم */
.live-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.1rem;
}

body.light-theme .live-title {
    color: #0f172a;
}

/* قاب نمایش ویدیو یا پیام آفلاین */
.live-frame-wrap {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border2);
}

/* پیام وقتی پخش زنده‌ای در جریان نیست */
.live-offline-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    height: 400px;
    background: linear-gradient(135deg, #0d0d10, #1a1020);
    color: var(--muted2);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem;
}

.live-offline-icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* پایین کادر: اطلاعات کیفیت و دکمه مشاهده کامل */
.live-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.1rem;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.live-info {
    font-size: 0.8rem;
    color: var(--muted2);
}

.live-fullpage-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    background: var(--ruby);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 16px var(--ruby-glow);
    transition: all 0.2s;
    white-space: nowrap;
}

.live-fullpage-btn:hover {
    background: var(--ruby2);
    transform: translateY(-1px);
}

/* ریسپانسیو موبایل */
@media (max-width: 600px) {
    #live-section {
        padding: 2rem 1rem;
    }
    .live-container {
        padding: 1rem;
    }
    .live-offline-msg {
        height: 280px;
    }
    .live-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}


