/* BREEG MASTER TEMPLATE - FM Ciudad 97.5 Edition */
:root {
  --color-base-hue: 90;
  --hue: var(--color-base-hue);

  --bg-primary: oklch(12% 0.03 var(--hue));
  --bg-secondary: oklch(18% 0.04 var(--hue));
  --bg-glass: oklch(from var(--bg-primary) l c h / 0.65);
  --text-main: oklch(96% 0.02 var(--hue));
  --text-soft: oklch(72% 0.04 var(--hue));
  --accent: oklch(82% 0.18 var(--hue));
  --border-color: oklch(26% 0.03 var(--hue));
  --input-bg: oklch(10% 0.02 var(--hue));

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;

  --max-page: 1480px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-speed: 0.3s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
  background: var(--bg-primary);
  color: var(--text-main);
  position: relative;
  overflow-x: hidden;
}

/* ===== FONDO PARALLAX ===== */
.parallax-bg {
  position: fixed;
  inset: 0;
  background-image: url('images/fondo.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  z-index: -2;
}

.parallax-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    oklch(10% 0.03 var(--hue) / 0.85) 0%,
    oklch(8% 0.02 var(--hue) / 0.92) 50%,
    oklch(6% 0.02 var(--hue) / 0.96) 100%
  );
  z-index: -1;
}

@media (max-width: 768px) {
  .parallax-bg { background-attachment: scroll; }
}

/* ===== TYPOGRAPHY ===== */
h1, h2 { margin: 0; font-weight: 900; text-transform: lowercase; letter-spacing: -0.04em; }
h1 { font-size: clamp(48px, 10vw, 120px); line-height: 0.9; }
h2 { font-size: clamp(36px, 6vw, 72px); line-height: 0.95; }
.text-soft { color: var(--text-soft); }

/* ===== LAYOUT ===== */
.container { max-width: var(--max-page); margin: 0 auto; padding: 0 clamp(20px, 3vw, 40px); position: relative; z-index: 1; }
.section { padding: clamp(60px, 8vw, 120px) 0; }

/* ===== NAVIGATION ===== */
.top-nav {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 1000; background: var(--bg-glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 6px; border-radius: 999px;
  border: 1px solid oklch(from var(--text-main) l c h / 0.1);
  display: flex; gap: 4px;
  box-shadow: 0 10px 30px oklch(0 0 0 / 0.3);
}
.nav-item {
  color: var(--text-main); text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; transition: all var(--transition-speed) var(--ease-out);
}
.nav-item:hover { background: oklch(from var(--text-main) l c h / 0.1); }
.nav-item.active { background: var(--accent); color: var(--bg-primary); }

/* ===== LIVE BADGE ===== */
.live-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: oklch(from var(--accent) l c h / 0.15); color: var(--accent);
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  margin-bottom: 20px;
}
.live-dot {
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ===== LOGO ===== */
.logo-wrapper { display: flex; justify-content: center; margin-bottom: 24px; }
.radio-logo {
  width: clamp(140px, 22vw, 220px);
  height: clamp(140px, 22vw, 220px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px oklch(from var(--accent) l c h / 0.2), 0 20px 50px oklch(0 0 0 / 0.5);
  animation: logoFloat 6s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== HERO ===== */
.hero {
  text-align: center; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.slogan { font-size: clamp(16px, 2.5vw, 22px); font-weight: 600; letter-spacing: 0.02em; margin-top: 8px; }

/* ===== PLAYER CARD MODERNO ===== */
.player-card {
  position: relative;
  background: oklch(14% 0.04 var(--hue) / 0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid oklch(from var(--accent) l c h / 0.25);
  border-radius: 24px;
  padding: 32px 36px;
  margin: 44px auto 0 auto;
  width: 100%; max-width: 560px;
  box-shadow:
    0 0 0 1px oklch(from var(--accent) l c h / 0.08),
    0 40px 80px -20px oklch(0 0 0 / 0.6),
    inset 0 1px 0 oklch(from var(--text-main) l c h / 0.06);
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease-out);
}

.player-card.is-playing {
  border-color: oklch(from var(--accent) l c h / 0.55);
  box-shadow:
    0 0 0 1px oklch(from var(--accent) l c h / 0.15),
    0 0 60px -10px oklch(from var(--accent) l c h / 0.2),
    0 40px 80px -20px oklch(0 0 0 / 0.6),
    inset 0 1px 0 oklch(from var(--text-main) l c h / 0.06);
}

/* Línea de acento superior */
.player-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  transition: opacity 0.4s;
}
.player-card.is-playing::before { opacity: 1; }

/* Layout principal del player */
.player-idle {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Anillo pulsante alrededor del botón */
.idle-pulse-ring {
  position: absolute;
  width: 74px; height: 74px;
  border-radius: 50%;
  border: 2px solid oklch(from var(--accent) l c h / 0.4);
  left: 36px;
  animation: ringPulse 2.5s ease-out infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.player-card.is-playing .idle-pulse-ring { opacity: 1; }

@keyframes ringPulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(1.7);  opacity: 0; }
}

/* Botón play principal */
.play-btn-big {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s var(--ease-out);
  box-shadow: 0 6px 24px oklch(from var(--accent) l c h / 0.45);
}
.play-btn-big:hover {
  transform: scale(1.07);
  box-shadow: 0 8px 32px oklch(from var(--accent) l c h / 0.65);
}
.play-btn-big:active { transform: scale(0.95); }

/* Texto al lado del botón */
.idle-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}
.idle-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 7px;
}
.idle-label::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulse 2s infinite;
}
.idle-sub {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
}

