*{
    margin: 0px;
    padding: 0px;
    font-family: lato;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
    
}

a {
    text-decoration: none;
}

ul {
    list-style: none;
}

header {
    width: 100%;
    height: 70px;
    background: #fefefe;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    margin: 0 auto;
    border-radius: 0 0 20px 20px;
    /*modificaciones iniciales*/
    position: fixed;
    top: 0;
    <z-index: 1000;
    transition: background-color 0.3s ease-in-out;
    /**/
}
/*modificaciones continuacion*/
header.scrolled {
    background-color: #fefefe; /* Cambia el color de fondo cuando el usuario hace scroll hacia abajo */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Agregamos una sombra sutil */
}

/*modificaciones fin*/

.logo {
    width: 120px;
    margin-top: 8px;
}

nav .logo {
    display: none;
    
}

nav ul {
    display: flex;
}

nav ul li a {
    color: #212526;
    display: block;
    margin: 0 2px;
    font-weight: 600;
    padding: 8px 18px;
    transition: 0.2s;
    border-radius: 30px;
}

nav ul li a:hover {
    background: #f6f4ff;
}

nav ul li a.active {
    background: #AF120C;
    color: white;
    
}


.hamburger {
   display: none;
    height: fit-content;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 5px;
    transition: 0.2s;
}

.hamburger:hover {
    background: #f6f4ff;
}


.hamburger div {
    width: 30px;
    height: 2px;
    margin: 6px 0;
    background: #212526;
}

img {
    width: 100%;
}

@media only screen and (max-width: 1100px) {
    
    header {
        width: 90%;
        padding: 0 20px;
    }
    
    nav {
        position: absolute;
        left: -300px;
        top: 0;
        z-index: 999;
        width: 280px;
        height: 100vh;
        background-color: #fefefe;
        transition: 0.2s;
        box-shadow: 2px 0 20px 0 rgba (0, 0, 0, 0.05);    
    }
    
    #nav_check:checked ~ nav {
        
        left: 0;
    }
    
    nav .logo {
        display: block;
        height: 70px;
        display: flex;
        align-items: center;
        margin-left: 30px;
    }
    
    nav ul li a {
        margin-bottom: 5px;
        padding: 10px 15px;
        border-radius: 5px;
        
    }
    
    nav ul {
        display: block;
        padding: 0 20px;
        margin-top: 30px;
        
    }
    
    .hamburger {
        display: block;
    }
    
}

.spacegp {
    height: 40px;
}