/* =========================================================
   OndaHit — sistema de diseño completo
   ========================================================= */

:root {
  --bg: #0b0b0c;
  --surface: #161617;
  --surface-2: #1f1f21;
  --border: #2a2a2c;
  --red: #e4141e;
  --red-bright: #ff2a35;
  --red-dim: #7a0e14;
  --text: #f5f5f5;
  --text-muted: #a3a3a6;
  --player-h: 84px;
  --font-display: 'Anton', 'Archivo Black', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  padding-bottom: calc(var(--player-h) + 16px);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 11, 12, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 40px; width: auto; display: block; }

.nav-links { display: none; gap: 24px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a:hover { color: var(--text); }

.nav-live-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff; font-weight: 700; font-size: 13px;
  padding: 9px 16px; border-radius: 999px; border: none; cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.nav-live-btn:hover { background: var(--red-bright); }
.nav-live-btn:active { transform: scale(0.97); }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.75); } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.hero-eyebrow { font-family: var(--font-mono); color: var(--red); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(38px, 6vw, 68px); line-height: 0.98; margin: 0 0 18px; letter-spacing: 0.5px; }
.hero h1 span { color: var(--red); }
.hero p { color: var(--text-muted); font-size: 16px; max-width: 46ch; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  background: var(--red); color: #fff; border: none; font-weight: 700; font-size: 15px;
  padding: 14px 26px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { background: var(--red-bright); }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  font-weight: 600; font-size: 15px; padding: 14px 24px; border-radius: 999px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--red); color: var(--red-bright); }

