:root {
  color-scheme: light;
  --ink:      #25222a;
  --muted:    #6f6672;
  --paper:    #fff8ee;
  --surface:  #ffffff;
  --red:      #df0022;
  --orange:   #ff9d26;
  --yellow:   #ffe94a;
  --charcoal: #312d32;
  --line:     rgba(49, 45, 50, 0.12);
  --shadow-sm: 0 2px 8px rgba(49, 35, 20, 0.07);
  --shadow-md: 0 8px 24px rgba(49, 35, 20, 0.10);
  --shadow-lg: 0 24px 60px rgba(49, 35, 20, 0.16);
}

/* ── Reset ────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-width: 320px;
    padding-bottom: 13rem;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 72% 0%, rgba(255, 233, 74, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 40%, rgba(255, 157, 38, 0.10) 0%, transparent 40%),
    linear-gradient(180deg, #fffdf8 0%, var(--paper) 60%, #ffffff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Focus visible ────────────────────────────────── */

:focus-visible {
  outline: 2.5px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Headings ─────────────────────────────────────── */

h1, h2, h3, p {
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  font-family: Montserrat, Inter, sans-serif;
  line-height: 1;
}

/* ── Header ───────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem clamp(1rem, 4vw, 4rem);
  background: rgba(255, 253, 248, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  flex-shrink: 0;
}

.brand img {
  display: block;
  width: clamp(3.2rem, 8vw, 4rem);
  height: auto;
  transition: transform 0.2s ease;
}

.brand:hover img {
  transform: scale(1.04);
}

/* ── Header player ────────────────────────────────── */

.header-player {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem 0.8rem;
  background: rgba(18, 18, 18, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.header-player .now-live {
  display: flex;
  align-items: center;
}

.header-player .now-live .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1db954;
  box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.5);
  animation: pulse-green 1.6s infinite;
  flex-shrink: 0;
}

@keyframes pulse-green {
  70% { box-shadow: 0 0 0 6px rgba(29, 185, 84, 0); }
}

.header-player .track {
  min-width: 0;
}

.header-player .track h2 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

.header-player .track-meta {
  margin: 0;
  font-size: 0.6rem;
  color: #a7a7a7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.header-player .track-meta.is-live {
  color: #1db954;
  font-weight: 600;
}

.header-player .equalizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 16px;
  padding: 0 0.3rem;
}

.header-player .equalizer span {
  width: 3px;
  height: 4px;
  border-radius: 1px;
  background: #1db954;
  opacity: 0.4;
  transition: height 0.12s ease;
}

.header-player.is-playing .equalizer span {
  opacity: 1;
  animation: spotifyEq 0.8s ease-in-out infinite;
}

.header-player.is-playing .equalizer span:nth-child(1) { animation-delay: 0s; }
.header-player.is-playing .equalizer span:nth-child(2) { animation-delay: 0.1s; }
.header-player.is-playing .equalizer span:nth-child(3) { animation-delay: 0.2s; }
.header-player.is-playing .equalizer span:nth-child(4) { animation-delay: 0.3s; }
.header-player.is-playing .equalizer span:nth-child(5) { animation-delay: 0.4s; }
.header-player.is-playing .equalizer span:nth-child(6) { animation-delay: 0.5s; }
.header-player.is-playing .equalizer span:nth-child(7) { animation-delay: 0.6s; }
.header-player.is-playing .equalizer span:nth-child(8) { animation-delay: 0.7s; }

.header-player:not(.is-playing) .equalizer span {
  animation: none;
  height: 4px;
  opacity: 0.4;
}

@keyframes spotifyEq {
  0%, 100% { height: 4px; }
  25% { height: 10px; }
  50% { height: 16px; }
  75% { height: 7px; }
}

.header-player .play-button {
  position: relative;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: #1db954;
  box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}

.header-player .play-button:hover {
  transform: scale(1.06);
  background: #1ed760;
}

.header-player .play-button:active {
  transform: scale(0.98);
}

.header-player .play-icon {
  position: absolute;
  top: 50%;
  left: 54%;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #000;
  transform: translate(-50%, -50%);
}

.header-player .play-button.is-playing .play-icon {
  left: 50%;
  width: 8px;
  height: 10px;
  border: 0;
  border-left: 2.5px solid #000;
  border-right: 2.5px solid #000;
}

