#menu-item-8950 {
    background-color: #E10000;
}

#menu-item-8950 > a {
    color: #ffffff;
}

.menu-item-gtranslate {
    display: flex;
    align-items: center;
}

.menu-idioma a {
    display: none;
}

.menu-idioma::after {
    content: '';
    display: block;
}

.gtranslate_wrapper {
    position: absolute;
    /*right: 10px;  /* Ajusta la distancia del borde derecho */
    transform: translateY(-50%);
    display:none;
}

/* Estilo de la parte superior */
.site-header {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    background: #ffffff;
}

.header-left {
    flex: 0 0 auto;
}

.header-right {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-left img, .header-right img {
    max-height: 80px;
    object-fit: contain;
}

.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    margin-left: 20px;
}

/* Estilos para el título y subtítulo */
.nombre {
    color: navy;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

.subtitle {
    display: flex;
    flex-direction: column;
    color: #666666;
    font-size: 15px;
    line-height: 1.4;
    margin-top: 5px;
}

/* Línea divisora vertical */
.divider {
    display: inline-block;
    width: 2px;
    height: 40px;
    background-color: navy;
    margin: 0 20px;
}

/* Estilos principales del menú */
.main-navigation {
    background-color: #eaeaea;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.menu {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: #f5f5f5;
    z-index: 100;
}

.menu > li {
    position: relative; /* Necesario para posicionar submenús */
    padding: 5px 10px;
    z-index: 100;
}

.menu > li > a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    padding: 8px 12px;
    display: block;
    transition: color 0.3s ease;
    z-index: 100;
}

.menu > li:hover > a {
    color: #0033a0;
}

/* Submenús */
.menu li ul.sub-menu {
    display: none; /* Ocultos por defecto */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    z-index: 100;
    min-width: 180px;
}

.menu li:hover > ul {
    display: block; /* Mostrar submenús al hacer hover */
    z-index: 100;
}

.menu li ul li {
    padding: 0;
    z-index: 100;
}

.menu li ul li a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    padding: 10px 15px;
    display: block;
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 100;
}

.menu li ul li:hover > a {
    color: #0033a0;
    background-color: #f8f9fa;
}

/* Submenús de segundo nivel y posteriores */
.menu li ul.sub-menu li {
    position: relative;
    width: 100%;
    z-index: 100;
}

.menu li ul.sub-menu li a {
    display: block;
    font-size: 13px;
    padding: 8px 12px;
    white-space: nowrap;
    z-index: 100;
}

/* Indicador de submenú anidado en todos los dispositivos */
/*.sub-menu .menu-item-has-children > a::after {
    content: '+';
    margin-left: 5px;
    float: right;
}

.sub-menu .menu-item-has-children.active > a::after {
    content: '-';
}*/

.menu li ul.sub-menu li ul.sub-menu {
    top: 0; /* Alinea con la parte superior del elemento padre */
    left: 100%; /* Coloca el submenú a la derecha del padre */
    margin-top: 0; /* Elimina cualquier margen superior */
    z-index: 100;
}

/* Mostrar submenús al hover */
.menu li:hover > ul.sub-menu {
    display: block;
}

/* Botón hamburguesa */
.menu-toggle {
    display: none; /* Oculto por defecto en desktop */
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    position: relative;
    z-index: 100;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Quitar los puntos de los submenús */
.menu, .menu ul, .sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 100;
}

/* Estilo para los enlaces de menú principal */
.menu-item-has-children > a {
    cursor: default; /* Indica que no es clickeable */
}

/* Comportamiento hover solo para desktop */
@media screen and (min-width: 769px) {
    .menu li:hover > ul.sub-menu {
        display: block;
    }
    
    .menu-item-gtranslate {
        display: flex;
        align-items: center;
    }
}

/* Responsividad del menú */
@media screen and (max-width: 768px) {
    .menu-item-gtranslate {
        display: none;
        align-items: center;
    }
    .gtranslate_wrapper {
        position: absolute;
        right: 10px;  /* Ajusta la distancia del borde derecho */
        top: 80%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
    }

    .header-center h1 {
        font-size: 1rem;
    }

    .header-center span {
        font-size: 0.8rem;
    }

    .header-top {
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .header-left img, .header-right img {
        max-height: 60px;
    }
    
    .nombre {
        font-size: 18px;
    }
    
    .subtitle {
        font-size: 12px;
    }
    
    .divider {
        height: 30px;
        margin: 0 10px;
    }

    .menu-toggle {
        display: block;
        margin: 8px;
    }

    .menu-toggle span {
        width: 22px;
        height: 2px;
        margin: 4px 0;
    }

    .main-navigation .menu {
        display: none; /* Oculto por defecto en móvil */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #f5f5f5;
        flex-direction: column;
        padding: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .main-navigation .menu.active {
        display: block; /* Se muestra cuando tiene la clase active */
    }

    .menu {
        flex-direction: column;
        align-items: flex-start;
        z-index: 1000;
    }

    .menu > li {
        margin: 10px 0;
    }

    .menu li ul {
        position: static; /* Para que submenús se vean bien en móviles */
    }

    .menu li ul.sub-menu,
    .menu li ul.sub-menu li ul.sub-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        margin-left: 10px; /* Indentación en móvil */
    }

    .menu > li {
        width: 100%;
        padding: 0;
    }

    .menu > li > a {
        padding: 8px 10px;
        border-bottom: 1px solid #ddd;
    }

    .menu li:hover > ul.sub-menu {
        display: none;
    }

    /* Ajustes para submenús en móvil */
    .menu li ul.sub-menu {
        position: static;
        width: 100%;
        display: none;
        box-shadow: none;
        background-color: #f9f9f9;
        margin-left: 0; /* Quita la indentación */
    }

    .menu li ul.sub-menu.active {
        display: block;
    }

    /* Indicador de menú desplegable */
    .menu-item-has-children > a::after {
        content: '+';
        margin-left: 5px;
        float: right;
    }

    .menu-item-has-children.active > a::after {
        content: '-';
    }

    .menu li ul.sub-menu li a {
        padding: 8px 10px;
    }

    .menu li ul.sub-menu li ul.sub-menu li a {
        padding: 10px;
    }
}

@media screen and (max-width: 524px) {
    .menu-item-gtranslate {
        display: none;
        align-items: center;
    }
    .gtranslate_wrapper {
        position: absolute;
        right: 10px;  /* Ajusta la distancia del borde derecho */
        top: 80%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
    }
    
    .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    background: #ffffff;
}

.header-left {
    flex: 0 0 auto;
}

.header-right {
    flex: 0 0 auto;
    display: flex;
    gap: 5px;
    align-items: center;
}

.header-left img, .header-right img {
    max-height: 40px;
    object-fit: contain;
}

.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    margin-left: 0;
}

/* Estilos para el título y subtítulo */
.nombre {
    color: navy;
    font-size: 7px;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.subtitle {
    display: flex;
    flex-direction: column;
    color: #666666;
    font-size: 8px;
    line-height: 1;
    margin-top: 5px;
}

/* Línea divisora vertical */
.divider {
    display: inline-block;
    width: 2px;
    height: 40px;
    background-color: navy;
    margin: 0 5px;
}
}