:root {
    --header-height: 90px;
}

header {
    width: 100%;
    position: relative;
    padding-top: var(--header-height);
}

header::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    z-index: 999;
}

.header-container {
    width: 100%;
    max-width: var(--content-max-width);
    height: var(--header-height);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    padding: 0 clamp(20px, 3.2vw, 40px);
    gap: 0;
    box-sizing: border-box;
}

.header-offcanvas {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    margin-left: clamp(72px, 9.4vw, 177px);
    box-sizing: border-box;
}

.header-logo {
    width: clamp(86px, calc(4.1vw + 64px), 98px);
    height: clamp(62px, calc(2.4vw + 50px), 72px);
    flex: 0 0 auto;
}

.header-logo--drawer {
    display: none;
    flex-shrink: 0;
    margin: 0;
    padding: 0 0 20px;
    border-bottom: 1px solid #e0e0e0;
}

.header-logo--drawer a[href] {
    display: block;
    width: 100%;
    height: 100%;
}

.header-logo a,
.header-logo img {
    display: block;
    width: 100%;
    height: 100%;
}

.header-logo a {
    transition: opacity 0.25s ease;
}

.header-logo a:hover {
    opacity: 0.8;
}

.header-nav {
    margin-left: clamp(0px, 2.1vw, 56px);
}

.header-nav > ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(16px, 1.85vw, 35px);
    min-width: 0;
}

.header-nav li {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.45vw, 8px);
}

.header-nav-item--select {
    position: relative;
    flex-shrink: 0;
}

.header-select {
    position: relative;
    flex-shrink: 0;
    min-width: max-content;
}

.header-select-trigger {
    display: inline-flex;
    align-items: center;
    gap: clamp(6px, 0.45vw, 8px);
    border: 0;
    background: transparent;
    margin: 0;
    padding: 0;
    cursor: pointer;
    color: #151515;
    text-align: center;
    font-family: "Ubuntu Sans", var(--font-family), sans-serif;
    font-size: clamp(16px, calc(0.15vw + 16px), 17px);
    font-style: normal;
    font-weight: 400;
    line-height: clamp(24px, calc(0.25vw + 24px), 28px);
    white-space: nowrap;
    transition: color 0.25s ease;
}

.header-select-trigger:hover,
.header-select.is-open .header-select-trigger {
    color: #7c0000;
}

.header-select-trigger img {
    width: 9.333px;
    height: 4.667px;
    display: block;
    transition: transform 0.25s ease;
}

.header-select.is-open .header-select-trigger img {
    transform: rotate(180deg);
}

.header-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    width: min(max-content, min(100vw - 32px, 360px));
    max-height: calc(100dvh - var(--header-height) - 24px);
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    display: none;
    z-index: 1006;
    box-sizing: border-box;
}

.header-select.is-open .header-select-menu {
    display: block;
}

.header-select-menu li {
    display: block;
}

.header-select-menu a {
    display: block;
    padding: 10px 14px;
    color: #151515;
    text-align: left;
    font-family: "Ubuntu Sans", var(--font-family), sans-serif;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header-select-menu a:hover {
    background: #f5f5f5;
    color: #7c0000;
}

.header-nav a {
    color: #151515;
    text-align: left;
    font-family: "Ubuntu Sans", var(--font-family), sans-serif;
    font-size: clamp(16px, calc(0.15vw + 16px), 17px);
    font-style: normal;
    font-weight: 400;
    line-height: clamp(24px, calc(0.25vw + 24px), 28px);
    white-space: nowrap;
    transition: color 0.25s ease;
}

.header-nav a:hover {
    color: #7c0000;
}

.header-nav img {
    width: 9.333px;
    height: 4.667px;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    margin-left: clamp(12px, 1.4vw, 24px);
    gap: clamp(22px, 2.1vw, 48px);
    flex-shrink: 0;
}

.header-lang {
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 0.55vw, 12px);
}

.header-phone a {
    color: #151515;
    font-family: "Ubuntu Sans", sans-serif;
    font-size: clamp(15px, calc(0.08vw + 15px), 16px);
    font-style: normal;
    font-weight: 300;
    line-height: clamp(20px, calc(0.06vw + 20px), 21px);
    white-space: nowrap;
    transition: color 0.25s ease;
}

.header-phone a:hover {
    color: #7c0000;
}

