/* ============================================================
   Página de lectura de cada capítulo (/cronicas/capitulo-NN/).
   Se apoya en los tokens y componentes de styles.css.
   ============================================================ */

.migas {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 12px 20px;
  background: rgba(7, 11, 24, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linea);
  font-size: 14px;
}
.migas a { color: var(--oro-claro); text-decoration: none; font-weight: 600; }

/* ---- Encabezado ---- */
.cap-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 90px) 0;
}
.cap-hero__fondo {
  position: absolute;
  inset: -40px;
  background: var(--bg) center 30% / cover no-repeat;
  filter: blur(28px) brightness(.55) saturate(1.25);
}
.cap-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 11, 24, .2), var(--noche));
}
.cap-hero__caja {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.cap-hero__poster {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radio);
  border: 1px solid rgba(242, 209, 132, .35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.cap-hero__titulo {
  font-family: var(--display);
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 900;
  line-height: 1.04;
  margin: 0 0 16px;
  background: linear-gradient(180deg, #fbeec2 5%, #f2d184 40%, #c89236 75%, #f3d98a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cap-hero__idea {
  font-family: var(--cuerpo);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 500;
  line-height: 1.6;
  color: var(--texto);
  margin: 0 0 14px;
  max-width: 52ch;
}
.cap-hero__meta { color: var(--texto-3); font-size: 14px; margin: 0 0 22px; }
.cap-hero__acciones { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 700px) {
  .cap-hero__caja { grid-template-columns: 1fr; text-align: center; }
  .cap-hero__poster { width: 180px; margin: 0 auto; }
  .cap-hero__idea { margin-inline: auto; }
  .cap-hero__acciones { justify-content: center; }
}

/* ---- Cuerpo ---- */
.cap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}
@media (max-width: 900px) { .cap-grid { grid-template-columns: 1fr; } }

.cap-lado { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 900px) { .cap-lado { position: static; } }

.h2--chico { font-size: clamp(24px, 3.2vw, 32px); margin: 44px 0 16px; }

.video {
  aspect-ratio: 16 / 9;
  border-radius: var(--radio-lg);
  overflow: hidden;
  border: 1px solid var(--linea);
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video__portada {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: none;
}
.video__portada img { width: 100%; height: 100%; object-fit: cover; }
.video__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 78px; height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--oro-claro), var(--oro));
  color: #2a1b03;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
  transition: transform .2s ease;
}
.video__portada:hover .video__play { transform: scale(1.08); }

.prosa p {
  font-size: clamp(16px, 1.9vw, 18px);
  line-height: 1.8;
  color: var(--texto-2);
  margin: 0 0 18px;
}
.prosa p:first-child::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 3.4em;
  line-height: .9;
  font-weight: 900;
  color: var(--oro-claro);
  margin: 6px 10px 0 0;
}

/* ---- Puntos clave ---- */
.puntos { list-style: none; padding: 0; margin: 0; counter-reset: p; }
.punto {
  position: relative;
  padding: 18px 20px 18px 62px;
  margin-bottom: 12px;
  background: rgba(12, 18, 38, .72);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  counter-increment: p;
}
.punto::before {
  content: counter(p, upper-roman);
  position: absolute;
  left: 18px; top: 17px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  color: var(--oro);
}
.punto__cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.punto h3 { font-family: var(--display); font-size: 19px; margin: 0; line-height: 1.25; }
.punto p { margin: 0; color: var(--texto-2); font-size: 15px; line-height: 1.65; }

.tiempo {
  flex: none;
  padding: 3px 9px;
  border: 1px solid rgba(242, 209, 132, .35);
  border-radius: 100px;
  background: var(--oro-tenue);
  color: var(--oro-claro);
  font-family: var(--cuerpo);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.tiempo:hover { background: rgba(212, 162, 74, .3); }

/* ---- Frases ---- */
.frases { display: grid; gap: 14px; }
.frase {
  margin: 0;
  padding: 22px 24px;
  border-left: 3px solid var(--oro);
  background: linear-gradient(90deg, rgba(212, 162, 74, .1), transparent);
  border-radius: 0 var(--radio) var(--radio) 0;
}
.frase p {
  font-family: var(--display);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 12px;
}

.preguntas { padding-left: 20px; color: var(--texto-2); }
.preguntas li { margin-bottom: 10px; font-size: 16px; }

/* ---- Lateral ---- */
.caja {
  padding: 20px;
  background: rgba(12, 18, 38, .72);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
}
.caja--oro { background: linear-gradient(180deg, rgba(212, 162, 74, .14), rgba(12, 18, 38, .72)); }
.caja--oro p { margin: 0 0 14px; color: var(--texto-2); font-size: 14.5px; }
.caja__titulo {
  font-family: var(--cuerpo);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--oro);
  margin: 0 0 12px;
}
.versos { list-style: none; padding: 0; margin: 0; }
.versos li { padding: 10px 0; border-top: 1px solid var(--linea); }
.versos li:first-child { border-top: 0; padding-top: 0; }
.versos strong { display: block; font-family: var(--display); font-size: 16px; color: var(--oro-claro); }
.versos span { font-size: 13.5px; color: var(--texto-2); line-height: 1.5; }

/* ---- Transcripción ---- */
.buscar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.buscar input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--linea);
  border-radius: 100px;
  background: rgba(255, 255, 255, .05);
  color: var(--texto);
  font: inherit;
  font-size: 15px;
}
.buscar input:focus { outline: none; border-color: rgba(242, 209, 132, .6); }
.buscar span { color: var(--texto-3); font-size: 13px; white-space: nowrap; }

.tr__p {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(214, 196, 150, .07);
  color: var(--texto-2);
  font-size: 16px;
  line-height: 1.75;
}
.tr__p .tiempo { align-self: start; margin-top: 3px; justify-self: start; }
.tr__p.is-oculto { display: none; }
.tr__p mark { background: rgba(242, 209, 132, .3); color: var(--texto); border-radius: 3px; }
@media (max-width: 560px) { .tr__p { grid-template-columns: 1fr; gap: 4px; } }

/* ---- Navegación entre capítulos ---- */
.nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-block: 40px 60px;
}
.nav__a {
  padding: 18px 20px;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  color: var(--texto);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
}
.nav__a span {
  display: block;
  font-family: var(--cuerpo);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: 4px;
}
.nav__a--der { text-align: right; }
.nav__a:hover { border-color: rgba(242, 209, 132, .45); }

@media (max-width: 560px) {
  .punto { padding: 16px 16px 16px 16px; }
  .punto::before { position: static; display: inline-block; margin-right: 10px; }
  .punto__cab { display: inline-flex; vertical-align: middle; }
}

/* ---- Diapositivas ---- */
.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.diapo { margin: 0; }
.diapo__img {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.diapo__img img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.diapo__img:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 209, 132, .45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
.diapo figcaption {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--texto-2);
}

.lupa {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
}
.lupa[open] { display: grid; place-items: center; }
.lupa::backdrop { background: rgba(3, 5, 12, .94); backdrop-filter: blur(6px); }
.lupa img {
  max-width: min(1400px, 96vw);
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}
.lupa__x {
  position: fixed;
  top: 16px; right: 18px;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

/* ---- Lección del material de estudio ---- */
.caja--material { background: linear-gradient(180deg, rgba(212, 162, 74, .12), rgba(12, 18, 38, .72)); }
.caja--material p { margin: 0 0 14px; color: var(--texto-2); font-size: 14px; line-height: 1.55; }
.caja--material .btn { width: 100%; margin-bottom: 12px; }
.caja--material .enlace { display: block; text-align: center; font-size: 13px; }
