* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #068fd3;
    padding: 1rem;
    color: white;
    z-index: 1;
    flex-direction: row;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);    
}
.navbar .logo {
    display: flex;
    align-items: center;
    max-width: 200px;
    height: auto;
    overflow: hidden;
    justify-content: flex-start;
    z-index: 1;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.navbar .logo:hover {
    transform: scale(1.1);
}
.navbar .logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Estilos de Menú para Escritorio (Centrado) */
.navbar .menu {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

/* Botones principales */
.navbar .menu .btn.btn-secondary {
    padding: 0.5rem 1rem !important;
    min-width: 120px;
    text-align: center;
    border: none !important;
}

/* Enlaces base: Aplica a todos los 'a' dentro del menú y lang_button */
.navbar .menu a, 
.navbar .lang_button a {    
    cursor: pointer;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    background-color: #068fd3;
    transition: background-color 0.3s ease;
    border-color: transparent !important; /* Asegura que no tengan borde */
}

/* FIX 2: Restaurado el hover para todos los enlaces del navbar */
.navbar .menu a:hover, 
.navbar .lang_button a:hover,
.navbar .menu .btn.btn-secondary:hover { 
    background-color: #69ccfe;
}

/* Estilos Dropdown Desktop (por hover) */
.navbar .dropdown {
    position: relative;
    display: inline-block;
}
.navbar .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #068fd3;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px #666666;
    z-index: 1;
}
.navbar .dropdown:hover .dropdown-content {
    display: block;
}
.navbar .dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border: none;
    /* El hover para estos enlaces lo define la regla general de .navbar .menu a:hover, etc. */
}

/* FIX 1: Ocultar el menú toggle en desktop */
.navbar #menu-toggle {
    display: none; 
}

html {
    scroll-behavior: smooth;
}
.fade-out {
    animation: fadeOut 1s forwards;
}
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ------------------------------------- */
/* RESPONSIVE STYLES (Mobile/Tablet) */
/* ------------------------------------- */
@media (max-width: 992px) {
    /* Mantiene el logo y el lang_button/toggle en la misma línea */
    .banner-content {
        z-index: 0;
    }


    .navbar {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        flex-wrap: nowrap;
    }

    /* Muestra el botón de menú hamburguesa */
    .navbar #menu-toggle {
        display: flex; /* Muestra el botón en móvil */
        align-items: center;
        justify-content: center;
        min-width: unset !important;
        padding: 0.5rem 0.75rem !important;
        line-height: 1;
    }

    /* Oculta el menú principal por defecto en móvil */
    .navbar .menu {
        display: none; 
        
        position: absolute;
        top: 100%;
        left: 0;
        transform: translateX(0);
        width: 100%;
        
        /* Estilos de despliegue */
        flex-direction: column;
        align-items: flex-start;
        background-color: #068fd3;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 0.5rem 0;
        z-index: 10;
        gap: 0;
    }
    
    /* Clase JS: Muestra el menú cuando está activo */
    .navbar .menu.active {
        display: flex;
    }

    /* Estilos para los elementos del menú desplegado */
    .navbar .menu a,
    .navbar .menu .dropdown {
        width: 100%;
        text-align: left;
    }

    .navbar .menu a,
    .navbar .menu .btn.btn-secondary {
        padding: 0.75rem 1rem !important;
        min-width: unset;
        justify-content: flex-start;
        background-color: transparent; /* Fondo transparente en menú desplegado */
    }

    /* Estilos para el dropdown dentro del menú colapsado */
    .navbar .dropdown-content {
        display: none; /* Oculto por defecto en móvil */
        position: static;
        width: 100%;
        box-shadow: none;
        padding-left: 1.5rem;
        background-color: #0570a2;
    }

    /* Clase JS: Muestra el submenú cuando está activo */
    .navbar .dropdown-content.active {
        display: block;
    }

    /* Ajusta el logo y el lang_button */
    .navbar .logo {
        width: auto;
    }
    .navbar .lang_button {
        display: flex;
        align-items: center;
    }
}