header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4%;
    position: sticky;
    top: -200px;
    transition: all 0.3s ease-in-out;
    z-index: 5;
    background-color: #f1f1f11a;
    box-shadow: 0 4px 12px 1px rgba(61, 61, 61, 0.3);
    min-height: 100px;
}
.nav-up {
    transition: all 0.3s ease-in-out;
}
.nav-down {
    top: 0;
    transition: all 0.3s ease-in-out;
}
.nav-scrolled {
    transition: all 0.3s ease-in-out;
    background-color: #fbf4f0a6;
}
.logo {
    width: 60px;
}
.logo a {
    width: inherit;
}
.small-logo a {
    width: inherit;
}
.small-logo {
    display: none;
}

.header-links {
    display: flex;
    flex-direction: row;
    gap: 16px;
}
.logo, .small-logo {
    border-radius: 50%;
    overflow: hidden;
}
.nav-link {
    padding: 0 16px;
    font-size: 20px;
}
a.active,
.nav-link.active > a {
    color: var(--link-hover-color);
}
.nav-link > a:hover {
    color: var(--link-hover-color);
}
#menu-toggle {
    display: none;
    z-index: 6;
}

.overlay {
    position: fixed;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    top: 0;
    left: 0;
    /* background-color: #000000aa; */
    visibility: hidden;
}
@media screen and (max-width: 1090px) {
    header {
        flex-direction: column;
        align-items: flex-end;
        padding: 0;
        min-height: 0;
        margin: 0;
    }
    .logo {
        display: none;
    }
    .nav-up {
        top: 0;
        padding: 0;
        min-height: 0;
    }
    .nav-down {
        top: 0px;
        padding: 0;
        min-height: 0;
    }
    .small-logo {
        display: block;
        /* margin-bottom: 16px; */
        width: 50px;
        height: auto;
    }
    .menu-button-container {
        display: flex;
    }
    .header-links {
        position: absolute;
        gap: 16px;
        top: 0;
        width: 175px;
        right: 0;
        padding: 0;
        padding-left: 8px;
        height: 100vh;
        overflow-x: auto;
        background-color: #193251;
        background-color: #f7e7df;
        z-index: 3;
        text-wrap: nowrap;
    }
    .nav-link {
        padding: 16px 0;
        height: unset;
        border-bottom: solid 1px var(--third-color);
        margin-left: -8px;
        padding-left: 16px;
    }
    #menu-toggle:checked ~ .header-links .nav-formation:hover .nav-link-sub-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        text-align: center;
        width: 75%;
        padding-bottom: 16px;
    }
    #menu-toggle:checked ~ .overlay {
        visibility: visible;
        /* z-index: 2; */
    }
    #menu-toggle {
        display: none;
    }
    .btn-container {
        position: fixed;
        top: 40px;
        right: 0;
        margin-right: 8px;
        margin-top: -12px;
        z-index: 6;
        width: 30px;
        height: 30px;
    }
    .menu-button,
    .menu-button::before,
    .menu-button::after {
        display: block;
        background-color: var(--primary-color);
        position: absolute;
        height: 4px;
        width: 30px;
        transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
        border-radius: 2px;
        z-index: 5;
    }
    div.menu-button {
        position: fixed;
        top: 40px;
    }
    /* Top layer of burger */
    .menu-button::before {
        content: '';
        margin-top: -8px;
    }
    /* Bottom layer of burger */
    .menu-button::after {
        content: '';
        margin-top: 8px;
    }
    #menu-toggle:checked + .menu-button-container .menu-button::before {
        margin-top: 0px;
        transform: rotate(225deg);
        background-color: var(--primary-color);
    }
    #menu-toggle:checked + .menu-button-container .menu-button {
        background: rgba(255, 255, 255, 0); /* make middle layer of burger transparent */
    }
    #menu-toggle:checked + .menu-button-container .menu-button::after {
        margin-top: 0px;
        transform: rotate(-225deg);
        background-color: var(--primary-color);
    }
    #menu-toggle ~ .header-links {
        display: block;
        max-width: 0;
        padding-left: 0;
        transition: all 300ms ease;
    }
    #menu-toggle:checked ~ .header-links {
        max-width: 200px;
        padding-top: 12px;
        padding-left: 8px;
        transition: all 300ms ease;
    }
    .menu-button-container {
        padding: 0;
    }
    .menu-button {
        right: 0;
        margin-right: 16px;
    }
}
