/* ═══════════════════════════════════════════════
   Persian Podcast CMS — قالب مدرن (Modern)
   مینیمال، فضای سفید، گرادیان نرم، گوشه‌های گرد
   ═══════════════════════════════════════════════ */

:root {
  --ppc-primary: #6C4DF6;
  --ppc-primary-soft: #f3f0ff;
  --ppc-accent: #00C2A8;
  --ppc-radius: 1rem;
  --ppc-body-font: 'Vazirmatn', 'Estedad', 'Sahel', Tahoma, sans-serif;
}

/* ── تایپوگرافی فارسی ── */
body {
  font-family: var(--ppc-body-font);
  line-height: 1.8;             /* خوانایی بهینه فارسی */
  background: #fafafd;
  transition: background .3s ease, color .3s ease;
  /* Sticky Footer: فوتر همیشه پایین — حتی در صفحات کم‌محتوا */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* محتوای اصلی فضای باقی‌مانده را می‌گیرد → فوتر پایین می‌ماند */
.site-navbar + .hero,
.site-navbar ~ main,
.site-navbar ~ section,
.site-navbar ~ article,
.site-navbar ~ .breadcrumb {
  flex-shrink: 0;
}
.site-footer { margin-top: auto; }

[data-bs-theme="dark"] body { background: #16161f; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.5; }

/* ── نوار ناوبری ── */
.site-navbar {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eee;
}
[data-bs-theme="dark"] .site-navbar {
  background: rgba(22, 22, 31, .9);
  border-bottom-color: #2a2a38;
}
.site-navbar .nav-link { font-weight: 500; padding-inline: .9rem; }
.site-navbar .navbar-brand i { color: var(--ppc-primary); }

.btn-icon { border: none; background: transparent; font-size: 1.15rem; }

/* ── نتایج جستجوی زنده ── */
.live-search-results {
  position: absolute; top: 110%; inset-inline-start: 0;
  width: 100%; min-width: 320px; max-height: 380px; overflow-y: auto;
  background: #fff; border-radius: .75rem; z-index: 1050;
}
[data-bs-theme="dark"] .live-search-results { background: #22222e; }
.live-result-item:hover { background: var(--ppc-primary-soft); }
[data-bs-theme="dark"] .live-result-item:hover { background: #2d2d3f; }

/* ── هدر قهرمان ── */
.hero {
  background-size: cover !important;
  background-position: center;
  border-radius: 0 0 2rem 2rem;
}

/* ── اپیزود ویژه: پلیر درجا ── */
.featured-cover {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  max-width: 320px;
}
.home-logo-badge {
  position: absolute;
  top: 1rem;
  inset-inline-start: 1rem;
  width: 140px;
  height: 140px;
  object-fit: contain;
  opacity: .95;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.15));
  pointer-events: none;
}
@media (max-width: 768px) {
  .home-logo-badge { width: 90px; height: 90px; }
}

.mini-player {
  background: rgba(20, 10, 60, .92);
  color: #fff;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
}
.mini-play {
  width: 48px; height: 48px; flex: 0 0 48px;
  background: #fff; color: var(--ppc-primary);
  border: none; font-size: 1.15rem;
  display: grid; place-items: center;
  transition: transform .2s ease;
}
.mini-play:hover { transform: scale(1.08); }
.mini-progress {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.25);
  overflow: hidden;
  cursor: pointer;
}
.mini-progress-bar {
  height: 100%; width: 0%;
  background: var(--ppc-accent, #00C2A8);
  transition: width .2s linear;
}

/* ── اپیزود ویژه ── */
.featured-episode {
  background: linear-gradient(135deg, var(--ppc-primary-soft), #eafaf7);
}
[data-bs-theme="dark"] .featured-episode {
  background: linear-gradient(135deg, #241f3f, #16302c);
}

/* ── کارت اپیزود ── */
.episode-card {
  border: none;
  border-radius: var(--ppc-radius);
  box-shadow: 0 4px 18px rgba(20, 10, 60, .06);
  transition: transform .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
.episode-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(20, 10, 60, .12);
}
.episode-card-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 1 / 1; }
.episode-card-cover img {
  width: 100%; height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .4s ease;
}
.episode-card:hover .episode-card-cover img { transform: scale(1.05); }
.episode-duration {
  position: absolute; bottom: .6rem; inset-inline-start: .6rem;
  background: rgba(0, 0, 0, .65); color: #fff;
  font-size: .78rem; padding: .15rem .6rem; border-radius: 2rem;
}

/* ── پلیر صوتی ── */
.podcast-player {
  background: linear-gradient(135deg, var(--ppc-primary), #8f75ff);
  color: #fff;
}
.podcast-player .form-range.ppc-seek { accent-color: #fff; height: .5rem; }
.podcast-player .ppc-volume { accent-color: #fff; width: 90px; }
.podcast-player .btn-icon { color: #fff; }
.btn-play {
  width: 58px; height: 58px; flex: 0 0 58px;
  background: #fff; color: var(--ppc-primary);
  font-size: 1.6rem; border: none;
  display: grid; place-items: center;
  transition: transform .2s ease;
}
.btn-play:hover { transform: scale(1.08); }

/* ── نظرات ── */
.comment {
  border-inline-start: 3px solid var(--ppc-primary-soft);
  padding: .75rem 1rem; margin-bottom: .75rem;
  border-radius: .5rem; background: #f8f8fc;
}
[data-bs-theme="dark"] .comment { background: #1e1e2a; border-inline-start-color: #2d2d3f; }
.comment-reply { margin-inline-start: 2rem; }
.comment-header { display: flex; gap: .75rem; align-items: baseline; margin-bottom: .25rem; }

/* ── breadcrumb ── */
.breadcrumb { margin-bottom: 0; }

/* ── فوتر ── */
.site-footer {
  background: #fff; border-top: 1px solid #eee;
}
[data-bs-theme="dark"] .site-footer { background: #1b1b26; border-top-color: #2a2a38; }
.footer-links a { color: inherit; text-decoration: none; display: block; padding: .2rem 0; }
.footer-links a:hover { color: var(--ppc-primary); }

/* ── دکمه‌ها: وسط‌چین شدن دقیق آیکون + متن ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  vertical-align: middle;
}
.btn i { line-height: 1; display: inline-flex; align-items: center; }

/* حالت فعال واکنش (لایک/دیس‌لایک) */
#btnLike.active { background: var(--bs-danger); color: #fff; }
#btnDislike.active { background: var(--bs-secondary); color: #fff; }

/* ── انیمیشن ورود کارت‌ها ── */
@media (prefers-reduced-motion: no-preference) {
  .episode-card { animation: fadeUp .5s ease both; }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
