/*
 * MiAbbaTV — Shared episode page styles
 * Used by: /saga-genesis/{slug}/index.html, /salmos/{slug}/index.html
 */

:root {
  --night: #14182e;
  --night-soft: #1f2647;
  --dawn: #3a3870;
  --horizon: #d97757;
  --sun: #ffc857;
  --sun-warm: #ffe1a8;
  --cream: #fdf6e3;
  --cream-soft: #f5e8d0;
  --text: #fdf6e3;
  --text-mute: rgba(253, 246, 227, 0.78);
  --text-faint: rgba(253, 246, 227, 0.5);
  --text-deep: #2a1f3d;
  --gold: #ffc857;
  --gold-warm: #ffe1a8;
  --gold-deep: #e0a233;
  --coral: #ee6c4d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Manrope', -apple-system, sans-serif;
  background: linear-gradient(180deg, var(--night) 0%, var(--night-soft) 28%, var(--dawn) 70%, var(--horizon) 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
}

a { color: var(--gold-warm); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }

.container { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* ====== Site header (top bar) ====== */
.site-header {
  padding: 22px 0 14px;
  border-bottom: 1px solid rgba(255, 200, 87, 0.15);
  margin-bottom: 28px;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand-link {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.18rem;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.brand-link em { font-style: normal; color: var(--gold); }
.nav-back {
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.nav-back:hover { color: var(--gold-warm); }

/* ====== Breadcrumbs ====== */
.breadcrumb {
  font-family: 'Manrope', sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 14px;
  text-transform: uppercase;
  font-weight: 600;
}
.breadcrumb a { color: var(--text-mute); }
.breadcrumb a:hover { color: var(--gold-warm); }
.breadcrumb [aria-current="page"] { color: var(--gold-warm); }
.breadcrumb-sep { margin: 0 6px; color: var(--text-faint); }

main { padding-bottom: 56px; }

/* ====== Episode hero ====== */
.ep-hero { text-align: center; margin: 8px 0 28px; }
.ep-hero .ep-section {
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-warm);
  margin-bottom: 12px;
}
.ep-hero h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 6.5vw, 3.6rem);
  line-height: 1.05;
  color: var(--cream);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.ep-hero .ep-tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 2.5vw, 1.32rem);
  color: var(--gold-warm);
  margin-bottom: 8px;
}
.divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 18px auto 0;
}

/* ====== Lazy YouTube player ====== */
.yt-lite {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--night);
  border: 1px solid rgba(176, 136, 86, 0.4);
  box-shadow: 0 22px 45px -15px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 248, 220, 0.1);
  cursor: pointer;
  margin: 0 0 18px;
}
.yt-lite img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.yt-lite:hover img { transform: scale(1.02); }
.yt-lite::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,24,46,0) 50%, rgba(20,24,46,0.5) 100%);
  pointer-events: none;
}
.yt-lite-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 76px; height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sun-warm), var(--sun));
  border: 3px solid var(--gold-warm);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.7), 0 0 0 8px rgba(255, 225, 168, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.yt-lite:hover .yt-lite-play, .yt-lite:focus-visible .yt-lite-play {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 12px 32px -4px rgba(0,0,0,0.8), 0 0 0 14px rgba(255, 225, 168, 0.22);
}
.yt-lite-play svg { width: 32px; height: 32px; color: var(--text-deep); margin-left: 4px; }
.yt-lite-label {
  position: absolute;
  bottom: 16px; left: 16px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(20, 24, 46, 0.6);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 87, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.yt-lite iframe { width: 100%; height: 100%; border: none; }

/* ====== Placeholder for unreleased episodes ====== */
.yt-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(58, 56, 112, 0.5), rgba(20, 24, 46, 0.7)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.35 0 0 0 0 0.18 0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-blend-mode: multiply;
  border: 1px solid rgba(176, 136, 86, 0.4);
  box-shadow: 0 22px 45px -15px rgba(0,0,0,0.7);
  margin: 0 0 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  position: relative;
}
.yt-placeholder::before {
  content: '';
  position: absolute;
  top: 14px; right: 14px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(238, 108, 77, 0.25);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(238, 108, 77, 0.25); }
  50% { box-shadow: 0 0 0 10px rgba(238, 108, 77, 0.05); }
}
.yt-placeholder-inner {
  text-align: center;
  max-width: 520px;
}
.yt-placeholder-label {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-warm);
  margin-bottom: 8px;
  padding: 4px 14px;
  border: 1px solid rgba(255, 200, 87, 0.4);
  border-radius: 999px;
}
.yt-placeholder-date {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.3rem, 3vw, 1.85rem);
  color: var(--cream);
  margin-bottom: 8px;
  line-height: 1.2;
}
.yt-placeholder-hint {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 0.92rem;
  color: var(--text-mute);
  margin-bottom: 16px;
}