.header-burger {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 0 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.header-burger:hover,
.header-close:hover {
    opacity: 0.7;
}

.header-burger img {
    display: block;
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.header-close {
    display: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.header-close img {
    display: block;
    width: 26px;
    height: 26px;
    pointer-events: none;
}

.header-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.45);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

header.is-menu-open .header-scrim {
    display: block;
}

body.header-menu-open {
    overflow: hidden;
    touch-action: none;
}

@media (max-width: 1200px) {
    :root {
        --header-height: 90px;
    }

    .header-offcanvas {
        position: fixed;
        top: 0;
        left: 0;
        flex: 0 0 0;
        min-width: 0;
        width: min(100%, 360px);
        max-width: min(100%, 360px);
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        padding: 28px 24px 32px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 32px;
        background: #fff;
        z-index: 1003;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.08);
        border-right: 1px solid #e0e0e0;
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translate3d(-100%, 0, 0);
        transition: transform 0.3s ease;
    }

    .header-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 22px;
        right: 18px;
        width: 34px;
        height: 34px;
        z-index: 2;
    }

    header.is-menu-open .header-offcanvas {
        transform: translate3d(0, 0, 0);
    }

    .header-logo--drawer {
        display: block;
    }

    .header-nav {
        margin-left: 0;
        width: max-content;
        min-width: 100%;
        max-width: none;
        align-self: flex-start;
    }

    .header-nav > ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        width: max-content;
        min-width: 100%;
    }

    .header-nav > ul > li {
        width: max-content;
        min-width: 100%;
        max-width: none;
    }

    .header-nav a,
    .header-select--services .header-select-trigger {
        font-size: 16px;
        line-height: 24px;
        text-align: left;
        white-space: nowrap;
    }

    .header-select {
        width: max-content;
        min-width: 100%;
        max-width: none;
    }

    .header-select-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: auto;
        width: max-content;
        min-width: 100%;
        max-width: none;
        max-height: min(55dvh, 280px);
        margin-top: 0;
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        z-index: 5;
    }

    .header-select.is-open {
        z-index: 6;
    }

    .header-select--services {
        width: max-content;
        min-width: 100%;
    }

    .header-select--services .header-select-trigger {
        justify-content: flex-start;
    }

    .header-select--lang {
        width: max-content;
        min-width: 100%;
        max-width: none;
    }

    .header-right {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 0;
        gap: 20px;
        padding-top: 8px;
        border-top: 1px solid #e0e0e0;
        width: max-content;
        min-width: 100%;
        box-sizing: border-box;
    }

    .header-select--lang .header-select-trigger,
    .header-phone a {
        font-size: 15px;
        line-height: 22px;
        white-space: nowrap;
    }

    .header-phone a {
        font-weight: 300;
    }

    .header-burger {
        display: inline-flex;
        margin-left: auto;
    }
}

@media (max-width: 1000px) {
    /* header,
    header::before,
    .header-container {
        height: 86px;
    } */

    :root {
        --header-height: 86px;
    }

    .header-offcanvas {
        width: min(100%, 360px);
        max-width: min(100%, 360px);
        padding: 26px 22px 28px;
    }

    .header-close {
        top: 20px;
        right: 16px;
    }

    .header-nav a,
    .header-select--services .header-select-trigger {
        font-size: 15px;
        line-height: 23px;
    }

    .header-select--lang .header-select-trigger,
    .header-phone a {
        font-size: 15px;
        line-height: 22px;
        white-space: nowrap;
    }
}

@media (max-width: 900px) {
    /* header,
    header::before,
    .header-container {
        height: 76px;
    } */

    :root {
        --header-height: 76px;
    }

    .header-logo {
        width: 90px;
        height: 62px;
    }

    .header-offcanvas {
        width: min(100%, 360px);
        max-width: min(100%, 360px);
        padding: 24px 20px 28px;
        gap: 28px;
    }

    .header-close {
        top: 18px;
        right: 14px;
    }

    .header-nav ul {
        gap: 16px;
    }

    .header-nav a,
    .header-select--services .header-select-trigger {
        font-size: 15px;
        line-height: 22px;
    }

    .header-select--lang .header-select-trigger,
    .header-phone a {
        font-size: 14px;
        line-height: 21px;
        white-space: nowrap;
    }
}

@media (max-width: 700px) {
    /* header,
    header::before,
    .header-container {
        height: 70px;
    } */

    :root {
        --header-height: 70px;
    }

    .header-logo {
        width: 84px;
        height: 58px;
    }

    .header-burger {
        width: 40px;
        height: 40px;
    }

    .header-burger img {
        width: 22px;
        height: 22px;
    }

    .header-offcanvas {
        width: min(100%, 100%);
        max-width: 100%;
        padding: 22px 20px 28px;
    }

    .header-close {
        top: 16px;
        right: 14px;
    }

    .header-nav a,
    .header-select--services .header-select-trigger {
        font-size: 14px;
        line-height: 21px;
    }

    .header-select--lang .header-select-trigger,
    .header-phone a {
        font-size: 14px;
        line-height: 20px;
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    /* header,
    header::before,
    .header-container {
        height: 64px;
    } */

    :root {
        --header-height: 64px;
    }

    .header-logo {
        width: 80px;
        height: 54px;
    }

    .header-offcanvas {
        padding: 20px 18px 24px;
    }

    .header-close {
        top: 14px;
        right: 12px;
    }

    .header-nav a,
    .header-select--services .header-select-trigger {
        font-size: 14px;
        line-height: 20px;
    }

    .header-select--lang .header-select-trigger,
    .header-phone a {
        font-size: 13px;
        line-height: 20px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    /* header,
    header::before,
    .header-container {
        height: 60px;
    } */

    :root {
        --header-height: 60px;
    }

    .header-logo {
        width: 72px;
        height: 50px;
    }

    .header-burger {
        width: 40px;
        height: 40px;
    }

    .header-offcanvas {
        padding: 18px 16px 24px;
        gap: 24px;
    }

    .header-close {
        top: 12px;
        right: 10px;
        width: 32px;
        height: 32px;
    }

    .header-nav ul {
        gap: 14px;
    }

    .header-nav a,
    .header-select--services .header-select-trigger {
        font-size: 13px;
        line-height: 20px;
    }

    .header-select--lang .header-select-trigger,
    .header-phone a {
        font-size: 13px;
        line-height: 19px;
        white-space: nowrap;
    }
}

