/* --- BARRA PRINCIPAL --- */
.navbar-wrapper {
    background-color: #E17F28;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1550px;
    margin: 0 auto;
    padding: 10px 15px;
    position: relative;
}

.nav-main-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-left {
    justify-content: flex-end;
    flex: 1;
}

.nav-right {
    justify-content: flex-start;
    flex: 1;
}

.nav-item {
    color: #3C0D12;
    text-decoration: none;
    font-weight: 700;
    font-size: 12.5px;
    padding: 6px 3px;
    white-space: nowrap;
    transition: color 0.2s ease-in-out;
}

.nav-item:hover,
.nav-item.active {
    color: #FFD700;
}

.icon-sm {
    font-size: 10px;
    margin-left: 2px;
}

/* LOGO DESKTOP */
.brand-center {
    margin: 0 12px;
    flex-shrink: 0;
}

.brand-img {
    height: 75px;
    width: 75px;
    border-radius: 50%;
    border: 3px solid #FFFFFF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    object-fit: cover;
    background-color: #FFFFFF;
}

/* Elementos móviles ocultos en Escritorio */
.mobile-header-bar {
    display: none;
}

/* DESPLEGABLES DESKTOP */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu-list,
.nested-menu-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FFFFFF;
    min-width: 240px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 8px 0;
    list-style: none;
    z-index: 9999;
}

.dropdown-align-right {
    right: 0;
    left: auto;
    width: 300px;
}

.dropdown-menu-list li a,
.nested-menu-list li a {
    color: #222222;
    padding: 8px 14px;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid #F0F0F0;
}

/* Hover en PC */
@media (min-width: 1025px) {
    .nav-dropdown:hover>.dropdown-menu-list {
        display: block;
    }

    .nested-dropdown {
        position: relative;
    }

    .nested-dropdown:hover>.nested-menu-list {
        display: block;
        top: 0;
        left: 100%;
    }
}


/* ========================================================
   RESPONSIVE DESIGN Y TABULACIÓN DE SUBMENÚS (<= 1024px)
   ======================================================== */
@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }

    /* Barra Superior Móvil */
    .mobile-header-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .brand-img-sm {
        height: 48px;
        width: 48px;
        border-radius: 50%;
        border: 2px solid #FFFFFF;
    }

    /* Botón Hamburguesa */
    .menu-toggle-btn {
        background: transparent;
        border: 2px solid #3C0D12;
        color: #3C0D12;
        font-size: 1.4rem;
        padding: 4px 12px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .menu-toggle-btn:hover {
        background-color: #3C0D12;
        color: #FFFFFF;
    }

    /* Contenedor del Menú Desplegable */
    .nav-main-container {
        display: none;
        /* Se despliega al dar clic */
        flex-direction: column;
        width: 100%;
        padding-top: 10px;
    }

    .nav-main-container.show-mobile {
        display: flex !important;
    }

    .nav-section {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        padding: 12px 10px;
        border-bottom: 1px solid rgba(60, 13, 18, 0.15);
        font-size: 14px;
        white-space: normal;
        box-sizing: border-box;
    }

    /* --- TABULACIÓN Y SANGRADO DE SUBMENÚS --- */
    .nav-dropdown,
    .nested-dropdown {
        width: 100%;
    }

    .dropdown-menu-list,
    .nested-menu-list {
        position: static;
        width: 100% !important;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.04);
        /* Fondo sutil para diferenciar */
        border-radius: 0;
        padding: 0;
        margin: 0;
    }

    /* Tabulador 1er Nivel (Nivel Principal) */
    .dropdown-menu-list li a {
        padding-left: 28px !important;
        /* Tabulación hacia adentro */
        font-size: 13px;
        background-color: rgba(255, 255, 255, 0.6);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Tabulador 2do Nivel (Submenú interno: SEVAC, CONAC, etc.) */
    .nested-menu-list li a {
        padding-left: 48px !important;
        /* Doble tabulación hacia adentro */
        font-size: 12.5px;
        background-color: rgba(255, 255, 255, 0.9);
    }

    /* Clases de apertura */
    .dropdown-menu-list.show-submenu,
    .nested-menu-list.show-submenu {
        display: block !important;
    }
}

/* ANIMACIONES DE ENTRADA AL SCROLL */
.slide-from-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.slide-from-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Estado activo: Visibilidad al 100% */
.slide-from-left.appear,
.slide-from-right.appear {
    opacity: 1 !important;
    transform: translateX(0) !important;
}