/* ------------------------------------------------ */
/* ⭐ CORRECCIÓN CLAVE PARA EL LAYOUT RESPONSIVE ⭐ */
/* Asegura que el padding y el border se incluyan dentro del width/height.
   Esto resuelve el desbordamiento horizontal en móviles para .caja-info. */
/* ------------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; 
    color: #fff;
    line-height: 1.6;

    /* --- ESTILOS PARA LA IMAGEN DE FONDO --- */
    background-image: url('https://rock.504.es/logos/banda.jpg');
    background-size: cover; 
    background-attachment: fixed; 
    background-position: center center; 
    background-repeat: no-repeat; 
}

/* --- ESTILOS DEL ENCABEZADO (HEADER) --- */
header {
    background-color: none;
    color: black;
    padding: 15px 0;
    text-align: center;
}

header h1 {
    margin-bottom: 5px; 
    font-size: 2.2em;
}

header h2 {
    margin-top: 5px; 
    font-size: 1.1em;
    font-weight: normal; 
}

/* --- ESTILOS PARA EL RÓTULO DE AVISOS --- */
.aviso-ticker-contenedor {
    width: 100%;
    overflow: hidden; 
    background-color: none; 
    color: #000000; 
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    white-space: nowrap; 
    margin-bottom: 20px;
}

#aviso-ticker-scroll {
    display: inline-block;
    animation: marquee 700s linear infinite; 
    animation-delay: -345s; 
}

#aviso-ticker-scroll p {
    display: inline;
    margin: 0;
    padding: 0 50px 0 0; 
    font-weight: bold;
    font-size: 1.1em;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* --- AJUSTES PARA EL INDICADOR DE 'EN VIVO' Y REPRODUCTOR --- */

.indicador-vivo {
    width: 100%; 
    text-align: center; 
    margin-top: 0px; 
    padding-bottom: 0px; 
}

.indicador-vivo .img-vivo {
    max-width: 100%; 
    height: auto;
    border-radius: 4px; 
}

.reproductor {
    width: 100%; 
    box-sizing: border-box;
    padding: 0 5px; 
}

.reproductor iframe {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: -10px;
}

/* ------------------------------------------------ */
/* ⭐ ESTILOS DE ESTRUCTURA PRINCIPAL (CORREGIDOS) ⭐ */
/* ------------------------------------------------ */
.contenedor-principal {
    display: flex;
    flex-wrap: wrap; 
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    gap: 20px; 
}

.columna-info {
    /* Fijo: Columna izquierda de 300px. No cambia de tamaño. */
    flex: 0 0 300px; /* No crecer, no encoger, base 300px */
    order: 1; 
    width: 300px; 
}

.columna-chat {
    /* Ocupa el espacio restante al lado de la columna-info */
    flex: 1; /* Permite crecer y llenar el espacio disponible */
    order: 2; 
    /* Se eliminó: width: 100%; ya que forzaba el salto de línea. */
}
/* ------------------------------------------------ */
/* ⭐ FIN ESTILOS DE ESTRUCTURA PRINCIPAL ⭐ */
/* ------------------------------------------------ */

h2 {
    color: #d0e7ff;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
}

/* Estilos para el banner en la columna de chat */
.banner-chat {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 20px;
    padding: 10px 0;
    background-color: none; 
    border-radius: 8px;
}

.banner-chat a {
    display: block; 
    flex-grow: 1; 
    text-align: center; 
    margin: 0 5px; 
}

.banner-chat .img-banner {
    max-width: 100%; 
    height: auto;
    max-height: 200px; 
    border-radius: 5px;
    transition: transform 0.2s; 
}

.banner-chat .img-banner:hover {
    transform: scale(1.05); 
}

/* --- Estilos para el Logo de la Radio --- */
.logo-radio {
    display: block; 
    width: 100%; 
    max-width: 300px; 
    height: auto;
    margin: 0 auto 20px auto; 
    border-radius: 10px; 
    box-shadow: none;
}

