/* ========================================================================= */
/* 1. NAVBAR GENERAL */
/* ========================================================================= */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow-x: hidden; /* Evita que la página se mueva hacia los lados */
}

.navbar-custom {
    position: fixed; 
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: #04294b; 
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
    padding: 15px 0;
}

.navbar-scrolled {
    background-color: #04294b; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 10px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    margin-right: auto;
}

.logo-navbar { 
    height: 60px; 
    width: auto; 
    transition: transform 0.3s ease; 
    object-fit: contain;
}

.logo-navbar:hover {
    transform: scale(1.05);
}

.navbar-nav {
    margin-left: auto;
    align-items: center;
}

.navbar-custom .nav-link {
    color: #ffffff !important;
    font-weight: 600;
    margin-left: 20px; 
    transition: color 0.3s ease;
    font-size: 20px; 
    position: relative;
    padding-bottom: 5px;
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%); 
    background-color: #cbdcf7; 
    transition: width 0.3s ease-in-out;
}

.navbar-custom .nav-link:hover::after {
    width: 80%; 
}

.navbar-custom .nav-link:hover {
    color: #cbdcf7 !important;
}

.navbar-custom .nav-link.active::after {
    width: 80%;
    background-color: #ffffff;
}

/* Estilos base del botón toggler de la hamburguesa */
.navbar-toggler { 
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 6px 10px;
    border-radius: 6px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
    outline: none;
}

.navbar-toggler-icon { 
    filter: invert(1); 
    width: 24px;
    height: 24px;
}

@media (min-width: 992px) {
    .navbar-custom .dropdown-menu {
        display: block;
        visibility: hidden;
        opacity: 0;
        transform: translateY(30px); 
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        background-color: #ffffff;
        border: none;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        border-radius: 8px;
        padding: 8px 0;
        margin-top: 0;
    }

    .navbar-custom .nav-item.dropdown:hover .dropdown-menu {
        visibility: visible;
        opacity: 1;
        transform: translateY(18px);
    }
}

.dropdown-item {
    color: #212529 !important;
    font-weight: 500;
    padding: 10px 20px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #04294b;
    color: #ffffff !important;
    padding-left: 25px; 
}

[id] {
    scroll-margin-top: 160px; 
}

.solucion-seccion {
    scroll-margin-top: 160px !important;
}

/* ========================================================================= */
/* BARRA SUPERIOR (TOP BAR) */
/* ========================================================================= */
.top-bar-intra {
    background-color: #04294b;
    color: #ffffff;
    font-size: 0.8rem;
    padding: 6px 0;
    width: 100%;
    border-bottom: 2px solid #04294b;
    position: fixed;
    top: 0;
    z-index: 1050;
}
.top-bar-info { display: flex; align-items: center; font-weight: 500; }
.top-bar-info i { margin-right: 8px; color: #ea0202; }

.navbar-custom { margin-top: 32px; }

/* ========================================================================= */
/* 2. FOOTER ESTILIZADO */
/* ========================================================================= */
.footer-section {
    padding-top: 60px;
    padding-bottom: 20px;
    background-color: #04294b;
}

.footer-subtitle {
    color: #ffffff !important;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.footer-links li {
    margin-bottom: 15px; 
}

.footer-links a {
    color: #ffffff !important; 
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
    padding-bottom: 3px;
    margin-bottom: 8px;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #d90429; 
    transition: width 0.3s ease-in-out;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-links a:hover {
    color: #cbdcf7 !important; 
}

.footer-social a {
    color: #ffffff;
    font-size: 1.4rem;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: #d90429;
    transform: translateY(-5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.85rem;
}

/* ========================================================================= */
/* CORRECCIÓN ABSOLUTA PARA CELULARES (Desbordamiento y Espacio Blanco)      */
/* ========================================================================= */
@media (max-width: 768px) {
    /* 1. Forzar que absolutamente todo el sitio respete el ancho de la pantalla y no cause scroll horizontal */
    html, body {
        max-width: 100% !important;
        overflow-x: hidden !important;
        position: relative;
    }

    /* 2. Eliminar por completo el espacio blanco entre el header y el carrusel */
    .navbar-spacer {
        height: 75px !important; /* Reduce el espacio artificial para que pegue perfecto */
    }

    /* Ajuste de los márgenes superiores de las barras fijas en móvil */
    .top-bar-intra {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }

    .navbar-custom {
        position: fixed;
        top: 28px; /* Ajustado justo debajo de la barra superior compacta */
        left: 0;
        width: 100%;
        margin-top: 0 !important;
    }

    /* 3. Asegurar que los contenedores no se salgan hacia la derecha */
    .container, .container-fluid {
        width: 100% !important;
        padding-right: 15px !important;
        padding-left: 15px !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }

    /* 4. Evitar que textos largos como los títulos del carrusel empujen la pantalla */
    .hero-text {
        width: 100% !important;
        box-sizing: border-box;
    }
}