:root {
  --azul: #1d4ed8;
  --azul-osc: #1e3a8a;
  --azul-profundo: #0e1f4d;
  --fondo: #f2f5fa;
  --texto: #1f2937;
  --gris: #64748b;
  --borde: #e3e9f2;
  --blanco: #ffffff;
  --sombra: 0 1px 2px rgba(14,31,77,.05), 0 10px 28px rgba(14,31,77,.07);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.45;
  padding-bottom: 78px;
}

/* ---------- Hero compacto ---------- */
.hero {
  position: relative;
  min-height: 34vh;
  display: flex;
  align-items: flex-end;
  background: url('/assets/portada.jpg') center 35% / cover no-repeat;
  color: #fff;
  padding: 2rem 1.5rem;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,31,77,.10) 0%, rgba(14,31,77,.60) 60%, rgba(14,31,77,.85) 100%);
}
.hero-content {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.hero-callsign {
  margin: 0 0 .35rem;
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .88;
  font-weight: 600;
}
.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.hero-tagline {
  margin: .6rem 0 0;
  font-size: 1rem;
  opacity: .92;
}

/* ---------- Grid principal: 3 columnas en desktop ---------- */
main.grid {
  max-width: 1280px;
  margin: -1.5rem auto 0;
  padding: 0 1.25rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}
.card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 14px;
  box-shadow: var(--sombra);
  padding: 1.1rem;
}
h2 {
  margin: 0 0 .8rem;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--azul);
  font-weight: 700;
}

/* Subtítulo del podcast */
.podcast-titulo {
  margin: -.4rem 0 .6rem;
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- Enlaces ---------- */
.enlace {
  display: flex; align-items: center; gap: .6rem;
  padding: .65rem .8rem;
  border: 1px solid var(--borde);
  border-radius: 10px;
  text-decoration: none;
  color: var(--texto);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.enlace + .enlace { margin-top: .45rem; }
.enlace:hover {
  border-color: var(--azul);
  box-shadow: 0 4px 12px rgba(29,78,216,.10);
  transform: translateY(-1px);
}
.enlace-nombre { font-weight: 650; font-size: .95rem; }
.enlace-det { color: var(--gris); margin-left: auto; font-size: .85rem; }
.enlace-flecha { color: var(--azul); opacity: 0; transform: translateX(-4px); transition: .15s; }
.enlace:hover .enlace-flecha { opacity: 1; transform: translateX(0); }

/* ---------- Podcast ---------- */
.rss { margin: 0 0 .4rem; }
.rss a { color: var(--azul); font-weight: 600; text-decoration: none; font-size: .95rem; }
.rss a:hover { text-decoration: underline; }
.episodio { display: flex; flex-direction: column; gap: .2rem; padding: .7rem 0; border-bottom: 1px solid var(--borde); }
.episodio:last-child { border-bottom: 0; }
.episodio button {
  text-align: left; border: none; background: none; cursor: pointer;
  font-size: .95rem; color: var(--texto); padding: 0; font-weight: 600;
  transition: color .15s;
}
.episodio button:hover { color: var(--azul); }
.meta { font-size: .8rem; color: var(--gris); }
.cargando { color: var(--gris); font-size: .9rem; }

/* ---------- Footer / player ---------- */
footer {
  text-align: center; color: var(--gris); font-size: .82rem;
  padding: 1.2rem 1.25rem 2rem;
}
#player {
  display: none;
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 720px;
  border: 1px solid var(--borde); border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #fff;
  padding: .45rem .75rem;
  box-shadow: 0 -6px 24px rgba(14,31,77,.10);
}

/* ---------- Móvil: apilar (podcast primero, ya está primero en el HTML) ---------- */
@media (max-width: 760px) {
  .hero { min-height: 30vh; }
  main.grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin-top: -1.25rem;
  }
}

@media (prefers-color-scheme: dark) {
  body { background: #0b1220; color: #e2e8f0; }
  .card { background: #111a2c; border-color: #1e2a3f; box-shadow: none; }
  h2 { color: #93c5fd; }
  .podcast-titulo { color: #e2e8f0; }
  .enlace { border-color: #1e2a3f; color: #e2e8f0; }
  .enlace:hover { border-color: #3b82f6; }
  .enlace-det { color: #94a3b8; }
  .episodio { border-color: #1e2a3f; }
  .episodio button { color: #e2e8f0; }
  .episodio button:hover { color: #93c5fd; }
  .meta, .cargando, footer { color: #94a3b8; }
  .rss a { color: #93c5fd; }
  #player { background: #111a2c; border-color: #1e2a3f; }
}
