/* ========================================
   VARIABLES Y RESET
======================================== */
:root {
  --bg-primary: #fafbfc;
  --bg-secondary: #ffffff;
  --accent: #e63946;
  --accent-secondary: #1d3557;
  --text-primary: #1a1a2e;
  --text-secondary: #5a5a72;
  --border-color: #e0e0eb;
  --shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
  --pulse: 0 0 20px rgba(230, 57, 70, 0.3);
  --card-hover: #f8f9fa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   NAVEGACIÓN
======================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-secondary);
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  z-index: 1000;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--accent-secondary);
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* Offset para contenido debajo del nav */
main {
  padding-top: 110px;
}

/* ========================================
   HERO - CABECERA PRINCIPAL
======================================== */
.hero {
  text-align: center;
  padding: 120px 20px 80px;
  background: linear-gradient(135deg, #f0f4ff, #fff0f2);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, transparent 20%, rgba(230, 57, 70, 0.03) 100%);
  z-index: -1;
  animation: rotate 40s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.station-name {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--accent-secondary);
  letter-spacing: -0.5px;
}

.station-slogan {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 35px;
  font-weight: 400;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: white;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  animation: pulseRed 2s infinite;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
  margin-bottom: 50px;
  letter-spacing: 0.5px;
}

@keyframes pulseRed {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.live-badge i {
  margin-right: 10px;
  animation: beat 1s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ========================================
   REPRODUCTOR DE AUDIO
======================================== */
.player-card {
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 45px;
  text-align: center;
  box-shadow: var(--shadow);
  margin: 50px auto;
  max-width: 900px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  border: 1px solid var(--border-color);
}

.player-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.player-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary), var(--accent));
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.player-mode-toggle {
  display: inline-flex;
  background: rgba(29, 53, 87, 0.08);
  padding: 8px;
  border-radius: 50px;
  margin-bottom: 25px;
  border: 1px solid rgba(29, 53, 87, 0.15);
}

.mode-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s;
}

.mode-btn.active {
  background: var(--accent);
  color: white;
}

.song-info {
  margin: 30px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.artist {
  font-size: 1.15rem;
  color: var(--accent-secondary);
  margin-top: 8px;
  font-weight: 500;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 40px 0;
}

.btn {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: var(--bg-primary);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.btn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
  border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.25);
}

.btn.playing {
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.progress-container {
  background: var(--border-color);
  height: 12px;
  border-radius: 10px;
  margin: 30px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 10px;
  transition: width 0.2s;
}

.volume-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.volume-control i {
  font-size: 1.4rem;
  color: var(--text-secondary);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 220px;
  height: 10px;
  background: var(--border-color);
  border-radius: 10px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent);
  border: 2px solid white;
}

.visualizer {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 80px;
  margin: 30px auto;
  gap: 8px;
}

.bar {
  width: 10px;
  background: var(--accent);
  border-radius: 4px;
  animation: visualize 1s ease-in-out infinite alternate;
}

.bar:nth-child(1) { animation-delay: 0.1s; height: 25%; }
.bar:nth-child(2) { animation-delay: 0.2s; height: 45%; }
.bar:nth-child(3) { animation-delay: 0.3s; height: 65%; }
.bar:nth-child(4) { animation-delay: 0.4s; height: 85%; }
.bar:nth-child(5) { animation-delay: 0.5s; height: 55%; }
.bar:nth-child(6) { animation-delay: 0.6s; height: 75%; }
.bar:nth-child(7) { animation-delay: 0.7s; height: 35%; }
.bar:nth-child(8) { animation-delay: 0.8s; height: 70%; }

@keyframes visualize {
  0% { opacity: 0.6; transform: scaleY(0.6); }
  100% { opacity: 1; transform: scaleY(1.4); }
}

/* ========================================
   SECCIONES - TÍTULOS
======================================== */
.section-title {
  text-align: center;
  font-size: 2.4rem;
  margin: 80px 0 50px;
  color: var(--accent-secondary);
  position: relative;
  font-weight: 800;
}

.section-title::after {
  content: "";
  display: block;
  width: 100px;
  height: 4px;
  background: var(--accent);
  margin: 20px auto 0;
  border-radius: 2px;
}

/* ========================================
   PROGRAMAS
======================================== */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 35px;
  margin-bottom: 100px;
}

.program-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 35px 30px;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
  text-align: center;
  border: 1px solid var(--border-color);
}

.program-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
  background: var(--card-hover);
}

.program-icon {
  font-size: 3.5rem;
  color: var(--accent);
  margin-bottom: 25px;
  padding: 20px;
  background: rgba(230, 57, 70, 0.05);
  border-radius: 50%;
  display: inline-block;
  transition: all 0.3s;
}

.program-card:hover .program-icon {
  background: rgba(230, 57, 70, 0.1);
  transform: scale(1.05);
}

.program-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.program-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.6;
}

.program-time {
  font-size: 0.95rem;
  background: rgba(29, 53, 87, 0.08);
  color: var(--accent-secondary);
  padding: 8px 16px;
  border-radius: 50px;
  display: inline-block;
  font-weight: 600;
  border: 1px solid rgba(29, 53, 87, 0.15);
}