.imagen-centrada {
    /* 1. Reducción de Tamaño */
    width: 50%; /* Establece el ancho al 50% del contenedor padre */
    height: auto; /* Mantiene la proporción original de la imagen */
    display: block; /* Necesario para que 'margin: 0 auto;' funcione */

    /* 2. Centrado Horizontal */
    margin-left: auto;
    margin-right: auto;
    /* Shorthand: margin: 0 auto; */
}

/* --- Estilo del Botón Flotante/General --- */

.btn-flotante, .btn-reset, #enviar-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none; 
}

.btn-flotante {
    background-color: #ff9900; 
    color: white;
}

.btn-flotante:hover {
    background-color: #e68a00;
}

.btn-reset {
    background-color: #dc3545; 
    color: white;
    margin-bottom: 15px;
}

.btn-reset:hover {
    background-color: #c82333;
}

/* --- ESTILOS PARA EL BOTÓN Y MODAL DE ADMINISTRACIÓN --- */

.img-admin-btn {
    width: 95%; 
    height: auto;
    cursor: pointer; 
    margin: 15px auto; 
    display: block; 
    transition: transform 0.1s ease-in-out;
}

.img-admin-btn:hover {
    transform: scale(1.02); 
}

.admin-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-top: 20px;
}

.admin-btn {
    padding: 15px 10px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    text-decoration: none; 
    transition: background-color 0.2s;
    display: flex; 
    align-items: center;
    justify-content: center;
    min-height: 45px;
}

.btn-action {
    background-color: #007bff; 
    color: white;
}

.btn-action:hover {
    background-color: #0056b3;
}

#btn-cerrar-admin {
    grid-column: 1 / span 2; 
    margin-top: 10px;
}

/* --- Estilos de Redes Sociales (Botones) --- */

.contenedor-botones {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    margin-top: 10px;
}

.social-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    color: white;
    font-size: 1.5em; 
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.whatsapp { background-color: #25D366; }
.telegram { background-color: #0088cc; }
.facebook { background-color: #1877F2; }
.twitter { background-color: #1DA1F2; }
.instagram { background-image: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }

.nota-social {
    text-align: center;
    font-style: italic;
    font-size: 0.9em;
    margin-top: 15px;
    border-top: 1px dashed #eee;
    padding-top: 10px;
    color: #666;
}

.titulo-compartir {
    margin-top: 30px; 
}

.caja-info {
    background-color: transparent;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 8px;
    text-align: left; 
}

/* --- ESTILOS PARA LA LISTA DE GANADORES --- */
#ganadores-ul {
    list-style-type: none; 
    padding: 0;
    
    /* ⭐ PROPIEDADES CLAVE PARA EL SCROLL VERTICAL ⭐ */
    max-height: 200px; /* Altura máxima para la lista de ganadores (puedes ajustar el valor) */
    overflow-y: auto;  /* Habilita el desplazamiento vertical */
    padding-right: 5px; /* Pequeño padding para la barra de scroll */
}

/* Opcional: Estilos para personalizar la barra de desplazamiento (solo Webkit) */
#ganadores-ul::-webkit-scrollbar {
    width: 6px;
}

#ganadores-ul::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* --- Estilos del Chat --- */
.caja-mensajes {
    height: 500px;
    background-color: none;
    border: 1px solid #ccc;
    padding: 15px;
    overflow-y: scroll;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.mensaje {
    /* Mantiene tus estilos actuales y añade el puntero y la transición */
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
    background-color: none;
    word-wrap: break-word;
    cursor: pointer; 
    transition: background-color 0.15s ease-in-out; 
}

/* 🌟 Clase para el efecto al pasar el cursor (HOVER) 🌟 */
.mensaje:hover {
    background-color: #f0f0f0; /* Gris claro sutil para el resaltado, ¡puedes cambiarlo! */
}

/* Clase que resalta el mensaje al hacer clic (PERSISTENTE) */
.mensaje-seleccionado {
    background-color: #d0e7ff !important; /* Azul claro para la selección */
    border: 1px solid #007bff; 
}

/* 🌟 Clase para el mensaje seleccionado 🌟 */
.mensaje-seleccionado {
    background-color: #d0e7ff !important; /* Color de fondo claro para resaltarlo, ¡puedes cambiarlo! */
    border: 1px solid #007bff; /* Borde para más énfasis */
    font-weight: bold; /* Opcional: poner el texto en negrita */
}

.mensaje strong {
    color: #007bff;
}

.area-envio textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    resize: none; 
}

.opciones-enriquecimiento {
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
    margin-bottom: 10px;
}

.opciones-enriquecimiento button,
.opciones-enriquecimiento select {
    width: auto;
    padding: 5px 10px;
    margin-right: 5px;
    margin-bottom: 5px; 
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    cursor: pointer;
}

#enviar-btn {
    width: 100%;
    padding: 10px;
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 0; 
}

#enviar-btn:hover {
    background-color: #218838;
}

