/* Paleta de colores */
:root{
    --bg: #0d0d0f;
    --bg-soft:#151517;
    --panel:#f2d34c;
    --panel-ink:#171717;
    --ink:#eaeaea;
    --muted:#b9b9bd;
    --line:#2a2a2e;
    --radius: 16px;
    --gap: 22px;
}

/* ===========================
   CONTENIDO (Estilos de Radio)
   =========================== */

/* Contenedor global */
.wrap-radio{
  width: min(1200px, 92vw);
  margin-inline: auto;
  padding: 18px 0 60px;
}

/* --- ¡NUEVO! Barra de Filtro --- */
.filter-nav {
    background-color: var(--panel); /* Fondo amarillo */
    padding: 0 15px;
    border-radius: 8px;
    margin-top: 30px;
    margin-bottom: 30px;
}
.filter-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Para que sea responsivo */
    min-height: 50px;
}
.filter-item {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--panel-ink);
    text-decoration: none;
    padding: 15px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.filter-item.active {
    background-color: var(--panel); 
    color: black;
    font-weight: 700;
}
.filter-item:hover:not(.active) {
    background-color: rgba(227, 195, 9, 0.67);
}

/* Dropdown de filtro */
.filter-dropdown {
    position: relative;
}
.filter-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #f2d34c;
    border: 1px solid var(--line);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 8px 15px rgba(250, 237, 2, 0.3);
    z-index: 10;
}
.filter-dropdown:hover .filter-dropdown-content {
    display: block;
}
.filter-dropdown-content a {
    display: block;
    color: rgb(0, 0, 0);
    padding: 12px 15px;
    text-decoration: none;
}
.filter-dropdown-content a:hover {
    background-color: var(--border-color);
}

/* Formulario de Búsqueda */
.filter-search {
    display: flex;
    margin-left: auto; /* Empuja a la derecha */
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
}
.filter-search input {
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #333;
}
.filter-search input:focus {
    outline: none;
}
.filter-search button {
    background: #e0e0e0;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    color: #333;
}
.filter-search button:hover {
    background: #ccc;
}

/* Responsivo para el filtro */
@media (max-width: 992px) {
    .filter-search {
        margin-left: 0;
        width: 100%;
        margin: 10px 0;
    }
    .filter-search input {
        width: 100%;
    }
}


/* Header de SECCIÓN */
.header-radio{
  display:flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 16px;
  padding: 10px 0 20px;
  border-bottom: 4px solid var(--panel);
  margin-bottom: 8px;
}
.title-page{
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: .5px;
  text-align: left;
}

/* ===== Secciones ===== */
.section-block{ 
  --head-h: 60px;
  margin: 18px 0 26px;
}
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin: 0 0 16px;
}
.section-title{
  background: var(--panel);
  color: var(--panel-ink);
  font-weight: 900;
  padding: 0 24px;
  height: var(--head-h);
  display:flex;
  align-items:center;
  border-radius: 14px;
  margin: 0;
  letter-spacing: .4px;
}

/* Botón "Ver más" */
.sec-more{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: var(--head-h);
  padding: 0 26px;
  border-radius: 14px;
  background: var(--panel);
  color: var(--panel-ink);
  text-decoration:none;
  font-weight: 800;
  font-size: 1.12rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space: nowrap;
}
.sec-more:hover{ transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 22px rgba(0,0,0,.3); }
.sec-more:active{ transform: translateY(0); box-shadow: 0 4px 12px rgba(0,0,0,.22); }

@media (max-width: 640px){
  .sec-more{ font-size: 1.03rem; padding: 0 20px; }
  .section-head { 
      flex-direction: column; 
      align-items: flex-start; 
      gap: 10px;
  }
}