/* ====== Episode meta ====== */
.ep-meta {
  display: flex; flex-wrap: wrap;
  gap: 14px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 10px 0;
  border-bottom: 1px dotted rgba(255, 200, 87, 0.2);
  margin-bottom: 32px;
}

/* ====== Article sections ====== */
article section { margin-bottom: 38px; }
article h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.55rem;
  color: var(--cream);
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 8px;
}
article h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 56px; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
article p {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: 1.06rem;
  color: var(--text);
  line-height: 1.78;
  margin-bottom: 14px;
}
article p strong { color: var(--gold-warm); font-weight: 500; }

/* ====== Verses block ====== */
.ep-verses ul { list-style: none; padding: 0; }
.ep-verses li {
  padding: 18px 22px;
  background: rgba(247, 233, 200, 0.06);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  margin-bottom: 14px;
}
.ep-verses blockquote {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.12rem;
  color: var(--cream);
  line-height: 1.55;
  margin-bottom: 8px;
}
.ep-verses cite {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-warm);
}

/* ====== Reflection block ====== */
.ep-reflection {
  padding: 26px 28px;
  background: linear-gradient(135deg, rgba(58, 56, 112, 0.3), rgba(20, 24, 46, 0.2));
  border: 1px solid rgba(255, 200, 87, 0.2);
  border-radius: 14px 8px 14px 8px;
  position: relative;
}
.ep-reflection::before {
  content: '"';
  position: absolute;
  top: -8px; left: 18px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
}
.ep-reflection h2 { margin-bottom: 12px; }
.ep-reflection p { margin-bottom: 0; }

/* ====== Share buttons ====== */
.ep-share { text-align: center; }
.share-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: rgba(247, 233, 200, 0.08);
  border: 1px solid rgba(176, 136, 86, 0.4);
  border-radius: 999px;
  color: var(--cream);
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.share-btn svg { width: 16px; height: 16px; }
.share-btn:hover { transform: translateY(-2px); }
.share-btn.whatsapp:hover { background: #25D366; border-color: #25D366; color: white; }
.share-btn.facebook:hover { background: #1877F2; border-color: #1877F2; color: white; }
.share-btn.copy:hover { background: var(--gold); border-color: var(--gold); color: var(--text-deep); }

/* ====== CTA block ====== */
.ep-cta {
  text-align: center;
  padding: 32px 20px;
  background: rgba(247, 233, 200, 0.08);
  border: 1px solid rgba(176, 136, 86, 0.4);
  border-radius: 14px 8px 14px 8px;
}
.ep-cta h2 { border: none; padding: 0; margin-bottom: 8px; }
.ep-cta h2::after { display: none; }
.ep-cta p {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--text-mute);
  margin-bottom: 18px;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--sun-warm), var(--sun));
  color: var(--text-deep);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--gold-deep);
  box-shadow: 0 6px 16px rgba(255, 200, 87, 0.4);
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 200, 87, 0.55);
  color: var(--text-deep);
}
.cta-btn svg { width: 16px; height: 16px; }

/* ====== Pagination (prev/next episode) ====== */
.ep-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 32px 0;
}
.ep-pagination a, .ep-pagination .disabled {
  padding: 14px 18px;
  background: rgba(247, 233, 200, 0.06);
  border: 1px solid rgba(176, 136, 86, 0.3);
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--cream);
  transition: all 0.2s ease;
  display: block;
}
.ep-pagination a:hover {
  background: rgba(247, 233, 200, 0.12);
  border-color: var(--gold-warm);
  transform: translateY(-2px);
  color: var(--cream);
}
.ep-pagination .disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-align: center;
}
.ep-pagination .ep-prev::before { content: '← '; color: var(--gold-warm); }
.ep-pagination .ep-next { text-align: right; }
.ep-pagination .ep-next::after { content: ' →'; color: var(--gold-warm); }
.ep-pagination .pag-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-warm);
  margin-bottom: 4px;
}

/* ====== Site footer ====== */
.site-footer {
  padding: 24px 0 32px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
  border-top: 1px solid rgba(255, 200, 87, 0.12);
}
.site-footer a { color: var(--gold-warm); }

/* ====== Copy toast (shared share notification) ====== */
#copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  padding: 11px 22px;
  background: linear-gradient(135deg, #2a1f3d, #14182e);
  color: var(--cream);
  border: 1px solid var(--gold-warm);
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  box-shadow: 0 12px 32px -6px rgba(0, 0, 0, 0.6);
}
#copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ====== Responsive ====== */
@media (max-width: 540px) {
  .ep-pagination { grid-template-columns: 1fr; }
  .yt-lite-play { width: 64px; height: 64px; }
  .yt-lite-play svg { width: 28px; height: 28px; }
  article p { font-size: 1rem; }
  article h2 { font-size: 1.35rem; }
}

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