.horizontal-menu__wrapper {
    width: 1200px;
    padding: 32px 16px 32px 32px;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid #EBEDF1;
    background: #FFF;
    position: absolute;
    left: 50%;
    top: 150px;
    box-shadow: 0 8px 12px -4px rgba(0, 0, 0, 0.05), 0 0 6px -2px rgba(0, 0, 0, 0.03);
    transform: translate(-50%);
    gap: 48px;
    z-index: 10;
    display: none;

    height: calc(100vh - 178px);
    overflow: hidden;
}

.horizontal-menu__wrapper--open {
    display: flex;
}

.horizontal-menu--open {
    display: flex;
    overflow: auto;
    gap: 48px;
    width: 100%;
}

.horizontal-menu__submenus {
    display: flex;
    gap: 32px;
    width: 100%;
    /* overflow-y: auto; */
    height: 708px;
    flex-wrap: wrap;

    scrollbar-color: #E6E8EC transparent;
    scrollbar-width: thin;
}

.horizontal-menu__submenu {
    display: flex;
    flex-direction: column;

    width: calc(100% / 2 - 16px);
}

.horizontal-menu__submenu .horizontal-menu__item:first-of-type {
    margin-bottom: 16px;
}

.horizontal-menu__submenu .horizontal-menu__item:first-of-type a {
    color: #111827;
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: 32px;
}

.horizontal-menu__submenu .horizontal-menu__item:not(:last-of-type) {
    margin-bottom: 10px;
}

.horizontal-menu__submenu .horizontal-menu__item a {
    color: #5A616C;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}

.horizontal-menu__submenu.hidden {
    display: none;
}

.horizontal-menu__submenu.active {
    display: flex;
}


.horizontal-menu__list {
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 708px;
}

.horizontal-menu__list .horizontal-menu__item {
    height: 346px;
    width: 340px;

    background-size: 100%;
    background-repeat: no-repeat;
    background-position-y: bottom;
    background-color: #F5F7FF;

    border-radius: 20px;
    padding: 24px;

    transition: 0.3s;

    cursor: pointer;
}

.horizontal-menu__button-name {
    color: #4B68D4;
    font-size: 32px;
    font-style: normal;
    font-weight: 500;
    line-height: 40px;

    display: flex;
    align-items: flex-end;
}

.horizontal-menu__button-name svg {
    overflow: visible;
    opacity: 0;
    transition: opacity 0.3s;
}

.horizontal-menu__list .horizontal-menu__item:hover svg {
    opacity: 1;
}

.horizontal-menu__list .horizontal-menu__item:hover {
    background-size: 103%;
}

.horizontal-menu__list .horizontal-menu__item.selected {
    background-color: #4B68D4;
    background-size: 99%;
}

.horizontal-menu__list .horizontal-menu__item.selected .horizontal-menu__button-name {
    color: #FFF;
}

.horizontal-menu__list .horizontal-menu__item.selected .horizontal-menu__button-name svg {
    opacity: 1;

}

.horizontal-menu__list .horizontal-menu__item.selected .horizontal-menu__button-name path {
    stroke: #FFF;
}

.btn-back__menu {
    display: none;
}

@media(max-width: 768px) {
    .horizontal-menu {
        width: auto;
        flex-direction: column;
        z-index: 99999;
        padding: 0;
        top: 200px;
        border: unset;

        border-radius: unset;
        gap: 30px;

        height: 75vh;
    }

    .horizontal-menu.horizontal-menu--open {
        box-shadow: unset;
    }

    .horizontal-menu__submenus {
        overflow: scroll;
        width: 100%;
    }

    .horizontal-menu__submenu {
        width: 100%;
    }

    .horizontal-menu__submenu .horizontal-menu__link--parent {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .btn-back__menu {
        display: flex;
        padding: 6px 16px 6px 12px;
        align-items: center;
        gap: 6px;

        color: #4B68D4;
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 20px;

        border-radius: 64px;
        border: 1px solid #4B68D4;

        width: fit-content;
    }

    .horizontal-menu__button-name {
        font-size: 20px;
        font-style: normal;
        font-weight: 500;
        line-height: 28px;

        justify-content: space-between;
        align-items: center;
    }

    .horizontal-menu__button-name svg {
        opacity: 1;
    }

    .horizontal-menu__list {
        width: auto;
    }

    .horizontal-menu__list .horizontal-menu__item {
        height: 257px;
        width: auto;
    }

    .horizontal-menu__list:has(.selected) .horizontal-menu__item:not(.selected) {
        display: none;
    }



    .horizontal-menu__list .horizontal-menu__item.selected {
        height: 88px;
    }

    .horizontal-menu__list .horizontal-menu__item.selected .horizontal-menu__button-name {
        font-size: 20px;
        font-style: normal;
        font-weight: 500;
        line-height: 28px;
        width: 140px;
    }

    .horizontal-menu__list .horizontal-menu__item.selected .horizontal-menu__button-name svg {
        opacity: 0;
    }

    .horizontal-menu__list .horizontal-menu__item {
        padding: 16px;
    }

    .horizontal-menu__submenus {
        flex-direction: column;
        gap: 6px;
    }

    .header__btn-menu .header__btn-menu-close {
        display: none;
    }

    .header__btn-menu.active .header__btn-menu-close {
        display: unset;
    }

    .header__btn-menu.active .header__btn-menu-burger {
        display: none;
    }

    .horizontal-menu__submenu {
        display: none;
    }

    .horizontal-menu__submenu.active .horizontal-menu__item:not(:first-of-type) {
        display: none;
        margin-bottom: 10px;
    }

    .horizontal-menu__submenu .horizontal-menu__item:first-of-type {
        margin-bottom: 16px;
    }

    .horizontal-menu__submenu .horizontal-menu__item a {
        color: #5A616C;
        font-size: 16px;
        font-style: normal;
        font-weight: 400;
        line-height: 24px;
    }

    .horizontal-menu__submenu .horizontal-menu__item:first-of-type a {
        color: #111827;
        font-size: 18px;
        font-style: normal;
        font-weight: 500;
        line-height: 24px;
    }

    .horizontal-menu.horizontal-menu--open {
        gap: 24px;
        width: calc(100% - 39px);
        overflow: auto;
        padding-bottom: 24px;
    }
}