/* --- Estilos para el Botón y Modal de Reset --- */
.btn-reset {
    display: block;
    width: 90%;
    margin: 20px auto 10px auto;
    padding: 10px;
    background-color: #ffc107; 
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-reset:hover {
    background-color: #e0a800;
}

#btn-confirmar-reset.btn-peligro {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #dc3545; 
    color: white;
    font-size: 1em;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s;
}

#btn-confirmar-reset.btn-peligro:hover {
    background-color: #c82333;
}

#btn-cancelar-reset.btn-cancelar {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f8f9fa; 
    color: #333;
    font-size: 1em;
    cursor: pointer;
    margin-top: 5px;
    transition: background-color 0.3s;
}

#btn-cancelar-reset.btn-cancelar:hover {
    background-color: #e2e6ea;
}

/* --- ESTILOS GENERALES DE TODAS LAS MODALES (Overlay) --- */

.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); 
    overflow: auto; 
}

/* Estilos de CONTENIDO de modales generales (Registro, Reset, Admin, Imagen) */
.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 90%; 
    max-width: 400px; 
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: fixed; 
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
}

/* Estilos específicos para el formulario de Registro/Reset */
.modal-content.formulario-moderno {
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    background-color: #f9f9f9;
    text-align: center;
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.input-group i {
    color: #007bff;
    margin-right: 15px;
    font-size: 1.2em;
}

.input-group input {
    flex-grow: 1;
    border: none;
    padding: 5px 0;
    font-size: 1em;
    outline: none; 
    background: transparent;
}

#btn-registrar {
    background-color: #28a745; 
    color: white;
    font-size: 1.1em;
    margin-top: 20px;
}

#btn-registrar:hover {
    background-color: #218838;
}

.mensaje-error {
    color: #dc3545; 
    font-size: 0.85em;
    margin-top: -10px;
    margin-bottom: 10px;
    display: block;
    height: 18px; 
    text-align: left;
    padding-left: 20px;
}

/* --- ESTILOS PARA EL MODAL DE IMAGEN --- */
#modalImage {
    max-width: 100%;
    height: auto;
    display: block; 
    margin-bottom: 20px; 
    border-radius: 5px;
}

.modal-banner {
    width: 100%; 
    text-align: center;
    padding-top: 10px; 
    border-top: 1px solid #eee; 
}

.modal-banner img {
    max-width: 100%;
    height: auto;
    display: block; 
    margin: 0 auto; 
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001; 
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.contenedor-logos-patrocinadores {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    align-items: center;
    padding: 10px 0;
    border: 1px solid #eee;
    border-radius: 6px;
    min-height: 70px;
}

.contenedor-logos-patrocinadores img {
    max-height: 80px; 
    width: auto; 
    max-width: 150px; 
    margin: 0 10px; 
    object-fit: contain; 
}


/* ------------------------------------------------ */
/* ⭐ ESTILOS CORREGIDOS DE LA MODAL DEL REPRODUCTOR (miModal) ⭐ */
/* ------------------------------------------------ */

/* Contenedor principal de la modal (overlay) */
#miModal {
    overflow: hidden; 
}

