/* ============================================
   MENÚ DE PAÍSES ELEGANTE - HOVER DESKTOP + CLICK MOBILE
   ============================================ */

.ldm-paises-container {
    position: relative;
    display: flex;
}

.ldm-paises-dropdown {
    position: relative;
    display: inline-block;
}

/* Botón principal - Primer tono de negro (#1a1a1a) */
.ldm-paises-trigger {
    border-radius: unset;
    background:  black;
    border: none;
    padding: 8px 18px;
    color: #f5f5f5;
    font-weight: 500;
    font-size: 1rem;
    font-family: 'Lalezar', 'Times New Roman', Times, serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    white-space: nowrap;
    height: 54px;
}

.ldm-paises-trigger i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.ldm-paises-trigger i:last-child {
    font-size: 0.8rem;
}

/* Menú desplegable - Segundo tono de negro (#111111) - VERTICAL */
.ldm-paises-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 100%;
    background: #111111;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.5);
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.05);
    max-height: 70vh;
    overflow-y: auto;
}

/* scroll del menu (Ancho) */
.ldm-paises-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

/* 3. El fondo de la barra (Track) */
.ldm-paises-dropdown-menu::-webkit-scrollbar-track {
    background: #111111; 
    border-radius: 10px;
}

/* 4. La parte que se mueve (Thumb/Puntero) */
.ldm-paises-dropdown-menu::-webkit-scrollbar-thumb {
    background: #2b2b2b;
    border-radius: 10px;
    transition: background 0.3s ease;
}

/* 5. Efecto al pasar el mouse por la barra */
.ldm-paises-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: black;
}

/* Por defecto oculto */
.ldm-paises-dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

/* ========== COMPORTAMIENTO DESKTOP (HOVER) ========== */
@media (min-width: 992px) {
    /* Mostrar al hacer hover en el contenedor */
    .ldm-paises-dropdown:hover .ldm-paises-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }
    
    /* Rotar flecha al hacer hover */
    .ldm-paises-dropdown:hover .ldm-paises-trigger i:last-child {
        transform: rotate(180deg);
    }
}

@media (max-width: 992px) {
    .open-mobile{
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .ldm-paises-trigger,
    .ldm-paises-trigger:hover,
    .ldm-paises-trigger:focus{
        background-color: #332d2d;
        box-shadow: none;
    }

    .ldm-paises-list li {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Lista de países - VERTICAL (común para ambos) */
.ldm-paises-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ldm-paises-list li {
    margin: 0;
    padding: 0;
    width: 100%;
    border: none!important;
}

.ldm-paises-list li a {
    display: block;
    padding: 10px 20px;
    color: #e0e0e0;
    text-decoration: none;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
    background: transparent;
    white-space: nowrap;
    text-align: left;
}

.ldm-paises-list li a:hover {
    background: #1f1f1f;
    color: #ffffff;
    padding-left: 28px;
}

/* País seleccionado actualmente */
.ldm-paises-list li.current-pais a,
.ldm-paises-list li.active a {
    background: #1c1c1c;
    color: var(--primary-color);
    font-weight: 600;
}

/* Animación de entrada para cada item (solo desktop) */
@media (min-width: 992px) {
    .ldm-paises-list li {
        animation: fadeInSlide 0.2s ease forwards;
        opacity: 0;
    }
    
    @keyframes fadeInSlide {
        from {
            opacity: 0;
            transform: translateX(-10px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    .ldm-paises-list li:nth-child(1) { animation-delay: 0.02s; }
    .ldm-paises-list li:nth-child(2) { animation-delay: 0.04s; }
    .ldm-paises-list li:nth-child(3) { animation-delay: 0.06s; }
    .ldm-paises-list li:nth-child(4) { animation-delay: 0.08s; }
    .ldm-paises-list li:nth-child(5) { animation-delay: 0.10s; }
    .ldm-paises-list li:nth-child(6) { animation-delay: 0.12s; }
    .ldm-paises-list li:nth-child(7) { animation-delay: 0.14s; }
    .ldm-paises-list li:nth-child(8) { animation-delay: 0.16s; }
    .ldm-paises-list li:nth-child(9) { animation-delay: 0.18s; }
    .ldm-paises-list li:nth-child(10) { animation-delay: 0.20s; }
}

/* ========== ESTILOS PARA VERSIÓN MÓVIL DEL MENÚ DE PAÍSES ========== */
.mobile-paises-item {
    border-bottom: none !important;
    opacity: 0;
    transform: translateX(20px);
    animation: slideInFromRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}



@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-paises-trigger {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 15px 20px !important;
    background: transparent !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.mobile-paises-trigger .submenu-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.mobile-paises-trigger[aria-expanded="true"] .submenu-arrow {
    transform: rotate(180deg);
}

.mobile-paises-submenu {
    display: none;
    background: rgba(0,0,0,0.3);
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-paises-submenu.show {
    display:flex;
    flex-direction: column;
    border: none;
    background-color: #1a1a1a;
    animation: expandMenu 0.3s ease forwards;
}
/* Animación de expansión del submenú */
@keyframes expandMenu {
    0% {
        opacity: 0;
        max-height: 0;
    }
    100% {
        opacity: 1;
        max-height: 1400px;
    }
}

.mobile-paises-submenu li a {
    display: block;
    padding: 12px 20px 12px 35px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    font-family: 'Open Sans', sans-serif;
}

.mobile-paises-submenu li a:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 40px;
}