/* =========================================
   VARIABLES Y RESETEO (ESTILO RED SOCIAL)
========================================= */
:root {
    --color-principal: #e63946; 
    --color-oscuro: #1d3557;
    --color-fondo-app: #f0f2f5; 
    --color-texto: #1c1e21;
    --blanco: #ffffff;
    --borde-suave: #e4e6eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--color-fondo-app);
    color: var(--color-texto);
    padding-bottom: 140px; 
}

a { text-decoration: none; color: inherit; }

/* =========================================
   HEADER
========================================= */
header {
    background-color: var(--color-oscuro);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1100px; /* Ancho completo en escritorio */
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Logo izquierda, menú derecha en escritorio */
    align-items: center;
    padding: 12px 20px;
}

.logo h1 { color: var(--blanco); font-size: 20px; font-weight: 900; }

nav ul { display: flex; gap: 20px; list-style: none; }
nav ul li a { color: var(--blanco); font-weight: bold; font-size: 14px; text-transform: uppercase; }

/* =========================================
   CONTENEDOR PRINCIPAL Y BANNER AL AIRE
========================================= */
.contenedor-principal {
    max-width: 1100px; /* Ancho para escritorio */
    margin: 25px auto;
    padding: 0 15px;
}

/* BANNER PRINCIPAL (ESCRITORIO) */
.al-aire-banner {
    background: var(--blanco);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--borde-suave);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.al-aire-info { flex: 2; text-align: left; }
.al-aire-info h2 { font-size: 13px; color: var(--color-principal); margin-bottom: 8px; text-transform: uppercase; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.pulso-rojo-inline { display: inline-block; width: 10px; height: 10px; background-color: #ff3b30; border-radius: 50%; animation: latir 1.5s infinite; }
.titulo-programa { font-size: 22px; font-weight: bold; color: var(--color-oscuro); line-height: 1.2; }

/* Foto y reproductor en el banner */
.al-aire-imagen img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.al-aire-reproductor { flex: 1; display: flex; justify-content: flex-end; }
.al-aire-reproductor audio { width: 100%; max-width: 300px; height: 45px; }


/* =========================================
   GRILLA DE NOTICIAS (ESCRITORIO)
========================================= */
.noticias-destacadas h2 {
    font-size: 20px;
    color: var(--color-oscuro);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-principal);
    display: inline-block;
}

.grilla-noticias { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 25px; 
}

/* Noticia destacada (Hero) */
.grilla-noticias article:first-child {
    grid-column: 1 / -1; 
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px;
    align-items: center;
}

.tarjeta-noticia {
    background: var(--blanco);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--borde-suave);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.tarjeta-noticia:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.1); }
.tarjeta-noticia img { width: 100%; height: 200px; object-fit: cover; }
.grilla-noticias article:first-child img { height: 100%; min-height: 350px; }

