/* ============================================================
   navbar.css — стили навигации
   Два варианта навбара:
     * Главная (index / index_en): .top-bar + navbar-custom + мега-меню + мобильное меню
     * Новости (news):            .navbar-custom.navbar-news + кнопка «назад» +
                                   переключатель языка + заголовок страницы
   ============================================================ */

/* ---------- ВЕРХНЯЯ СТРОКА (только index) ---------- */
.top-bar {
    background-color: rgba(34,36,47,0.2);
    color: #fdb400;
    text-align: center;
    padding: 8px 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 2;
}
.top-bar.hide-top-bar {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

/* ---------- ОБЩИЙ НАВБАР ---------- */
.navbar-custom {
    background-color: rgba(34,36,47,0.7);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.15);
    transition: all 0.3s ease;
    z-index: 1030;
}
.navbar-custom .navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.navbar-brand img {
    height: 64px;
    width: auto;
}

/* ---------- ПУНКТЫ И МЕГА-МЕНЮ (index) ---------- */
.nav-link-custom {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff !important;
    text-transform: uppercase;
    padding: 0.5rem 1rem !important;
    transition: background-color 0.2s;
}
.nav-link-custom:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 6px;
}
.nav-item-dropdown { position: relative; }
.mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(34,36,47,0.9);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1050;
    border: 1px solid rgba(255,255,255,0.1);
}
.nav-item-dropdown:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
}
.dropdown-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1.5rem;
}
.dropdown-single {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 220px;
}
.dropdown-item-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.5rem 0;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s, background 0.2s;
    border-radius: 8px;
}
.dropdown-item-custom i {
    width: 20px;
    font-size: 1rem;
    color: #aaa;
}
.dropdown-item-custom:hover {
    color: #ffffff;
    background-color: rgba(255,255,255,0.08);
    padding-left: 8px;
}
.phone-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.phone-link:hover { text-decoration: underline; }
.phone-icon { color: #fdb400; font-size: 1.2rem; }
/* ============================================================
   ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКА — Bootstrap btn-group (как в админке страниц)
   Кнопки .btn-outline-warning; активную подсвечивает js/page-runtime.js
   (добавляет .active + .active-lang). Метки RU/EN фиксированы.
   ============================================================ */
.lang-switch,
.nav-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---------- МОБИЛЬНОЕ МЕНЮ (index) ---------- */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #111111;
    border-top: 1px solid #222;
    padding: 1rem;
    z-index: 1040;
    display: none;
    box-shadow: 0 20px 30px rgba(0,0,0,0.5);
}
.mobile-nav-link {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 0;
    display: block;
    border-bottom: 1px solid #222;
    cursor: pointer;
}
.mobile-submenu {
    padding-left: 1rem;
    display: none;
}
.mobile-submenu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
}
.mobile-submenu a i { width: 20px; }

/* ============================================================
   НАВБАР НОВОСТЕЙ (news) — отличается вид и поведение
   ============================================================ */
.navbar-news {
    position: sticky;
    top: 0;
    padding: 0.75rem 0;
}
.navbar-news .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.navbar-left-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 30px;
    background: var(--opacity-10);
    color: var(--text-color-white);
    font-size: 1.6rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}
.back-button:hover { background: var(--opacity-25); color: var(--primary-gold); }
.back-button:active { transform: scale(0.96); }
.nav-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.page-title {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 1px;
    margin: 0;
    color: var(--text-color-white);
    text-transform: uppercase;
    background: rgba(0,0,0,0.3);
    padding: 6px 16px;
    border-radius: 40px;
    backdrop-filter: blur(2px);
    white-space: nowrap;
    text-align: center;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-brand-custom {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    line-height: 0;
}
.navbar-brand-custom img { height: 52px; width: auto; }
.navbar-brand-custom .fallback-text {
    color: var(--text-color-white);
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 10px;
    background: var(--opacity-10);
    border-radius: 8px;
}

/* ---------- АДАПТИВ НАВБАРА НОВОСТЕЙ ---------- */
/* На мобильных/планшетах прячем плашку заголовка между языком и логотипом,
   чтобы навбар не «разваливался» (логотип не переносился на новую строку). */
@media (max-width: 767.98px) {
    .page-title { display: none; }
}
@media (max-width: 576px) {
    .navbar-news .container { gap: 0.5rem; }
    .navbar-brand-custom img { height: 44px; }
    .back-button { width: 40px; height: 40px; font-size: 1.4rem; }
}
