/*====================================================
            NAVBAR CORPORATIVO
=====================================================*/

.navbar {
    background: transparent;
    min-height: 75px;
    padding: 8px 0;
    transition: all .35s ease;
    box-shadow: none;
    z-index: 999;
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    min-height: 70px;
    padding: 5px 0;
    box-shadow: 0 15px 35px rgba(15, 61, 94, .12);
}

/*=========================================
            LOGO
=========================================*/

.logo-1 {
    width: 180px;
    height: 80px;
    object-fit: contain;
    transition: .35s;
}

.navbar.scrolled .logo-1 {
    width: 180px;
    height: 80px;
}

.navbar-brand {
    margin-right: 20px !important;
    display: flex;
    align-items: center;
}

#logoprincipal {
    display: flex;
    align-items: center;
    justify-content: center;
}

/*=========================================
            MENU
=========================================*/

.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    margin-left: 5px;
}

.nav-link {
    color: #374151 !important;
    font-size: 17px;
    font-weight: 600;
    padding: 10px 12px !important;
    position: relative;
    transition: .35s;
}

/* Línea inferior hover */
.nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 3px;
    background: #F4B400;
    border-radius: 20px;
    transition: .35s;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: #0F3D5E !important;
}

.nav-link:hover::after {
    width: 75%;
}

/*=========================================
        ICONO LOGIN
=========================================*/

.nav-link i {
    font-size: 28px;
}

/*=========================================
        BOTÓN HAMBURGUESA
=========================================*/

.navbar-toggler {
    border: none;
    padding: 6px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    width: 30px;
    height: 30px;
}

/*=========================================
        RESPONSIVE MEDIA QUERIES
        (ONLY CONFIRMED BREAKPOINTS)
=========================================*/

/* TABLETS LARGE (≤ 992px) - Confirmed in style.css */
@media (max-width: 992px) {
    .navbar-collapse {
        position: absolute;
        top: 60px;
        right: 5px;
        width: 125px;
        background: #FFF;
        border-radius: 18px;
        padding: 5px 0;
        box-shadow: 0 15px 35px rgba(0, 0, 0, .12);
        border: 1px solid #ECECEC;
    }

    .navbar-nav {
        width: 100%;
        text-align: center;
    }

    .navbar-nav .nav-item {
        margin: 0;
    }

    .navbar-nav .nav-link {
        padding: 3px 2px !important;
        font-size: 16px;
    }
}

/* MÓVILES PEQUEÑOS (≤ 450px) - Confirmed in style.css */
@media (max-width: 450px) {
    .navbar {
        min-height: 65px;
        padding: 6px 0;
    }

    .logo-1 {
        width: 135px;
    }

    .navbar-collapse {
        margin-top: 12px;
        padding: 18px;
        border-radius: 15px;
    }

    .navbar-nav .nav-item {
        text-align: center;
        font-size: 5px;
    }

    .nav-link {
        font-size: 16px;
    }

    .nav-link i {
        font-size: 26px;
    }
}

/*=========================================
        CUENTA (ícono de persona)
   Vive fuera del menú colapsable (junto a la hamburguesa) para que en móvil
   siempre esté visible. En escritorio order-lg-last la deja al final del menú.
=========================================*/

.nav-acciones {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-usuario-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #374151;
    text-decoration: none;
    transition: background .25s, color .25s;
}

    .nav-usuario-btn i {
        font-size: 28px;
        line-height: 1;
    }

    .nav-usuario-btn:hover,
    .nav-usuario-btn:focus-visible,
    .nav-usuario .show > .nav-usuario-btn,
    .nav-usuario-btn.show {
        color: #0F3D5E;
        background: rgba(244, 180, 0, .15);
    }

.nav-usuario .dropdown-menu {
    min-width: 190px;
    padding: 6px;
    border: 1px solid #ECECEC;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .12);
}

.nav-usuario .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
}

    .nav-usuario .dropdown-item i {
        font-size: 18px;
        color: #0F3D5E;
    }

    .nav-usuario .dropdown-item:hover,
    .nav-usuario .dropdown-item:focus {
        background: rgba(244, 180, 0, .15);
        color: #0F3D5E;
    }

@media (min-width: 992px) {
    .nav-acciones {
        margin-left: 8px;
    }
}

/* Móvil y tablet: el menú desplegado tiene scroll propio. El navbar es fixed, así que sin esto
   los últimos enlaces quedaban fuera de pantalla en celulares bajos o en horizontal. */
@media (max-width: 991.98px) {
    #menu.navbar-collapse {
        max-height: calc(100vh - 90px);
        max-height: calc(100dvh - 90px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

@media (max-width: 450px) {
    .nav-usuario-btn i {
        font-size: 26px;
    }
}
