/* Кастомные стили для навигационной панели */

.navbar-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    min-height: 70px;
    padding: 10px 0;
    transition: all 0.3s ease;
}

.navbar-custom.scrolled {
    min-height: 60px;
    padding: 5px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.navbar-custom .navbar-brand {
    color: #fff !important;
    font-size: 24px;
    font-weight: 700;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none !important;
}

.navbar-custom .navbar-brand:hover {
    transform: scale(1.05);
    text-decoration: none !important;
}

.navbar-custom .navbar-brand:focus {
    text-decoration: none !important;
}

.navbar-custom .navbar-brand img {
    height: 50px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.navbar-custom.scrolled .navbar-brand img {
    height: 45px;
}

.navbar-custom .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 16px;
    font-weight: 500;
    padding: 25px 20px;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-decoration: none !important;
}

.navbar-custom .navbar-nav > li > a:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.navbar-custom .navbar-nav > li > a:focus {
    text-decoration: none !important;
}

.navbar-custom .navbar-nav > li > a:active {
    text-decoration: none !important;
}

.navbar-custom .navbar-nav > li > a::before {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.5));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.navbar-custom .navbar-nav > li.active > a {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none !important;
}

.navbar-custom .navbar-nav > li.active > a::before {
    transform: scaleX(1);
}

.navbar-custom .navbar-nav > li > a:hover::before {
    transform: scaleX(1);
}

.navbar-custom .navbar-toggle {
    border-color: rgba(255, 255, 255, 0.4);
    margin-top: 18px;
    transition: all 0.3s ease;
}

.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.navbar-custom .navbar-toggle .icon-bar {
    background-color: #fff;
}

/* Стили для правой части меню (логин) */
.navbar-custom .navbar-right > li > a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
}

.navbar-custom .navbar-right > li > a:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none !important;
}

.navbar-custom .navbar-right > li > a:focus {
    text-decoration: none !important;
}

.navbar-custom .navbar-right > li > a:active {
    text-decoration: none !important;
}

/* ===== СПЕЦИАЛЬНЫЙ КЛАСС ДЛЯ КНОПКИ ПРОФИЛЯ ПОЛЬЗОВАТЕЛЯ ===== */
.user-profile-btn {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    padding: 10px 20px !important;
    margin: 15px 10px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.user-profile-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    text-decoration: none !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.user-profile-btn:focus {
    text-decoration: none !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
}

.user-profile-btn:active {
    text-decoration: none !important;
    transform: translateY(0) !important;
}

.user-profile-btn:visited {
    text-decoration: none !important;
}

/* Убираем ::before для кнопки профиля */
.user-profile-btn::before {
    display: none !important;
}

/* Убираем подчеркивание у текста внутри кнопки профиля */
.user-profile-btn span,
.user-profile-btn:hover span,
.user-profile-btn:focus span,
.user-profile-btn:active span {
    text-decoration: none !important;
}

/* Иконка внутри кнопки профиля */
.user-profile-btn .glyphicon {
    margin-right: 8px;
    font-size: 14px;
}

/* ===== КОНЕЦ СТИЛЕЙ КНОПКИ ПРОФИЛЯ ===== */

/* Старые стили для dropdown-toggle (на всякий случай) */
.navbar-custom .navbar-right .dropdown-toggle {
    text-decoration: none !important;
}

.navbar-custom .navbar-right .dropdown-toggle:hover {
    text-decoration: none !important;
}

.navbar-custom .navbar-right .dropdown-toggle:focus {
    text-decoration: none !important;
    outline: none;
}

.navbar-custom .navbar-right .dropdown-toggle:active {
    text-decoration: none !important;
}

.navbar-custom .navbar-right .dropdown-toggle:visited {
    text-decoration: none !important;
}

.navbar-custom .navbar-right .dropdown-toggle::before {
    display: none !important;
}

/* Responsive */
@media (max-width: 767px) {
    .navbar-custom .navbar-brand img {
        height: 40px;
    }
    
    .navbar-custom .navbar-nav {
        margin: 0;
        background-color: rgba(0, 0, 0, 0.1);
        border-radius: 5px;
        margin-top: 10px;
    }
    
    .navbar-custom .navbar-nav > li > a {
        padding: 15px 15px;
    }
    
    .navbar-custom .navbar-nav > li > a::before {
        display: none;
    }
    
    .navbar-custom .navbar-nav > li.active > a {
        background-color: rgba(255, 255, 255, 0.3);
    }
    
    /* Адаптивные стили для кнопки профиля */
    .user-profile-btn {
        margin: 10px 5px !important;
        padding: 8px 15px !important;
    }
}

/* Выпадающее меню для пользователя */
.navbar-custom .dropdown-menu {
    background-color: #fff;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    margin-top: 5px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-custom .dropdown-menu > li > a {
    color: #333 !important;
    padding: 12px 20px;
    transition: all 0.2s ease;
    text-shadow: none;
    text-decoration: none !important;
}

.navbar-custom .dropdown-menu > li > a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    padding-left: 25px;
    text-decoration: none !important;
}

.navbar-custom .dropdown-menu > li > a:focus {
    text-decoration: none !important;
}

.navbar-custom .dropdown-menu > li > a:active {
    text-decoration: none !important;
}

.navbar-custom .dropdown-menu > li + li {
    border-top: 1px solid #f0f0f0;
}

/* Иконки в меню */
.navbar-custom .navbar-nav > li > a i {
    margin-right: 5px;
}

/* Анимация для активного пункта */
.navbar-custom .navbar-nav > li.active > a {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        background-color: rgba(255, 255, 255, 0.2);
    }
    50% {
        background-color: rgba(255, 255, 255, 0.25);
    }
}

/* Убираем подчеркивание у всех ссылок в навбаре */
.navbar-custom a,
.navbar-custom a:hover,
.navbar-custom a:focus,
.navbar-custom a:active,
.navbar-custom a:visited {
    text-decoration: none !important;
}