/* ========================================
   VIDEOS
======================================== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 35px;
  margin-bottom: 100px;
}

.video-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
  border: 1px solid var(--border-color);
}

.video-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  padding: 25px;
}

.video-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.3;
}

.video-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   ESTADÍSTICAS
======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin: 70px 0 100px;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
  border: 1px solid var(--border-color);
}

.stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.07);
}

.stat-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(230, 57, 70, 0.05);
  border-radius: 50%;
  display: inline-block;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  margin: 15px 0;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ========================================
   FOOTER
======================================== */
footer {
  background: var(--bg-secondary);
  padding: 80px 0 50px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  border-top: 1px solid var(--border-color);
}

.footer-logo {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-secondary);
  margin-bottom: 15px;
}

.footer-logo span {
  color: var(--accent);
}

.footer-slogan {
  max-width: 600px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

.footer-links {
  margin: 35px 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
}

.footer-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 6px 10px;
  border-radius: 6px;
}

.footer-links a:hover {
  color: var(--accent);
  background: rgba(230, 57, 70, 0.05);
}

.social-links {
  margin: 35px 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 0 10px;
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

.social-links a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.2);
}

.copyright {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.copyright a {
  color: var(--accent);
  text-decoration: none;
}

.copyright a:hover {
  text-decoration: underline;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
  .nav-links { gap: 15px; }
  .nav-links a { font-size: 0.95rem; padding: 6px 2px; }
  .station-name { font-size: 2.3rem; }
  .station-slogan { font-size: 1.1rem; }
  .player-card { padding: 30px 20px; }
  .btn { width: 65px; height: 65px; font-size: 1.4rem; }
  .volume-control { flex-wrap: wrap; gap: 15px; }
  input[type="range"] { width: 180px; }
  .section-title { font-size: 2rem; }
  .programs-grid, .videos-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  main { padding-top: 100px; }
  .hero { padding: 100px 20px 60px; }
  .station-name { font-size: 2rem; }
  .live-badge { padding: 8px 20px; font-size: 0.95rem; }
  .section-title { font-size: 1.8rem; margin: 60px 0 40px; }
  .program-card, .video-card, .stat-card { padding: 25px; }
}

/* ========================================
   VIDEOS.HTML - ESTILOS ESPECÍFICOS (ACTUALIZADO)
======================================== */
.video-preview {
  background: var(--bg-secondary);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
  border: 1px solid var(--border-color);
  cursor: pointer;
  position: relative;
}

.video-preview:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.video-preview img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.video-preview .play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(230, 57, 70, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-preview:hover .play-overlay {
  opacity: 1;
}

.play-overlay i {
  font-size: 3rem;
  color: var(--accent);
  background: white;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.video-info {
  padding: 25px;
}

.video-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.3;
}

.video-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* MODAL VIDEO PLAYER — ¡AHORA MÁS GRANDE Y RESPONSIVE! */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: 24px;
  width: 100%;
  max-width: 1200px; /* ¡Más grande! */
  max-height: 95vh;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: modalIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 30px 30px 20px;
  background: var(--accent-secondary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  max-width: 85%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  background: #000;
}

.modal-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.modal-footer {
  padding: 25px 30px;
  background: var(--bg-primary);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  border-top: 1px solid var(--border-color);
}

/* RESPONSIVE MODAL */
@media (max-width: 1024px) {
  .modal-content {
    max-width: 95%;
    border-radius: 20px;
  }
  .modal-header {
    padding: 25px 25px 15px;
  }
  .modal-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .modal-content {
    max-width: 98%;
    border-radius: 16px;
    max-height: 98vh;
  }
  .modal-header {
    padding: 20px;
  }
  .modal-title {
    font-size: 1.2rem;
  }
  .close-modal {
    font-size: 1.6rem;
    width: 42px;
    height: 42px;
  }
  .modal-footer {
    padding: 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 5px;
    border-radius: 12px;
  }
  .modal-header {
    padding: 15px;
  }
  .modal-title {
    font-size: 1.1rem;
  }
  .close-modal {
    font-size: 1.5rem;
  }
}

.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-modal[style*="display: flex"] {
  opacity: 1;
}

/* ========================================
   TV EN VIVO - ESTILOS INTEGRADOS
======================================== */
.live-tv-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #f8f9fa, #f0f4ff);
  position: relative;
}

.live-tv-card {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border-color);
  position: relative;
  transform: scale(1);
  will-change: transform;
}

.live-tv-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 25px 50px rgba(29, 53, 87, 0.15);
}

.live-tv-header {
  background: linear-gradient(135deg, var(--accent-secondary), #14263d);
  color: white;
  padding: 1.8rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.live-indicator {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  box-shadow: 0 0 16px var(--accent);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.live-tv-header h3 {
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0;
  letter-spacing: 0.5px;
  font-family: 'Segoe UI', sans-serif;
}

.live-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  background: #000;
  overflow: hidden;
  border-top: 1px solid rgba(29, 53, 87, 0.1);
}

.live-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.live-info {
  padding: 2.2rem;
  background: rgba(29, 53, 87, 0.03);
  border-top: 1px solid rgba(29, 53, 87, 0.05);
  position: relative;
  z-index: 1;
}

.live-info p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.live-info strong {
  color: var(--text-primary);
}

.fullscreen-btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  border-radius: 50px;
  background: var(--accent-secondary);
  color: white;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--accent-secondary);
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(29, 53, 87, 0.2);
}

.fullscreen-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(230, 57, 70, 0.4);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .live-tv-section {
    padding: 50px 0;
  }
  .live-tv-header {
    padding: 1.5rem;
  }
  .live-tv-header h3 {
    font-size: 1.3rem;
  }
  .live-info {
    padding: 1.8rem;
  }
}