.headroom {
    will-change: transform;
    transition: .3s;
}
.headroom.headroom--not-top {
    background-color: 
    color-mix(in srgb, var(--bgr-color) 80%, transparent);
    backdrop-filter: blur(5px);
}
.header {
    position: sticky;
    top: 0;
    z-index: 90;
}
.header .container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
}
.burger {
    display: none;
}
.burger-btn {
    width: 40px;
    height: 40px;
    padding: 8px;
    background: #ffffff0d;
    border-radius: 100%;
    border: none;
    outline: none;
    overflow: hidden;
}
.burger__overlay {
    position: fixed;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background: transparent;
    backdrop-filter: blur(0);
    transition: .3s;
    z-index: -1;
    pointer-events: none;
}
.burger__overlay.active {
    background: #00000080;
    backdrop-filter: blur(5px);
    z-index: 10;
    pointer-events: all;
}
.header__nav {
    display: flex;
    flex-grow: 1;
}
.header__nav-buttons {
    display: none;
    width: 100%;
    gap: 16px;
    padding: 16px;
}
.header__menu {
    display: flex;
    flex: 1;
    gap: 8px;
    justify-content: center;
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.header__menu li {
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    transition: .3s;
}
@media (hover:hover) {
    .header__menu li:hover {
        border-color: var(--primary-text-color);
    }
}
.header__menu .current-menu-item {
    border-color: var(--primary-text-color);
}
.header__menu li a {    
    display: inline-block;
    padding: 16px;
    font-weight: 700;
    transition: .3s;
    width: 100%;
}

/* Выпадающие подменю: десктоп — по наведению / фокусу с клавиатуры */
@media (min-width: 1201px) {
    .header__menu .menu-item-has-children {
        position: relative;
    }
    .header__menu .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: max(100%, 12rem);
        margin: 0;
        padding: 0.5rem 0;
        list-style: none;
        background: color-mix(in srgb, var(--bgr-color) 95%, #000);
        border-radius: var(--border-radius);
        box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
        z-index: 100;
        opacity: 0;
        visibility: hidden;
        transform: translateY(0.35rem);
        transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
        pointer-events: none;
    }
    .header__menu .sub-menu .sub-menu {
        top: 0;
        left: 100%;
        margin-left: 0.25rem;
    }
}

@media (hover: hover) and (min-width: 1201px) {
    .header__menu .menu-item-has-children:hover > .sub-menu,
    .header__menu .menu-item-has-children:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

.header__buttons {
    display: flex;
    gap: 16px;
}
.btn {
    display: flex;
    gap: 8px;
    align-items: center;
}



@media screen and (max-width: 1200px) {
    .burger {
        display: flex;
    }
    .header__nav {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        width: 300px;
        height: 100vh;
        flex-flow: column;
        justify-content: flex-start;
        background: var(--bgr-color);
        transition: .3s;
        z-index: 50;
    }
    .header__nav.active {
        transform: translateX(0);
    }
    .header__nav-buttons {
        display: flex;
        flex-flow: column;
    }
    .header__menu {
        flex-flow: column;
        flex: 0;
    }
    .header__menu li {
        border-radius: 0;
        border-bottom: 1px solid #ffffff0d;
    }

    /* Мобильное меню: подменю скрыто, открывается классом (клик по родителю) */
    .header__menu .sub-menu {
        display: none;
        position: static;
        width: 100%;
        margin: 0;
        padding: 0 0 0 0.75rem;
        list-style: none;
        box-shadow: none;
        background: transparent;
    }
    .header__menu .menu-item-has-children.sub-menu-is-open > .sub-menu {
        display: block;
    }

    .header__buttons {
        flex: 1;
        justify-content: flex-end;
    }
}

@media screen and (max-width: 576px) {
    .header__buttons .btn--primary {
        display: none;
    }
}