/* Contenido de la Modal - La caja central (CLAVE DEL TAMAÑO Y POSICIÓN) */
#miModal .modal-contenido {
    background-color: #fefefe;
    padding: 0; 
    border: 1px solid #888;
    
    /* REGLAS CLAVE: Tamaño fijo para todas las resoluciones */
    width: 90%;             
    max-width: 250px;       
    min-width: 200px;
    height: auto;           
    
    border-radius: 8px;
    
    /* CLAVE PARA LA POSICIÓN Y ARRASTRE */
    position: fixed;        
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    cursor: default; 
    box-sizing: border-box; 
}

/* Encabezado de la modal para arrastrar (Drag Handle) */
#miModal .modal-header {
    padding: 5px 10px; 
    background-color: #f1f1f1; 
    border-bottom: 1px solid #ddd;
    cursor: grab; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin: 0; 
}

#miModal .modal-header h4 {
    margin: 0;
    font-size: 0.9em; 
    color: #333;
}

/* Botón de cerrar 'x' */
#miModal .cerrar {
    color: #888;
    font-size: 20px; 
    font-weight: bold;
    cursor: pointer;
    line-height: 1; 
}

/* Contenido del reproductor */
#miModal .reproductor-contenedor {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px; 
}

/* Estilo para el logo sobre el reproductor */
#miModal .logo-reproductor {
    width: 120px; 
    height: auto;
    margin-bottom: 8px;
    display: block;
    border-radius: 4px;
}

/* Estilo para el control de audio */
#miModal .reproductor-contenedor audio {
    width: 100%;
    max-width: 230px; 
}

/* ------------------------------------------------ */
/* --- FIN DE ESTILOS MODAL REPRODUCTOR --- */
/* ------------------------------------------------ */

/* Nuevos estilos para el Libro de Visitas */
.header-libro-visitas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header-libro-visitas h3 {
    margin: 0;
    color: #333; 
    font-size: 1.1em;
}

.btn-firma {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 65px; 
    height: 65px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-firma:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.visita-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
    transition: background-color 0.2s;
}

.visita-item:hover {
    background-color: #f9f9f9;
}

.divisor {
    border-top: 1px solid #eee;
    margin: 15px 0;
}

/* Ajuste para el modal pequeño de comentario */
.small-modal {
    max-width: 450px !important;
}

/* --- ESTILOS PARA LA LISTA DEL LIBRO DE VISITAS --- */
#visitas-ul {
    /* Mantiene tus estilos base */
    list-style-type: none; 
    padding: 0;
    
    /* ⭐ PROPIEDADES CLAVE PARA LA BARRA DE DESPLAZAMIENTO ⭐ */
    max-height: 300px; /* Define la altura máxima de la lista antes de que aparezca el scroll */
    overflow-y: auto;  /* Asegura que aparezca el scroll vertical si el contenido excede la altura */
    padding-right: 5px; /* Pequeño padding para que la barra de scroll no toque los ítems */
}

/* Opcional: Estilos para personalizar la barra de desplazamiento (solo funciona en Webkit/Chrome/Safari) */
#visitas-ul::-webkit-scrollbar {
    width: 6px;
}

#visitas-ul::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}


/* ------------------------------------------------ */
/* ⭐ MEDIA QUERIES (RESPONSIVE DESIGN) AJUSTADOS ⭐ */
/* ------------------------------------------------ */

/* Eliminada la media query intermedia (max-width: 1000px) para mantener 
   la doble columna hasta resoluciones pequeñas. */

