/* =========================================
   RESET Y ESTILOS BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MonSBo', sans-serif;
    background-color: #fff;
    font-size: 12px;
}

/* =========================================
   BARRA DE NAVEGACIÓN
   ========================================= */
.navbar {
    background: linear-gradient(135deg, #621132 0%, #7a1540 100%);
    padding: 5px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 5;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* =========================================
   BOTÓN MENÚ (MÓVIL)
   ========================================= */
.menu-toggle {
    display: none;
    font-size: small;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 8px 12px;
    margin-left: 7px;
    cursor: pointer;
    z-index: 6;
    font-family: 'MonThi', sans-serif;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* =========================================
   LISTA DE NAVEGACIÓN
   ========================================= */
.nav-list {
    list-style: none;
    display: flex;
    justify-content: flex-start;
    gap: 5px;
}

.nav-item {
    position: relative;
    margin: 0 5px;
}

/* Estilos de los enlaces */
.nav-item a {
    text-decoration: none;
    color: #fff;
    padding: 10px 15px;
    display: block;
    transition: all 0.3s ease;
    font-family: 'MonSBo', sans-serif;
    font-size: 12px;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo al hover */
.nav-item a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-item a:hover::before {
    left: 100%;
}

.nav-item a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-item a img {
    margin-left: 45%;
    transition: transform 0.3s ease;
}

.nav-item a:hover img {
    transform: rotate(180deg);
}

/* =========================================
   SUBMENÚ (NIVEL 1 - Vertical)
   ========================================= */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, #621132 0%, #7a1540 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    list-style: none;
    display: none;
    z-index: 2000;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease;
    margin-top: 0; /* corregido para evitar gap */
}

@keyframes slideDown {
    from {
        opacity: 0;
        /* transform: translateY(-10px); */ /* comentado para mantener hover */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mostrar menú al pasar el mouse */
.nav-item:hover .dropdown {
    display: block;
}

.dropdown li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.dropdown li:last-child {
    border-bottom: none;
}

.dropdown li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown li a {
    padding: 10px 15px;
    color: #fff;
    display: block;
    transition: all 0.3s ease;
}

.dropdown li a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* =========================================
   SUBMENÚ LATERAL (NIVEL 2 - Derecha)
   ========================================= */
.submenu-parent {
    position: relative;
}

/* Indicador visual de submenú */
.submenu-parent > a::after {
    position: absolute;
    right: 10px;
    transition: transform 0.3s ease;
}

.submenu-parent:hover > a::after {
    transform: translateX(3px);
}

.submenu {
    position: absolute;
    top: 0;
    left: 100%;
    background: linear-gradient(135deg, #621132 0%, #7a1540 100%);
    min-width: 200px;
    border-radius: 8px;
    list-style: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 3000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideRight 0.3s ease;
    margin-left: 0; /* corregido para evitar gap */
}

@keyframes slideRight {
    from {
        opacity: 0;
        /* transform: translateX(-10px); */ /* comentado para mantener hover */
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.submenu-parent:hover .submenu {
    display: block;
}

.submenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.submenu li a {
    padding: 10px 15px;
    color: white;
    display: block;
    transition: all 0.3s ease;
}

.submenu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* =========================================
   RESPONSIVO (MÓVIL)
   ========================================= */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        background: linear-gradient(135deg, #621132 0%, #7a1540 100%);
        width: 100%;
        display: none;
        text-align: center;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        animation: slideDown 0.3s ease;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-item {
        max-width: 99%;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .dropdown, 
    .submenu {
        position: static;
        box-shadow: none;
        display: none;
        width: 100%;
        padding-left: 10px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0;
        border: none;
    }

    /* Mostrar dropdown al hacer click en móvil */
    .nav-item.active .dropdown,
    .submenu-parent.active .submenu {
        display: block;
    }

    /* Mantener hover para dispositivos que lo soporten */
    .nav-item:hover .dropdown,
    .submenu-parent:hover .submenu {
        display: block;
    }

    /* Ajustes para hover en móvil */
    .nav-item a:hover {
        transform: translateY(0);
    }
}
