/* menuRegiones.css */
/* Estilos específicos para el nuevo sistema de menú regional */
.mega-menu {
    position: relative;
    display: inline-block;
    margin: 0 5px;
}

.region-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s;
}

.region-btn:hover {
    background-color: #2ecc71;
}

.region-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1001;
}

.states-list {
    margin: 0;
    padding: 5px 0;
    list-style: none;
}

.state-item {
    position: relative;
    display: block;
    background-color: #34495e;
}

.state-name {
    display: block;
    padding: 12px 20px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.state-item:hover > .state-name {
    background-color: #2ecc71;
    color: #000;
}

.journals {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #34495e;
    min-width: 200px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1002;
    padding: 5px 0;
}

/* Mostrar journals en hover para dispositivos no táctiles */
.state-item:hover .journals {
    display: block;
}

/* Clase para mostrar journals en dispositivos táctiles y como alternativa */
.show-journals {
    display: block !important;
}

/* Agregar indicador visual para elementos clickeables en móvil */
@media (hover: none) and (pointer: coarse) {
    .state-name {
        position: relative;
    }
    
    .state-name::after {
        content: '▶';
        position: absolute;
        right: 15px;
        font-size: 12px;
        transition: transform 0.2s ease;
    }
    
    .show-journals .state-name::after {
        transform: rotate(90deg);
    }
}

.journals a {
    display: block;
    padding: 12px 20px;
    color: white !important;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: transparent !important;
}

.journals a:hover {
    background-color: #2ecc71 !important;
    color: #000 !important;
}

/* Responsividade para o menu de regiões */
@media screen and (max-width: 768px) {
    .mega-menu {
        width: 100%;
        margin: 0;
    }
    
    .region-btn {
        width: 100%;
        text-align: center;
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .region-content {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        margin-bottom: 10px;
    }
    
    .state-item {
        border-bottom: 1px solid #2c3e50;
    }
    
    .state-name {
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
    
    .journals {
        position: static;
        width: 100%;
        box-shadow: none;
        background: #2c3e50;
        display: none; /* Cambiado para mejor control */
        border-radius: 0;
        padding: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    /* Mostrar journals cuando tenga la clase show-journals */
    .journals.show-journals {
        display: block !important;
        animation: slideDown 0.3s ease;
    }
    
    /* Animación para el despliegue */
    @keyframes slideDown {
        from {
            opacity: 0;
            max-height: 0;
        }
        to {
            opacity: 1;
            max-height: 200px;
        }
    }
    
    /* Remover el hover en móvil ya que se maneja por JavaScript */
    .state-item:hover .journals {
        display: none;
    }
    
    .journals.show-journals {
        display: block !important;
        padding: 5px 0;
    }
    
    .journals a {
        padding: 10px 30px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .region-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .state-name {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .journals a {
        padding: 8px 25px;
        font-size: 13px;
    }
}