/* ═══════════════════════════════════════════════════
   LOOPS – Video Library / YouTube Playlists Page
   Page-specific additions layered on top of base.css.
   Relies on base.css for :root tokens, reset, typography,
   nav, hero (incl. the --centered hero variant), buttons,
   tags, section-label, card, loops-cta and footer.
═══════════════════════════════════════════════════ */

/* ── HERO (flat variant for this content-library page) ── */
.hero.playlists-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.hero.playlists-hero::before { display: none; }
.hero-meta-note { margin-top: 22px; font-size: 13px; color: var(--muted); }
.faq-list--spaced { margin-top: 36px; }

/* ── STATS STRIP (populated dynamically by playlists.js) ── */
.stats-strip { background: var(--off); border-bottom: 1px solid var(--border); padding: 0 40px; }
.stats-strip-inner { max-width: var(--max-w); margin: 0 auto; display: flex; gap: 0; align-items: stretch; }
.strip-stat { flex: 1; padding: 28px 0; text-align: center; border-right: 1px solid var(--border); }
.strip-stat:last-child { border-right: none; }
.strip-num { font-family: 'Anton', sans-serif; font-size: 34px; color: var(--black); letter-spacing: 0.5px; }
.strip-num .accent { color: var(--accent); }
.strip-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 4px; }

/* ── FILTER BAR ── */
.filter-section { padding: 48px 40px 0; }
.filter-section-inner { max-width: var(--max-w); margin: 0 auto; }
.filter-section-inner .section-lead { margin-top: 10px; }
#filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.filter-btn {
  padding: 8px 20px; border-radius: 100px; border: 1.5px solid var(--border);
  background: var(--white); font-size: 13px; font-weight: 600; color: var(--mid);
  cursor: pointer; transition: all 0.18s; font-family: 'DM Sans', sans-serif;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.filter-btn.active { background: var(--black); border-color: var(--black); color: #fff; }

/* ── PLAYLIST GRID ── */
.pl-section { padding: 40px 40px 80px; }
.pl-section-inner { max-width: var(--max-w); margin: 0 auto; }
#playlist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 32px; }

/* Playlist card */
.pl-card {
  display: flex; flex-direction: column;
  border-radius: var(--r-lg); border: 1.5px solid var(--border);
  background: var(--white); text-decoration: none; color: inherit;
  overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.pl-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px rgba(0,0,0,0.1); border-color: var(--accent); }

.pl-thumb-wrap { position: relative; overflow: hidden; aspect-ratio: 16/9; background: var(--off2); }
.pl-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.pl-card:hover .pl-thumb { transform: scale(1.04); }
.pl-play-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.28); opacity: 0; transition: opacity 0.2s;
}
.pl-card:hover .pl-play-icon { opacity: 1; }
.pl-count {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.72); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 100px;
}

.pl-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.pl-meta-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pl-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 4px 12px; border-radius: 100px; }
.pl-level { font-size: 11px; color: var(--muted); font-weight: 500; }
.pl-title { font-size: 16px; font-weight: 700; color: var(--black); margin-bottom: 8px; line-height: 1.35; }
.pl-desc { font-size: 13px; color: var(--mid); line-height: 1.65; flex: 1; }
.pl-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.pl-stat { font-size: 12px; color: var(--muted); font-weight: 500; }
.pl-watch { font-size: 12px; font-weight: 700; color: var(--accent-dark); }

/* ── BODY-MIND EXPLAINER (reuses base.css's .card) ── */
.explainer-section { background: var(--off); border-top: 1px solid var(--border); padding: 80px 40px; }
.explainer-inner { max-width: var(--max-w); margin: 0 auto; }
.explainer-inner .section-lead { margin-top: 16px; }
.explainer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 44px; }
.ex-icon { font-size: 32px; margin-bottom: 14px; }
.ex-title { font-size: 15px; font-weight: 700; color: var(--black); margin-bottom: 8px; }
.ex-text { font-size: 13px; color: var(--mid); line-height: 1.7; }

/* ── LOOPS CTA text overrides (base.css supplies the dark section itself) ── */
.loops-cta .section-label { color: rgba(255,255,255,0.55); margin-bottom: 20px; }
.loops-cta .section-label::before { background: rgba(255,255,255,0.4); }
.loops-cta-lead { font-size: 17px; font-weight: 300; color: rgba(255,255,255,0.65); max-width: 520px; margin: 20px auto 0; line-height: 1.75; }
.loops-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ── SKELETON LOADER ── */
@keyframes skel-shimmer { 0% { background-position: -600px 0; } 100% { background-position: 600px 0; } }
.skel-box, .skel-line {
  border-radius: 6px;
  background: linear-gradient(90deg, var(--off2) 25%, var(--border) 50%, var(--off2) 75%);
  background-size: 600px 100%;
  animation: skel-shimmer 1.4s infinite linear;
}
.pl-skeleton { pointer-events: none; }
.pl-skeleton .pl-body { gap: 0; }

/* ── ERROR / EMPTY STATES ── */
.pl-error { grid-column: 1/-1; color: var(--red); padding: 40px 0; text-align: center; }
.pl-empty { grid-column: 1/-1; color: var(--muted); padding: 48px 0; text-align: center; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 900px) {
  #playlist-grid { grid-template-columns: 1fr 1fr; }
  .explainer-grid { grid-template-columns: 1fr; }
  .stats-strip-inner { flex-wrap: wrap; }
  .strip-stat { flex: 1 1 45%; border-right: none; border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) {
  #playlist-grid { grid-template-columns: 1fr; }
  .filter-section, .pl-section, .explainer-section { padding-left: 20px; padding-right: 20px; }
  .stats-strip { padding: 0 20px; }
}
