.header {
    position: relative;
    z-index: 1;
}

.header a {
    color: var(--light-link-header);
}

.header__background {
    background-image: linear-gradient(#2e2f328c, #1f202299), url(../assets/images/black-gradient.jpeg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50.7% 0%;
    
    
}

.header__nav {
    display: flex;
    align-items: center;
    color: var(--light-color);
    letter-spacing: 0.3px;
    justify-content: space-between;
    padding: 40px 0;
    gap: 6px;
}

.header__nav-link {
    display: block;
    width: 218px;
}

.nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 400;
    font-size: 17px;
    letter-spacing: 0;
    gap: 20px;
}

.nav-list__link a {
    position: relative;
    display: inline-block;
}

.nav-list__link:not(.btn-nav) a::before {
    content: "";
    bottom: -4px;
    left: 0;
    position: absolute;
    width: 100%;
    height: 2px;
    color: var(--light-color);
    opacity: 0.8;
    transform: scaleX(0);
    transition: all 0.2s ease-in-out;
}

.nav-list__link:not(.btn-nav) a:hover::before {
    transform: scaleX(1);
    background-color: var(--light-color);
}

.header__nav-menu {
    top: -100vh;
    transition: all 0.3s ease-in-out;
    position: absolute;
    width: 100%;
    height: 100vh;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    gap: 30px;
    z-index: 1;
}

.header__menu-btn {
    display: block;
    width: auto;
    height: auto;
    padding: 19px 8px;
    margin-left: auto;
    cursor: pointer;
    transition: opacity 0.5s ease;
    order: 3;
}

.header__menu-btn:hover {
    opacity: 0.6;
}

.header__navicon {
    display: block;
    width: 24px;
    height: 2px;
    position: relative;
    background: var(--light-color);
    cursor: pointer;
    transition: background 0.2s ease-out;
}

.header__navicon::before,
.header__navicon::after {
    content: '';
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    background: var(--light-color);
    transition: all 0.2s ease-out;
}

.header__navicon:before {
    top: 7px;
}

.header__navicon:after {
    top: -7px;
}

.header.nav-visible .header__nav-menu {
    top: 130px;
}

.header.nav-visible .header__background,
.header.nav-visible .header__nav-menu {
    background: var(--text-dark);
}

.header.nav-visible .header__navicon {
    background: transparent;
}

.header.nav-visible .header__navicon::before {
    transform: rotate(-45deg);
}

.header.nav-visible .header__navicon::after {
    transform: rotate(45deg);
}

.header.nav-visible .header__navicon::before,
.header.nav-visible .header__navicon::after {
    top:0;
}

@media (min-width: 1110px) {
    .header__background {
        background-position: 51% 50%;
    }

    .header__nav {
        padding: 45px 0;
        gap: 8px;
    }

    .header__menu-btn {
        display: none;
    }

    .header__nav-menu {
        position: static;
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: wrap;
        align-items: center;
        margin-left: auto;
        order: 2;
        gap: 8px;
        height: auto;
    }

    .nav-list {
        flex-direction: row;
        font-size: 15px;
        gap: 30px;
    }

    .header__nav-btn {
        margin-left: 20px;
    }
}

@media (min-width: 1200px) {
    .header__nav {
        gap: 15px;
    }

    .header__nav-menu {
        order: 0;
    }

    .btn-sub-nav {
        display: none;
    }

    .btn-nav {
        display: block;
    }

    .header__nav-btn {
        margin-left: 0;
    }
}