@media (max-width: 768px) {
    
    /* AJUSTE PRINCIPAL: Columnas se apilan */
    .contenedor-principal {
        flex-direction: column;
        padding: 0 10px; 
        margin-top: 10px;
        gap: 15px; /* Reducimos el espacio un poco */
    }
    
    .columna-info, 
    #seccion-libro-visitas, /* Aplicamos el mismo estilo que columna-chat */
    .columna-chat {
        width: 100%;
        max-width: none; /* Quitamos el max-width para que ocupe todo */
        margin-right: 0;
        margin-bottom: 0; 
        order: initial !important; /* Deshace el orden para que sigan el flujo HTML */
    }
    
    header h1 {
        font-size: 1.8em;
    }
    header h2 {
        font-size: 1em;
    }

    .logo-radio {
        max-width: 300px; 
    }
    .btn-reset {
        width: 100%;
    }
    
    /* AJUSTE: Banners del chat para móvil */
    .banner-chat {
        flex-wrap: wrap; 
        justify-content: space-evenly; 
    }

    .banner-chat a {
        width: calc(33.33% - 10px); 
        margin: 5px 5px; 
    }

    .banner-chat .img-banner {
        max-height: 100px; 
    }

    /* Regla adicional para asegurar 2 banners por fila en pantallas muy pequeñas */
    @media (max-width: 480px) {
        .banner-chat a {
            width: calc(50% - 10px); 
        }
    }

    /* Ajuste de modal y botones */
    .modal-content.formulario-moderno,
    .modal-content {
        width: 95%;
        padding: 15px;
        box-sizing: border-box;
    }
    
    .close-button {
        top: 5px;
        right: 15px;
        font-size: 30px;
    }
    
    .caja-mensajes {
        height: 400px; 
    }

    .contenedor-botones {
        justify-content: space-evenly; 
        padding: 5px 0;
    }

    .social-btn {
        width: 40px; 
        height: 40px; 
        font-size: 1.3em;
    }
    
    .admin-buttons-grid {
        grid-template-columns: 1fr;
    }
    #btn-cerrar-admin {
        grid-column: 1 / 1;
    }
}

@media (max-width: 600px) {
    .footer-contenido {
        flex-direction: column;
        align-items: center;
    }

    .footer-seccion {
        margin: 10px 0;
        text-align: center;
    }
}

/* ------------------------------------------------ */
/* --- ESTILOS CORREGIDOS DE MODALES GENERALES (Flotante/Draggable) --- */
/* ------------------------------------------------ */

.modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background-color: rgba(0, 0, 0, 0.4); 
    align-items: center; 
    justify-content: center;
}

.modal-contenido {
    background-color: #fff;
    padding: 0;
    border: 1px solid #888;
    width: 300px; 
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.3), 0 12px 40px 0 rgba(0,0,0,0.25);
    border-radius: 10px;
    
    /* Configuración para ser flotante y arrastrable (draggable) */
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
}

/* Animación de entrada (mantengo el estilo, aunque la activación es por JS) */
@keyframes animatetop {
    from {top: 0; opacity: 0}
    to {top: 50%; opacity: 1}
}

/* Encabezado del modal (zona de arrastre) */
.modal-header {
    padding: 10px 15px;
    background-color: #007bff; 
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: move; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 {
    margin: 0;
    font-size: 1.1em;
}

/* Botón de cierre */
.cerrar {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    line-height: 18px;
    cursor: pointer;
    transition: color 0.3s;
}

.cerrar:hover,
.cerrar:focus {
    color: #ccc;
    text-decoration: none;
}

/* Contenedor específico del reproductor */
.reproductor-contenedor {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 15px;
    text-align: center;
}

/* Logo dentro del reproductor modal */
.logo-reproductor {
    width: 150px; 
    height: auto;
    margin-bottom: 15px;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Elemento de audio HTML5 */
.reproductor-contenedor audio {
    width: 100%; 
    max-width: 260px; 
    height: 40px;
    margin-top: 5px;
    border-radius: 20px;
}

/* ------------------------------------------------ */
/* --- ESTILOS ESPECÍFICOS PARA MODALES GRANDES (IFRAME) --- */
/* ------------------------------------------------ */

/* Clase para hacer modales más anchos y altos (como el formulario de registro) */
.large-modal {
    width: 600px !important; 
    max-width: 90%; 
    height: 600px; 
    max-height: 90vh; 
}

/* Asegura que el contenido del modal grande ocupe el espacio sin padding */
.large-modal .modal-body {
    padding: 0;
    height: calc(100% - 40px); 
    overflow: hidden; 
}

/* --- Estilos para la Lista de Programación Dinámica --- */

/* Estilo de cada elemento de la lista (simula la tarjeta) */
.programa-item-dinamico {
    display: flex;
    background-color: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* Transiciones para suavizar los cambios al hacer hover */
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s; 
}

/* --- ESTILOS PARA EL HOVER (Efecto ÚNICO y Más Pronunciado) --- */
.programa-item-dinamico:hover {
    /* Eleva la tarjeta 5px (efecto dinámico) */
    transform: translateY(-5px); 
    
    /* Sombra más visible para dar sensación de elevación */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); 
    
    /* Cambia el borde para destacar */
    border-color: #007bff; 
    
    /* Indica que se puede hacer clic */
    cursor: pointer;
}

/* ---------------------------------------------------- */
/* --- ESTILOS COMPLEMENTARIOS (Sin Cambios) --- */
/* ---------------------------------------------------- */

/* Barra vertical azul a la izquierda */
.programa-barra-dinamica {
    width: 6px;
    background-color: #007bff;
    flex-shrink: 0;
}

/* Contenido del programa (nombre y horario) */
.programa-contenido {
    padding: 10px;
    flex-grow: 1;
}

.programa-nombre {
    font-weight: bold;
    font-size: 1em;
    color: #333;
    margin-bottom: 3px;
}

.programa-horario-texto {
    font-size: 0.9em;
    color: #666;
}

.programa-horario-texto i {
    margin-right: 5px;
    color: #777;
}

/* Estilo para los días resaltados en rojo */
.programa-dias {
    font-weight: 600;
    color: #dc3545;
}

/* --- Estilos para la SECCIÓN DE PROGRAMACIÓN DINÁMICA --- */
#programacion-ul {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px !important;
}

