body.loading-page {
  cursor: wait;
}

body.loading-page a {
  cursor: wait;
}

/* ==========================================================================
   RC Radio 107.7 FM Estelí — Estilos globales
   ========================================================================== */

:root {
  --red: #e50914;
  --red-dark: #b30710;
  --bg: #1a1a1c;
  --bg-soft: #232326;
  --panel: #2a2a2e;
  --border: #3a3a40;
  --text: #ffffff;
  --muted: #b0b0b8;
  --radius: 16px;
  --container: 1140px;
  /* Variables que controla el panel de administración (pestaña Apariencia) */
  --red-rgb: 229, 9, 20;
  --red-dark-rgb: 179, 7, 16;
  --red-light: #ff2a35;
  --blob-rgb: 255, 45, 55;
  --blob2-rgb: 255, 120, 125;
  --fondo-arriba: #1d0508;
  --fondo-abajo: #0b0b0d;
  --fondo-html: #08080a;
  --contorno-color: #000;
  --contorno-ancho: 2px;
  --contorno-fino: 1.6px;
  --font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body, "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { 
  line-height: 1.15; 
  font-family: 'Neuropol X Free', "Audiowide", "Montserrat", sans-serif;
  letter-spacing: 1px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------------------------------ Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 17px;
}

.brand .freq { color: var(--red); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #d5d5da;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover { background: #1b1b1f; color: #fff; }
.nav-links a.active { background: var(--red); color: #fff; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: #141416;
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* -------------------------------------------------------------------- Hero */
.hero {
  padding: 84px 0 64px;
  background: linear-gradient(180deg, rgba(20, 0, 2, 0.4) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.hero .eyebrow {
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12.5px;
  margin: 0 0 10px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 7vw, 66px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.hero h1 span { color: var(--red); }

.hero .lead {
  margin: 0 0 28px;
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(16px, 2.1vw, 19px);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.page-head {
  padding: 60px 0 36px;
  background: linear-gradient(180deg, rgba(20, 0, 2, 0.4) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  text-transform: uppercase;
}

.page-head h1 span { color: var(--red); }
.page-head p { margin: 10px 0 0; color: var(--muted); max-width: 680px; }

/* ------------------------------------------------------------------ Bloques */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }

.btn-ghost { border-color: #34343a; color: #fff; }
.btn-ghost:hover { border-color: var(--red); transform: translateY(-2px); }

.section { padding: 64px 0; position: relative; z-index: 1; }
.section.alt { background: rgba(35, 35, 38, 0.4); backdrop-filter: blur(5px); }

.section-head { margin-bottom: 30px; }

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 900;
  text-transform: uppercase;
}

.section-head h2 span { color: var(--red); }
.section-head p { margin: 0; color: var(--muted); max-width: 720px; }

/* ------------------------------------------------------ Reproductor en vivo V2 */
.live-grid-v2 {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
  align-items: stretch;
  margin-top: 40px;
}

.player-v2, .twitch-v2, .app-v2 {
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.player-v2 {
  background: linear-gradient(145deg, #150202 0%, #0a0a0c 100%);
  border: 1.5px solid rgba(var(--red-rgb), 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(var(--red-rgb), 0.05);
}

.player-v2-header, .twitch-v2-header, .app-v2-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.player-v2-header h3, .twitch-v2-header h3, .app-v2-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.icon-signal {
  width: 28px;
  height: 28px;
  color: var(--red);
  filter: drop-shadow(0 0 8px rgba(var(--red-rgb), 0.6));
}

.icon-twitch {
  width: 28px;
  height: 28px;
  color: #a970ff;
}

.player-v2-status {
  margin-bottom: 30px;
}

.status-pill {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #eee;
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

.pill-dot {
  width: 10px;
  height: 10px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--red);
  animation: pulse 2s infinite;
  flex-shrink: 0;
  z-index: 10;
  position: relative;
}

/* --- Marquee Infinito --- */
.marquee-container {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent, black 20px, black 90%, transparent);
  position: relative;
  display: flex;
}

.marquee-content {
  display: inline-flex;
  animation: marquee-infinite 25s linear infinite;
  width: max-content;
}

.marquee-text {
  padding-right: 100px;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #eee;
  white-space: nowrap;
  min-width: 100%;
}

@keyframes marquee-infinite {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.player-v2-visualizer {
  height: 120px;
  margin: 10px 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-v2-visualizer canvas {
  width: 100%;
  height: 100%;
}

.player-v2-footer {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.play-btn-v2 {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: #fff;
  font-size: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(var(--red-rgb), 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.play-btn-v2:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 35px rgba(var(--red-rgb), 0.6);
}

.player-v2-vol {
  flex: 1;
  max-width: 200px;
}

.vol-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.vol-meta span:last-child {
  color: #fff;
}

.player-v2-vol input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 999px;
  outline: none;
  overflow: hidden;
}

.player-v2-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
  box-shadow: -200px 0 0 200px var(--red), 0 0 10px rgba(255, 255, 255, 0.5);
  border: none;
}

.twitch-v2 {
  background: #0a0a0c;
  border: 1.5px solid rgba(255, 255, 255, 0.05);
}

.twitch-v2-frame {
  flex: 1;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.twitch-v2-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 980px) {
  .live-grid-v2 { grid-template-columns: 1fr; }
  .twitch-v2-frame { aspect-ratio: 16 / 9; min-height: 300px; }
}

/* --- Floating Player --- */
.floating-player {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 999;
  background: rgba(42, 42, 46, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-player.show {
  transform: translateY(0);
}

.floating-player .mini-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.floating-player .mini-info .mini-title {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--red);
  position: relative;
  z-index: 2;
  background: rgba(42, 42, 46, 0.95);
}

.floating-player .mini-info .marquee-text {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.floating-player .mini-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mini-vol {
  width: 80px;
  height: 4px;
}

/* --- Carousel Staff --- */
.staff-card {
  flex: 0 0 280px;
  margin-right: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s;
}

.staff-card:hover { transform: scale(1.02); }

.staff-card .photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.staff-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-card .info {
  padding: 16px;
  text-align: center;
}

.staff-card h3 { margin: 0; font-size: 18px; }
.staff-card p { margin: 4px 0 0; color: var(--red); font-weight: 700; font-size: 14px; }

/* --- Programación --- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.program-card {
  background: rgba(42, 42, 46, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.program-card:hover {
  transform: translateY(-5px);
  border-color: var(--red);
  box-shadow: 0 22px 44px rgba(var(--red-rgb), 0.16);
}

.program-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.program-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.program-card .body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.program-card h3 { margin: 0; font-size: 19px; font-weight: 900; text-transform: uppercase; }

.program-card .time {
  color: var(--red);
  font-weight: 800;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.tag {
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
}

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

.schedule-col {
  background: rgba(42, 42, 46, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.schedule-col h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--red);
}

.schedule-col ul { list-style: none; margin: 0; padding: 0; }

.schedule-col li {
  display: flex;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed #2a2a30;
  font-size: 14px;
}

.schedule-col li .hora { color: #fff; font-weight: 800; min-width: 108px; flex-shrink: 0; }
.schedule-col li .prog { color: var(--muted); }

/* --- Audios --- */
.audio-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
}

.audio-card .info { display: flex; align-items: center; gap: 14px; }

.audio-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #101012;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--red);
  font-weight: 900;
}

.audio-card .title { font-weight: 900; text-transform: uppercase; font-size: 15px; }

.spotify {
  width: 100%;
  margin-top: 20px;
}

.spotify iframe {
  width: 100%;
  height: 500px; /* Aumentado de tamaño */
  border-radius: 20px;
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* --- Contacto --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}


.social { display: flex; flex-wrap: wrap; gap: 14px; }

.social a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #000;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  transition: transform 0.2s;
}

.social a:hover { transform: translateY(-3px); border-color: var(--red); }

/* --- Footer --- */
.site-footer {
  background: #070708;
  border-top: 1px solid var(--border);
  padding: 56px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 34px;
}

.footer-brand { font-size: 22px; font-weight: 900; text-transform: uppercase; }
.footer-brand span { color: var(--red); }

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--red);
}

.footer-col a, .footer-col p { display: block; margin: 7px 0; color: var(--muted); font-size: 14.5px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding-top: 20px;
  text-align: center;
  color: #74747c;
  font-size: 13px;
}

@media (max-width: 980px) {
  .schedule-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 12px 20px 20px;
    background: #0d0d10;
    display: none;
  }
  .nav-links.open { display: flex; }
}

@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}


/* ==========================================================================
   v2 — Liquid glass, tipografía, reproductor, carrusel y mapa
   ========================================================================== */
:root {
  --font-display: 'Neuropol X Free', 'Audiowide', 'Montserrat', sans-serif;
  --glass: linear-gradient(135deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 50%, rgba(255,255,255,.07) 100%);
  --glass-border: rgba(255,255,255,.14);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(255,255,255,.04), 0 12px 40px rgba(0,0,0,.35);
  --blur: 18px;
}

html { background: var(--fondo-html); }

/* --- Fondo líquido (visible en TODAS las páginas) --- */
.liquid-bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, var(--fondo-arriba) 0%, var(--fondo-abajo) 62%);
}
.liquid-blob {
  position: absolute; left: 0; top: 0;
  width: 64vmax; height: 64vmax;
  border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%;
  background: radial-gradient(circle at 35% 35%, rgba(var(--blob-rgb),.80) 0%, rgba(var(--red-rgb),.38) 45%, transparent 70%);
  opacity: .55;
  will-change: transform, border-radius;
  animation: liquid-drift-a 28s ease-in-out infinite alternate, liquid-morph 16s ease-in-out infinite;
}
.liquid-blob:nth-child(2) {
  left: auto; top: auto; right: -10vmax; bottom: -12vmax;
  width: 72vmax; height: 72vmax;
  background: radial-gradient(circle at 60% 40%, rgba(var(--blob2-rgb),.35) 0%, rgba(var(--red-dark-rgb),.35) 45%, transparent 70%);
  opacity: .5;
  animation: liquid-drift-b 34s ease-in-out infinite alternate, liquid-morph 20s ease-in-out -6s infinite;
}
.liquid-blob:nth-child(3) {
  left: 30%; top: 35%;
  width: 46vmax; height: 46vmax;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.14) 0%, rgba(var(--red-rgb),.22) 45%, transparent 70%);
  opacity: .6;
  animation: liquid-drift-c 40s ease-in-out infinite alternate, liquid-morph 24s ease-in-out -12s infinite;
}
@keyframes liquid-drift-a { 0% { transform: translate3d(-18vw,-18vh,0) rotate(0deg); } 100% { transform: translate3d(22vw,16vh,0) rotate(120deg); } }
@keyframes liquid-drift-b { 0% { transform: translate3d(8vw,6vh,0) rotate(0deg); }  100% { transform: translate3d(-26vw,-20vh,0) rotate(-110deg); } }
@keyframes liquid-drift-c { 0% { transform: translate3d(-22vw,12vh,0) scale(.9); }   100% { transform: translate3d(24vw,-16vh,0) scale(1.15); } }
@keyframes liquid-morph {
  0%,100% { border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%; }
  33%     { border-radius: 63% 37% 41% 59% / 55% 62% 38% 45%; }
  66%     { border-radius: 38% 62% 55% 45% / 62% 40% 60% 38%; }
}

/* --- Liquid glass en toda la web --- */
.site-header, .player-v2, .twitch-v2, .app-v2, .contact-card, .program-card, .schedule-col,
.audio-card, .map, .floating-player, .status-pill, .site-footer {
  background: var(--glass);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(170%);
  backdrop-filter: blur(var(--blur)) saturate(170%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.site-header { border-width: 0 0 1px; border-radius: 0; background: linear-gradient(180deg, rgba(20,20,24,.62), rgba(20,20,24,.38)); }
.site-footer { border-width: 1px 0 0; border-radius: 0; background: linear-gradient(180deg, rgba(10,10,12,.55), rgba(7,7,8,.85)); box-shadow: none; }
.section.alt {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border-block: 1px solid rgba(255,255,255,.08);
}
.hero, .page-head { background: linear-gradient(180deg, rgba(var(--red-rgb),.10) 0%, transparent 100%); border-bottom: 1px solid rgba(255,255,255,.08); }
.player-v2 { background: linear-gradient(145deg, rgba(var(--red-rgb),.20) 0%, rgba(255,255,255,.05) 55%, rgba(255,255,255,.04) 100%); border-color: rgba(var(--red-rgb),.35); }
.floating-player { background: linear-gradient(135deg, rgba(40,40,46,.72), rgba(24,24,28,.62)); }
.floating-player .mini-info .mini-title { background: transparent; }
.status-pill { box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }

/* brillo especular */
.player-v2::before, .twitch-v2::before, .app-v2::before, .contact-card::before, .program-card::before,
.schedule-col::before, .audio-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: linear-gradient(120deg, rgba(255,255,255,.14) 0%, transparent 32%, transparent 70%, rgba(255,255,255,.05) 100%);
}
.contact-card, .program-card, .schedule-col, .audio-card { position: relative; }
.player-v2 > *, .twitch-v2 > *, .app-v2 > * { position: relative; z-index: 2; }

/* botones y redes con vidrio */
.btn-ghost { background: rgba(255,255,255,.06); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-color: rgba(255,255,255,.22); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.btn-primary { background: linear-gradient(180deg, var(--red-light), var(--red) 60%, var(--red-dark)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 24px rgba(var(--red-rgb),.35); }
.social a { background: rgba(255,255,255,.07); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.nav-links a:hover { background: rgba(255,255,255,.10); }

/* --- Tipografía y distribución --- */
body { font-size: var(--font-size); line-height: 1.7; text-rendering: optimizeLegibility; font-kerning: normal; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: .04em; text-wrap: balance; overflow-wrap: break-word; }
p { text-wrap: pretty; }
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(44px, 6vw, 72px); }
.hero .eyebrow { letter-spacing: .22em; margin-bottom: 16px; }
.hero h1 { font-size: clamp(32px, 6.4vw, 64px); letter-spacing: .03em; line-height: 1.1; margin-bottom: 20px; }
.hero .lead { max-width: 60ch; line-height: 1.75; margin-bottom: 32px; }
.page-head { padding: clamp(44px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); }
.page-head h1 { font-size: clamp(28px, 5vw, 46px); letter-spacing: .04em; }
.page-head p { max-width: 62ch; margin-top: 14px; }
.section { padding: clamp(48px, 7vw, 84px) 0; }
.section-head { margin-bottom: clamp(24px, 4vw, 40px); }
.section-head h2 { font-size: clamp(22px, 3.6vw, 36px); letter-spacing: .05em; margin-bottom: 14px; }
.section-head p { max-width: 62ch; line-height: 1.7; }
.section .container > p { max-width: 70ch; margin: 0 0 1.1em; line-height: 1.8; }
.btn { letter-spacing: .08em; line-height: 1.2; }

.contact-card { padding: 26px; }
.contact-card h3 { margin: 0 0 14px; font-size: 15px; color: var(--red); text-transform: uppercase; letter-spacing: .08em; }
.contact-card a, .contact-card p { display: block; margin: 6px 0; color: #e8e8ec; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.contact-card a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.contact-grid { gap: 22px; }

.program-card .body { padding: 22px 24px 26px; gap: 12px; }
.program-card h3 { font-size: 18px; letter-spacing: .05em; }
.program-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.program-card .time { letter-spacing: .06em; line-height: 1.4; }
.tag { letter-spacing: .06em; line-height: 1.2; }
.schedule-col h3 { letter-spacing: .08em; }
.schedule-col li { line-height: 1.5; }
.audio-card .text { display: flex; flex-direction: column; gap: 2px; }
.audio-card .subtitle { font-size: 12.5px; color: var(--muted); }
.audio-card .title { letter-spacing: .04em; line-height: 1.3; }
.audio-card .play-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer; flex-shrink: 0; position: relative; z-index: 2; }
.footer-brand { letter-spacing: .06em; }
.footer-tag { max-width: 34ch; margin: 10px 0 18px; color: var(--muted); line-height: 1.65; }
.footer-col h4 { letter-spacing: .12em; }

/* --- Reproductor: pequeño cuando no suena, onda a todo el ancho al sonar --- */
.live-grid-v2 { align-items: center; }
.player-v2 { transition: padding .45s ease; }
.player-v2-visualizer {
  height: 180px; max-height: 180px; margin: 6px 0 28px;
  display: block; overflow: hidden;
  transition: max-height .5s ease, margin .5s ease, opacity .4s ease;
}
.player-v2-visualizer canvas { display: block; width: 100%; height: 100%; }
.player-v2.is-idle { padding: 22px 26px; }
.player-v2.is-idle .player-v2-header { margin-bottom: 16px; }
.player-v2.is-idle .player-v2-status { margin-bottom: 18px; }
.player-v2.is-idle .player-v2-visualizer { max-height: 0; margin: 0; opacity: 0; }
.player-v2.is-idle .play-btn-v2 { width: 60px; height: 60px; }
.play-btn-v2 { transition: width .4s ease, height .4s ease, transform .3s cubic-bezier(.175,.885,.32,1.275), box-shadow .3s; }
.player-v2-header h3, .twitch-v2-header h3, .app-v2-header h3 { letter-spacing: .05em; }

/* --- Carrusel infinito (transform en GPU, 60 fps) --- */
.staff-carousel {
  display: block; overflow: hidden; padding: 20px 0; cursor: default;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.staff-track {
  display: flex; width: max-content;
  animation: staff-scroll var(--staff-duration, 30s) linear infinite;
  will-change: transform; backface-visibility: hidden; transform: translate3d(0,0,0);
}
@media (hover: hover) { .staff-carousel:hover .staff-track { animation-play-state: paused; } }
.staff-carousel.is-held .staff-track { animation-play-state: paused; }
@keyframes staff-scroll { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
.staff-card {
  background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  border-color: rgba(255,255,255,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 30px rgba(0,0,0,.35);
  transition: none;
}
.staff-card .info { padding: 18px 16px 20px; }
.staff-card h3 { font-size: 16px; letter-spacing: .04em; margin-bottom: 6px; }
.staff-card p { font-family: "Montserrat", sans-serif; font-size: 13px; letter-spacing: .04em; margin: 0; }

/* --- Mapa grande --- */
.map { position: relative; height: clamp(420px, 68vh, 700px); padding: 0; overflow: hidden; border-radius: 24px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.map-open { margin-top: 18px; }

.is-leaving { opacity: 0; transform: translateY(8px); }
#pjax-container { transition: opacity .18s ease, transform .18s ease; }

@media (max-width: 600px) {
  .player-v2, .twitch-v2, .app-v2 { padding: 22px; }
  .player-v2-visualizer { height: 140px; max-height: 140px; }
  .map { height: 380px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .liquid-blob, .staff-track, .marquee-content { animation: none; }
}

/* --- Reproductor flotante compacto --- */
.floating-player {
  left: 50%; right: auto; bottom: 18px;
  width: min(400px, calc(100% - 24px));
  padding: 7px 8px 7px 18px;
  gap: 12px;
  transform: translate(-50%, 160%);
}
.floating-player.show { transform: translate(-50%, 0); }
.floating-player .mini-info { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.floating-player .mini-info .mini-title { font-size: 11px; letter-spacing: .1em; }
.floating-player .marquee-container { display: block; flex: none; width: 100%; }
.floating-player .marquee-text { font-size: 12px; padding-right: 36px; line-height: 1.4; }
.floating-player .marquee-content { animation-duration: 14s; }
.floating-player .mini-controls { gap: 10px; }
.floating-player .mini-play-btn { width: 38px; height: 38px; font-size: 13px; }
.floating-player .mini-vol { width: 56px; }
@media (max-width: 420px) { .floating-player .mini-vol { display: none; } }

/* --- Texto del reproductor: bucle infinito sin huecos (lo arma el JS) --- */
.marquee-content .marquee-text { min-width: 0; padding-right: 48px; }
.floating-player .marquee-content .marquee-text { padding-right: 36px; }
.brand .freq, .brand span > span { color: var(--red); }

/* --- Texto que no es título: blanco con borde negro (legibilidad) --- */
:root { --muted: var(--text); }
body {
  color: var(--text);
  -webkit-text-stroke: var(--contorno-ancho) var(--contorno-color);
  paint-order: stroke fill;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
/* los títulos conservan su estilo original */
h1, h2, h3, h4, .brand, .footer-brand, .mini-title, .brand * , .footer-brand *, h1 *, h2 *, h3 *, h4 * {
  -webkit-text-stroke: 0;
  paint-order: normal;
  text-shadow: none;
}
.nav-links a, .contact-card a, .contact-card p, .footer-col a, .footer-col p, .footer-tag, .footer-bottom,
.hero .eyebrow, .program-card .time, .program-card p, .staff-card p, .schedule-col li .hora, .schedule-col li .prog,
.audio-card .subtitle, .audio-card .title, .status-pill, .vol-meta, .vol-meta span:last-child, .tag, .btn,
.marquee-text, .floating-player .mini-info .marquee-text, .section-head p, .page-head p, .hero .lead {
  color: var(--text);
}
.nav-links a, .btn, .tag, .program-card .time, .hero .eyebrow, .vol-meta { -webkit-text-stroke-width: var(--contorno-fino); }

/* --- Página 404 --- */
.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.nf-code {
  font-family: var(--font-display); font-size: clamp(96px, 24vw, 240px); line-height: 1; margin: 0 0 8px;
  letter-spacing: .06em; color: var(--red); -webkit-text-stroke: 0; text-shadow: 0 0 60px rgba(var(--red-rgb),.55);
}
.notfound h1 { font-size: clamp(26px, 5vw, 44px); margin-bottom: 14px; }
.nf-text { max-width: 52ch; margin: 0 auto 28px; line-height: 1.7; }
.nf-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.notfound .container > .nf-code { font-size: clamp(88px, 20vw, 200px); line-height: 1; margin: 0 0 6px; max-width: none; }
.notfound .container > .nf-text { max-width: 52ch; margin: 0 auto 28px; }


/* ==========================================================================
   v3 — Twitch escalable, carrusel estable en móviles, optimización multiplataforma
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { overflow-x: clip; }
a, button, .btn, input { touch-action: manipulation; }
img { max-width: 100%; }

/* --- Twitch: siempre 16:9, ocupa el ancho de su tarjeta --- */
.player-v2, .twitch-v2, .app-v2 { min-width: 0; }
.twitch-v2-content { flex: 1; display: flex; align-items: center; min-width: 0; }
.twitch-v2-frame { position: relative; width: 100%; flex: none; aspect-ratio: 16 / 9; min-height: 0; }
.twitch-v2-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 980px) { .twitch-v2-frame { min-height: 0; } }

/* --- Carrusel: sin pausa "pegada" en táctiles, sin hover raro --- */
.staff-carousel { touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.staff-card { contain: layout paint; }
.staff-card .photo img { display: block; width: 100%; height: auto; -webkit-user-drag: none; pointer-events: none; }
@media (hover: none) { .staff-card:hover { transform: none; } }

/* --- Zonas seguras (iPhone con notch) y reproductor flotante --- */
.floating-player { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.footer-bottom { padding-bottom: 84px; }
.nav-toggle { min-width: 44px; min-height: 44px; }
.map { height: clamp(380px, 68vh, 700px); height: clamp(380px, 68svh, 700px); }

/* --- Tablets y móviles: menos efectos costosos --- */
@media (max-width: 820px) {
  :root { --blur: 10px; }
  .liquid-blob:nth-child(3) { display: none; }
  .liquid-blob { width: 90vmax; height: 90vmax; opacity: .5; }
  .staff-carousel {
    -webkit-mask-image: none; mask-image: none; /* la máscara + animación parpadea en iOS */
  }
  .hero h1 { overflow-wrap: anywhere; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .staff-card { flex-basis: 240px; }
  .btn { padding: 13px 20px; }
  .nf-actions .btn { width: 100%; max-width: 320px; }
  .player-v2, .twitch-v2, .app-v2 { border-radius: 20px; }
}
@media (hover: none) and (pointer: coarse) {
  .btn, .nav-links a, .tag { min-height: 40px; }
}

/* --- Control de volumen: bolita visible y fácil de tocar --- */
.player-v2-vol { max-width: 260px; }
.player-v2-vol input[type="range"], .mini-vol {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 36px; margin: 0; padding: 0;
  background: transparent; overflow: visible; outline: none; cursor: pointer;
  touch-action: pan-y; --fill: 100%;
}
.mini-vol { width: 80px; }
.floating-player .mini-vol { width: 80px; }
/* pista */
.player-v2-vol input[type="range"]::-webkit-slider-runnable-track, .mini-vol::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--red) 0, var(--red) var(--fill), rgba(255,255,255,.25) var(--fill));
}
.player-v2-vol input[type="range"]::-moz-range-track, .mini-vol::-moz-range-track {
  height: 8px; border-radius: 999px; background: rgba(255,255,255,.25);
}
.player-v2-vol input[type="range"]::-moz-range-progress, .mini-vol::-moz-range-progress {
  height: 8px; border-radius: 999px; background: var(--red);
}
/* bolita */
.player-v2-vol input[type="range"]::-webkit-slider-thumb, .mini-vol::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -7px; border-radius: 50%;
  background: #fff; border: 3px solid var(--red);
  box-shadow: 0 2px 8px rgba(0,0,0,.55), 0 0 0 0 rgba(var(--red-rgb),.35);
  transition: box-shadow .15s ease, transform .15s ease;
}
.player-v2-vol input[type="range"]::-moz-range-thumb, .mini-vol::-moz-range-thumb {
  box-sizing: border-box; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--red); box-shadow: 0 2px 8px rgba(0,0,0,.55);
}
.player-v2-vol input[type="range"]:hover::-webkit-slider-thumb, .mini-vol:hover::-webkit-slider-thumb { transform: scale(1.12); }
.player-v2-vol input[type="range"]:active::-webkit-slider-thumb, .mini-vol:active::-webkit-slider-thumb { box-shadow: 0 2px 8px rgba(0,0,0,.55), 0 0 0 9px rgba(var(--red-rgb),.3); }
.player-v2-vol input[type="range"]:focus-visible, .mini-vol:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 999px; }
@media (hover: none) and (pointer: coarse) {
  .player-v2-vol input[type="range"], .mini-vol { height: 44px; }
  .player-v2-vol input[type="range"]::-webkit-slider-thumb, .mini-vol::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -9px; }
}

/* --- Borde negro del texto: contorno con text-shadow (estable en móviles) ---
   -webkit-text-stroke se deforma en varios Android/iOS, así que se reemplaza. */
body, .nav-links a, .btn, .tag, .program-card .time, .hero .eyebrow, .vol-meta {
  -webkit-text-stroke: 0;
  paint-order: normal;
}
body {
  text-shadow:
    -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
    0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000, 1px 0 0 #000,
    0 2px 4px rgba(0,0,0,.55);
}
h1, h2, h3, h4, .brand, .footer-brand, .mini-title, .brand *, .footer-brand *, h1 *, h2 *, h3 *, h4 *,
.nf-code {
  -webkit-text-stroke: 0;
  text-shadow: none;
}
.nf-code { text-shadow: 0 0 60px rgba(var(--red-rgb),.55); }

/* Etiquetas y botones: texto centrado verticalmente aunque tengan altura mínima táctil */
.tag, .btn, .nav-links a { display: inline-flex; align-items: center; justify-content: center; }
.nav-links a { justify-content: flex-start; }


/* ==========================================================================
   Tarjeta «Descarga nuestra App» (junto al reproductor) y botón de Twitch
   ========================================================================== */
.live-grid-v2 { grid-template-columns: 1.4fr 1fr; align-items: stretch; }
.app-v2 { justify-content: center; align-items: flex-start; gap: 6px; }
.app-v2-header h3 span { color: var(--red); }
.app-v2-text { margin: 0 0 22px; color: var(--muted); line-height: 1.6; max-width: 420px; }
.app-v2 .btn { align-self: flex-start; }
.social a .social-twitch { width: 24px; height: 24px; display: block; }
@media (max-width: 980px) { .live-grid-v2 { grid-template-columns: 1fr; } }
