/* ==========================================================================
   HISTORIA JUDÍA — portada de la sección y página de cada episodio.
   Usa las variables y componentes de academia.css (tinta, oro, pergamino).
   ========================================================================== */

.pag-historia { background: var(--parch); }
.pag-historia main { display: block; }
.chip { display: inline-block; align-self: flex-start; padding: 6px 12px; border-radius: 2px; background: var(--gold); color: var(--ink); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.prox { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tx-3); }

/* ----------------------------------------------------------- portada */
.h-hero { position: relative; background: var(--ink); color: var(--tx-inv); padding: clamp(130px, 16vw, 190px) 0 clamp(56px, 8vw, 96px); overflow: hidden; }
.h-hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse 60% 70% at 85% 20%, rgba(197, 154, 69, .16), transparent 70%),
  radial-gradient(ellipse 50% 60% at 10% 100%, rgba(31, 45, 75, .9), transparent 70%); }
.h-hero-in { position: relative; }
.h-hero h1 { font-size: clamp(2.8rem, 1.4rem + 4.6vw, 5.2rem); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 26px; }
.h-hero h1 em { color: var(--gold-2); }
.h-lede { max-width: 36em; font-size: clamp(1.08rem, 1rem + .35vw, 1.26rem); color: var(--tx-inv-2); margin-bottom: 30px; }
.h-hebreo { font-size: clamp(1.7rem, 1.1rem + 1.8vw, 2.6rem); color: var(--gold-soft); margin-bottom: 26px; text-align: left; direction: rtl; display: inline-block; }
.h-cuenta { padding-top: 22px; border-top: 1px solid var(--line-inv); font-size: .95rem; color: var(--tx-inv-2); max-width: 36em; }
.h-cuenta strong { font-family: var(--serif); font-size: 1.5rem; color: var(--tx-inv); margin-right: 2px; }

/* destacado */
.h-destacado { background: var(--ink); padding-bottom: clamp(56px, 8vw, 96px); margin-top: -1px; }
.dest { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; text-decoration: none; color: var(--tx-inv); background: var(--ink-2); border: 1px solid var(--line-inv); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-2); transition: transform .3s var(--ease), border-color .3s; }
.dest:hover { transform: translateY(-4px); border-color: rgba(197, 154, 69, .5); }
.dest-img { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; }
.dest-img img { width: 100%; height: 100%; object-fit: cover; }
.dest-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, rgba(22, 33, 58, .5)); }
.dest-play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; box-shadow: 0 0 0 12px rgba(197, 154, 69, .25); transition: transform .3s var(--ease); }
.dest:hover .dest-play { transform: scale(1.08); }
.dest-play .ic { width: 30px; height: 30px; fill: currentColor; stroke: none; margin-left: 4px; }
.dest-txt { display: flex; flex-direction: column; gap: 12px; justify-content: center; padding: clamp(24px, 4vw, 48px); }
.dest-serie { font-size: .8rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); }
.dest-titulo { font-family: var(--serif); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.1; }
.dest-heb { font-size: 1.5rem; color: var(--gold-soft); text-align: left; direction: rtl; }
.dest-res { color: var(--tx-inv-2); font-size: 1rem; }
.dest-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; color: var(--tx-inv-2); font-size: .95rem; margin-top: 6px; }
.dest-meta .btn { margin-left: auto; }