/* Opcional: Estilos para la barra de desplazamiento */
#programacion-ul::-webkit-scrollbar {
    width: 6px;
}
#programacion-ul::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Ajuste fino del texto en el contenido del programa */
.programa-horario-texto i {
    width: 15px;
    text-align: center;
}

/* --- ESTILOS PARA EL FOOTER (PIE DE PÁGINA) --- */
.footer-moderno {
    background-color: #2c3e50; 
    color: #ecf0f1; 
    /* Reducido el padding vertical (30px 20px 10px a 20px) */
    padding: 20px 20px 10px;
    border-top: 5px solid #e74c3c; 
    font-family: Arial, sans-serif;
    /* Reducido el margin-top para compactar */
    margin-top: 15px; 
}

.footer-contenido {
    display: flex;
    flex-wrap: wrap;
    /* Usar space-between para distribuir uniformemente 3 columnas */
    justify-content: space-between; 
    max-width: 1200px;
    margin: 0 auto;
    /* Reducido el padding-bottom */
    padding-bottom: 10px; 
}

.footer-seccion {
    /* Base para 3 columnas: 1/3 - márgenes */
    flex: 1; 
    /* Margen más pequeño para reducir la separación */
    margin: 10px; 
    /* Asegura que no sea demasiado pequeña en móvil */
    min-width: 200px; 
}

/* Estilos para el Logo */
.footer-logo {
    /* Limita el ancho del logo */
    max-width: 50%;
    /* Ajusta la altura del logo */
    height: auto;
    /* Margen inferior para separarlo un poco del crédito si es necesario */
    margin-bottom: 0px;
    /* Asegura que no haya espacio extra debajo del logo */
    display: block;

    /* --- CAMBIOS PARA CENTRAR EL LOGO --- */
    margin-left: auto;  /* Margen izquierdo automático */
    margin-right: auto; /* Margen derecho automático */
}

/* Estilos para los títulos */
.footer-seccion h3 {
    color: #f1c40f; 
    border-bottom: 2px solid #e74c3c;
    /* Reducido el padding-bottom */
    padding-bottom: 3px; 
    /* Reducido el margin-bottom */
    margin-bottom: 10px; 
    font-size: 1.1em; /* Ligeramente más pequeño */
}

/* Estilos para enlaces y horario */
.footer-seccion a,
.footer-seccion .horario {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    /* REDUCIDO: El cambio clave para el espaciado entre líneas */
    margin-bottom: 5px; 
    transition: color 0.3s;
    font-size: 0.95em; /* Ligeramente más pequeño para compactar */
}

