/* CdeA Radio · podcasts.carlosdeanta.net — misma paleta que carlosdeanta.net y las webs docentes */
:root {
  --navy: #052A64;
  --navy2: #113F86;
  --navy-deep: #031a40;
  --gold: #DBB246;
  --gold-dark: #9A7A1E;
  --gold-soft: #F7EDD2;
  --ink: #1B2430;
  --ink2: #5B6470;
  --line: #E2E6EB;
  --soft: #F4F6F9;
  --paper: #FFFFFF;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
body.playing { padding-bottom: 96px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy2); }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; color: var(--navy); margin: 0 0 .4em; }
.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 0 0 .9rem; display: flex; align-items: center; gap: .7rem; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; color: var(--navy); white-space: nowrap; }
.brand b { color: var(--gold-dark); font-weight: 700; }
.top-right { display: flex; align-items: center; gap: .8rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--soft); }
.seg button { border: 0; background: transparent; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--ink2); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.seg-label { font-size: .78rem; color: var(--ink2); margin-right: .3rem; align-self: center; padding-left: .5rem; }
.lang-link { font-size: .82rem; font-weight: 600; letter-spacing: .06em; color: var(--navy); text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .3rem .6rem; }
.lang-link:hover { border-color: var(--gold); }

/* Portada */
.hero { background: radial-gradient(1200px 500px at 85% 20%, #0d3a80 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); color: #fff; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center; padding: 4.5rem 0 4rem; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 5.6vw, 4.4rem); }
.hero h1 em { color: var(--gold); font-style: italic; }
.lead { font-size: 1.15rem; color: #d6deec; max-width: 54ch; margin: 0 0 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.btn-radio { display: inline-flex; align-items: center; gap: .7rem; background: var(--gold); color: var(--navy-deep); border: 0; border-radius: 999px; padding: .85rem 1.6rem; font-weight: 700; font-size: 1.02rem; letter-spacing: .02em; box-shadow: 0 8px 24px rgba(219,178,70,.25); transition: transform .15s; }
.btn-radio:hover { transform: translateY(-1px); }
.onair { width: 10px; height: 10px; border-radius: 50%; background: #c0392b; box-shadow: 0 0 0 0 rgba(192,57,43,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(192,57,43,0); } 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); } }
.btn-ghost { color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .8rem 1.4rem; font-weight: 600; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.stats { margin: 1.6rem 0 0; color: #a9b6cf; font-size: .92rem; letter-spacing: .02em; }
.hero-art { position: relative; justify-self: end; width: min(400px, 100%); }
.hero-art img { border-radius: 10px; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.eq { position: absolute; left: -22px; bottom: 26px; display: flex; gap: 5px; align-items: flex-end; height: 70px; z-index: 1; }
.eq i { width: 7px; background: var(--gold); border-radius: 2px; animation: eq 1.1s ease-in-out infinite alternate; }
.eq i:nth-child(1) { animation-delay: -.2s } .eq i:nth-child(2) { animation-delay: -.7s } .eq i:nth-child(3) { animation-delay: -.4s }
.eq i:nth-child(4) { animation-delay: -.9s } .eq i:nth-child(5) { animation-delay: -.1s } .eq i:nth-child(6) { animation-delay: -.5s } .eq i:nth-child(7) { animation-delay: -.8s }
@keyframes eq { from { height: 12%; } to { height: 100%; } }
body:not(.sonando) .eq i { animation-play-state: paused; }

/* Secciones */
.bloque { padding: 4rem 0 1rem; }
.bloque + .bloque { padding-top: 2.5rem; }
.bloque > .wrap > h2 { font-size: clamp(2rem, 3.6vw, 2.7rem); }
.bloque-intro { color: var(--ink2); max-width: 70ch; margin: 0 0 2rem; }

/* Cadena con episodios */
.serie { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; align-items: start; padding: 2rem 0 2.5rem; border-top: 1px solid var(--line); }
.serie-side { position: sticky; top: 88px; }
.serie-side img { border-radius: var(--radius); box-shadow: 0 14px 34px rgba(5,42,100,.18); margin-bottom: 1.2rem; }
.serie-side h3 { font-size: 1.9rem; margin-bottom: .2rem; }
.serie-side .sub { color: var(--gold-dark); font-weight: 600; font-size: .95rem; margin: 0 0 .8rem; }
.serie-side p { color: var(--ink2); font-size: .95rem; }
.side-actions { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: var(--radius); padding: .6rem 1rem; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid var(--navy); background: #fff; color: var(--navy); }
.btn:hover { background: var(--soft); }
.btn.primario { background: var(--navy); color: #fff; }
.btn.primario:hover { background: var(--navy2); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.rss { font-size: .85rem; color: var(--ink2); background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; margin-top: .3rem; }
.rss code { display: block; word-break: break-all; font-size: .78rem; color: var(--navy); margin: .3rem 0 .5rem; }
.rss button { border: 0; background: none; color: var(--navy2); font-weight: 600; padding: 0; text-decoration: underline; }

.eps { list-style: none; margin: 0; padding: 0; }
.ep { display: grid; grid-template-columns: 52px 1fr auto; gap: 1rem; align-items: center; padding: 1rem .8rem; border-bottom: 1px solid var(--line); border-radius: var(--radius); transition: background .15s; }
.ep:hover { background: var(--soft); }
.ep.activo { background: var(--gold-soft); }
.ep-play { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--navy); background: #fff; display: grid; place-items: center; color: var(--navy); }
.ep-play svg { width: 20px; height: 20px; fill: currentColor; }
.ep:hover .ep-play, .ep.activo .ep-play { background: var(--navy); color: #fff; }
.ep-num { font-size: .75rem; font-weight: 700; letter-spacing: .12em; color: var(--gold-dark); }
.ep h4 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--navy); margin: 0 0 .15rem; line-height: 1.2; }
.ep p { margin: 0; color: var(--ink2); font-size: .93rem; }
.ep-meta { text-align: right; font-size: .85rem; color: var(--ink2); white-space: nowrap; }
.ep-meta .dur { display: block; font-weight: 600; color: var(--ink); }
.ep-meta a { color: var(--ink2); font-size: .78rem; }
.prog { height: 3px; background: var(--line); border-radius: 2px; margin-top: .45rem; overflow: hidden; max-width: 240px; }
.prog i { display: block; height: 100%; background: var(--gold); }

/* Libros */
.libros { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.8rem; padding-bottom: 2rem; }
.libro { display: flex; flex-direction: column; }
.libro .tapa { position: relative; border-radius: 4px; overflow: hidden; box-shadow: 0 12px 28px rgba(5,42,100,.18); margin-bottom: .9rem; aspect-ratio: 480 / 690; background: var(--soft); }
.libro .tapa img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--navy); color: var(--gold); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .3rem .55rem; border-radius: 3px; }
.libro h3 { font-size: 1.3rem; margin-bottom: .15rem; }
.libro p { color: var(--ink2); font-size: .88rem; margin: 0 0 .5rem; }
.libro a { font-size: .88rem; font-weight: 600; }

/* Pie */
.pie { background: var(--navy-deep); color: #a9b6cf; margin-top: 3rem; font-size: .9rem; }
.pie-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 2rem 0; }
.pie p { margin: 0; }
.pie a { color: var(--gold); }

/* Reproductor */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--navy-deep); color: #fff; box-shadow: 0 -10px 30px rgba(0,0,0,.25); border-top: 2px solid var(--gold); }
.player-in { display: grid; grid-template-columns: 56px minmax(0, 1.2fr) auto minmax(0, 1.6fr) auto; gap: 1rem; align-items: center; padding: .7rem 0; }
.p-cover { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; }
.p-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-sub { font-size: .8rem; color: #a9b6cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-ctrls { display: flex; align-items: center; gap: .4rem; }
.p-btn { background: none; border: 0; color: #d6deec; font-size: .8rem; font-weight: 700; padding: .4rem; min-width: 36px; height: 36px; display: grid; place-items: center; }
.p-btn:hover { color: var(--gold); }
.p-btn svg { width: 20px; height: 20px; fill: currentColor; }
.p-play { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy-deep); display: grid; place-items: center; }
.p-play svg { width: 22px; height: 22px; fill: currentColor; }
.p-bar { display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: #a9b6cf; font-variant-numeric: tabular-nums; }
.p-bar input { flex: 1; accent-color: var(--gold); min-width: 60px; }
.p-speed { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 999px; font-size: .75rem; font-weight: 700; padding: .15rem .5rem; }
.p-close { background: none; border: 0; color: #a9b6cf; font-size: 1.6rem; line-height: 1; padding: .2rem .4rem; }
.p-close:hover { color: #fff; }

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; padding: 3rem 0; gap: 2rem; }
  .hero-art { justify-self: start; width: min(260px, 70%); }
  .serie { grid-template-columns: 1fr; gap: 1.5rem; }
  .serie-side { position: static; display: grid; grid-template-columns: 120px 1fr; gap: 0 1.2rem; }
  .serie-side img { grid-row: span 3; margin: 0; }
  .side-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .player-in { grid-template-columns: 44px minmax(0, 1fr) auto; gap: .3rem .8rem; padding: .6rem 0; }
  .p-cover { width: 44px; height: 44px; }
  .p-bar { grid-column: 1 / -1; grid-row: 2; }
  .p-ctrls { grid-column: 3; grid-row: 1; }
  .p-close { position: absolute; top: -34px; right: 8px; background: var(--navy-deep); border-radius: 50% 50% 0 0; width: 36px; height: 34px; }
  .p-ctrls #pBack, .p-ctrls #pFwd { display: none; }
  body.playing { padding-bottom: 120px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .seg-label { display: none; }
  .brand span { font-size: 1.25rem; }
  .ep { grid-template-columns: 44px 1fr; gap: .8rem; padding: .9rem .3rem; }
  .ep-play { width: 42px; height: 42px; }
  .ep-meta { grid-column: 2; text-align: left; }
  .ep-meta .dur { display: inline; margin-right: .6rem; }
  .libros { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .eq i, .onair { animation: none; } }

/* Compartir por WhatsApp */
.btn.wa { border-color: #1fa855; color: #128c4b; }
.btn.wa:hover { background: #effaf3; }
.wa-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .35rem; color: #128c4b !important; }
.wa-link svg { width: 16px; height: 16px; fill: currentColor; }

/* Navegación visual: portada → grupo → serie */
body.vista-sub .hero { display: none; }
.migas { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 1.4rem 0 0; font-size: .9rem; color: var(--ink2); }
.migas a { color: var(--navy2); text-decoration: none; font-weight: 600; }
.migas a:hover { color: var(--gold-dark); }
.migas b { color: var(--ink); font-weight: 600; }
.bloque-sub { padding-top: 1.2rem; }
.bloque-sub .serie { border-top: 0; padding-top: 1rem; }

.grupos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.grupo { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: center; min-height: 300px; padding: 2rem; border-radius: 12px; overflow: hidden; text-decoration: none; color: #fff;
  background: radial-gradient(600px 300px at 90% 10%, #0d3a80 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%); box-shadow: 0 18px 40px rgba(5,42,100,.18); transition: transform .2s, box-shadow .2s; }
.grupo:hover { transform: translateY(-4px); box-shadow: 0 26px 50px rgba(5,42,100,.28); }
.grupo svg { width: 46px; height: 46px; fill: var(--gold); margin-bottom: .8rem; }
.grupo h3 { color: #fff; font-size: 2.2rem; margin-bottom: .4rem; }
.grupo p { color: #d6deec; font-size: .95rem; margin: 0 0 1rem; }
.grupo-meta { color: var(--gold); font-weight: 700; font-size: .9rem; letter-spacing: .02em; }
.abanico { position: relative; height: 230px; }
.abanico img { position: absolute; bottom: 0; left: 50%; width: 120px; border-radius: 4px; box-shadow: 0 10px 24px rgba(0,0,0,.4); transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 9deg)) translateX(calc((var(--i) - (var(--n) - 1) / 2) * 34px)); transition: transform .25s; }
.grupo:hover .abanico img { transform: translateX(-50%) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 12deg)) translateX(calc((var(--i) - (var(--n) - 1) / 2) * 44px)); }

.tapas { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2rem 1.6rem; padding-bottom: 2rem; }
.tapa-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.tapa-card .tapa { position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 12px 28px rgba(5,42,100,.18); margin-bottom: .9rem; aspect-ratio: 480 / 690; background: var(--soft); transition: transform .2s, box-shadow .2s; }
.tapa-card:hover .tapa { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(5,42,100,.28); }
.tapa-card .tapa img { width: 100%; height: 100%; object-fit: cover; }
.tapa-card h3 { font-size: 1.35rem; margin-bottom: .15rem; }
.tapa-card p { color: var(--ink2); font-size: .88rem; margin: 0; }
.badge.ok { background: var(--gold); color: var(--navy-deep); }
.tapa-play { position: absolute; right: 12px; bottom: 12px; width: 48px; height: 48px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
.tapa-play svg { width: 22px; height: 22px; fill: var(--navy-deep); }
.tapa-card:hover .tapa-play { opacity: 1; transform: none; }
.pronto { align-self: center; text-align: center; padding: 3rem 1rem; border: 1px dashed var(--line); border-radius: 8px; color: var(--ink2); }
.pronto .badge { position: static; display: inline-block; margin-bottom: .8rem; }

@media (max-width: 900px) {
  .grupos { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grupo { grid-template-columns: 1fr; padding: 1.5rem; min-height: 0; }
  .abanico { height: 170px; }
  .abanico img { width: 90px; }
  .tapas { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; }
  .tapa-play { opacity: 1; transform: none; width: 40px; height: 40px; }
}

/* Cabecera compacta (2026-10-10): los dos grupos se ven sin desplazarse */
.hero-in { padding: 2.2rem 0 2rem; gap: 2rem; grid-template-columns: 1.5fr 1fr; }
.hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); margin-bottom: .3em; }
.lead { font-size: 1.05rem; margin-bottom: 1.3rem; }
.stats { margin-top: 1rem; }
.hero-art { width: min(220px, 100%); }
.hero-art img { border-radius: 50%; box-shadow: 0 20px 45px rgba(0,0,0,.4); }
.eq { left: -46px; bottom: 18px; height: 54px; }
#grupos { padding-top: 2rem; }
#grupos h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: .8rem; }
.grupo { min-height: 230px; padding: 1.6rem 1.8rem; }
.grupo h3 { font-size: 1.9rem; }
.grupo svg { width: 38px; height: 38px; margin-bottom: .5rem; }
.grupo p { margin-bottom: .7rem; }
.abanico { height: 190px; }
.abanico img { width: 108px; }
.brand img { border-radius: 50%; }

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr auto; padding: 1.8rem 0 1.6rem; gap: 1rem; }
  .hero-art { width: 130px; justify-self: end; align-self: start; }
  .eq { display: none; }
}
@media (max-width: 560px) {
  .hero-in { grid-template-columns: 1fr; padding: 1.4rem 0 1.4rem; }
  .hero-art { display: none; }
  .hero h1 { font-size: 2rem; }
  .lead { font-size: .98rem; margin-bottom: 1rem; }
  .hero-actions { gap: .6rem; }
  .btn-radio, .btn-ghost { padding: .7rem 1.2rem; font-size: .95rem; }
  .stats { font-size: .82rem; }
  #grupos { padding-top: 1.4rem; }
  .grupos { gap: 1rem; }
  .grupo { grid-template-columns: 1fr 120px; padding: 1.2rem; gap: .6rem; min-height: 0; }
  .grupo h3 { font-size: 1.55rem; }
  .grupo p { display: none; }
  .grupo svg { width: 30px; height: 30px; }
  .abanico { height: 120px; }
  .abanico img { width: 66px; transform: translateX(-50%) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 8deg)) translateX(calc((var(--i) - (var(--n) - 1) / 2) * 16px)); }
  .brand span { font-size: 1.15rem; }
  .seg-label { display: none; }
  .lang-link { padding: .25rem .45rem; font-size: .75rem; }
  .top-right { gap: .4rem; }
}
.btn-radio { text-decoration: none; cursor: pointer; }
.btn-radio svg { width: 20px; height: 20px; fill: currentColor; }

/* Descarga del programa para Windows */
.app-link { color: var(--gold); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.app-link:hover { text-decoration: underline; }
.app-link svg { width: 14px; height: 14px; fill: currentColor; }
.app-nota { margin: .6rem 0 0; font-size: .85rem; color: #d6deec; max-width: 60ch; background: rgba(255,255,255,.06); border-left: 2px solid var(--gold); padding: .5rem .8rem; border-radius: 4px; }
