.mg-main-menu-toggle {
    font-size: 14px;
    display: block;
    text-align: center;
    float: left;
    text-decoration: none;
	position: relative;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    background: #ff7606;
    color: #fff;
    border-radius: 4px;
    height: 40px;
	line-height: 40px;
}


.mg-main-menu-toggle:hover, .mg-main-menu-toggle:focus {
    color: #ffffff;
    outline-width: 0;
    text-decoration: none;
}

.top-menu-block.open .top-menu-toggle, .top-bar.open .mg-main-menu-toggle {
    color: rgb(255, 255, 255);
}

.mg-main-menu-toggle .toggle-icon {
    font-size: 20px;
    position: relative;
    top: 1px;
    width: 17.5px;
}

.top-menu-block.open .top-menu-toggle i::before, .top-bar.open .mg-main-menu-toggle span::before {
    content: "" !important;
}

.mg-main-menu-holder {
    position: absolute; /* Должно быть фиксированным */
    left: 0;
    right: 0;
    width: 100%; /* Полная ширина меню */
    display: none; /* Скрыто по умолчанию */
    height: calc(100vh - 40px); /* Замените на высоту вашего заголовка */
    overflow-y: auto; /* Прокрутка по вертикали */
    opacity: 0; /* Начальная непрозрачность */
    transition: 0.4s ease-in-out;
	--td-hc-indentation: 6rem;
    min-height: 60vh;
    margin-bottom: var(--td-hc-indentation);
    box-shadow: 0 14px 25px #b5c3d066;
    z-index: 99;
}

.mg-main-menu-holder .col-lg-8, .mg-main-menu-holder .col-lg-4 {
	padding: 1em;
}

.container-flex {
	display: flex;
    flex-wrap: wrap;
}

.mg-main-menu-holder.open {
    display: flex;
    opacity: 1;
    width: 100%;
    overflow-y: scroll;
    border-bottom: 1px solid rgb(241, 241, 241);
	    background: white;
}

.mg-main-menu {
	border-right: 1px solid rgba(181, 195, 208, .4);
    flex-wrap: initial;
    max-height: 80vh;
    overflow-x: hidden;
    overflow-y: auto;
	z-index: 1000;
	background-color: #fff;
	padding: 15px 15px 0px;
	width: 300px;
    margin: 0px;
}

.locked {
    overflow: hidden; /* Отключаем прокрутку */
    height: 100%; /* Устанавливаем высоту на 100% */
}

.mg-main-menu > li {
    display: inline-block;
    height: 40px;
    z-index: 60;
    position: relative;
    width: 100%;
    border-radius: 3px;
    transition: 0.2s;
	margin: 0;
}

.mg-main-menu > li a {
    color: rgb(33, 37, 41);
    display: block;
    text-align: left;
    font-size: 14px;
    line-height: 40px;
    height: 40px;
    padding: 0px 10px;
    text-decoration: none;
    transition: 0.2s;
}

.mg-main-menu > li a i {
    font-size: 20px;
    line-height: 40px;
    position: relative;
    float: left;
    margin-right: 5px;
    width: 26px;
    text-align: center;
}

.mg-main-menu-content {
	max-height: 80vh;
    overflow-x: hidden;
    overflow-y: auto;
	padding: 20px;
    width: calc(100% - 300px);
    float: right;
}

.mg-main-menu-content-block {
    position: relative;
    float: left;
    width: 100%;
    display: none;
}

.mg-main-menu-content-block.active {
    display: block;
}

.mg-main-menu-content-title {
    position: relative;
    float: left;
    width: 100%;
    margin: 0px 0px 20px;
	color: rgb(33, 37, 41);
    font-size: 18px;
    font-weight: bold;
}

