/*==============================================
    MENU CSS - JM MULTISERVICIOS (REESTRUCTURADO)
================================================*/

:root {
    --color-neon: #ccff0b;
    --color-blanco: #fdfcff;
    --color-negro: #000000;
    --header-height: 90px;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* --- Estilos del Header --- */
header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(0, 0, 0, 0.301);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 100000;
    /* Siempre al frente */
    display: flex;
    align-items: center;

    box-sizing: border-box;
    border-bottom: 1px solid var(--color-neon);
}

/*caja de contenido del menu*/
nav {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
    /* Para que el botón se ubique respecto a esto */
}

/*caja logo*/
.logo {
    border-right: 2px solid var(--color-neon);
    padding-right: 5%;

}

/*imagen del logo*/
.logo img {
    height: 70px;
    width: auto;
    display: block;

}

/* --- Menú en Pantallas Grandes (Escritorio) --- */
.listas ul {
    display: flex;
    gap: 30px;
    list-style: none;
    position: relative;
}

.listas ul li {
    position: relative;
    padding: 5px 0;
}

/* Creación de la barra neón */
.listas ul li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-principal);
    /* Tu verde neón */
    box-shadow: 0 0 5px var(--color-principal), 0 0 20px var(--color-principal);

    /* Estado inicial: Invisible y encogida a la izquierda */
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

/* Efecto Hover: La barra se expande */
.listas ul li:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/*enlaces del menu*/
.listas ul li a {
    text-decoration: none;
    color: var(--color-blanco);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s ease;
}



/*animacion del menu*/
.listas ul li a:hover {
    color: var(--color-neon);
}

/*boton de contacto*/
.contact {
    display: flex;
    align-items: center;
    padding: 4px;
    padding-left: 5%;
    border-left: 2px solid var(--color-neon);
    height: 100%;

}

/*animacion del enlace*/
.contact a {
    position: relative;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(45deg, #ccff0b, #ffffff, #ccff0b);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.25em;
    cursor: pointer;
}

/* Texto del enlace */
.contact a span {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
}

/*Caja antes del enlace*/
.contact a::before {
    content: "";
    position: absolute;
    inset: 1px;
    background: #272727;
    border-radius: 9px;
    transition: 0.5s;
}

/*animacion del boton*/
.contact a:hover::before {
    opacity: 0.7;
}

/*Caja después del enlace*/
.contact a::after {
    content: "";
    position: absolute;
    inset: 0px;
    background: linear-gradient(45deg, #ccff0b, #000000, #ccff0b);
    border-radius: 9px;
    transition: 0.5s;
    opacity: 0;
    filter: blur(20px);
}

/*animacion del boton*/
.contact a:hover::after {
    opacity: 1;
}


/* --- Botón Hamburguesa (Oculto en PC) --- */
.menu-toggle {
    display: none;
    /* Se activa solo en móvil */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 100002;
    /* Por encima incluso del menú desplegable */
    position: relative;
    /* Evita que se pierda al mover otros elementos */
}

/*barra de menu*/
.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-neon);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}


@media (max-width: 1500px) {
    header {
        height: 90px;
    }

    nav {
        width: 98%;
        padding: 0 2%;
    }

    .logo {
        border-right: 1px solid var(--color-neon);
        padding-right: 2%;
    }

    .contact {
        display: flex;
        align-items: center;
        padding: 4px;
        padding-left: 2%;
        border-left: 1px solid var(--color-neon);
        height: 100%;

    }
}


/* --- RESPONSIVE MÓVIL (Corte en 992px) --- */
@media (max-width: 992px) {

    .menu-toggle {
        display: flex;
        background: none;
        border: none;
        /* Aparece el botón */
    }

    /* Contenedor del Menú Desplegable */
    .listas {
        position: fixed;
        top: 0;
        left: -100%;
        /* Escondido */
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.842);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: transform 0.5s ease-in-out, left 0.5s ease-in-out;
        z-index: 100001;
        box-sizing: border-box;
        /* Justo debajo del botón */
    }

    .logo img {
        height: 60px;
        width: auto;
        display: block;

    }

    .contact {
        display: none;
    }

    /* Clase que activa el JavaScript */
    .listas.active {
        left: 0;
        /* Entra a la pantalla */
    }

    .listas ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 35px;
        /* Asegura que la lista se centre */
    }

    .listas ul li a {
        font-size: 1.5rem;
        /* Tamaño cómodo para el dedo */
    }

    /* Animación de la Hamburguesa a "X" */
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(9.5px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-9.5px) rotate(-45deg);
    }
}

@media (min-width: 993px) {
    .listas {
        position: static;
        width: auto;
        height: auto;
        background: none;
        left: 0;
    }

    .listas ul {
        flex-direction: row;
        gap: 25px;
    }

    .listas ul li a {
        font-size: 0.9rem;
    }
}