/* Variables de color para fácil modificación */
:root {
    --color-pudahuel-rojo: #3A88D1;
    --color-texto-claro: #ffffff;
    --color-fondo-oscuro: #1a1a1a;
    --color-gris-claro: #f4f4f4;
}

/* Estilos Generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-gris-claro);
    color: var(--color-fondo-oscuro);
    /* Ajuste para el header fijo (60px) */
    padding-top: 60px; 
    /* Espacio para la barra de reproductor fija */
    padding-bottom: 80px; 
}

a {
    text-decoration: none;
    color: var(--color-pudahuel-rojo);
}

/* --- 1. BARRA DE NAVEGACIÓN (FIJA, 100% ANCHO, LOGO ALINEADO) --- */
.header {
    background-color: var(--color-pudahuel-rojo);
    color: var(--color-texto-claro);
    padding: 15px 0; 
    position: fixed; 
    top: 0;          
    left: 0;         
    width: 100%;     
    z-index: 1001;   
    display: flex; 
    justify-content: center; 
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* --- CONTENEDOR INTERNO PARA ALINEAR EL LOGO Y MENÚ --- */
.header-content {
    /* MISMO ANCHO QUE EL CARRUSEL */
    max-width: 900px; 
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%; 
}

/* tamaño del logo */
.logo-image {
    max-height: 70px; 
    width: auto;
    display: block;
}

.nav ul {
    list-style: none;
    display: flex;
}

.nav ul li {
    margin-left: 20px;
}

.nav ul li a {
    color: var(--color-texto-claro);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.3s;
}

.nav ul li a:hover {
    opacity: 0.8;
}

/* --- 2. REPRODUCTOR DE RADIO (Sticky) --- */
.player-bar {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--color-fondo-oscuro);
    color: var(--color-texto-claro);
    padding: 10px 5%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.player-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

#radio-audio {
    display: none; 
}

/* Estilos para el indicador EN VIVO en la barra inferior (CORREGIDO) */
.live-status {
    color: var(--color-pudahuel-rojo); 
    font-weight: 900;
    margin-right: 15px; 
    font-size: 1em; 
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Estilo del Botón de Play/Pausa */
.play-button {
    border: none;
    border-radius: 50%; 
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-right: 20px;
    transition: background-color 0.2s, transform 0.1s;
    flex-shrink: 0;
}

/* CLASES PARA EL ESTADO DEL BOTÓN (USADAS POR JS) */
.play-button.is-paused {
    background-color: var(--color-pudahuel-rojo);
    color: var(--color-texto-claro);
}

.play-button.is-playing {
    background-color: var(--color-texto-claro);
}

.play-button.is-playing #play-icon {
    color: var(--color-pudahuel-rojo);
}

#play-icon {
    font-size: 1.5em;
    line-height: 1;
    padding-left: 2px;
}

.current-track {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex; 
    align-items: baseline;
    font-size: 1.1em; 
    font-weight: 700;
}

.track-title {
    font-weight: 900;
    margin-right: 5px;
    color: var(--color-pudahuel-rojo); 
}

.track-artist {
    opacity: 0.8;
    font-weight: 400;
}

/* --- 3. CARRUSEL DE BANNERS Y CONTENEDOR PRINCIPAL --- */
.main-content {
    padding: 20px 5%;
    max-width: 900px; 
    margin: 0 auto; 
    position: relative; 
}

.carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%; 
    height: 300px; 
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.carousel-track {
    display: flex;
    width: 100%; 
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    width: 100%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end; 
    padding: 30px;
    color: var(--color-texto-claro);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* Estilos de Imágenes (VERIFICAR RUTAS) Y COLOR DE OPACIDAD DEL BANNER */
.slide-1 { 
    background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.1)), url('banner1.jpg'); 
}
.slide-2 { 
    background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.1)), url('banner2.jpg'); 
}
.slide-3 { 
    background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.1)), url('banner3.jpg'); 
}

.slide-4 { 
    background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.1)), url('banner4.jpg'); 
}


.slide-5 { 
    background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.1)), url('banner5.jpg'); 
}


/* tamaño letras dentro carrusel */
.slide-content h2 {
    font-size:2em; 
    margin-bottom: 5px;
    font-weight: 900;
    line-height: 1.1;
}

.slide-content p {
    font-size: 1em;
    font-weight: 700;
}

/* Botones de navegación del carrusel */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-texto-claro);
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    font-size: 1em;
    line-height: 1;
    border-radius: 50%;
    height: 30px;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.carousel-button:hover {
    background: var(--color-pudahuel-rojo);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

/* --- 4. SECCIÓN DE CONTENIDO ADICIONAL (Grid) --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
}

.grid-item {
    background-color: var(--color-texto-claro);
    border: 1px solid #ddd;
    border-top: 5px solid var(--color-pudahuel-rojo);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.grid-item h3 {
    color: var(--color-pudahuel-rojo);
    margin-bottom: 10px;
}

.grid-item a {
    color: var(--color-fondo-oscuro);
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    margin-top: 10px;
    color: var(--color-pudahuel-rojo);
}

/* --- FOOTER --- */
.footer {
    text-align: center;
    padding: 15px 5%;
    background-color: var(--color-fondo-oscuro);
    color: var(--color-texto-claro);
    font-size: 0.9em;
}

/* --- Media Query para Diseño Responsivo (Móviles) --- */
@media (max-width: 768px) {
    
    .header {
        padding: 10px 0;
    }
    
    .header-content {
        /* Mantiene la distribución en fila */
        flex-direction: row; 
        padding: 0 5%; 
    }

    body {
        padding-top: 60px; 
    }
    
    .logo-image {
        max-height: 30px; 
    }

    .nav ul {
        justify-content: center;
        width: 100%;
        padding: 5px 0;
    }

    .nav ul li {
        margin: 0 5px; 
    }

    .nav ul li a {
        font-size: 0.8em;
    }
    
    .carousel-container {
        height: 250px;
    }
    
    .slide-content h2 {
        font-size: 1.5em;
    }
    
    .player-bar {
        padding: 10px 3%;
    }

    .current-track {
        font-size: 0.9em;
    }
}