/* --- Limpieza de conflictos Bootstrap 5 --- */

/* Reseteamos el estilo de listas para que no salgan los puntos */
.navbar-nav {
    list-style: none !important;
    padding-left: 0 !important;
}

/* Forzamos el tamaño del logo */
.navbar-brand img {
    height: 45px !important;
    width: auto !important;
}

/* Estilo para los links del menú */
.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 500;
}

/* Efecto hover bordo */
.navbar-nav .nav-link:hover {
    color: #800000 !important;
    border-bottom: 2px solid #800000;
}

/* Asegurar que el botón no tenga márgenes locos */
.btn-danger {
    margin: 0 !important;
}

/* --- Ajustes Navbar Sarthou Bootstrap 5 --- */

/* Eliminar el espacio blanco superior heredado del viejo CSS de Bootstrap 3 */
body {
    padding-top: 0 !important;
}

/* 1. Color bordó personalizado para la barra */
.bg-bordo-sarthou {
    background-color: #a31820 !important;
}

/* Hover de los links principales (Naranja suave) */
.bg-bordo-sarthou .navbar-nav .nav-link:hover {
    color: #ffb459 !important; 
}

/* Hover de los links dentro del menú desplegable a bordó */
.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
    background-color: #a31820 !important;
    color: #ffffff !important;
}

/* 2. Activar Dropdown al pasar el mouse (solo en computadoras) */
@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
    
    .navbar .dropdown-menu {
        animation: fadeIn 0.3s ease-in-out;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Bloque de Noticias Unificado --- */

/* Fila contenedora: usamos flex para alinear alturas */
.noticias-row {
    height: 450px; /* Altura fija para el bloque */
    display: flex;
    align-items: stretch;
}

/* El carrusel ocupa el 100% del alto del contenedor */
#noticiasCarousel, 
#noticiasCarousel .carousel-inner, 
#noticiasCarousel .carousel-item {
    height: 100% !important;
}

/* Las imágenes cubren el espacio sin deformarse */
#noticiasCarousel .carousel-item img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* El contenedor de botones (Sidebar) */
.noticias-sidebar {
    height: 100% !important;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espacio entre botones */
}

/* Botones: flex: 1 obliga a que se repartan el espacio equitativamente */
.noticia-btn {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0 15px;
    transition: all 0.3s ease;
    text-align: left;
    cursor: pointer;
}

.noticia-btn:hover {
    background: #f1f1f1;
}

.noticia-btn.active {
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-left: 5px solid #a31820;
}

/* --- Corrección de espacios en Pre-Footer y Footer --- */

/* Forzamos a que el footer no tenga margen superior que genere la franja blanca */
footer, .footer, #footer {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Evitamos márgenes indeseados al final de la sección bottom */
#bottom {
    margin-bottom: 0 !important;
}

/* Pintamos el fondo del body de gris oscuro como red de seguridad por si el footer no llega al borde inferior de la pantalla */
body {
    background-color: #212529; 
}

/* Mantenemos el fondo blanco explícito para el resto del contenido principal, evitando que hereden el gris del body */
section:not(#bottom), .bg-white {
    background-color: #ffffff;
}

/* --- Estilo Minimalista para Footer --- */

.social-link,
.social-link:hover,
.social-link:active,
.social-link:focus {
    transition: all 0.3s ease-in-out;
    display: inline-block;
    text-decoration: none !important; 
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    opacity: 0.7;
}

.social-link:hover {
    color: #a31820 !important;
    opacity: 1;
}

/* Evita que iOS le agregue subrayado fantasma al icono */
.social-link i {
    text-decoration: none !important;
}

/* Links de empresa con hover bordo */
.empresa-link {
    transition: color 0.3s ease-in-out;
}

.empresa-link:hover {
    color: #a31820 !important;
    text-decoration: none;
}

.navbar-dark .navbar-nav .nav-link.active {
    font-weight: bold;
    color: #ffffff !important;
    border-bottom: 2px solid #ffffff;
}