body.no-scroll {
    overflow: hidden;
}

/* Основные стили меню */
.main-menu {
    position: relative;
    z-index: 1000;
    margin-left: 4rem;
}

.nav {
    background-color: transparent !important;
    box-shadow: none !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled,
.nav:hover {
    background-color: #fff !important;
}

.nav .container__left .logo {
    width: auto;
}

.main-menu__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.main-menu__item {
    position: relative;
}

.main-menu__link {
    display: inline-block;
    padding: 0;
    text-decoration: none;
    color: #000;
    font-family: "Ubuntu", sans-serif;
    font-size: 16px;
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.5s;
    position: relative;
}

.nav.scrolled .main-menu__link,
.nav:hover .main-menu__link {
    color: #000;
}

.main-menu__link:hover {
    color: #0070AD;
}

.main-menu__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0070AD;
    transition: width 0.5s ease;
}

.main-menu__link:hover::after {
    width: 100%;
}

/* Выпадающее меню */
.main-menu__dropdown {
    position: fixed;
    top: 92px;
    width: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    height: 40vh;
    overflow-y: auto;
    min-width: 100vw;
    margin-left: calc(-50vw + 50%);
    box-shadow: 0 8px 16px -4px rgba(0,0,0,0.1);
}

.main-menu__item:hover .main-menu__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-menu__dropdown-content {
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 0;
    font-family: "Ubuntu", sans-serif;
    font-size: 16px;
    font-weight: 400;
    height: 100%;
    background-color: rgb(247, 247, 247);
}

.main-menu__promo-section {
    background-color: #0070ad;
    color: #fff;
    padding: 2rem;
    width: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-shrink: 0;
}

.main-menu__promo-section h4 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.main-menu__promo-section p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.main-menu__promo-section .promo-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid #fff;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
    margin-top: auto;
}

.main-menu__promo-section .promo-button:hover {
    background-color: #fff;
    color: #0070ad;
}

.main-menu__promo-section .promo-button i {
    margin-left: 0.5rem;
}


.main-menu__links-section {
    padding: 2rem;
    flex-grow: 0;
    width: fit-content;
    overflow-y: auto;
    /* border-right: 1px solid #eee; */
}

.main-menu__sub-links-section {
    background-color: #fff;
}

.main-menu__sub-links-section,
.main-menu__sub-sub-links-section {
    padding: 2rem;
    flex-grow: 0;
    width: fit-content;
    display: none; /* Скрываем по умолчанию */
}

.main-menu__sub-links-section.active,
.main-menu__sub-sub-links-section.active {
    display: block; /* Показываем активную секцию */
}

.main-menu__submenu-content {
    display: none; /* Скрываем все подменю */
    max-height: 100%;
    overflow-y: auto;
}

.main-menu__submenu-content.active {
    display: block; /* Показываем активное подменю */
}

/* Равная ширина для трех главных разделов в меню "Услуги и сотрудничество" */
.main-menu__dropdown-content .main-menu__section {
    flex: 0 0 auto;
}

/* Колонки для больших меню */
.main-menu__columns {
    /* display: grid; */
    /* grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
    /* gap: 2rem; */
    /* margin-bottom: 2rem; */
}

.main-menu__column {
    min-width: 0;
}

/* Секции меню */
.main-menu__section {
    margin: 0;
    transition: all 0.3s ease;
}

.main-menu__section:last-child {
    margin-bottom: 0;
}

.main-menu__section-title {
    color: #000;
    font-family: "Ubuntu", sans-serif;
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    padding: 0.5rem 0;
    cursor: default;
}

/* Выпадающие секции - больше не нужны в таком виде */
.main-menu__section-dropdown,
.main-menu__subsection-dropdown {
   display: none;
}


/* Подсекции */
.main-menu__subsection {
    margin-bottom: 0rem;
    margin-top: 0rem;
}

.main-menu__subsection:last-child {
    margin-bottom: 0;
}

.main-menu__subsection-title {
    color: #000;
    font-family: "Ubuntu", sans-serif;
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    cursor: default;
    padding: 0.5rem 0;
}

/* Выпадающие подсекции - больше не нужны в таком виде */
.main-menu__subsection-dropdown {
    display: none;
}

/* Стили для ссылок с подменю */
.main-menu__hoverable > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0;
}

.main-menu__hoverable > a .arrow {
    margin-left: 1rem;
    font-size: 0.8em;
    transition: transform 0.3s;
}

/* Новые унифицированные стили для подчеркивания */
.main-menu__submenu li a {
    position: relative;
}

.main-menu__submenu li a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #0070AD;
    transition: width 0.5s ease;
}

.main-menu__submenu li a:hover::after {
    width: 100%;
}

/* Отключаем подчеркивание у 'a' в hoverable, чтобы оно было только на span */
.main-menu__hoverable > a::after {
    content: none;
}


.main-menu__hoverable.active > a .arrow {
    transform: none; /* Убираем вращение */
}

/* Улучшенные стили для скролла подменю */
.main-menu__section-dropdown::-webkit-scrollbar,
.main-menu__subsection-dropdown::-webkit-scrollbar {
    width: 4px;
}

.main-menu__section-dropdown::-webkit-scrollbar-track,
.main-menu__subsection-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.main-menu__section-dropdown::-webkit-scrollbar-thumb,
.main-menu__subsection-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.main-menu__section-dropdown::-webkit-scrollbar-thumb:hover,
.main-menu__subsection-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Списки в меню */
.main-menu__submenu,
.main-menu__subsection ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu__submenu li,
.main-menu__subsection ul li {
    margin-bottom: 0;
    position: relative;
}

.main-menu__submenu li:last-child,
.main-menu__subsection ul li:last-child {
    margin-bottom: 0;
}

.main-menu__submenu a,
.main-menu__subsection ul a {
    display: inline-block;
    padding: 0.75rem 0;
    text-decoration: none;
    color: #000;
    font-family: "Ubuntu", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    transition: color 0.5s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    width: auto;
}

.main-menu__submenu a:hover,
.main-menu__subsection ul a:hover {
    color: #0070AD;
}

/* .main-menu__submenu a:hover::after,
.main-menu__subsection ul a:hover::after {
    width: 100%;
} */

/* Удаляем старые правила для выпадающих меню */
.main-menu__section-dropdown,
.main-menu__subsection-dropdown,
.main-menu__hoverable:hover > .main-menu__section-dropdown,
.main-menu__hoverable:hover > .main-menu__subsection-dropdown {
   /* Эти правила больше не нужны, так как мы управляем видимостью через JS */
   display: none;
}

.main-menu__section-dropdown.active,
.main-menu__subsection-dropdown.active {
    /* Эти правила больше не нужны */
    display: none;
}


/* Кастомный скроллбар для выпадающего меню */
.main-menu__dropdown::-webkit-scrollbar {
    width: 4px;
}

.main-menu__dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.main-menu__dropdown::-webkit-scrollbar-thumb {
    background: #0070AD;
    border-radius: 2px;
}

.main-menu__dropdown::-webkit-scrollbar-thumb:hover {
    background: #005a8b;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .main-menu__columns {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .main-menu__dropdown-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-menu {
        display: none;
    }
} 