/* =========================================================
   La Regional 870 — Hoja de estilos principal
   Primario: #390e5e (morado) · Secundario: #F5B700 (dorado)
   ========================================================= */

:root {
  --purple-900: #1f0636;
  --purple-800: #2b0a47;
  --purple-700: #390e5e;
  --purple-500: #5d2a8c;
  --purple-300: #b58ae0;
  --gold-500: #f5b700;
  --gold-400: #ffc933;
  --live: #e8336d;

  --color-primary: var(--purple-700);
  --color-accent: var(--gold-500);
  --color-on-accent: var(--purple-900);
  --bg: #faf8fc;
  --surface: #ffffff;
  --surface-2: #f1ebf7;
  --text: #1d1428;
  --text-muted: #5b5068;
  --border: #e3d9ee;
  --heading: var(--purple-700);
  --link: var(--purple-500);
  --shadow: 0 10px 30px rgba(57, 14, 94, 0.12);
  --header-bg: rgba(255, 255, 255, 0.9);

  --radius: 18px;
  --radius-sm: 10px;
  --container: 1200px;
  --header-h: 72px;
  --mini-h: 68px;
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Modo oscuro: por preferencia del sistema (si el usuario no eligió) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120720;
    --surface: #1d0d30;
    --surface-2: #26123d;
    --text: #f3ecfa;
    --text-muted: #bfb1cf;
    --border: #3a2357;
    --heading: #ffffff;
    --link: var(--gold-400);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --header-bg: rgba(18, 7, 32, 0.88);
  }
}
/* Modo oscuro elegido manualmente */
:root[data-theme="dark"] {
  --bg: #120720;
  --surface: #1d0d30;
  --surface-2: #26123d;
  --text: #f3ecfa;
  --text-muted: #bfb1cf;
  --border: #3a2357;
  --heading: #ffffff;
  --link: var(--gold-400);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(18, 7, 32, 0.88);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding-bottom: var(--mini-h);
  transition: background-color .25s, color .25s;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--heading); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--color-accent); color: var(--color-on-accent); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }
.center { text-align: center; margin-top: 32px; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; fill: currentColor; }
.accent-text { color: var(--color-accent); display: block; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: transform .15s, background-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .9rem; }
.btn-lg { min-height: 54px; padding: 14px 30px; font-size: 1.1rem; }
.btn-accent { background: var(--color-accent); color: var(--color-on-accent); box-shadow: 0 6px 18px rgba(245, 183, 0, .35); }
.btn-accent:hover { background: var(--gold-400); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--purple-500); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }

/* Icono play/pause según estado */
.icon-pause { display: none; }
.is-playing .icon-play { display: none; }
.is-playing .icon-pause { display: inline; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 12px; }
.brand img { height: 54px; width: auto; border-radius: 10px; background: #fff; }
/* El logo PNG tiene fondo blanco: sobre fondos oscuros se muestra como placa redondeada */
:root[data-theme="dark"] .brand img { padding: 2px 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { padding: 2px 6px; } }
.header-actions { display: flex; align-items: center; gap: 4px; }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 10px 14px; border-radius: 999px; text-decoration: none;
  color: var(--text); font-weight: 600; font-size: .95rem;
}
.main-nav a:hover, .main-nav a.active { background: var(--surface-2); color: var(--heading); }
.main-nav a.active { box-shadow: inset 0 -3px 0 var(--color-accent); }

.menu-toggle { display: none; }
.burger, .burger::before, .burger::after {
  display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s, opacity .2s;
}
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .burger { background: transparent; }
.menu-toggle[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 959px) {
  .menu-toggle { display: inline-grid; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--surface);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    transform: translateY(-110%); visibility: hidden; transition: transform .3s, visibility .3s; z-index: -1;
  }
  .main-nav.open { transform: translateY(0); visibility: visible; }
  .main-nav ul { flex-direction: column; padding: 12px 16px 20px; }
  .main-nav a { padding: 14px 16px; font-size: 1.05rem; border-radius: var(--radius-sm); }
}
@media (max-width: 479px) {
  .header-actions .btn-label { display: none; }
  .header-actions .btn-sm { width: 44px; padding: 0; }
  .brand img { height: 46px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(88vh, 760px); display: flex; align-items: center; overflow: hidden;
  color: #fff; isolation: isolate;
  background: radial-gradient(ellipse at 20% 20%, var(--purple-500), transparent 60%),
              radial-gradient(ellipse at 90% 80%, rgba(245, 183, 0, .35), transparent 55%),
              var(--purple-900);
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0; transition: opacity .8s; }
.hero-video.ready { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(31, 6, 54, .92) 0%, rgba(57, 14, 94, .7) 50%, rgba(57, 14, 94, .35) 100%); }
.hero-content { padding-top: 64px; padding-bottom: 64px; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 7vw, 4.6rem); font-weight: 900; letter-spacing: -.02em; max-width: 14ch; }
.hero-lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 40ch; color: rgba(255, 255, 255, .88); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--color-accent); margin-bottom: 12px; }
.section .eyebrow { color: var(--link); }

