/* Базовые стили меню */
.header__nav {
    display: flex;
    /*gap: 2rem;*/
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.header__nav-item {
    position: relative;
}

.header__nav-link {
    cursor: pointer;
    /*padding: 0.5rem 1rem;*/
    padding-bottom: 22px;
    padding-top: 22px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    color: #ffffff;
    display: block;
}
.header__nav-link:hover {
    color: #DDEB33;
}

/* Стили для пунктов с подменю */
.header__nav-link:not(.header__nav-link--simple) {
    position: relative;
}

.header__nav-link:not(.header__nav-link--simple)::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 0.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Ховер для пунктов с подменю */
.header__nav-item:hover .header__nav-link:not(.header__nav-link--simple)::after {
    transform: rotate(180deg);
}

/* Второй уровень меню (подменю) */
.header__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    /*min-width: 220px;*/
    width: max-content;
    background: #0E243B;
    /*box-shadow: 0 8px 16px rgba(0,0,0,0.1);*/
    border-radius: 4px;
    padding: 30px 30px 18px 30px;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Показываем подменю при ховере на родительский пункт */
.header__nav-item:hover .header__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Стили для элементов подменю */
.header__submenu-item {
    margin: 0;
    padding: 0;
}

.header__submenu-link {
    display: block;
    padding-bottom: 12px;
    color: #ABB3BB;
    font-size: 16px;
    line-height: 135%;
    text-decoration: none;
    transition: background 0.2s ease;

}

.header__submenu-link:hover {
    /*background: #f5f5f5;*/
    color: #FFFFFF;
}

/* Стили для одиночных пунктов меню */
.header__nav-link--simple {
    cursor: pointer;
}

.header__nav-link--simple:hover {
    color: #DDEB33;
}

/* ===== АКТИВНЫЕ ПУНКТЫ МЕНЮ ===== */
/* Активный пункт первого уровня */
.header__nav-item.active .header__nav-link,
.header__nav-link.active {
    color: #DDEB33;
    font-weight: 600;
    position: relative;
}

.header__nav-item.active .header__nav-link::before,
.header__nav-link.active::before {
    /*content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: #DDEB33;*/
}

/* Активный пункт второго уровня */
.header__submenu-link.active {
    /*background: #e7f3ff;*/
    color: #DDEB33;
    font-weight: 600;
}

/* Адаптивность для мобильных устройств */

@media (max-width: 768px) {
    .header__nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header__submenu {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .header__nav-item:hover .header__submenu {
        display: block;
    }
}