/* Difusion Radio Preview v5: pulido visual, menos ruido publico,
   tema claro con mejor contraste y gradientes animados por paleta. */
:root {
  --dr-v5-shadow-soft: 0 14px 38px rgba(8, 33, 66, .14);
}
/* Barra superior: conservar fondo, quitar borde/linea azul inferior. */
.site-header {
  border-bottom: 0 !important;
  box-shadow: 0 10px 28px rgba(6, 24, 52, .12);
}
.site-header::after,
.site-header::before {
  display: none !important;
  content: none !important;
}
/* El tab activo no lleva marco; solo color. */
.main-nav a.active,
.main-nav a.active:hover,
.main-nav a[aria-current="page"] {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
/* Menos ruido en audiencia publica. */
#audiencia-breakdown {
  display: none !important;
}
.broadcast-kpis article:nth-child(3) #listeners-count {
  font-size: clamp(1.8rem, 3.1vw, 2.2rem);
  margin-bottom: 2px;
}
.broadcast-kpis #audiencia-label {
  font-size: .88rem;
  line-height: 1.1;
  color: var(--text);
  opacity: .9;
  white-space: normal;
}
html[data-theme="dark"] .broadcast-kpis #audiencia-label {
  color: rgba(246, 250, 255, .92);
}
/* Tema claro: menos blanco, mejor contraste, textos mas legibles. */
html:not([data-theme="dark"]) {
  --bg: #dfeaf4;
  --surface: #eef5fb;
  --surface-2: #dce8f3;
  --surface-3: #ceddec;
  --text: #14314d;
  --muted: #48637d;
  --border: #b8cada;
  --brand-soft: #d8ecfc;
  --shadow-sm: 0 9px 26px rgba(21, 59, 99, .10);
  --shadow: 0 22px 60px rgba(18, 59, 103, .14);
}
html:not([data-theme="dark"]) body {
  background:
    radial-gradient(circle at 11% 10%, rgba(0,148,255,.14), transparent 24rem),
    radial-gradient(circle at 89% 14%, rgba(103,80,235,.11), transparent 28rem),
    linear-gradient(160deg, #d8e5f1 0%, #e6eef7 45%, #dbe7f2 100%);
}
html:not([data-theme="dark"]) .section-soft,
html:not([data-theme="dark"]) .contact-form,
html:not([data-theme="dark"]) .schedule-event,
html:not([data-theme="dark"]) .audio-dock,
html:not([data-theme="dark"]) .host-card,
html:not([data-theme="dark"]) .broadcast-panel {
  box-shadow: 0 12px 38px rgba(16, 57, 97, .09);
}
html:not([data-theme="dark"]) .live-card {
  color: #f7fbff;
  box-shadow: 0 18px 46px rgba(4, 88, 156, .18);
}
html:not([data-theme="dark"]) .live-card small,
html:not([data-theme="dark"]) .live-card p,
html:not([data-theme="dark"]) .live-card .live-time,
html:not([data-theme="dark"]) .live-card .live-status,
html:not([data-theme="dark"]) .live-card .secondary-button,
html:not([data-theme="dark"]) .live-card .primary-button {
  color: #f7fbff;
}
html:not([data-theme="dark"]) .live-card .secondary-button {
  border-color: rgba(240,247,255,.28);
  background: rgba(255,255,255,.10);
}
html:not([data-theme="dark"]) .live-card .secondary-button:hover {
  background: rgba(255,255,255,.18);
}
html:not([data-theme="dark"]) .live-activity {
  background: rgba(255,255,255,.18);
  color: #fff;
}
html:not([data-theme="dark"]) .live-activity small {
  color: rgba(247,251,255,.82);
}
html:not([data-theme="dark"]) .broadcast-panel-head p,
html:not([data-theme="dark"]) .broadcast-panel h2,
html:not([data-theme="dark"]) .broadcast-panel small,
html:not([data-theme="dark"]) .broadcast-sequence .sequence-item small,
html:not([data-theme="dark"]) .broadcast-sequence .sequence-item strong,
html:not([data-theme="dark"]) .schedule-event p,
html:not([data-theme="dark"]) .schedule-event .event-time,
html:not([data-theme="dark"]) .host-copy p {
  color: inherit;
}
/* Gradientes animados derivados de la foto; no se muestra la foto como franja. */
@keyframes drPaletteFlow {
  0% { background-position: 0% 50%, 0% 50%; }
  50% { background-position: 100% 50%, 100% 50%; }
  100% { background-position: 0% 50%, 0% 50%; }
}
.host-card {
  position: relative;
  overflow: hidden;
}
.host-card::before {
  background-image:
    linear-gradient(90deg,
      color-mix(in srgb, var(--host-c1, #24a7ff) 92%, white 8%),
      color-mix(in srgb, var(--host-c2, #7b51ff) 85%, white 15%),
      color-mix(in srgb, var(--host-c3, #0ec8a4) 88%, white 12%));
  background-size: 240% 240%;
  animation: drPaletteFlow 11s ease-in-out infinite;
  filter: saturate(1.08) brightness(1.03);
  height: 7px;
}
html[data-theme="dark"] .host-card::before {
  filter: saturate(1.1) brightness(1.0);
}
.host-card.is-live-host::before {
  height: 8px;
  animation-duration: 8s;
}
.host-card.is-live-host {
  box-shadow: 0 0 0 2px rgba(14,199,183,.18), var(--dr-v5-shadow-soft);
}
/* Franja actualizada en historico de emision: misma logica de paleta. */
.broadcast-sequence .sequence-item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.broadcast-sequence .sequence-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: inherit;
  background-image: linear-gradient(90deg,
    var(--seq-c1, rgba(4,155,243,.9)),
    var(--seq-c2, rgba(122,80,246,.85)),
    var(--seq-c3, rgba(12,196,175,.9)));
  background-size: 240% 240%;
  animation: drPaletteFlow 12s ease-in-out infinite;
  opacity: .95;
}
.broadcast-sequence .sequence-item.current {
  border-color: rgba(33,183,255,.42) !important;
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--seq-c1, #24a7ff) 88%, white 12%), 0 9px 24px rgba(5,117,173,.11);
}
.broadcast-sequence .sequence-item.current::before {
  height: 100%;
  opacity: .10;
}
.broadcast-sequence .sequence-item.next,
.broadcast-sequence .sequence-item.next:hover,
.broadcast-sequence .sequence-item.next:focus-visible {
  border-color: rgba(0,0,0,.07) !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .broadcast-sequence .sequence-item.next,
html[data-theme="dark"] .broadcast-sequence .sequence-item.next:hover,
html[data-theme="dark"] .broadcast-sequence .sequence-item.next:focus-visible {
  border-color: rgba(255,255,255,.07) !important;
}
.broadcast-sequence .sequence-item.next::before,
.broadcast-sequence .sequence-item:first-child::before {
  height: 3px;
  opacity: .85;
}
/* En programacion semanal, solo el bloque vigente luce marco claro. */
.schedule-event {
  position: relative;
  overflow: hidden;
}
.schedule-event::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background-image: linear-gradient(90deg,
    var(--event-c1, rgba(4,155,243,.88)),
    var(--event-c2, rgba(122,80,246,.84)),
    var(--event-c3, rgba(12,196,175,.9)));
  background-size: 240% 240%;
  animation: drPaletteFlow 12s ease-in-out infinite;
  opacity: .86;
}
.schedule-event.is-current-program::before,
.schedule-event.is-live-program::before {
  height: 100%;
  opacity: .10;
}
.schedule-event.is-current-program {
  border-color: rgba(33,183,255,.45);
}
.schedule-event.is-live-program {
  border-color: rgba(15,196,175,.48);
}
/* Mejor legibilidad en tema claro. */
html:not([data-theme="dark"]) .host-card .host-program,
html:not([data-theme="dark"]) .schedule-event h3,
html:not([data-theme="dark"]) .broadcast-sequence .sequence-item strong,
html:not([data-theme="dark"]) .broadcast-sequence .sequence-item small,
html:not([data-theme="dark"]) .host-copy h3,
html:not([data-theme="dark"]) .host-copy p,
html:not([data-theme="dark"]) .contact-copy p,
html:not([data-theme="dark"]) .contact-list small,
html:not([data-theme="dark"]) .contact-list strong {
  color: #163453;
}
html:not([data-theme="dark"]) .host-card .host-program,
html:not([data-theme="dark"]) .eyebrow,
html:not([data-theme="dark"]) .schedule-event span,
html:not([data-theme="dark"]) .broadcast-sequence .sequence-item span {
  color: #0a7bd1;
}
/* Ajustes moviles finos. */
@media (max-width: 768px) {
  .broadcast-kpis article:nth-child(3) {
    grid-template-columns: 32px minmax(0,1fr);
  }
  .broadcast-kpis #audiencia-label {
    font-size: .82rem;
  }
  .broadcast-sequence .sequence-item::before,
  .schedule-event::before,
  .host-card::before {
    animation-duration: 14s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .host-card::before,
  .broadcast-sequence .sequence-item::before,
  .schedule-event::before {
    animation: none !important;
  }
}