.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(232, 51, 109, .7); animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 51, 109, .7); }
  70% { box-shadow: 0 0 0 10px rgba(232, 51, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 51, 109, 0); }
}

/* ---------- Secciones ---------- */
.section { padding: 72px 0; }
@media (min-width: 960px) { .section { padding: 96px 0; } }
.section-alt { background: var(--surface-2); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; }
.section-lead { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Reproductor ---------- */
.section-player { padding: 0 0 24px; margin-top: -56px; position: relative; z-index: 2; }
.section-player + .section { padding-top: 56px; }
.player-card {
  display: grid; gap: 24px; align-items: center; padding: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow);
}
@media (min-width: 720px) { .player-card { grid-template-columns: 240px 1fr; padding: 28px; gap: 36px; } }
.player-cover { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--purple-700); max-width: 320px; width: 100%; margin: 0 auto; }
.player-cover img { width: 100%; height: 100%; object-fit: contain; transition: opacity .4s; }
.player-cover img.is-art { object-fit: cover; }
.badge-live {
  position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0, 0, 0, .65); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .08em; padding: 6px 10px; border-radius: 999px;
}
.player-heading { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 8px; }
.track-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.4rem, 3.5vw, 2.1rem); line-height: 1.2; margin: 0 0 4px; color: var(--heading); overflow-wrap: anywhere; }
.track-artist { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 12px; }
.on-air-now { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-weight: 600; }
.player-controls { display: flex; align-items: center; gap: 20px; margin-top: 12px; flex-wrap: wrap; }
.player-status { min-height: 1.4em; font-size: .9rem; color: var(--text-muted); margin: 10px 0 0; }

.play-btn {
  position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 0;
  background: var(--color-accent); color: var(--color-on-accent); box-shadow: 0 8px 22px rgba(245, 183, 0, .45); transition: transform .15s;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn .icon { width: 30px; height: 30px; }
.play-btn-sm { width: 48px; height: 48px; box-shadow: none; }
.play-btn-sm .icon { width: 22px; height: 22px; }
.spinner { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--color-primary); animation: spin .9s linear infinite; display: none; }
.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.volume { display: flex; align-items: center; gap: 6px; }
.icon-mute { display: none; }
.is-muted .icon-volume { display: none; }
.is-muted .icon-mute { display: inline; }
.volume input[type="range"] { width: 130px; accent-color: var(--color-primary); }
:root[data-theme="dark"] .volume input[type="range"] { accent-color: var(--color-accent); }

.eq { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.eq span { width: 4px; height: 20%; background: var(--color-accent); border-radius: 2px; }
.is-playing .eq span { animation: eq 1s ease-in-out infinite; }
.eq span:nth-child(2) { animation-delay: -.3s; }
.eq span:nth-child(3) { animation-delay: -.6s; }
.eq span:nth-child(4) { animation-delay: -.15s; }
.eq span:nth-child(5) { animation-delay: -.45s; }
@keyframes eq { 0%, 100% { height: 20%; } 50% { height: 100%; } }

/* ---------- Mini reproductor ---------- */
.mini-player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--mini-h);
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: var(--purple-800); color: #fff; box-shadow: 0 -6px 20px rgba(0, 0, 0, .2);
}
.mini-player img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--purple-700); }
.mini-info { flex: 1; min-width: 0; }
.mini-info p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-title { font-weight: 700; font-family: var(--font-head); }
.mini-artist { font-size: .85rem; color: rgba(255, 255, 255, .75); }
.mini-player .spinner { border-top-color: #fff; }
@media (min-width: 960px) {
  .mini-player { left: auto; right: 24px; bottom: 24px; width: 380px; border-radius: 999px; padding: 10px 10px 10px 12px; }
  .mini-player img { border-radius: 50%; }
  body { padding-bottom: 0; }
}

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 16px; bottom: calc(var(--mini-h) + 16px); z-index: 41;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); transition: transform .15s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float .icon { width: 30px; height: 30px; }
@media (min-width: 960px) { .wa-float { bottom: 104px; right: 24px; } }

