/* Reset de márgenes y padding para evitar espacios no deseados */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/** Menu **/
.menu {
    height: 80px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    background-color: #003456;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.menu_items {
    display: flex;
    list-style: none;
    margin-right: 30px;
}

.menu_items li {
    margin: 0 25px;
}

.menu_items li a {
    padding: 7px 13px;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    color: var(--gris-claro);
    transition: all 0.5s;
}

.menu_items li:hover, li.active {
    transition: .4s;
}

.menu li a:hover {
    color: var(--gris-hover);
}

.btn_menu {
    margin-right: 30px;
    font-size: 25px;
    color: var(--gris-claro);
    display: none;
}

.btn_menu_pointer {
    cursor: pointer;
}

.logo_show {
    display: none;
}


/** Estilos para móviles **/
@media screen and (max-width: 850px) {
    .menu {
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo {
        position: relative;
        right: 25px;
        z-index: 4;
    }
    
    .btn_menu {
        display: inline-flex;
        position: relative;
        left: 15px;
        z-index: 4;
    }
    
    .menu_items {
        position: fixed;
        z-index: 3;
        width: 80%;
        height: 100vh; /* Ajustado para que cubra toda la pantalla */
        top: -100vh;
        left: 0;
        text-align: left;
        transition: all .3s;
        flex-direction: column;
        margin: 0;
        background-color: #002842;
        overflow-y: auto;
        padding-top: 50px; /* Espaciado para evitar que los elementos queden pegados arriba */
    }
    
    .menu_items li {
        margin: 15px 0;
        line-height: 50px;
        position: relative;
        left: 20px; /* Alineado correctamente */
    }
    
    .menu_items li a {
        font-size: 16px;
        color: white;
    }
    
    .menu_items li a:hover {
        color: var(--gris-hover);
    }

    .logo {
        padding-left: 35px;
    }
    
    .logo_show {
        display: block;
        z-index: 3;
    }
    
    ul.show {
        top: 0;
        opacity: 1;
        pointer-events: unset;
    }

    ul {
        top: 0;
        opacity: 0;
        pointer-events: none;
    }
}

/* Ajustes para modo landscape en móviles */
@media screen and (max-width: 850px) and (orientation: landscape) {
    .menu_items li {
        margin: 5px 0;
        top: 100px;
    }
    
    .menu_items {
        overflow-y: auto;
    }
}

/** Barra de contacto móvil **/
.contact_bar_mobil {
    display: none;
}

@media (max-width: 850px) {
    .contact_bar_mobil {
        position: fixed;
        width: 100%;
        height: 50px;
        background-color: #002842;
        z-index: 2;
        bottom: -50px;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: all 0.9s;
    }
    
    .icon_contact {
        margin: 0px 10px;
    }
    
    .contact_bar_mobil.show {
        opacity: 1;
        bottom: 0;
    }
}
