/* Третий уровень — раскрытие вправо */
/* Второй уровень */
.topmenu > .menu-item {
    position: relative;
}

.topmenu > .menu-item > .smenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    min-width: 280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 10;
    padding: 10px 0;
}

.topmenu > .menu-item:hover > .smenu {
    display: block;
}

/* Пункты второго уровня */
.submenu_item {
    position: relative;
}

.submenu_item > a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    color: #37474F;
    border-bottom: 1px solid #f0f0f0;
}

.submenu_item > a:hover {
    background: #f9f9f9;
    color: #37A03C;
}


/* Пункты третьего уровня */
/* Третий уровень — пункты с классом menu-item внутри submenu */
.submenu > .menu-item {
    position: relative;
}

.submenu > .menu-item > a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    color: #37474F;
    border-bottom: 1px solid #f0f0f0;
}

.submenu > .menu-item > a:hover {
    background: #f9f9f9;
    color: #37A03C;
}

.submenu > .menu-item > .smenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #fff;
    min-width: 280px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 10;
}

.submenu > .menu-item:hover > .smenu {
    display: block;
}

/* Стрелка для пунктов с подменю */
.submenu > .menu-item > a.submenu-link::after {
    content: "›";
    position: absolute;
    right: 12px;
    font-size: 18px;
    color: #37A03C;
}
.level-2 > a {
    pointer-events: auto;
    cursor: default;
}
.level-2 a::before {
    content: "";
    display: none;
    width: 0;
    margin: auto;
    height: 0;
    top: 0;
    bottom: 0;
    position: absolute;
    border-style: solid;
    border-width: 5px 5px 0 5px;
    border-color: #37A03C transparent transparent transparent;
    right: -15px;
}
.p100 {
 margin-top: 100px;   
}
.no-third .smenu .smenu {
    display: none !important;
}
.no-third  .submenu > .menu-item > a.submenu-link::after {
    display: none !important;
}
.no-third  .level-2 > a {
    pointer-events: auto !important;
    cursor: pointer !important;
}
.no-third .footer-dropdown .footer-dropdown {
    display: none !important;
}
.no-third .dropdown-toggle> a {
    pointer-events: auto !important;
    cursor: pointer !important;
}




/* ============================================
   БОКОВОЕ МЕНЮ (открытие по клику)
   ============================================ */

/* ============================================
   БОКОВОЕ МЕНЮ - ТОЛЬКО ПО КЛИКУ
   ============================================ */

.service-menu {
    display: block;
    width: 100%;
}

.sidebar-menu {
    display: block;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 10px 0;
    border: 0;
}

/* 1-й уровень */
.sidebar-menu-list {
    display: block;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-list > .sidebar-item {
    display: block;
    border-bottom: 0;
}

.sidebar-menu-list > .sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item a,
.sidebar-item span {
    display: block;
    padding: 12px 20px;
    color: #1a1a2e;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.25s ease;
    cursor: pointer;
}

.sidebar-item a:hover {
    background: #fff;
    color: #37A03C;
}

.sidebar-item span {
    cursor: pointer;
    font-weight: 600;
    color: #37474F;
    font-weight: 600;
    line-height: 23px;
    color: #37474F;
    padding: 0 20px 0 0;
    display: block;
    width: 100%;
    font-size: 18px;
    text-decoration: none;
}

.sidebar-item span:hover {
    background: #fff;
    color: #37A03C;
}

/* ============================================
   2-Й УРОВЕНЬ - ТОЛЬКО ПО КЛИКУ
   ============================================ */

.sidebar-sub {
    display: block;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    margin-top: 10px;
}

/* ОТКРЫВАЕМ ТОЛЬКО ПО КЛИКУ (ЧЕРЕЗ JS) */
.sidebar-parent.active .sidebar-sub {
    max-height: 800px;
}

.sidebar-sub-item {
    display: block;
    border-bottom: 1px solid #e5e8ec;
}

.sidebar-sub-item:last-child {
    border-bottom: none;
}

.sidebar-sub-item a {
    display: block;
    padding: 10px 20px 10px 35px;
    color: #37474F;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.25s ease;
}

.sidebar-sub-item a:hover {
    background: #fff;
    color: #37A03C;
    padding-left: 4px;
}

/* ============================================
   3-Й УРОВЕНЬ - ТОЛЬКО ПО КЛИКУ
   ============================================ */

.sidebar-sub-level3 {
    display: block;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #e5e8ec;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.sidebar-sub-parent.active .sidebar-sub-level3 {
    max-height: 800px;
}

.sidebar-sub-level3 .sidebar-sub-item a {
    padding: 8px 20px 8px 50px;
    font-size: 13px;
    color: #4a5a6a;
}

.sidebar-sub-level3 .sidebar-sub-item a:hover {
    background: #dce0e6;
    color: #0066cc;
    padding-left: 55px;
}

/* ============================================
   АКТИВНЫЙ ПУНКТ
   ============================================ */

.sidebar-item.active > a,
.sidebar-item.active > span {
    background: #fff;
    color: #37A03C;
    font-weight: 600;
}

.sidebar-sub-item.active > a {
    background: #d4e8ff;
    color: #0066cc;
    font-weight: 600;
}

/* ============================================
   АДАПТИВ
   ============================================ */

@media (max-width: 768px) {
    .sidebar-menu {
        border-radius: 8px;
        padding: 5px 0;
    }

    .sidebar-item a,
    .sidebar-item span {
        padding: 0;
        font-size: 16px;
    }
    
    .sidebar-sub-item a {
        padding: 8px 16px 8px 28px;
        font-size: 13px;
    }
    
    .sidebar-sub-level3 .sidebar-sub-item a {
        padding: 8px 16px 8px 40px;
        font-size: 12px;
    }
}

.link-s {
      font-weight: 600;
    font-size: 18px;
    line-height: 23px;
    color: #37474F;
    padding: 0 20px 0 0;
    display: block;
    width: 100%;
    text-decoration: none;  
}

.sidebar-menu-list .sidebar-parent.level-1:before  {
    transform: rotate(90deg); 
}
.service-menu ul li.active:before {
transform: rotate(270deg) !important;
}
.sidebar-menu-list .level-1 .sidebar-sub {
    margin-top: 0;
}    
.sidebar-menu-list .level-1.active .sidebar-sub {
    margin-top: 10px;
}