


.megamenu{
    position: absolute;
    width: 100%;
}

.megamenu li>a{
display: block;
}

.megamenu li>a:hover, .megamenu li>a:hover {
    background-color: var(--light-gray);
    color: var(--blue);

}

.megamenu li>a:not(.rooter):hover>.chev{
    display: block;
}

.megamenu li>a:hover>.chev>svg>path{
    stroke: #335ABD;
}

.megamenu-mobile{
    display: none;
}

.megamenu-parents{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    /* Основной список мобильных мегаменю */
.mobile-megamenu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Элемент верхнего уровня */
.mobile-megamenu-item {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.mobile-megamenu-item:last-child {
    margin-bottom: 0;
}

/* Ссылка-заголовок поста */
.mobile-megamenu-root {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Подменю с пунктами из repeater */
.mobile-megamenu-submenu {
    list-style: none;
    padding: 30px 0 0 0;
    margin: 0;    
}

.mobile-megamenu-submenu li {
    margin-bottom: 20px;
}

.mobile-megamenu-submenu a {
    display: block;
    line-height: 1;
    text-decoration: none;
}

/* .mobile-megamenu-submenu a:hover {
    color: #000;
} */

/* Скрываем подменю по умолчанию */
/* .mobile-megamenu-submenu {
    display: none;
} */

/* Стили для иконки */
.menuico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    cursor: pointer; /* Показываем, что элемент кликабельный */
}

.menuico img {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    display: block;
}

/* Поворот иконки при открытии */
.mobile-megamenu-item.is-open .menuico {
    transform: rotate(90deg);
}

/* Flex-выравнивание заголовка и иконки */
.mobile-megamenu-root {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
}

/* === Десктопное мегаменю === */
.megaholder .megamenu {
    display: none;
}
.megaholder .megamenu.is-active {
    display: block;
}

/* Подменю внутри мегаменю */
.megamenu-children {
    display: none;
}
.megamenu-children.is-active {
    display: block;
}

.megamenu .megamenu-parent-item a, .megamenu .megamenu-children a{
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
}

.megamenu .megamenu-children a .chev{
    display: none;
}

.megamenu .megamenu-children a:hover{

}

/* Подсветка активного родителя */
.megamenu-parent-item.is-active > a {
    font-weight: 700;
}

/* === Мобильное меню === */
.mobile-megamenu-submenu {
    display: none;
}
.menuico {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.3s ease;
    cursor: pointer;
    height: auto;
    width: 100%;
}
.menuico img {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    display: block;
}
.mobile-megamenu-item.is-open .menuico {
    transform: unset;
    & img {
        transform: rotate(180deg);
    }
}
.mobile-megamenu-root {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 12px;
    text-decoration: none;
}