/* Visualizador de barras */
.player-bars {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 36px;
  margin-top: 20px;
}
.player-card.is-playing .player-bars { display: flex; }

.player-bars span {
  display: block;
  width: 5px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0.75;
  animation: barDance 0.9s ease-in-out infinite alternate;
  min-height: 4px;
}
.player-bars span:nth-child(1)  { height: 18px; animation-delay: 0.0s; }
.player-bars span:nth-child(2)  { height: 30px; animation-delay: 0.1s; }
.player-bars span:nth-child(3)  { height: 22px; animation-delay: 0.2s; }
.player-bars span:nth-child(4)  { height: 34px; animation-delay: 0.05s; }
.player-bars span:nth-child(5)  { height: 14px; animation-delay: 0.3s; }
.player-bars span:nth-child(6)  { height: 28px; animation-delay: 0.15s; }
.player-bars span:nth-child(7)  { height: 36px; animation-delay: 0.25s; }
.player-bars span:nth-child(8)  { height: 20px; animation-delay: 0.0s; }
.player-bars span:nth-child(9)  { height: 32px; animation-delay: 0.12s; }
.player-bars span:nth-child(10) { height: 16px; animation-delay: 0.35s; }
.player-bars span:nth-child(11) { height: 26px; animation-delay: 0.08s; }
.player-bars span:nth-child(12) { height: 36px; animation-delay: 0.2s; }
.player-bars span:nth-child(13) { height: 20px; animation-delay: 0.28s; }
.player-bars span:nth-child(14) { height: 30px; animation-delay: 0.04s; }
.player-bars span:nth-child(15) { height: 12px; animation-delay: 0.18s; }

@keyframes barDance {
  0%   { transform: scaleY(0.25); opacity: 0.4; }
  100% { transform: scaleY(1);    opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .player-bars span { animation: none; transform: scaleY(0.6); }
  .idle-pulse-ring  { animation: none; }
  .idle-label::before { animation: none; }
}

/* Loading */
.player-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--text-soft);
  font-size: 14px;
}
.loading-spinner {
  width: 18px; height: 18px;
  border: 2px solid oklch(from var(--accent) l c h / 0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== GRILLA COMPLETA SEMANAL ===== */
.programacion-section { text-align: center; }

.grilla-completa-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
  text-align: left;
}

.dia-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all var(--transition-speed) var(--ease-out);
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeUp 0.6s var(--ease-out) forwards;
}

