header {
    position: relative;
    width: 100%;
}

.navbar {
    height: 100px;
    width: auto;
    padding: 10px 0;
    background: var(--white);
    z-index: 90;
    transition: all 0.3s ease-in-out;
}

.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.04);
    animation: navbarFadeIn 0.4s forwards;
}
@keyframes navbarFadeIn {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-overlay {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    inset: 0;
    height: 100vh;
    width: 100vw;
    background-color: var(--overlay-color);
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s;
    z-index: 95;
    pointer-events: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    animation: fadeIn 0.4s ease forwards;
}

.navbar li {
    display: inline-block;
}

.navbar li a {
    position: relative;
    padding: 30px 15px;
    font-weight: 500;
    font-size: 19px;
    color: #232323;
    font-weight: 500;
    background: transparent;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.navbar li a:hover {
    color: var(--color-primary);
    transition: all 0.3s ease-in-out;
}

.popup-header {
    display: none;
    position: relative;
    margin-bottom: 30px;
}

.header-btn {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.header-toggler {
    display: none;
    opacity: 0;
    animation: fadeOut 0.4s ease forwards;
    cursor: pointer;
    margin: 0;
    background: transparent;
    border: none;
    font-size: 25px;
    padding: 20px 0;
}

.header-toggler i {
    margin: 0;
    background: transparent;
    border: none;
    font-size: 25px;
}



@media only screen and (max-width: 1399px) {
    .navbar li a {
        padding: 30px 8px;
        font-size: 16px;
    }
}

@media only screen and (max-width: 1024px) {
    .popup-header {
        display: block;
    }

    .nav-container {
        position: fixed;
        left: -100%;
        top: 0;
        background: var(--white);
        width: 400px;
        height: 100vh;
        padding: 50px 40px;
        transition: left 0.4s ease-in-out;
        z-index: 100;
    }

    .nav-container.show {
        left: 0;
    }

    .nav-container.show,
    #nav-overlay.show {
        visibility: visible;
        opacity: 1;
        transition: left 0.4s ease-in-out, opacity 0.3s ease-in-out;
        pointer-events: all;
    }

    .navbar {
        padding: 0;
        height: 82px;
    }

    .logo-mobile {
        display: inline-block;
        margin-top: -15px;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-menu li {
        padding: 15px 0;
        border-bottom: solid var(--iti-border-color) 1px;
    }

    .nav-menu li a {
        padding: 0 8px;
    }

    .navbar-toggle {
        position: absolute;
        top: -15px;
        right: 0px;
        height: 35px;
        width: 35px;
        line-height: 32px;
        text-align: center;
        border: 2px solid #ddd;
        border-radius: 50%;
        background: transparent;
    }
    .logo {
        width: 110px;
    }
    .header-btn {
        display: none !important;
        animation: fadeOut 0.4s ease forwards;
    }
    .header-toggler {
        display: block;
        animation: fadeIn 0.4s ease forwards;
    }
}

@media only screen and (max-width: 540px) {
    .navbar .container {
        padding: 0 30px;
    }

    .nav-container {
        width: 100vw;
    }
}



/* ========================================================= */
/* Анимации */
/* ========================================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}