/* línea del tiempo */
.h-ruta { background: var(--parch); padding: var(--sec-y) 0; }
.serie { max-width: 860px; margin: 0 auto clamp(48px, 7vw, 84px); }
.serie-cab { display: flex; align-items: center; gap: 22px; margin-bottom: 34px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.serie-heb { flex: none; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); color: var(--gold); line-height: 1.15; width: 3.6em; text-align: center; }
.serie-tr { display: block; margin-top: 2px; font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); }
.serie-cab h3 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); margin-bottom: 4px; }
.serie-cab p { color: var(--tx-2); }
.linea { position: relative; padding-left: 0; }
.linea::before { content: ""; position: absolute; left: 21px; top: 16px; bottom: 16px; width: 2px; background: linear-gradient(180deg, var(--gold), rgba(197, 154, 69, .25)); }
.ep { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 20px; padding: 10px 0; }
.ep-nodo { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--stone); font-family: var(--serif); font-weight: 700; color: var(--tx-3); box-shadow: 0 0 0 6px var(--parch); }
.ep-listo .ep-nodo { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.ep-nodo .ic { fill: currentColor; stroke: none; margin-left: 2px; width: 16px; height: 16px; }
.ep-cuerpo { display: flex; gap: 20px; align-items: stretch; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--stone); border-radius: var(--r-lg); overflow: hidden; }
.ep-txt { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 16px 20px; }
.ep-txt strong { font-family: var(--serif); font-size: 1.28rem; line-height: 1.2; }
.ep-txt > span { color: var(--tx-2); font-size: .98rem; }
.ep-txt small { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .84rem; font-weight: 600; color: var(--gold-deep); }
.ep-txt small.prox { color: var(--tx-3); }
.ep-listo .ep-cuerpo { box-shadow: var(--sh-1); transition: transform .25s var(--ease), box-shadow .25s; }
.ep-listo .ep-cuerpo:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(14, 22, 38, .5); }
.ep-img { flex: none; align-self: center; width: 250px; aspect-ratio: 16 / 9; background: #000; }
.ep-img img { width: 100%; height: 100%; object-fit: cover; }
.ep-prox .ep-cuerpo { background: transparent; border-style: dashed; }
.ep-prox .ep-txt strong { color: var(--tx-2); }
.puente { margin: 34px 0 0 64px; padding: 14px 18px; border-left: 2px solid var(--gold); color: var(--tx-2); font-family: var(--serif); font-style: italic; font-size: 1.1rem; }

/* franja de la app / inscripción */
.h-app { background: var(--ink); color: var(--tx-inv); padding: clamp(56px, 8vw, 96px) 0; }
.h-app-in { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.h-app h2 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.h-app .sec-lede { color: var(--tx-inv-2); }
.h-app-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ------------------------------------------------------------ episodio */
.e-hero { background: var(--ink); color: var(--tx-inv); padding: clamp(110px, 13vw, 150px) 0 clamp(48px, 7vw, 80px); }
.migas { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; color: var(--tx-inv-2); margin-bottom: 26px; }
.migas a { color: var(--gold-2); text-decoration: none; }
.migas a:hover { text-decoration: underline; }
.e-titulo { margin-bottom: 30px; }
.e-titulo h1 { font-size: clamp(2.3rem, 1.3rem + 3.6vw, 4.2rem); line-height: 1.04; letter-spacing: -.02em; margin-bottom: 12px; }
.e-heb { font-size: clamp(1.7rem, 1.1rem + 1.8vw, 2.6rem); color: var(--gold-soft); direction: rtl; text-align: left; }
.e-translit { margin-top: 4px; font-size: .86rem; letter-spacing: .18em; text-transform: uppercase; color: var(--tx-inv-2); }

.player { background: #000; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-2); border: 1px solid var(--line-inv); }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.player-barra { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; background: var(--ink-2); border-top: 1px solid var(--line-inv); }
.pb { background: transparent; border: 1px solid var(--line-inv); color: var(--tx-inv); border-radius: var(--r); padding: 7px 14px; font-size: .86rem; transition: border-color .2s, color .2s; }
.pb:hover { border-color: var(--gold); color: var(--gold-2); }
.pb b { color: var(--gold-2); font-weight: 700; }
.pb-nota { font-size: .86rem; color: var(--tx-inv-2); }
.pb-nota button { background: none; border: 0; color: var(--gold-2); text-decoration: underline; padding: 0 2px; font-size: inherit; }

.cap-tit { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); margin: 34px 0 14px; }
.caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.caps button { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; background: var(--ink-2); border: 1px solid var(--line-inv); border-radius: var(--r); color: var(--tx-inv); transition: border-color .2s, background .2s, transform .2s var(--ease); }
.caps button:hover { border-color: rgba(197, 154, 69, .6); transform: translateY(-2px); }
.caps button.activo { border-color: var(--gold); background: var(--ink-3); }
.cap-t { font-size: .82rem; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.cap-n { font-family: var(--serif); font-size: 1.04rem; line-height: 1.2; }

.e-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.e-sub { margin-top: 36px; font-size: 1.1rem; }
.fuentes { display: flex; flex-wrap: wrap; gap: 8px; }
.fuentes li { padding: 7px 14px; border: 1px solid var(--stone); border-radius: 999px; background: var(--paper); font-size: .92rem; color: var(--tx-2); }
.e-nota { background: var(--paper); border: 1px solid var(--stone); border-top: 3px solid var(--gold); border-radius: var(--r-lg); padding: 26px; }
.e-nota h3 { font-size: 1.2rem; }
.e-nota ul { display: grid; gap: 10px; margin: 14px 0 18px; }
.e-nota li { color: var(--tx-2); font-size: .98rem; padding-left: 16px; position: relative; }
.e-nota li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.credito { font-size: .84rem; color: var(--tx-3); padding-top: 14px; border-top: 1px solid var(--line); }

.pers { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.pers-card { flex: 0 1 calc(25% - 14px); min-width: 190px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 18px 14px 20px; background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line-inv); border-radius: var(--r-lg); }
.pers-img { display: flex; justify-content: center; align-items: flex-end; width: 100%; height: 280px; margin-bottom: 12px; overflow: hidden; }
.pers-img img { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45)); }
.pers-heb { font-size: 1.9rem; color: var(--gold-soft); line-height: 1.15; }
.pers-n { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.pers-es { font-size: .88rem; color: var(--tx-inv-2); }
.pers-rol { font-size: .84rem; color: var(--gold-2); margin-top: 6px; }

.e-sig-in { display: flex; gap: 18px; flex-wrap: wrap; }
.sig { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; background: var(--paper); border: 1px solid var(--stone); border-radius: var(--r-lg); text-decoration: none; }
.sig small { font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); }
.sig strong { font-family: var(--serif); font-size: 1.3rem; }
a.sig:hover { border-color: var(--gold); }
.sig-sig { border-style: dashed; background: transparent; }
.e-sig { padding-top: 0; }

/* --------------------------------------------------------- teléfonos */
@media (max-width: 960px) {
  .dest { grid-template-columns: minmax(0, 1fr); }
  .dest-meta .btn { margin-left: 0; }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .e-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .serie-cab { gap: 14px; }
  .linea::before { left: 17px; }
  .ep { grid-template-columns: 36px minmax(0, 1fr); gap: 14px; }
  .ep-nodo { width: 36px; height: 36px; font-size: .9rem; }
  .ep-cuerpo { flex-direction: column; gap: 0; }
  .ep-img { width: 100%; aspect-ratio: 16 / 9; }
  .ep-txt { padding: 14px 16px; }
  .puente { margin-left: 0; }
  .pers { gap: 12px; }
  .pers-card { flex-basis: calc(50% - 6px); min-width: 0; }
  .pers-img { height: 220px; }
  .pers-heb { font-size: 1.6rem; }
  .h-app-btns .btn { width: 100%; }
  .h-app-btns { width: 100%; }
  .player { margin-inline: calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; }
}