/* ---------- Locutores ---------- */
.hosts-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.host-card figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); height: 100%; transition: transform .25s; }
.host-card:hover figure { transform: translateY(-6px); }
.host-card img { aspect-ratio: 1; width: 100%; height: auto; object-fit: cover; transition: transform .5s; }
.host-card:hover img { transform: scale(1.05); }
.host-card figcaption { padding: 16px 18px 20px; position: relative; }
.host-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.host-time { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--text-muted); margin: 0; }
.on-air-tag {
  display: none; position: absolute; top: -16px; left: 16px; background: var(--live); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
.host-card.on-air figure { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent), var(--shadow); }
.host-card.on-air .on-air-tag { display: inline-block; }
.hosts-video { margin: 48px auto 0; max-width: 900px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.hosts-video video { width: 100%; }

/* ---------- Facebook ---------- */
.fb-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.fb-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 340px; }
.fb-media { position: relative; aspect-ratio: 4 / 3; background: var(--purple-800); overflow: hidden; }
.fb-media img, .fb-media video { width: 100%; height: 100%; object-fit: cover; }
.fb-media .fb-type { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.fb-media-empty { display: grid; place-items: center; height: 100%; }
.fb-media-empty img { width: 55%; height: auto; object-fit: contain; }
.fb-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.fb-date { font-size: .8rem; color: var(--text-muted); margin-bottom: 6px; }
.fb-text { margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fb-link { margin-top: auto; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.fb-link:hover { text-decoration: underline; }
.fb-empty { grid-column: 1 / -1; text-align: center; padding: 32px; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--border); color: var(--text-muted); }

.skeleton { position: relative; overflow: hidden; background: var(--surface); }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(181, 138, 224, .18), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- App ---------- */
.section-app { background: linear-gradient(135deg, var(--purple-900), var(--purple-700) 60%, var(--purple-500)); color: #fff; }
.section-app h2 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
.section-app .eyebrow { color: var(--color-accent); }
.section-app p { color: rgba(255, 255, 255, .88); font-size: 1.08rem; max-width: 46ch; }
.app-inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .app-inner { grid-template-columns: 1.3fr 1fr; } }
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.store-badges a { display: inline-block; border-radius: 10px; transition: transform .15s; }
.store-badges a:hover { transform: translateY(-3px); }
.store-badges img { height: 60px; width: auto; }
.store-badges a:first-child img { height: 81px; margin: -10px -6px; } /* el badge de Google trae margen transparente */
.app-visual { display: flex; justify-content: center; }
.phone {
  width: 220px; aspect-ratio: 9 / 18; border-radius: 36px; border: 8px solid #0d0418; background: linear-gradient(180deg, var(--purple-700), var(--purple-900));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; box-shadow: 0 30px 60px rgba(0, 0, 0, .4);
  transform: rotate(-6deg);
}
.phone img { width: 75%; background: #fff; border-radius: 14px; padding: 6px; }
.phone-play { width: 72px; height: 72px; border-radius: 50%; background: var(--color-accent); color: var(--color-on-accent); display: grid; place-items: center; }
.phone-play .icon { width: 30px; height: 30px; }
.phone span { font-family: var(--font-head); font-weight: 800; letter-spacing: .15em; font-size: .85rem; color: var(--color-accent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--purple-900); color: rgba(255, 255, 255, .82); padding: 64px 0 24px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--color-accent); }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand img { width: 160px; height: auto; margin-bottom: 12px; background: #fff; border-radius: 14px; padding: 6px 10px; }
.footer-title { color: var(--color-accent); font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-list li { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.social { display: flex; gap: 12px; }
.social a { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); transition: background-color .2s, transform .15s; }
.social a:hover { background: var(--color-accent); color: var(--color-on-accent); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; font-size: .9rem; text-align: center; }
.footer-bottom p { margin: 0; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

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