.dia-card:hover {
  transform: translateY(-4px);
  border-color: oklch(from var(--accent) l c h / 0.5);
  box-shadow: 0 15px 35px -10px oklch(0 0 0 / 0.4);
}

.dia-card.hoy {
  border-color: var(--accent);
  box-shadow: 0 0 25px -5px oklch(from var(--accent) l c h / 0.25);
  background: oklch(from var(--bg-glass) l c h / 0.85);
}

.dia-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.dia-header h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  text-transform: capitalize;
}

.today-tag {
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 11px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.dia-programas {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.programa-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.programa-icon {
  font-size: 20px;
  background: oklch(from var(--accent) l c h / 0.1);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  border: 1px solid oklch(from var(--accent) l c h / 0.15);
}

.programa-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.programa-time {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.programa-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.programa-desc {
  font-size: 13px;
  line-height: 1.4;
  margin-top: 2px;
}

.programa-empty {
  font-size: 13px;
  font-style: italic;
  color: var(--text-soft);
  opacity: 0.7;
  margin: 6px 0;
}

@keyframes cardFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== SECCIÓN TIKTOK RESPONSIVE ===== */
.tiktok-section { text-align: center; }

.tiktok-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
  justify-items: center;
  width: 100%;
}

.tiktok-embed {
  margin: 0 !important;
  width: 100% !important;
  max-width: 325px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px oklch(0 0 0 / 0.4);
}

@media (max-width: 992px) {
  .tiktok-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .tiktok-grid { grid-template-columns: 1fr; }
}

/* ===== SECCIONES GENERALES ===== */
.redes-section, .contacto-section { text-align: center; }

/* ===== SOCIAL GRID ===== */
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 900px; margin: 40px auto 0; }
.social-card {
  display: flex; align-items: center; gap: 16px; background: var(--bg-glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 20px 24px;
  text-decoration: none; color: var(--text-main); transition: all var(--transition-speed) var(--ease-out); text-align: left;
}
.social-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 40px -15px oklch(from var(--accent) l c h / 0.4); }
.social-icon { width: 32px; height: 32px; flex-shrink: 0; color: var(--accent); }
.social-card strong { font-size: 16px; font-weight: 700; }

/* ===== BOTÓN WHATSAPP ===== */
.btn-whatsapp {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; margin-top: 32px;
  padding: 18px 36px; background: #25D366; color: #0a1a0f; font-weight: 800; font-size: 16px; text-decoration: none;
  border-radius: var(--radius-xl); transition: all var(--transition-speed) var(--ease-out); box-shadow: 0 10px 30px -10px oklch(0.7 0.2 145 / 0.6);
}
.btn-whatsapp:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 40px -10px oklch(0.7 0.2 145 / 0.8); }
.btn-whatsapp .social-icon { width: 24px; height: 24px; color: #0a1a0f; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border-color); padding: 40px 0; text-align: center; color: var(--text-soft); font-size: 14px; position: relative; z-index: 1; background: oklch(from var(--bg-primary) l c h / 0.8); backdrop-filter: blur(8px); }
.footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.footer a:hover { text-decoration: underline; }

/* ===== ANIMACIÓN DE ENTRADA ===== */
.section { opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s var(--ease-out) forwards; }
.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.25s; }
.section:nth-child(3) { animation-delay: 0.35s; }
.section:nth-child(4) { animation-delay: 0.45s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .top-nav { top: 12px; padding: 4px; gap: 2px; }
  .nav-item { font-size: 12px; padding: 6px 12px; }
  .grilla-completa-container { grid-template-columns: 1fr; }
  .social-card { padding: 16px 18px; }
  .btn-whatsapp { padding: 16px 28px; font-size: 15px; width: 100%; justify-content: center; }
}