.contenido-tarjeta { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.fecha { font-size: 12px; color: #65676B; font-weight: 600; margin-bottom: 10px; text-transform: uppercase; }
.contenido-tarjeta h3 { font-size: 18px; line-height: 1.3; margin-bottom: 10px; color: #050505; }
.grilla-noticias article:first-child h3 { font-size: 28px; } 
.contenido-tarjeta p { font-size: 15px; color: #555; line-height: 1.5; margin-bottom: 20px; flex-grow: 1; }

.btn-leer-mas {
    display: block; text-align: center; background-color: var(--color-fondo-app);
    color: var(--color-oscuro); font-weight: bold; padding: 12px; border-radius: 8px;
    font-size: 14px; transition: background 0.2s; margin-top: auto; 
}
.btn-leer-mas:hover { background-color: #e4e6eb; }


/* =========================================
   REPRODUCTOR INFERIOR Y BOTONERA 
========================================= */
.reproductor-sticky {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background-color: var(--color-oscuro); color: var(--blanco);
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 15px; z-index: 99;
}

.info-aire { display: flex; align-items: center; gap: 12px; }
.pulso-rojo { width: 10px; height: 10px; background-color: #ff3b30; border-radius: 50%; animation: latir 1.5s infinite; }
@keyframes latir { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }
.nombre-programa-fijo { font-weight: bold; font-size: 14px; }

/* Botonera oculta por defecto en PC */
.app-bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%; height: 60px;
    background-color: var(--blanco); border-top: 1px solid var(--borde-suave);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); z-index: 1000;
}

.nav-item {
    flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
    color: #65676B; font-size: 11px; font-weight: 600; gap: 4px; transition: color 0.2s ease;
}
.nav-item.activo { color: var(--color-principal); }
.nav-item .icono svg { width: 22px; height: 22px; stroke: currentColor; }

/* REGLA CRUCIAL: Ocultar el reproductor de abajo en PC */
@media (min-width: 769px) {
    .solo-movil { display: none !important; }
}


/* =========================================
   COMPORTAMIENTO EN CELULARES (Mobile)
========================================= */
@media (max-width: 768px) {
    
    /* Header centrado y sin menú superior */
    .header-container { justify-content: center; }
    header nav { display: none; } 
    
    /* Contenedor angosto */
    .contenedor-principal { max-width: 600px; padding: 0 10px; margin-top: 15px;}
    
    /* Banner "Al Aire" (Se hace simple en celular porque el reproductor está abajo) */
    .al-aire-banner { flex-direction: column; text-align: center; padding: 15px; }
    .al-aire-info { text-align: center; }
    .al-aire-info h2 { justify-content: center; }
    .titulo-programa { font-size: 18px; }
    .al-aire-imagen, .al-aire-reproductor { display: none; } 

    /* Noticias estilo Feed de red social */
    .noticias-destacadas h2 { display: none; }
    .grilla-noticias { display: flex; flex-direction: column; gap: 15px; }
    .grilla-noticias article:first-child { grid-template-columns: 1fr; }
    .grilla-noticias article:first-child img { min-height: 250px; height: 250px;}
    .grilla-noticias article:first-child h3 { font-size: 22px; }
    .tarjeta-noticia img { height: 250px; }

    /* Mostramos la botonera y elevamos el reproductor flotante */
    .app-bottom-nav { display: flex; }
    
    .reproductor-sticky {
        bottom: 70px; 
        width: calc(100% - 20px);
        left: 10px;
        border-radius: 12px; 
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        padding: 8px 15px;
    }
    .controles-audio audio { height: 35px; width: 130px; } 
}
/* =========================================
   PÁGINA DE NOTICIA COMPLETA
========================================= */
.noticia-completa {
    background: var(--blanco);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--borde-suave);
    margin-bottom: 30px;
}

.noticia-header { margin-bottom: 25px; }

.noticia-header h1 {
    font-size: 34px;
    color: var(--color-oscuro);
    margin-bottom: 15px;
    line-height: 1.2;
}

.noticia-header .bajada {
    font-size: 19px;
    color: #555;
    font-style: italic;
    border-left: 4px solid var(--color-principal);
    padding-left: 15px;
    margin-top: 15px;
    line-height: 1.5;
}

.noticia-imagen img {
    width: 100%;
    max-height: 550px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.noticia-cuerpo {
    font-size: 18px;
    color: #333;
    line-height: 1.7;
}

/* El botón verde de WhatsApp */
.btn-whatsapp {
    display: inline-block;
    background-color: #25D366;
    color: white !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    margin-top: 40px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-whatsapp:hover { background-color: #128C7E; }

/* En celulares ajustamos para que se lea mejor y no tenga márgenes inútiles */
@media (max-width: 768px) {
    .noticia-completa {
        padding: 20px 15px;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--borde-suave);
        border-bottom: 1px solid var(--borde-suave);
    }
    .noticia-header h1 { font-size: 26px; }
    .noticia-header .bajada { font-size: 17px; }
    
    /* La foto se estira hasta los bordes del celular */
    .noticia-imagen img {
        border-radius: 0;
        margin-left: -15px;
        width: calc(100% + 30px);
        max-height: 300px;
        margin-bottom: 20px;
    }
    .noticia-cuerpo { font-size: 16px; }
}