.header-player .play-button.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.header-player .play-button.is-loading::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.7);
  animation: spin 0.8s linear infinite;
}

.header-player .track-label {
  display: none;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: rgba(223, 0, 34, 0.08);
  border: 1px solid rgba(223, 0, 34, 0.15);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-badge .live-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-red 1.6s infinite;
  flex-shrink: 0;
}

@keyframes pulse-red {
  70% { box-shadow: 0 0 0 6px rgba(223, 0, 34, 0); }
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.5rem);
}

.nav a {
  position: relative;
  padding: 0.3rem 0.6rem;
  color: var(--charcoal);
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  font-weight: 700;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--red);
  background: rgba(223, 0, 34, 0.06);
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 14px rgba(223, 0, 34, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.header-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(223, 0, 34, 0.35);
}

/* ── Header farmacia de turno ────────────────────── */

.header-farmacia {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, rgba(29, 185, 84, 0.08), rgba(29, 185, 84, 0.04));
  border: 1px solid rgba(29, 185, 84, 0.2);
  border-radius: 10px;
  flex-shrink: 0;
}

.farmacia-icono {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  background: #1db954;
  border-radius: 8px;
  flex-shrink: 0;
}

.farmacia-icono svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: #fff;
}

.farmacia-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.farmacia-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: #1db954;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.farmacia-nombre {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.farmacia-detalles {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.farmacia-horario {
  font-weight: 700;
  color: #1db954;
}

.farmacia-mobile {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem clamp(1rem, 4vw, 4rem);
  background: rgba(29, 185, 84, 0.06);
}

/* ── Header volume ────────────────────────────────── */

.header-volume {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #a7a7a7;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: 0.2rem;
}

.vol-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.header-volume input[type="range"] {
  width: 60px;
  height: 3px;
  accent-color: #1db954;
  cursor: pointer;
  background: #535353;
  border-radius: 2px;
}

.header-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.header-volume:hover input[type="range"]::-webkit-slider-thumb {
  opacity: 1;
}

/* ── Hero compacto ────────────────────────────────── */

.hero-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  background: linear-gradient(135deg, #fffdf8, #fff8ee);
  border-bottom: 1px solid rgba(49, 45, 50, 0.06);
  gap: 2rem;
}

.hero-text h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
}

.freq-tag {
  display: block;
  font-size: 0.5em;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-top: 0.1em;
}

.hero-text .lead {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  line-height: 1.5;
}

.hero-logo {
  position: relative;
  flex-shrink: 0;
}

