/* =========================================================
   Lista de episodios — depende de common.css
   ========================================================= */

/* Hero de la portada-resumen Multipodcast. */
.multipodcast-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 190px;
  margin-bottom: 1.4rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border-radius: 18px;
  display: flex;
  align-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, .2), transparent 25%),
    linear-gradient(135deg, var(--accent-dark), #162b3a 72%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .2);
}

.multipodcast-hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.multipodcast-hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.multipodcast-hero.has-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .42));
}

.multipodcast-hero.has-hero .multipodcast-hero-art {
  display: none;
}

.multipodcast-hero h1 {
  margin: 0;
  max-width: 13ch;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: .98;
  letter-spacing: -.035em;
}

.multipodcast-hero-content > p:last-child {
  max-width: 540px;
  margin: 1.15rem 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(.95rem, 2vw, 1.08rem);
}

.multipodcast-hero-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(38%, 360px);
  opacity: .9;
}

.multipodcast-hero-art span {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
}

.multipodcast-hero-art span:nth-child(1) { width: 210px; height: 210px; right: -45px; top: -30px; }
.multipodcast-hero-art span:nth-child(2) { width: 130px; height: 130px; right: 80px; bottom: -38px; }
.multipodcast-hero-art span:nth-child(3) { width: 54px; height: 54px; right: 54px; top: 105px; background: rgba(255, 255, 255, .14); }

@media (max-width: 620px) {
  .multipodcast-hero { min-height: 170px; }
  .multipodcast-hero-art { opacity: .5; width: 46%; }
}

.podcast-directory {
  display: grid;
  gap: 1rem;
}

.podcast-directory h3 {
  margin: 0 0 .3rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  line-height: 1.25;
}

.podcast-directory h3 a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color .12s;
}

.podcast-directory h3 a:hover,
.podcast-directory h3 a:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* El contenedor principal pasa a ser un flex column transparente:
   cada episodio es su propia tarjeta flotante. */
main.card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

/* =========================================================
   Tarjeta de episodio
   ========================================================= */
.episode {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 1.1rem;
  align-items: start;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.episode:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.12);
  border-color: var(--accent);
}

.episode > a {
  display: contents;
}

.cover {
  width: 108px;
  height: 108px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #ede8e1;
  display: block;
  transition: box-shadow .25s ease, transform .25s ease;
}

.episode:hover .cover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.16);
  transform: scale(1.04) rotate(-0.5deg);
}

.episode-content { min-width: 0; }

h2 {
  margin: 0 0 .3rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

h2 a {
  color: inherit;
  text-decoration: none;
  transition: color .12s;
}

h2 a:hover { color: var(--accent); }

/* Badge de fecha */
.episode .meta {
  display: inline-block;
  margin: 0 0 .5rem;
  border-radius: 999px;
  background: rgba(181, 71, 14, .09);
  color: var(--accent);
  padding: .2em .75em;
  font-size: .78rem;
  font-weight: 600;
}

.excerpt {
  margin: 0;
  font-size: .93rem;
  color: var(--muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.read-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: .87rem;
  margin-left: .2em;
  white-space: nowrap;
}

.read-more::after {
  content: ' →';
  display: inline-block;
  transition: transform .15s ease;
}

.read-more:hover { text-decoration: underline; }
.read-more:hover::after { transform: translateX(2px); }

.player {
  margin-top: .75rem;
  width: min(480px, 100%);
}

/* =========================================================
   Paginación
   ========================================================= */
.pagination {
  margin-top: .15rem;
  padding: 1.1rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.pagination .links {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.page-link {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .4rem .75rem;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  font-size: .87rem;
  font-weight: 500;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  transition: background .12s, border-color .12s, color .12s, transform .15s ease;
}

.page-link:hover {
  background: #ffeee6;
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.page-link.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}

/* =========================================================
   Animación de entrada
   ========================================================= */
.reveal.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 620px) {
  .episode {
    grid-template-columns: 84px 1fr;
    padding: 1.1rem;
  }

  .cover { width: 84px; height: 84px; }

  .pagination { align-items: flex-start; }

  .pagination .links {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .2rem;
  }
}

@media (max-width: 460px) {
  .episode {
    grid-template-columns: 1fr;
    gap: .8rem;
  }

  .cover {
    width: min(100%, 160px);
    height: auto;
    aspect-ratio: 1/1;
  }

  .player { width: 100%; }
}
