/* header — Figma 97:4248, states: default / 2nd-level expanded */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 156.343px;
    padding: 54.857px 28.8px 0;
    background: transparent;
}

.header__overlay {
    position: fixed;
    inset: 0;
    z-index: 101;
    background: rgba(62, 60, 56, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease-in-out;
}

.header.is-menu-open .header__overlay {
    opacity: 1;
    pointer-events: auto;
}

.header__bar {
    position: relative;
    z-index: 102;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 101.486px;
    padding: 27.429px 53.486px 24.686px;
    border-radius: 10.971px;
    background: var(--c-glass);
    backdrop-filter: blur(17.897px);
    -webkit-backdrop-filter: blur(17.897px);
    transition: opacity 300ms ease-in-out;
}

.header.is-menu-open .header__bar {
    opacity: 0;
    pointer-events: none;
}

.header__nav,
.header__actions,
.header__nav-item {
    display: flex;
    align-items: center;
}

.header__nav {
    gap: 32.914px;
}

.header__actions {
    gap: 50.743px;
}

.header__nav-item {
    position: relative;
}

.header__link {
    display: flex;
    gap: 6.857px;
    align-items: center;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 21.943px;
    line-height: 1.05;
    color: var(--c-black);
    white-space: nowrap;
    word-break: break-word;
    transition:
        color 180ms ease,
        opacity 180ms ease,
        text-decoration-color 180ms ease;
}

.header__link:hover,
.header__link:focus-visible,
.header__dropdown-link:hover,
.header__dropdown-link:focus-visible,
.header__panel-link:hover,
.header__panel-link:focus-visible {
    color: var(--c-green);
}

.header__actions .header__link:hover,
.header__actions .header__link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.header__chevron {
    width: 8.229px;
    height: 4.114px;
    transition: transform 0.25s ease;
}

.header__nav-item:hover .header__chevron,
.header__link[aria-expanded="true"] .header__chevron {
    transform: rotate(180deg);
}

.header__dropdown {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 250px;
    padding: 18px;
    border-radius: 10.971px;
    background: var(--c-black);
    color: var(--c-white);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.header__nav-item:hover .header__dropdown,
.header__nav-item:focus-within .header__dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.header__dropdown-link {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.05;
    color: var(--c-white);
    white-space: nowrap;
    transition: color 180ms ease;
}

.header__logo {
    position: absolute;
    left: calc(50% - 0.2px);
    top: calc(50% + 1.63px);
    width: 178.286px;
    height: 50.057px;
    transform: translate(-50%, -50%);
    transition: opacity 180ms ease;
}

.header__logo:hover,
.header__logo:focus-visible {
    opacity: 0.8;
}

.header__logo-img {
    width: 100%;
    height: 100%;
}

.header__burger {
    position: relative;
    display: flex;
    justify-content: center;
    width: 64.457px;
    height: 35.657px;
    transition: opacity 180ms ease;
}

.header__burger:hover,
.header__burger:focus-visible {
    opacity: 0.7;
}

.header__burger-line {
    position: absolute;
    left: 1.371px;
    width: 61.714px;
    height: 2.057px;
    border-radius: 2px;
    background: var(--c-black);
}

.header__burger-line:nth-child(1) {
    top: 8.4px;
}

.header__burger-line:nth-child(2) {
    top: 18px;
}

.header__burger-line:nth-child(3) {
    top: 27.6px;
}

.header__panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 103;
    display: flex;
    justify-content: center;
    width: 100%;
    height: 222px;
    padding: 44px 82px;
    border-radius: 0 0 15px 15px;
    background: var(--c-black);
    color: var(--c-white);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
    transition:
        transform 300ms ease-in-out,
        opacity 300ms ease-in-out;
}

.header.is-menu-open .header__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.header__panel-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    min-width: 0;
}

.header__panel-links,
.header__panel-contacts {
    display: flex;
    align-items: center;
    gap: 82px;
}

.header__panel-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    height: 134px;
}

.header__panel-group--info {
    width: 135px;
}

.header__panel-group--services {
    width: 215px;
}

.header__panel-group--address {
    width: 178px;
}

.header__panel-group--socials {
    width: 134px;
}

.header__panel-link {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.05;
    color: var(--c-white);
    transition: color 180ms ease;
}

.header__panel-link.is-accent {
    color: var(--c-green);
}

.header__panel-address {
    line-height: 1.1;
}

.header__panel-note {
    width: 134px;
    font-family: var(--font-ui);
    font-weight: 400;
    font-size: 12px;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--c-white);
    opacity: 0.4;
}

.header__close {
    position: absolute;
    top: 44px;
    right: 103px;
    width: 25px;
    height: 25px;
    transition: opacity 180ms ease;
}

.header__close:hover,
.header__close:focus-visible {
    opacity: 0.7;
}

.header__close-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32.25px;
    height: 1.417px;
    border-radius: 2px;
    background: var(--c-white);
    transform-origin: center;
}

.header__close-line:nth-child(1) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.header__close-line:nth-child(2) {
    transform: translate(-50%, -50%) rotate(45deg);
}

@media (max-width: 1200px) {
    .header {
        height: 65px;
        padding: 0;
    }

    .header__nav,
    .header__actions .header__link,
    .header__dropdown {
        display: none;
    }

    .header__bar {
        height: 65px;
        padding: 18px 20px;
        border-radius: 7px;
        backdrop-filter: blur(13px);
        -webkit-backdrop-filter: blur(13px);
    }

    .header__logo {
        position: relative;
        top: auto;
        left: auto;
        width: 106px;
        height: 29px;
        transform: none;
    }

    .header__burger {
        width: 38px;
        height: 11.822px;
        margin-left: auto;
    }

    .header__burger-line {
        left: 0;
        width: 38px;
        height: 1.267px;
    }

    .header__burger-line:nth-child(1) {
        top: 0;
    }

    .header__burger-line:nth-child(2) {
        top: 5.911px;
    }

    .header__burger-line:nth-child(3) {
        top: 11.822px;
    }

    .header__overlay {
        display: none;
    }

    .header__panel {
        height: 376px;
        padding: 54px 24px;
    }

    .header__panel-inner {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        max-width: 272px;
    }

    .header__panel-links,
    .header__panel-contacts {
        justify-content: space-between;
        width: 100%;
        gap: 32px;
    }

    .header__panel-group {
        flex: 1 0 0;
        max-width: 120px;
        height: 134px;
    }

    .header__panel-group--services {
        order: 1;
        font-family: var(--font-text);
    }

    .header__panel-group--info {
        order: 2;
    }

    .header__panel-link {
        font-size: 12px;
    }

    .header__panel-group--services .header__panel-link,
    .header__panel-group--address .header__panel-link,
    .header__panel-group--socials .header__panel-link {
        font-family: var(--font-text);
    }

    .header__panel-address {
        line-height: 1.1;
    }

    .header__panel-note {
        width: 120px;
        font-family: var(--font-text);
        font-size: 12px;
    }

    .header__close {
        top: 21px;
        right: 24px;
    }

    .header__close-line {
        width: 19.661px;
        background: var(--c-green);
    }
}
