/* === ШАПКА === */
.header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    background-image: url('/images/Header_background.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* Все дочерние блоки шапки на всю ширину */
.container-header .grid-child,
.container-header .container-nav,
.container-header .navbar-brand,
.container-header .container-top-a,
.container-header .container-top-b,
.container-header .container-below-top {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Логотип */
.navbar-brand {
    order: 0;
    padding: 15px 20px !important;
    text-align: center;
}

/* Слайдшоу (top-a) */
.container-top-a {
    order: 1;
}

/* Убираем отступы у слайдшоу */
.djslider-loader {
    max-width: 100% !important;
}
#djslider118 {
    max-width: 100% !important;
}

/* Меню (container-nav) */
.container-nav {
    order: 2;
    background-color: #1a4f8a;
    padding: 0 !important;
}

/* ===== Стили для TOPBAR (темно-синяя полоска) ===== */

/* 1. Фон для всего topbar */
.topbar {
    background-color: #1a4f8a !important; /* темно-синий */
    padding: 2px 0 !important;
    min-height: 30px !important;
    display: flex !important;
    justify-content: flex-end !important; /* выравнивание по правому краю */
    align-items: center !important;
}

/* 2. Если topbar - это контейнер */
.container-topbar,
#topbar,
.topbar-wrapper {
    background-color: #0a2f5a !important;
    padding: 2px 20px !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

/* 3. Стили для меню в topbar */
.topbar .mod-menu,
.topbar .nav {
    display: flex !important;
    justify-content: flex-end !important; /* пункты справа */
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: transparent !important;
}

/* 4. Стили для пунктов меню в topbar */
.topbar .nav-item,
.topbar .mod-menu .nav-item {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.topbar .nav-link,
.topbar .mod-menu .nav-link {
    display: block !important;
    padding: 2px 12px !important;
    color: #ffffff !important;
    font-size: 12px !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    line-height: 1.4 !important;
}

/* 5. При наведении на пункты topbar */
.topbar .nav-link:hover,
.topbar .mod-menu .nav-link:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
    border-radius: 3px !important;
}

/* 6. Активный пункт в topbar */
.topbar .nav-item.active .nav-link,
.topbar .nav-item.current .nav-link {
    background: rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
    border-radius: 3px !important;
}

/* 7. Если topbar находится внутри grid-child */
.grid-child.container-topbar {
    background-color: #0a2f5a !important;
    padding: 2px 20px !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

/* 8. Для мобильной версии - чтобы не ломалось */
@media (max-width: 768px) {
    .topbar .mod-menu,
    .topbar .nav {
        flex-wrap: wrap !important;
        justify-content: flex-end !important;
    }
    .topbar .nav-link {
        padding: 2px 8px !important;
        font-size: 11px !important;
    }
}

/* Само меню horizontal-menu*/
.horizontal-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Меню слева */
    align-items: stretch;
    list-style: none;
    padding: 0 40px !important;
    margin: 0 !important;
    background-color: #1a4f8a;


    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    min-height: 20px;
    max-height: 35px;

}

/* Пункты меню */
.horizontal-menu > li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    background-color: #1a4f8a;
    height: 100%;

}

/* Ссылки */
.horizontal-menu .nav-item {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    color: #d4edff;
    text-decoration: none;
    padding: 10px 25px;
    background-color: transparent;
    height: 100%;
    transition: background-color 0.3s, color 0.3s;
}

.horizontal-menu .nav-item:hover {
    background-color: #1a4f8a;
    color: #ffffff;
}

.horizontal-menu .nav-item.active {
    background-color: #1a4f8a;
    font-weight: bold;
}



/* ============================================================
   ЛЕВОЕ МЕНЮ (sidebar-left) — ФИНАЛЬНАЯ ВЕРСИЯ
   ============================================================ */

/* 1. ФОН КОЛОНКИ И КОНТЕЙНЕРА — БЕЛЫЙ */
.sidebar-left,
.sidebar-left .card,
.sidebar-left .card-body,
.sidebar-left .mod-menu {
    background-color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 2. ГЛАВНЫЕ ПУНКТЫ — СИНИЙ ФОН, СВЕТЛЫЙ ТЕКСТ */
.sidebar-left .mod-menu > li.nav-item {
   
    background-color: #1a4f8a !important; /* СВЕТЛЕЕ ПРИ НАВЕДЕНИИ */

    border-bottom: 1px solid #1a4f8a !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.sidebar-left .mod-menu > li.nav-item > a {
    color: #d4edff !important; /* СВЕТЛЫЙ ТЕКСТ */
    padding: 8px 20px !important;
    display: block;
    text-decoration: none;
    font-weight: 500;
    background-color: transparent !important;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar-left .mod-menu > li.nav-item > a:hover {
    background-color: #1a4f8a !important; /* СВЕТЛЕЕ ПРИ НАВЕДЕНИИ */
    color: #ffffff !important;
}

.sidebar-left .mod-menu > li.nav-item.current > a,
.sidebar-left .mod-menu > li.nav-item.active > a {
    background-color: #1a4f8a !important; /* АКТИВНЫЙ — ТОЖЕ СВЕТЛЕЕ */
    color: #ffffff !important;
    font-weight: bold;
}

/* 3. ПОДПУНКТЫ — БЕЛЫЙ ФОН, ТЁМНЫЙ ТЕКСТ, ЛЕВОЕ ВЫРАВНИВАНИЕ */
.sidebar-left .mod-menu__sub {
    background-color: #ffffff !important; /* БЕЛЫЙ ФОН */
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.sidebar-left .mod-menu__sub .nav-item {
    background-color: #ffffff !important; /* БЕЛЫЙ ФОН */
    border-bottom: 1px solid #f0f0f0 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.sidebar-left .mod-menu__sub .nav-item > a {
    color: #333333 !important; /* ТЁМНЫЙ ТЕКСТ */
    padding: 6px 20px !important; /* ЛЕВОЕ ВЫРАВНИВАНИЕ (без отступа слева) */
    display: block;
    text-decoration: none;
    font-weight: 400;
    background-color: transparent !important;
    font-size: 0.95rem;
    text-align: left !important; /* ПРИНУДИТЕЛЬНО ЛЕВЫЙ КРАЙ */
    transition: background-color 0.3s, color 0.3s;
}

.sidebar-left .mod-menu__sub .nav-item > a:hover {
    background-color: #e8f0fe !important; /* ПОДСВЕТКА ПРИ НАВЕДЕНИИ */
    color: #0a2f5a !important;
}

.sidebar-left .mod-menu__sub .nav-item.current > a,
.sidebar-left .mod-menu__sub .nav-item.active > a {
    background-color: #d4e4f7 !important; /* ПОДСВЕТКА АКТИВНОГО */
    color: #0a2f5a !important;
    font-weight: bold;
}

