.site-header {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.9));
    padding: 0 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.brand-logo-link {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 0.2px;
    flex-shrink: 0;
}

.brand-logo-link img {
    height: 58px;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 12px;
}

.main-navigation {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.main-navigation a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 8px 14px;
    position: relative;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-color: rgba(255, 255, 255, 0.06);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.main-navigation a::after { display: none; }

.main-navigation a:hover {
    transform: translateY(-1px);
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.main-navigation a.active {
    background: linear-gradient(135deg, var(--primary-color), #574bdb);
    border-color: transparent;
    box-shadow: 0 14px 32px rgba(108, 92, 231, 0.35);
}

/* Бургер-меню для мобильных устройств */
.burger-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-light);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.burger-menu-toggle.active span:first-child {
    transform: rotate(45deg);
}

.burger-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Мобильное меню */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.98);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 96%;
    height: 100%;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.95));
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 80px 0;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    position: absolute;
    top: 20px;
    right: 20px;
    left: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-brand {
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 800;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-navigation {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px auto;
    width: 96%;
}

.mobile-navigation a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 15px 20px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-navigation a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.25);
}

.mobile-navigation a.active {
    background: linear-gradient(135deg, var(--primary-color), #574bdb);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
}

.mobile-navigation a::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 209, 178, 0.5);
}

/* Анимация появления мобильного меню */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

.mobile-menu.active {
    animation: slideInRight 0.3s ease forwards;
}

.mobile-menu:not(.active) {
    animation: slideOutRight 0.3s ease forwards;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .burger-menu-toggle {
        display: flex;
    }
    
    .brand-logo-link { 
        display: flex;
        flex-direction: row;
        align-items: center;
        font-size: 1.1rem; 
        text-align: center;
    }
    
    .brand-logo-link img { 
        height: 46px; 
        border-radius: 10px; 
    }
    
    .header-content { 
        display: flex;
        flex-direction: row;
        align-items: center;
        width: auto; 
    }
    
    /* Скрываем десктопное меню на мобильных */
    .main-navigation.desktop-only {
        display: none;
    }
}

@media (max-width: 480px) {
    .site-header { 
        padding: 10px 12px; 
    }
    
    .brand-logo-link { 
        font-size: 0.95rem; 
    }
    
    .brand-logo-link img { 
        height: 42px; 
        border-radius: 8px; 
    }
    
    .mobile-menu {
        width: 100%;
        right: -100%;
    }
    
    .mobile-menu.active {
        right: 0;
    }
    
    .mobile-menu-header {
        padding: 15px 0 20px;
    }
    
    .mobile-navigation a {
        padding: 18px 20px;
        font-size: 1.2rem;
    }
}

/* Дополнительные стили для плавности */
.site-header {
    transition: padding 0.3s ease;
}

.brand-logo-link {
    transition: font-size 0.3s ease;
}

.brand-logo-link img {
    transition: height 0.3s ease, border-radius 0.3s ease;
}

/* Эффект затемнения при открытом мобильном меню */
body.menu-open {
    overflow: hidden;
}

body.menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    pointer-events: none;
}