/* =======================================================
   NAVIGATION.CSS - Стили навигации
   ======================================================= */

/* Основная навигация */
.navbar.fixed-top {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px);
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030;
    height: auto !important;
    min-height: 56px;
    max-height: 70px;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar .container-fluid {
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
    height: auto;
}

/* Логотип */
.navbar-brand {
    padding: 0.25rem 0;
}

.navbar-brand img {
    max-height: 40px !important;
    height: 40px !important;
    width: auto !important;
    transition: all 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Ссылки навигации */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #9d99c6 !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #9d99c6;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.language-switcher .form-select {
    width: auto;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
}

.language-switcher .form-select:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #9d99c6;
    box-shadow: 0 0 0 0.2rem rgba(157, 153, 198, 0.25);
    color: white;
}

.language-switcher .form-select option {
    background-color: #2c3e50;
    color: white;
}

/* Флаги стран */
.lang-flag {
    width: 24px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    border: 1px solid #ccc;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
}

.flag-ru { 
    background-image: linear-gradient(180deg, #fff 33%, #0039a6 33%, #0039a6 66%, #d52b1e 66%); 
}

.flag-kk { 
    background-image: linear-gradient(180deg, #00bcd4 100%); 
    position: relative; 
}

.flag-kk::after {
    content: '';
    display: block;
    position: absolute;
    left: 2px; 
    top: 2px;
    width: 6px; 
    height: 6px;
    border-radius: 50%;
    background: #ffd600;
}

/* Dropdown меню */
.dropdown-menu {
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(157, 153, 198, 0.2);
    color: #9d99c6;
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Кнопка мобильного меню */
.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: #9d99c6;
    background-color: rgba(157, 153, 198, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(157, 153, 198, 0.25);
}

.navbar-toggler-icon {
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Мобильная навигация */
@media (max-width: 991.98px) {
    .navbar.fixed-top {
        max-height: none;
    }
    
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.95) !important;
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        margin-top: 15px;
        padding: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }
    
    .navbar-nav {
        gap: 5px;
    }
    
    .navbar-nav .nav-link {
        color: white !important;
        padding: 12px 16px;
        border-radius: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 5px;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(157, 153, 198, 0.2);
        color: #9d99c6 !important;
        transform: translateX(5px);
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .language-switcher {
        margin: 15px 0;
        justify-content: center;
    }
    
    .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.95);
    }
}

/* Анимация открытия мобильного меню */
.navbar-collapse.collapsing {
    transition: height 0.35s ease;
}

.navbar-collapse.show {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Эффект при скролле */
.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled .navbar-brand img {
    transform: scale(0.9);
}