/* Estilos del menú hamburguesa */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Estilos para móvil - MENÚ CENTRADO CON FONDO GRIS */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background: rgba(128, 128, 128, 0.95); /* Fondo gris semi-transparente */
        display: flex;
        flex-direction: column;
        justify-content: center; /* Centra verticalmente */
        align-items: center; /* Centra horizontalmente */
        padding: 20px;
        transition: all 0.3s ease-in-out;
        z-index: 998;
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links a {
        margin: 15px 0;
        padding: 12px 0;
        color: white; /* Texto blanco para contrastar con el fondo gris */
        text-decoration: none;
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        transition: color 0.3s ease;
    }
    
    .nav-links a:hover {
        color: #f1f1f1;
    }
}

/* Estilos para desktop */
@media (min-width: 769px) {
    .nav-links {
        display: flex;
        align-items: center;
    }
    
    .nav-links a {
        margin-left: 20px;
        color: #333;
        text-decoration: none;
    }
}

/* Animaciones para el icono hamburguesa */
.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
    background-color: white; /* Cambia color al abrir menú */
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
    background-color: white; /* Cambia color al abrir menú */
}

/* Cambiar color del icono cuando el menú está abierto */
.hamburger.active {
    position: fixed;
    right: 1rem;
    top: 1rem;
}