/* Стили для навигационной панели */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.navbar-menu {
    display: flex;
    justify-content: center;
    flex: 1;
}

.navbar-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

.navbar-menu li {
    position: relative;
}

.nav-link {
    display: block;
    padding: 1.2rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid #3498db;
}

.admin-link {
    color: rgba(255, 255, 255, 0.85);
    background-color: rgba(231, 76, 60, 0.2);
    border-radius: 4px;
}

.admin-link:hover, .admin-link.active {
    background-color: rgba(231, 76, 60, 0.4);
    color: #ffffff;
}

/* Стили для выпадающего меню */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    position: relative;
    padding-right: 1.5rem;
}

.dropdown-toggle::after {
    content: '';
    display: inline-block;
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.85);
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.8rem 1.2rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f5f7fa;
    color: #3498db;
}

.dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background-color: #ecf0f1;
    border: none;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-btn, .logout-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-btn {
    background-color: #3498db;
    color: white;
}

.login-btn:hover {
    background-color: #2980b9;
}

.logout-btn {
    background-color: #e74c3c;
    color: white;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* Стили для мобильного меню-бургера */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .bar:first-child {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .bar:last-child {
    transform: translateY(-8px) rotate(-45deg);
}

/* Запрет прокрутки при открытом меню */
body.menu-open {
    overflow: hidden;
}

/* Стили для элементов, видимых только на мобильных или десктопе */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Адаптивный дизайн для навбара */
@media (max-width: 992px) {
    .navbar {
        flex-direction: column;
        padding: 0.5rem;
    }
    
    .navbar-brand {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
        padding: 0.5rem;
    }
    
    .navbar-menu {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .navbar-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        padding: 0.8rem 0.6rem;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid #ecf0f1;
        margin-top: 0;
    }
    
    .user-menu {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        z-index: 1000;
        overflow-y: auto;
        padding: 1rem;
        flex-direction: column;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .navbar-menu.show {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }
    
    .navbar-menu ul {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .navbar-menu li {
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        padding: 0.8rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-left: none;
    }
    
    .nav-link:hover, .nav-link.active {
        border-bottom: 1px solid #3498db;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .dropdown-toggle::after {
        right: 1.5rem;
    }
} 