.footer-seccion a:hover {
    color: #f1c40f; 
    text-decoration: underline;
}

.footer-seccion i {
    margin-right: 8px; /* Ligeramente reducido */
    color: #e74c3c; 
    font-size: 1em; /* Ligeramente reducido */
}

/* Estilos para la línea de créditos */
.footer-creditos {
    text-align: center;
    border-top: 1px solid #34495e; 
    /* Reducido el padding-top */
    padding-top: 5px; 
    /* Reducido el margin-top */
    margin-top: 5px; 
    font-size: 0.8em; /* Más pequeño */
    color: #bdc3c7;
}

/* Ajuste específico para la columna del logo si es necesario */
.logo-columna {
    display: flex;
    align-items: center; /* Centra verticalmente el logo */
    justify-content: center; /* Centra horizontalmente el logo */
}

/* --- ESTILOS PARA EL AGRUPAMIENTO DIARIO DEL CHAT --- */

/* Cabecera de la fecha (ej: Lunes 8 de diciembre) */
.chat-date-header {
    text-align: center;
    margin: 15px 0 10px;
    padding: 5px 10px;
    background-color: #e9ecef; /* Fondo gris claro para destacar */
    border-radius: 5px;
    font-weight: bold;
    color: #007bff; /* Color primario */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* Propiedades para que la fecha se mantenga visible al hacer scroll */
    position: sticky; 
    top: 0; 
    z-index: 10; 
}

/* Contenedor de un mensaje individual (la línea de información y el contenido) */
.mensaje-item {
    padding: 5px 0;
    border-bottom: 1px dotted #e0e0e0;
}

/* Estilo para la línea [YYYY-MM-DD HH:MM:SS] | Nombre | Lugar | */
.mensaje-info-line {
    font-size: 0.85em;
    color: #6c757d; 
    margin-bottom: 3px;
    word-wrap: break-word; 
    padding-left: 5px; /* Pequeña indentación */
}

.mensaje-info-line strong {
    color: #343a40; /* Color oscuro para destacar Nombre/Lugar */
}

/* Asegura que el contenido del mensaje no tenga margen superior excesivo */
.mensaje-item p {
    margin-top: 0;
    margin-bottom: 5px; 
    padding-left: 5px;
}

/* ESTILO PARA EL SEPARADOR DE FECHA DEL CHAT */
.date-separator {
    text-align: center;
    margin: 10px 0;
    padding: 5px;
    background-color: #f0f0f0; /* Fondo gris claro */
    border-radius: 5px;
    font-weight: bold;
    color: #333;
    font-size: 0.9em;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    user-select: none; /* Evita que el usuario pueda seleccionar el separador */
}

/* --- Estilos del Mensaje Seleccionado --- */
.mensaje {
    /* Mantiene tus estilos actuales y añade el puntero */
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
    background-color: none;
    word-wrap: break-word;
    cursor: pointer; /* Indica que es clickeable */
    transition: background-color 0.15s ease-in-out; /* Para un efecto suave */
}

/* 🌟 Clase que resalta el mensaje al hacer clic 🌟 */
.mensaje-seleccionado {
    background-color: #d0e7ff !important; /* Color de fondo: azul claro (puedes cambiarlo) */
    border: 1px solid #007bff; /* Borde para más énfasis */
}

/* 1. Base del Mensaje: Necesario para el cursor y las transiciones */
.mensaje {
    /* Mantén tus estilos base... */
    cursor: pointer; /* Hace que el cursor cambie al pasar sobre él */
    transition: background-color 0.15s ease-in-out; 
}

/* 2. Efecto al pasar el cursor (HOVER) - Mantenido por el navegador */
.mensaje:hover {
    background-color: #f0f0f0; /* Gris claro sutil para el hover */
}

/* 3. Estilo de Selección (Persistente por JavaScript) */
.mensaje-seleccionado {
    background-color: #d0e7ff !important; /* Azul claro para la selección, visible incluso con hover */
    border: 1px solid #007bff; 
}