/* ===== Grid tarjetas (Para Recientes) ===== */
.news-grid-3x3 {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
@media (max-width: 980px){ .news-grid-3x3 { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 640px){ .news-grid-3x3 { grid-template-columns: 1fr; } }

/* ===== CARRUSEL (Para Estaciones) - CORREGIDO ===== */

.news-carousel {
  display: grid;
  grid-auto-flow: column;
  /* ¡CORRECCIÓN! Esto calcula 3 tarjetas perfectas */
  grid-auto-columns: calc((100% - (var(--gap) * 2)) / 3);
  gap: var(--gap);
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 10px 0; /* Sin padding lateral para alinear */
  margin: 0;
  scroll-snap-type: x mandatory;
}
.news-carousel::-webkit-scrollbar {
  display: none;
}
@media (max-width: 980px){ 
    .news-carousel{ 
        /* Muestra 2 tarjetas perfectas */
        grid-auto-columns: calc((100% - var(--gap)) / 2);
    } 
}
@media (max-width: 640px){ 
    .news-carousel{ 
        /* Muestra 1 tarjeta (con un pequeño margen) */
        grid-auto-columns: 90%; 
    } 
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: rgba(30, 30, 30, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.carousel-arrow:hover {
  background-color: var(--panel);
  color: var(--panel-ink);
  transform: translateY(-50%) scale(1.1);
}
.carousel-arrow.prev { left: -25px; }
.carousel-arrow.next { right: -25px; }

@media (max-width: 640px){
  .carousel-arrow { display: none; } /* Oculta flechas en móvil */
}

/* ===== Tarjeta ===== */
.card{
  background: #111113;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display:flex;
  flex-direction:column;
  min-height: 360px;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
  scroll-snap-align: start;
}
.news-carousel .card {
  flex-shrink: 0;
}
.card:hover{
  transform: translateY(-2px);
  border-color:#3a3a3f;
  box-shadow: 0 8px 26px rgba(0,0,0,.28);
}
.card__media{
  width:100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  overflow: hidden;
  display:block;
}
.card__media img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.card__body{ 
    padding: 14px 16px 10px; 
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}
.eyebrow{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.eyebrow__sep{ opacity:.45; }
.eyebrow__date{
  margin-left:auto;
  background: #1e1e22;
  color:#cfcfd4;
  padding:3px 8px;
  border-radius: 999px;
  font-size: 12px;
  border:1px solid #2a2a30;
}
.card__title{
  margin: 0 0 8px;
  font-size: clamp(18px, 2.6vw, 24px);
  line-height:1.15;
  font-weight: 850;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.card__title a{ color: var(--ink); text-decoration: none; }
.card__title a:hover{ text-decoration: underline; }
.card__excerpt{
  margin: 0 0 14px;
  color: #d3d3d7;
  font-size: clamp(14px, 2.2vw, 17px);
  line-height: 1.35;
  display:-webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:hidden;
  min-height: 3.9em;
  flex-grow: 1;
}
.card__chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding: 0 16px 16px;
  margin-top: auto;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  border:1px solid #3a3a3f;
  background: #1b1b1f;
  color:#d7d7db;
}
.chip--cat{
  background: var(--panel);
  color: var(--panel-ink);
  border-color: #d7b93a;
  font-weight: 700;
}
.chip--loc{
  background: #151519;
  color: #e3e3e8;
}

/* Separadores visuales */
.section-block + .section-block{
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
a:focus-visible, .card:focus-within{
  outline: 3px solid var(--panel);
  outline-offset: 2px;
  border-color: var(--panel);
}

/* Scrollbar eliminada para consistencia con el resto del sitio */



/* =========================================
   1. ESTILOS GENERALES (PC: Mouse y Teclado)
   ========================================= */

/* CONTENEDOR PRINCIPAL */
.carousel-container {
    position: relative;
    width: 100%;
    /* Dejamos 45px a los lados SIEMPRE para las flechas en PC */
    padding: 20px 45px; 
    box-sizing: border-box;
    overflow: hidden; 
}

/* EL RIEL (CARRUSEL) */
.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 15px 5px; /* Espacio para animación y sombra */
    scrollbar-width: none; 
}
.carousel::-webkit-scrollbar { display: none; } 

/* --- FLECHAS (Visibles por defecto) --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #fdd835;
    color: #000;
    font-size: 18px;
    cursor: pointer;
    z-index: 20; /* Encima de todo */
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    transition: transform 0.2s, background-color 0.2s;
}
.nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background-color: #ffd700;
}

/* POSICIÓN DE FLECHAS: Pegadas a los bordes del contenedor */
.left-btn { left: 5px; }
.right-btn { right: 5px; }


/* --- TARJETA Y ANIMACIONES (Estilo PC) --- */
.news-card {
    /* Ancho fijo base, pero flexible si la ventana es MINÚSCULA */
    width: 300px;
    min-width: 300px; 
    flex: 0 0 auto;
    background-color: #0d0d0d;
    border-radius: 16px;
    padding: 12px;
    border: 1px solid #1a1a1a;
    
    /* ANIMACIÓN */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

/* HOVER: Se activa con el mouse */
.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.6);
    border-color: #fdd835;
    z-index: 5;
}

.news-img {
    width: 100%; height: 160px; object-fit: cover;
    border-radius: 12px; margin-bottom: 12px;
}

/* --- ESTILOS INTERNOS (TEXTO Y BOTONES) --- */
.info-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px; padding: 0 4px;
}
.info-top span:first-child { color: #e6a345; font-size: 14px; font-weight: 800; text-transform: uppercase; }
.date-tag { background-color: #222; color: #bbb; font-size: 11px; padding: 4px 10px; border-radius: 12px; font-weight: 600; }
.news-card h2 { color: #fff; margin: 5px 0 10px 0; font-size: 18px; line-height: 1.3; }
.news-card p { color: #ccc; font-size: 14px; }

.tag-btn {
    border: none; padding: 8px 18px; border-radius: 20px;
    font-size: 13px; font-weight: 800; cursor: pointer; margin-right: 8px;
    transition: opacity 0.2s, transform 0.2s; text-transform: capitalize;
}
.tag-btn:hover { opacity: 0.9; transform: scale(1.05); }
.tag-btn:nth-of-type(1) { background-color: #fdd835; color: #000; }
.tag-btn.small { background-color: #2a2a2a; color: #fff; }


/* ====================================================================
   2. DETECCIÓN DE MÓVIL REAL (Touch Screen)
   Aquí ocurre la magia. Usamos 'pointer: coarse' que significa 
   "puntero grueso" (dedo), en lugar de medir el ancho de la pantalla.
   ==================================================================== */

@media (hover: none) and (pointer: coarse) {
    
    /* Contenedor se expande a full pantalla y quita el espacio de flechas */
    .carousel-container {
        width: 100vw !important;
        padding: 20px 0 !important; 
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
    }


    /* RIEL FLUIDO */
    .carousel {
        display: flex !important;
        gap: 15px !important;
        padding: 0 20px !important;
        scroll-snap-type: x mandatory; /* Efecto imán en el dedo */
    }

    /* TARJETA ADAPTABLE (SWIPE) */
    .news-card {
        /* Se hace gigante para llenar la pantalla del cel */
        min-width: 85vw !important; 
        width: 85vw !important;
        max-width: 85vw !important;
        
        scroll-snap-align: center;
        margin: 0 !important;
        transform: none !important; /* Sin animación hover en celular */
    }
}





/* Título: 3 líneas seguras */
.news-card h2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: calc(1.3em * 3); /* 3 líneas exactas */
}

/* Párrafo: 2 líneas seguras */
.news-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    min-height: calc(1.35em * 2); /* 2 líneas exactas */
}
/* Ajustes de líneas y espacio en móvil */
@media (hover: none) and (pointer: coarse) {

    /* Título responsive */
    .news-card h2 {
        -webkit-line-clamp: 3; /* ← número de líneas */
        min-height: calc(1.3em * 3); /* ← ajusta el espacio visual */
    }

    /* Párrafo responsive */
    .news-card p {
        -webkit-line-clamp: 2; /* ← número de líneas */
        min-height: calc(1.35em * 2); /* ← ajusta el espacio visual */
    }
}








/* ===========================
   CORRECCIÓN BANNER PUBLICIDAD
   =========================== */
/* Busca o agrega esta sección en tu CSS */

.publicidad {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 30px;
    display: block; /* Asegura que se comporte como bloque */
}

.publicidad img {
    width: 100% !important;   /* El !important fuerza a la imagen a estirarse */
    height: auto;             /* Mantiene la proporción para que no se vea aplastada */
    display: block;           /* Quita espacios extra debajo de la imagen */
    border-radius: 8px;       /* Para que coincida con las esquinas de tu barra amarilla */
}

.radio-destacadas{
    width: 100%;
    margin: 30px auto;
}

.radio-card-grande{
    background: #111;
    border-radius: 20px;
    padding: 30px;
}

.radio-buttons-grande{
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.radio-buttons-grande .radio-btn{
    background: transparent;
    border: none;
    cursor: pointer;
}

.radio-buttons-grande .radio-btn img{
    width: 220px;
    border-radius: 18px;
}

.radio-player-grande{
    display: flex;
    align-items: center;
    gap: 20px;
    background: #1c1c1c;
    padding: 25px;
    border-radius: 18px;
}

.radio-player-grande img{
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.play-toggle{
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    cursor: pointer;
    background: #f1c40f;
    color: black;
}

.radio-info h2{
    color: white;
    margin: 0;
}

.radio-info p{
    color: #ccc;
}

#radio-volume{
    margin-left: auto;
    width: 180px;
}

/* Eliminados estilos de footer redundantes para usar includes/footer.php */
