header{
    position: relative;
    z-index: 1000;
}
header .container{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}
#mainHeader, #mainHeader *{
    box-sizing: border-box;
}
#mainHeader.fixed{
    position: fixed;
    top: 0;
    left: 0;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.9);
    width: 100%;
    z-index: 9999;
    padding: 10px 20px;
}
.logo{
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.logo h1{
    color:#01184b;
}
.logo img{
    width: auto;
    height: 55px;
    object-fit: contain;
    display: block;
}
.container{
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#mainHeader{transition: all 0.3s ease;}
nav ul{
    display: flex;
    gap:20px;
    align-items: center;
    list-style: none;
}
nav ul li{
    display: flex;
    align-items: center;
}
nav ul li a:not(.btn-login):not(.btn-register){
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: var(--text-dark);
    padding: 8px 12px;
}
/* línea oculta inicialmente */
nav ul li a:not(.btn-login):not(.btn-register)::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
/*cuando pase el cursor*/
nav ul li a:not(.btn-login):not(.btn-register):hover::after{
    width: 100%;
}
/*cambio de color*/
nav ul li a:not(.btn-login):not(.btn-register):hover{
    color:var(--primary-color);
}
.menu-toggle{
    display: none;
    flex-direction: column;
    cursor: pointer;
}
.menu-toggle span{
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 4px 0;
}
.btn-login,.btn-register,.commonBtp{
    padding: 15px 30px;
    font-size: 16px;
    background: var(--gradient);
    border-radius: 23px;
    color: white;
    letter-spacing: 1px;
    font-weight: 600;
    filter: drop-shadow(2px 5px 8px #b1a5f8);
    border: none;
    transition: 0.4s ease-in-out;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    display:inline-block;
}
.btn-login:hover,
.btn-register:hover{
    box-shadow: 0 30px 40px -5px rgba(0, 0, 0, 0.3);
}
@media (max-width: 768px){

    html, body{
        overflow-x: hidden;
    }

    header{
        position: relative;
    }

    .menu-toggle{
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 4px;
    }

   #menu{
        display: none;
        flex-direction: column;

        position: fixed; /* 👈 CLAVE */
        top: 70px;       /* ajusta según altura header */
        right: 10px;

        width: 260px;

        /*background: #fff;*/
        padding: 20px;

        border-radius: 8px;
       /* box-shadow: 0 4px 8px rgba(0,0,0,0.15);*/

        z-index: 99999;
    }
    #menu.active{
        display: flex;
    }
    #mainHeader{
        position: relative;
        z-index: 1000;
    }
}