.nav_services {
    width: 100%;
    left: 0;
    height: 8dvh;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--grey);
    border-top: 1px solid var(--grey);
    z-index: 1000;
    background: var(--dark);
    padding: 0% 5%;
}

.nav_services.fixed {
    position: fixed;
    top: 6.8dvh;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.nav_services.at-bottom {
    position: absolute;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Efecto hacking para los enlaces del nav services - FORZAR GRIS POR DEFECTO */
.nav_services a,
.nav_services a:link,
.nav_services a:visited {
    width: 100%;
    height: 100%;
    font-size: 1.2rem;
    color: var(--grey) !important; /* GRIS POR DEFECTO SIEMPRE */
    text-decoration: none;
    padding: 10px 20px;
    background-color: transparent;
    border-right: 1px solid var(--grey);
    transition: background-color 0.3s, color 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav_services a:first-child {
    border-left: 1px solid var(--grey);
}

.nav_services a:hover {
    background-color: var(--dark-grey);
    color: var(--white) !important; /* BLANCO EN HOVER */
    animation: services-hack 0.5s ease-in-out;
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.nav_services a.active {
    background-color: var(--dark-grey);
    color: var(--white) !important; /* BLANCO CUANDO ACTIVO */
    font-weight: 500;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.nav_services a.active:hover {
    animation: services-hack 0.6s ease-in-out;
    box-shadow: inset 0 0 20px rgba(230, 0, 255, 0.2);
    text-shadow: 0 0 12px rgba(255, 255, 255, 1);
}

/* Estructura del contenido del enlace */
.nav_services a .nav-text {
    display: inline;
    color: inherit;
}

.nav_services a .nav-number {
    display: none;
    font-weight: bold;
    font-size: 1.4rem;
    color: inherit;
}

/* Animación de efecto hacking para nav services */
@keyframes services-hack {
    0%, 100% {
        opacity: 1;
        transform: none;
        filter: none;
    }
    
    20% {
        opacity: 0.8;
        transform: scale(1.01);
        text-shadow: 1px 0 #00ff41, -1px 0 #ff0080;
    }
    
    40% {
        opacity: 0.6;
        transform: scale(0.99) skew(1deg);
        filter: blur(0.3px);
    }
    
    60% {
        opacity: 0.9;
        transform: scale(1.005);
        text-shadow: 2px 0 #ff0080, -2px 0 #00ff41;
    }
    
    80% {
        opacity: 0.7;
        transform: scale(1);
        filter: brightness(1.2);
    }
}

/* DESKTOP: Eliminar todas las media queries conflictivas y usar solo estas */
@media (min-width: 901px) {
    .nav_services a,
    .nav_services a:link,
    .nav_services a:visited {
        color: var(--grey) !important;
    }
    
    .nav_services a:hover,
    .nav_services a.active {
        color: var(--white) !important;
    }
    
    .nav_services a .nav-text {
        display: inline;
    }
    
    .nav_services a .nav-number {
        display: none;
    }
}

/* MÓVIL: Pantallas menores a 900px */
@media (max-width: 900px) {
    .nav_services a,
    .nav_services a:link,
    .nav_services a:visited {
        color: var(--grey) !important;
    }
    
    .nav_services a:hover,
    .nav_services a.active {
        color: var(--white) !important;
    }
    
    .nav_services a .nav-text {
        display: none !important;
    }
    
    .nav_services a .nav-number {
        display: inline !important;
        font-size: 1.2rem;
        font-weight: bold;
        color: inherit;
    }
}

/* Media query para pantallas menores a 600px */
@media (max-width: 600px) {
    .nav_services {
        height: 6dvh;
        padding: 0% 2%;
    }
    
    .nav_services.fixed {
        top: 5dvh;
    }
    
    .nav_services a {
        font-size: 1rem;
        padding: 8px 12px;
        min-width: 50px;
    }
    
    .nav_services a .nav-number {
        font-size: 1.2rem;
    }
    
    .nav_services a:hover .nav-number {
        animation: services-hack-number 0.5s ease-in-out;
    }
}

/* Animación específica para números en móvil */
@keyframes services-hack-number {
    0%, 100% {
        opacity: 1;
        transform: none;
        filter: none;
    }
    
    25% {
        opacity: 0.8;
        transform: scale(1.2);
        text-shadow: 1px 0 #00ff41, -1px 0 #ff0080;
    }
    
    50% {
        opacity: 0.6;
        transform: scale(1.1) rotate(2deg);
        filter: blur(0.2px);
    }
    
    75% {
        opacity: 0.9;
        transform: scale(1.15);
        text-shadow: 2px 0 #ff0080, -2px 0 #00ff41;
    }
}

@media (max-width: 400px) {
    .nav_services {
        height: 5dvh;
        padding: 0% 1%;
    }
    
    .nav_services.fixed {
        top: 4dvh;
    }
    
    .nav_services a {
        padding: 6px 10px;
        min-width: 40px;
    }
    
    .nav_services a .nav-number {
        font-size: 1.1rem;
    }
}