/* Estilos para el menú de cabecera */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 10px;
    height: 10%;
    z-index: 10;
}

.logo a img {
    width: 120px; /* Ajusta el tamaño del logo según tus necesidades */
    height: auto;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-right: 24px;
    width: 100px; /* Ancho fijo para todos los elementos del menú */
}

nav ul li:last-child {
    margin-right: 0;
}

nav ul li a {
    text-decoration: none;
    color: var(--color-primary);
    font-family: Helvetica, sans-serif;
    display: block; /* Hacer que todo el botón sea interactivo */
    padding: 10px; /* Espaciado interno para encajonar el texto */
}

nav ul li a:hover {
   
    background-color: var(--color-primary);
    color: white;
}

nav ul li.active a {
   /* text-decoration: underline;*/
    border-bottom: solid 3px #003CA6;
}

/* Estilos para el menú desplegable en dispositivos móviles */
.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    margin: 3px 0;
}

@media (max-width: 768px) {
    .header {
        height: 5%;
    }
    
    .burger-menu {
        display: flex;
        position: absolute;
        right: 50px !important; /* Forzar a 30px del borde derecho */
        top: 30px;
        flex-direction: column;
        cursor: pointer;
    }

    .bar {
        width: 25px;
        height: 3px;
        background-color: var(--color-primary);
        margin: 3px 0;
        transition: 0.4s;
    }
    
    /* Estilo para el botón X cuando se activa */
    .bar.change:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .bar.change:nth-child(2) {
        opacity: 0;
    }
    
    .bar.change:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    nav.active {
        display: block;
    }
    
    nav {
        display: none;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.70);
        position: absolute;
        top: 145px;
        left: 0;
        z-index: 200;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        width: 95%;
    }

    nav ul li {
        margin: 10px 0;
        width: 95%;
    }

    nav ul li a {
        position: relative;
        text-align: left;
        left: 25px;
    }
}
