.header {
    box-shadow: 0 0 1px #00000052, 0 4px 8px #0000003d;
    position: sticky;
    top: 0;
    z-index: 2;
}

.header__wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 70px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.header__mobile-btn {
    display: none;
}

.header__logo {
    width: 120px;
    height: 60px;
    flex: 0 0 120px;
}

.header__logo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header__menu {
    margin: 0 auto;
    font-weight: 700;
}

.header__menu-ul {
    display: flex;
    gap: 24px;
    list-style: none;
}

.header__menu-ul a {
    display: block;
}

.header__menu-ul li {
    position: relative;
}

.header__menu-ul li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Общие стили для всех подменю */
.header__menu-ul .sub-menu {
    position: absolute;
    list-style: none;
    background-color: var(--header);
    min-width: 240px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

.header__menu-ul > li > .sub-menu {
    top: 100%;
    left: -20px;
    transform: translateX(-50%) translateY(10px);
}

.header__menu-ul .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    transform: translateX(10px) translateY(0);
}

.header__menu-ul .sub-menu li {
    padding: 0 15px;
    position: relative;
}

.header__menu-ul .sub-menu a {
    padding: 8px 15px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.header__menu-ul .sub-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

.header__buttons {
    display: flex;
    justify-content: end;
    gap: 12px;
    white-space: nowrap;
}

@media screen and (max-width: 768px) {
    .header__wrapper {
        gap: 10px;
        height: 120px;
    }

    .header__mobile-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex: 0 0 36px;
        width: 36px;
        height: 24px;
    }

    .header__mobile-btn div {
        height: 4px;
        width: 100%;
    }

    .header__mobile-btn div:first-child {
        width: 90%;
    }

    .header__mobile-btn div:last-child {
        width: 70%;
    }

    .header__logo {
        height: 50px;
        width: 100px;
        flex: 0 0 100px;
    }

    .header__menu {
        display: none;
        position: absolute;
        z-index: 2;
        top: 70px;
        left: 0;
        right: 0;
    }

    .header__menu.open {
        display: block;
    }

    .header__menu-ul {
        flex-direction: column;
        gap: 0;
    }

    .header__menu-ul a {
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, .05);
    }

    .header__menu-ul li:last-child a {
        border: none;
    }

    .header__buttons {
        width: 100%;
        padding-bottom: 10px;
    }

    .header__menu-ul .sub-menu {
        display: block !important;
        position: static;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        padding: 0;
        background-color: rgba(0, 0, 0, 0.1);
    }

    .header__menu-ul .sub-menu a {
        font-size: 0.95em;
    }

    .header__buttons .button {
        width: 50%;
    }
}