.hero-logo::before {
  content: '';
  position: absolute;
  width: 140%;
  aspect-ratio: 1;
  top: -20%;
  left: -20%;
  background: radial-gradient(circle, rgba(255, 157, 38, 0.15), transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.hero-logo img {
  position: relative;
  z-index: 1;
  width: clamp(6rem, 10vw, 9rem);
  filter: drop-shadow(0 8px 16px rgba(30, 20, 22, 0.15));
}

/* ── Sponsors fixed bottom ─────────────────────────── */

.sponsors-fixed {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  background: #fff;
  border-top: 1px solid rgba(49, 45, 50, 0.08);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.sponsor-track {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.8rem;
  width: 100%;
}

.sponsor-track img {
  height: 140px;
  width: 140px;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.sponsor-track img:hover {
  transform: scale(1.1);
}

.sponsor-placeholder {
  height: 140px;
  width: 140px;
  background: linear-gradient(135deg, #f0f0f0, #e5e5e5);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #aaa;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Eyebrow ──────────────────────────────────────── */

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--red);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Content sections ─────────────────────────────── */

.content-section,
.split-section {
  scroll-margin-top: 5rem;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 6vw, 6rem);
}

.section-heading {
  max-width: 50rem;
  margin-bottom: 1rem;
}

.section-heading h2,
.split-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 800;
}

/* ── Schedule grid ────────────────────────────────── */

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.8rem;
}

.program-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 8rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 12px;
  border-top: 3px solid var(--red);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.program-card.is-active {
  border-top: 3px solid var(--red);
  box-shadow: 0 0 0 2px var(--red), var(--shadow-md);
  animation: pulse-red 2s ease-in-out infinite;
}

.program-card.is-active::after {
  content: '● EN VIVO';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--red);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 2px var(--red), var(--shadow-md); }
  50% { box-shadow: 0 0 0 4px rgba(223, 0, 34, 0.3), var(--shadow-lg); }
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.time-slot {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.program-card h3 {
  margin: 0.6rem 0 auto;
}

.program-name {
  color: var(--charcoal);
  font-family: Montserrat, Inter, sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 800;
  line-height: 1.1;
}

.host-name {
  display: inline-block;
  margin: 0.6rem 0 0;
  padding: 0.15rem 0.4rem;
  background: var(--charcoal);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 3px;
  width: fit-content;
}

/* ── Staff section ────────────────────────────────── */

.split-section {
  display: grid;
  gap: 1.2rem;
  background: #fff;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.staff-card {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-height: 4.5rem;
  padding: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.staff-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.staff-photo {
  display: grid;
  place-items: center;
  width: 3.2rem;
  aspect-ratio: 1;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.staff-card h3 {
  margin: 0 0 0.2rem;
  font-size: clamp(0.72rem, 0.9vw, 0.88rem);
  line-height: 1.2;
}

.staff-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ── Footer ───────────────────────────────────────── */

.footer {
  display: grid;
  padding: 2rem clamp(1rem, 6vw, 6rem);
  background: var(--charcoal);
  color: #fff;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 0.6rem;
  min-width: 0;
  font-weight: 800;
}

.contact-list a,
.contact-list p {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.15rem 0.6rem;
  margin: 0;
  min-height: 4.2rem;
  padding: 0.8rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
  transition: background 0.18s, transform 0.18s ease;
}

.contact-list a:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-2px);
}

.contact-list svg {
  grid-row: span 2;
  justify-self: center;
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: var(--yellow);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-list span {
  color: var(--yellow);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-mail b {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: clamp(0.72rem, 1vw, 0.88rem);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: normal;
}

.contact-mail b span {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
}

/* ── Animations ───────────────────────────────────── */

@keyframes pulse {
  70% { box-shadow: 0 0 0 0.65rem rgba(223, 0, 34, 0); }
}

/* ── Reduced motion ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 1120px) {
  .schedule-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .staff-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body {
  padding-bottom: 14rem;
  }

  .header-center {
    gap: 0.8rem;
  }

  .live-badge {
    display: none;
  }

  .header-volume {
    display: none;
  }

  .header-player .equalizer {
    display: none;
  }

  .header-player .track-meta {
    display: none;
  }

  .farmacia-mobile {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem clamp(1rem, 4vw, 4rem);
    background: rgba(29, 185, 84, 0.06);
  }

  .farmacia-mobile .farmacia-icono {
    width: 2rem;
    height: 2rem;
  }

  .farmacia-mobile .farmacia-icono svg {
    width: 1.1rem;
    height: 1.1rem;
  }

  .farmacia-mobile .farmacia-label {
    font-size: 0.55rem;
  }

  .farmacia-mobile .farmacia-nombre {
    font-size: 0.8rem;
  }

  .farmacia-mobile .farmacia-detalles {
    font-size: 0.6rem;
  }

  .hero-compact {
    padding: 1.5rem 1rem;
  }

  .content-section,
  .split-section {
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 4vw, 4rem);
  }

  .sponsor-track img,
  .sponsor-placeholder {
    height: 110px;
    width: 100%;
  }

  .sponsor-track {
    grid-template-columns: repeat(4, 1fr);
  }

  .schedule-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    padding-bottom: 11rem;
  }

  .site-header {
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
  }

  .brand img {
    width: 2.5rem;
  }

  .header-player {
    padding: 0.3rem 0.6rem;
    gap: 0.5rem;
  }

  .header-player .track h2 {
    font-size: 0.7rem;
  }

  .header-player .play-button {
    width: 1.6rem;
    height: 1.6rem;
  }

  .header-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }

  .nav a {
    font-size: 0.8rem;
    padding: 0.2rem 0.3rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .hero-logo img {
    width: 4rem;
  }

  .sponsor-track img,
  .sponsor-placeholder {
    height: 90px;
    width: 100%;
  }

  .sponsor-track {
    grid-template-columns: repeat(4, 1fr);
  }

  .schedule-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
