/* ═══════════════════════════════════════════════
   ediciones.css — Estilos exclusivos para /ediciones.html
   Importa variables y componentes globales de style.css.
   No modifica style.css bajo ninguna circunstancia.
═══════════════════════════════════════════════ */

/* ─── 0. Body override ─── */
body {
  background: var(--color-white);
}

/* ─── 1. Active nav link ─── */
.navbar__nav a[href="ediciones.html"] {
  color: var(--color-pink);
}
.navbar__nav a[href="ediciones.html"]::after {
  width: 100%;
}

/* ─── 2. TICKER reutilizado de historia.css ─── */
.ticker2 {
  overflow: hidden;
  background-color: var(--color-pink);
  color: var(--color-white);
  padding: 0.45rem 0;
  white-space: nowrap;
}

/* ─── 3. HERO EDITORIAL ─── */
.ed-hero {
  margin-top: var(--navbar-height);
  padding: 4rem var(--gutter) 3rem;
  border-bottom: 2px solid var(--color-black);
  background: var(--color-white);
}

.ed-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5rem;
  align-items: end;
}

.ed-hero__meta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.ed-hero__label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-pink);
  display: block;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  align-self: flex-start;
}

.ed-hero__counter {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.02em;
  color: var(--color-grey-200);
  user-select: none;
  /* Número de fondo decorativo */
  white-space: nowrap;
}

.ed-hero__text {
  padding-bottom: 0.5rem;
}

.ed-hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  letter-spacing: 0.03em;
  line-height: 0.9;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}

.ed-hero__title em {
  color: var(--color-pink);
  font-style: normal;
}

.ed-hero__sub {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--color-grey-600);
  max-width: 54ch;
}

.ed-hero__rule {
  max-width: var(--max-width);
  margin: 0 auto;
  /* visual separator handled by border-bottom on .ed-hero */
}

/* ─── 4. ARCHIVE SECTION ─── */
.ed-archive {
  padding: 5rem var(--gutter) 6rem;
}

.ed-archive__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── Section header ── */
.ed-archive__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 3.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--color-black);
  flex-wrap: wrap;
  gap: 0.8rem;
}

.ed-archive__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ed-archive__sub {
  font-size: 0.68rem;
  color: var(--color-grey-400);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── 5. GRID DE TARJETAS ─── */
/*
  Sobreescribimos el .podcast__grid de style.css solo en este contexto.
  style.css define podcast__grid con columnas fijas; aquí lo expandimos
  para el layout de archivo completo sin tocar el original.
*/
.ed-archive__inner .podcast__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ─── 6. TARJETAS: extensión de .podcast-card de style.css ─── */
/*
  .podcast-card ya está definida en style.css (estructura, overlay, tipografía).
  Aquí solo ajustamos proporciones y detalles específicos de la página de archivo.
*/

/* Thumbnail más alto en la página de archivo para mayor impacto visual */
.ed-archive__inner .podcast-card .podcast-card__thumb {
  aspect-ratio: 4 / 6;
}

/* Hover: eleva la tarjeta ligeramente */
.ed-archive__inner .podcast-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--color-grey-200);
}

.ed-archive__inner .podcast-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* Año en overlay: usamos .podcast-card__ep para mostrar el ID de edición */
.ed-archive__inner .podcast-card .podcast-card__ep {
  font-size: 2rem;
}

/* Fade-in base: las tarjetas comienzan invisibles.
   script.js añade .is-visible via IntersectionObserver. */
.ed-archive__inner .podcast-card {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    box-shadow 0.3s ease;
}

.ed-archive__inner .podcast-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Escalonamiento visual mediante nth-child */
.ed-archive__inner .podcast-card:nth-child(4n+2) { transition-delay: 0.07s; }
.ed-archive__inner .podcast-card:nth-child(4n+3) { transition-delay: 0.14s; }
.ed-archive__inner .podcast-card:nth-child(4n+4) { transition-delay: 0.21s; }

/* ─── 7. SKELETON PLACEHOLDERS ─── */
.ed-skeleton {
  aspect-ratio: 3 / 5;
  background: linear-gradient(
    90deg,
    var(--color-grey-100) 25%,
    var(--color-grey-200) 50%,
    var(--color-grey-100) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease infinite;
}

@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Ocultamos skeletons en cuanto el container tenga tarjetas reales */
.ed-archive__inner .podcast__grid:not(:empty) .ed-skeleton {
  display: none;
}

/* ─── 8. CTA ─── */
.ed-cta {
  border-top: 2px solid var(--color-black);
  padding: 4rem var(--gutter);
}

.ed-cta__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.ed-cta__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-pink);
  display: block;
  margin-bottom: 0.6rem;
}

.ed-cta__heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.ed-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--color-black);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 2px solid var(--color-black);
  transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
  flex-shrink: 0;
}

.ed-cta__link:hover {
  background: var(--color-pink);
  border-color: var(--color-pink);
  color: var(--color-white);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1100px): 3 columnas
═══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .ed-archive__inner .podcast__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ed-hero__inner {
    gap: 3rem;
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 768px): 2 columnas
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .ed-archive__inner .podcast__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .ed-hero__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ed-hero__label {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: none;
  }

  .ed-hero__counter {
    font-size: clamp(5rem, 20vw, 9rem);
    margin-top: 1rem;
  }

  .ed-archive {
    padding: 3.5rem var(--gutter) 4.5rem;
  }

  .ed-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 480px): 1 columna
═══════════════════════════════════════════════ */
@media (max-width: 480px) {
  .ed-archive__inner .podcast__grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .ed-archive__inner .podcast-card .podcast-card__thumb {
    aspect-ratio: 4 / 6;
  }

  .ed-archive {
    padding: 2.5rem var(--gutter) 3.5rem;
  }

  .ed-hero {
    padding: 3rem var(--gutter) 2.5rem;
  }
}