.hero-wave { height: 220px; display: flex; align-items: center; justify-content: center; position: relative; }
.wave-bars { display: flex; align-items: center; gap: 6px; height: 160px; }
.wave-bars span { width: 8px; border-radius: 4px; background: linear-gradient(180deg, var(--red-bright), var(--red-dim)); animation: wave 1.2s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.section-title { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.3px; }
.section-title .accent { color: var(--red); }
.section-link { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.section-link:hover { color: var(--red-bright); }

/* ---------- Botón de preview (mp3) sobre carátulas ---------- */
.cover-wrap { position: relative; flex-shrink: 0; }
.play-preview-btn {
  position: absolute; bottom: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.95;
  transition: transform 0.15s ease, background 0.15s ease;
}
.play-preview-btn:hover { background: var(--red-bright); transform: scale(1.08); }
.play-preview-btn svg { width: 14px; height: 14px; }
.play-preview-btn.is-playing { background: var(--red-bright); }
.play-preview-btn .icon-pause { display: none; }
.play-preview-btn.is-playing .icon-play { display: none; }
.play-preview-btn.is-playing .icon-pause { display: block; }

/* ---------- TOP Onda de la Semana ---------- */
.top-onda-card {
  display: flex; gap: 22px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px;
}
.top-onda-cover { width: 140px; height: 168px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.top-onda-card .eyebrow { font-family: var(--font-mono); font-size: 11px; color: var(--red); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; }
.top-onda-card h3 { margin: 0 0 4px; font-size: 20px; }
.top-onda-card .artist { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.top-onda-card .note { color: var(--text-muted); font-size: 14px; line-height: 1.5; margin: 0; }
@media (max-width: 520px) {
  .top-onda-card { flex-direction: column; align-items: flex-start; }
  .top-onda-cover { width: 100%; height: 220px; }
}

/* ---------- Ranking ---------- */
.ranking-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.ranking-row {
  display: grid; grid-template-columns: 36px 52px 1fr auto; align-items: center; gap: 16px;
  padding: 12px 10px; border-bottom: 1px solid var(--border); border-radius: 8px;
  transition: background 0.15s ease; position: relative;
}
.ranking-row:hover { background: var(--surface); }
.ranking-pos { font-family: var(--font-display); font-size: 20px; color: var(--text-muted); }
.ranking-row:nth-child(-n+3) .ranking-pos { color: var(--red); }
.ranking-cover { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.ranking-row .cover-wrap .play-preview-btn { width: 28px; height: 28px; bottom: 2px; right: 2px; }
.ranking-row .cover-wrap .play-preview-btn svg { width: 11px; height: 11px; }
.ranking-info .title { font-weight: 700; font-size: 15px; }
.ranking-info .artist { color: var(--text-muted); font-size: 13px; }
.ranking-trend { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.disco-semana-tag { display: inline-block; font-family: var(--font-mono); font-size: 9px; color: var(--red-bright); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.listen-external-link { display: inline-block; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-decoration: underline; margin-top: 6px; }
.listen-external-link:hover { color: var(--red-bright); }

/* ---------- Noticias ---------- */
.news-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .news-grid { grid-template-columns: 1fr 1fr 1fr; } }
.news-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: border-color 0.15s ease, transform 0.15s ease;
}
.news-card:hover { border-color: var(--red); transform: translateY(-2px); }
.news-card img { width: 100%; height: 170px; object-fit: cover; background: var(--surface-2); }
.news-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-cat { font-family: var(--font-mono); font-size: 10px; color: var(--red); text-transform: uppercase; letter-spacing: 1.5px; }
.news-card h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.news-card p { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.5; flex: 1; }

.featured-card {
  display: grid; grid-template-columns: 1fr; gap: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 28px;
}
@media (min-width: 800px) { .featured-card { grid-template-columns: 1.1fr 1fr; } }
.featured-card img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; }
.featured-body { padding: 26px 26px 26px 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
@media (max-width: 799px) { .featured-body { padding: 0 20px 20px; } }
.featured-body h2 { font-family: var(--font-display); font-size: 28px; margin: 0; line-height: 1.05; }
.featured-body p { color: var(--text-muted); font-size: 15px; margin: 0; }

/* ---------- Banners ---------- */
.banner-slot { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.banner-slot img { width: 100%; display: block; max-height: 320px; object-fit: cover; }
.banner-hero { margin: 28px 0; }
.banner-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }

/* ---------- Programas + Banner sidebar (grid 2/3 + 1/3) ---------- */
.split-section-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: stretch; }
@media (max-width: 860px) { .split-section-grid { grid-template-columns: 1fr; } }

.split-programs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .split-programs-grid { grid-template-columns: 1fr; } }
.split-programs-grid .program-card { width: 100%; }
.split-programs-grid .program-card img { height: 130px; }

.split-sidebar { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.split-sidebar .banner-slot { flex: 1; min-height: 220px; }
.split-sidebar .banner-slot img { width: 100%; height: 100%; min-height: 220px; max-height: none; object-fit: cover; }

.program-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.program-card:hover { border-color: var(--red); transform: translateY(-2px); }
.program-card img { width: 100%; height: 140px; object-fit: cover; background: var(--surface-2); }
.program-card-body { padding: 14px 16px 18px; }
.program-card h3 { margin: 0 0 4px; font-size: 16px; }
.program-schedule { font-family: var(--font-mono); font-size: 11px; color: var(--red); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.program-host { color: var(--text-muted); font-size: 13px; }

.carousel-arrows { display: none; gap: 8px; }
@media (min-width: 700px) { .carousel-arrows { display: flex; } }
.carousel-arrow-btn {
  width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.carousel-arrow-btn:hover { border-color: var(--red); color: var(--red-bright); }

/* ---------- Videos: carrusel + popup ---------- */
.videos-carousel-wrap { position: relative; }
.videos-carousel { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; cursor: grab; user-select: none; }
.videos-carousel.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.videos-carousel::-webkit-scrollbar { display: none; }
.video-card {
  flex: 0 0 auto; width: 300px; scroll-snap-align: start; cursor: pointer; border-radius: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); transition: border-color 0.15s ease, transform 0.15s ease;
}
.video-card:hover { border-color: var(--red); transform: translateY(-2px); }
.video-thumb-wrap { position: relative; }
.video-thumb-wrap img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.video-play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.15); }
.video-play-overlay svg { width: 54px; height: 54px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }
.video-card-body { padding: 12px 14px 16px; }
.video-card h3 { margin: 0 0 2px; font-size: 15px; line-height: 1.3; }
.video-card .video-artist { color: var(--text-muted); font-size: 12.5px; }

.video-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.video-modal-overlay.is-open { display: flex; }
.video-modal-box { width: 100%; max-width: 900px; position: relative; }
.video-modal-close {
  position: absolute; top: -44px; right: 0; background: transparent; border: none; color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer; padding: 4px 10px;
}
.video-modal-close:hover { color: var(--red-bright); }
.video-modal-inner { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.video-modal-inner iframe, .video-modal-inner video { width: 100%; height: 100%; border: none; display: block; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 100px; color: var(--text-muted); font-size: 13px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.social-links { display: flex; gap: 14px; }
.social-links a { color: var(--text-muted); font-size: 13px; font-weight: 600; }
.social-links a:hover { color: var(--red-bright); }

/* =========================================================
   Reproductor flotante (persistente)
   ========================================================= */
.player-bar { position: fixed; left: 0; right: 0; bottom: 0; height: var(--player-h); background: var(--surface); border-top: 1px solid var(--border); z-index: 50; display: flex; align-items: center; }
.player-inner { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.player-play-btn {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; background: var(--red); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.player-play-btn:hover { background: var(--red-bright); }
.player-play-btn:active { transform: scale(0.94); }
.player-play-btn svg { width: 20px; height: 20px; }
.player-meta { min-width: 0; flex: 1; display: flex; align-items: center; gap: 12px; }
.player-eq { display: flex; align-items: flex-end; gap: 3px; height: 20px; flex-shrink: 0; }
.player-eq span { width: 3px; background: var(--red); border-radius: 2px; animation: wave 1s ease-in-out infinite; opacity: 0.4; }
.player-bar.is-playing .player-eq span { opacity: 1; }
.player-text { min-width: 0; }
.player-status { font-family: var(--font-mono); font-size: 10px; color: var(--red); text-transform: uppercase; letter-spacing: 1.5px; display: flex; align-items: center; gap: 6px; }
.player-now-playing { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-station { color: var(--text-muted); font-size: 12px; display: none; }
@media (min-width: 640px) { .player-station { display: block; } }
.player-volume { display: none; align-items: center; gap: 8px; }
@media (min-width: 560px) { .player-volume { display: flex; } }
.player-volume input[type="range"] { width: 90px; accent-color: var(--red); }

/* Utilities */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .wave-bars span, .player-eq span, .pulse-dot, .now-playing-eq span { animation: none; }
}

/* =========================================================
   Reproductor expandido (pantalla completa, estilo Spotify)
   ========================================================= */
.now-playing-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: linear-gradient(180deg, #1a0508 0%, var(--bg) 55%, #000 100%);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.now-playing-overlay.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }

.now-playing-inner {
  width: 100%; max-width: 420px; height: 100%; max-height: 780px;
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 28px 32px; box-sizing: border-box;
}

.now-playing-topbar { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.now-playing-close { background: transparent; border: none; color: var(--text); cursor: pointer; padding: 6px; display: flex; }
.now-playing-close:hover { color: var(--red-bright); }
.now-playing-eyebrow { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; }

.now-playing-cover-wrap { width: 100%; max-width: 320px; aspect-ratio: 1 / 1; margin: 12px 0 28px; }
.now-playing-cover { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; box-shadow: 0 20px 60px rgba(228,20,30,0.25), 0 8px 24px rgba(0,0,0,0.5); }

.now-playing-info { width: 100%; max-width: 320px; text-align: left; margin-bottom: 18px; }
.now-playing-status { font-family: var(--font-mono); font-size: 11px; color: var(--red); text-transform: uppercase; letter-spacing: 1.5px; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.now-playing-title { font-family: var(--font-display); font-size: 30px; line-height: 1.05; margin-bottom: 6px; }
.now-playing-subtitle { color: var(--text-muted); font-size: 15px; }

.now-playing-eq { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 44px; margin-bottom: 24px; }
.now-playing-eq span { width: 5px; border-radius: 3px; background: linear-gradient(180deg, var(--red-bright), var(--red-dim)); animation: wave 1.1s ease-in-out infinite; opacity: 0.3; }
.now-playing-overlay.is-open .now-playing-eq span { opacity: 1; }

.now-playing-controls { margin-bottom: 22px; }
.now-playing-play-btn {
  width: 76px; height: 76px; border-radius: 50%; background: var(--red); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 8px 24px rgba(228,20,30,0.4);
  transition: background 0.15s ease, transform 0.1s ease;
}
.now-playing-play-btn:hover { background: var(--red-bright); }
.now-playing-play-btn:active { transform: scale(0.95); }
.now-playing-play-btn svg { width: 30px; height: 30px; }

.now-playing-volume { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 220px; color: var(--text-muted); }
.now-playing-volume input[type="range"] { flex: 1; accent-color: var(--red); }