.mg-main-menu-content-title a {
    color: rgb(33, 37, 41);
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

.mg-main-menu-content-block .submenu {
    position: relative;
    float: left;
    width: 100%;
    column-count: 3;
    list-style: none;
    padding: 0px;
    margin: 0px;
}

.mg-main-menu-content-block .submenu > li {
    margin-bottom: 20px;
}

.mg-main-menu-content-block .submenu li .mg-cat-desc {
    margin-bottom: 3px;
}

.mg-main-menu-content-block .submenu li .mg-cat-desc a {
    font-weight: bold;
    color: rgb(33, 37, 41);
    text-decoration: none;
}

.mg-main-menu-content .submenu li ul.sub-submenu {
    padding: 10px 0 0 10px;
    list-style: none;
    margin: 0px;
}

.mg-main-menu-content .submenu li .sub-submenu li {
   margin: 0;
    font-weight: 400;
}

.mg-main-menu-content .submenu li .sub-submenu li a {
    color: rgb(68, 71, 74);
    text-decoration: none;
}

.mg-main-menu-content-block .submenu li a {
	text-decoration: none;
}

li.mg-main-menu-li.active {
    color: #ff7606;
    background-color: rgb(219, 219, 219);
}

li.mg-main-menu-li.active > a {
    color: #ff7606; /* Цвет текста для активной ссылки */
	
}

@media all and (max-width: 991px) {
    .mg-main-menu-content {
        display: none; /* Скрываем блок с табами */
    }

    .mg-main-menu,
    .mg-main-menu-tabs {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        background-color: #fff;
        height: auto;
    }
	.mg-main-menu, .mg-main-menu-tabs {
        flex-direction: column; /* Располагаем в столбец */
    }
    
    .mg-main-menu > li, .mg-main-menu-tabs > li {
        flex: none; /* Убираем гибкость, чтобы каждый пункт занимал всю ширину */
        width: 100%; /* Устанавливаем ширину на 100% */
    }
	/*.mg-main-menu-holder.open {
	    max-height: 80vh;
	}*/

    /* Дополнительные стили для элементов внутри */
    .mg-main-menu > li,
    .mg-main-menu-tabs > li {
        flex: 1; /* Каждый элемент занимает равное пространство */
        text-align: center; /* Центрируем текст */
        margin: 5px; /* Отступы между элементами */
    }
}

.top-bar.visible {
    -webkit-box-shadow: 0 1px 10px 0 #bdbdbd;
    box-shadow: 0 1px 10px 0 #bdbdbd;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 70;
}

.mg-main-menu-holder.visible {
    position: fixed;
    background: #fff;
    z-index: 70;
    top: 65px;
    left: 0;
    right: 0;
    width: 100%;
}



.mg-main-menu > li {
    display: flex;          /* флекс, чтобы картинка и текст на одной линии */
    align-items: center;    /* вертикальное выравнивание по центру */
    height: 40px;           /* фиксированная высота */
    margin-bottom: 5px;     /* расстояние между пунктами */
    width: 100%;
}

.mg-main-menu > li a {
    display: flex;
    align-items: center;
    gap: 8px;               /* отступ между картинкой и текстом */
    width: 100%;            /* чтобы ссылка занимала весь li */
    text-decoration: none;
    color: rgb(33, 37, 41);
    font-size: 14px;
    height: 40px;
   line-height: normal !important;
}

.catimage {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;         /* чтобы картинка не сжималась */
}



.mg-main-menu-content-block .submenu > li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.mg-main-menu-content-block .submenu > li a {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: rgb(33, 37, 41);
    font-weight: 600;
    font-size: 16px;
    flex: 1; /* чтобы занимать оставшееся пространство */
}

.mg-main-menu-content-block .submenu > li img {
    width: 150px; /* или высота 150px - в зависимости от соотношения */
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    flex-shrink: 0;
}

/* Вложенные подменю (sub-submenu) — чуть меньше и с отступом */
.mg-main-menu-content-block .submenu li ul.sub-submenu {
    margin-left: 165px; /* чтобы текст не накладывался на картинку родителя */
    padding-left: 0;
    list-style: none;
    margin-top: 10px;
}

.mg-main-menu-content-block .submenu > li {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Выровнять элементы слева */
    gap: 15px;
    margin-bottom: 15px;
}

.mg-main-menu-content-block .submenu > li a {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-start; /* Выровнять содержимое слева */
    text-align: left; /* Текст слева */
}

.mg-main-menu-content-block .submenu > li img {
    width: 100px; /* или подбери нужный размер */
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    flex-shrink: 0;
}

}
