/* Основные стили шапки */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(40, 42, 46, 0.98); /* Темный серо-угольный фон */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    padding: 15px 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 600; /* Чуть менее жирный */
    color: #e0e3e7; /* Светло-серый текст */
    text-decoration: none;
    transition: all 0.3s;
}

.logo:hover {
    color: #a0a0ff; /* Светло-синий при наведении */
}

.logo-img {
    height: 36px;
    margin-right: 10px;
    filter: brightness(0.9);
}

/* Кнопка меню (бургер) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    z-index: 1100;
    position: relative;
}

.menu-icon {
    width: 26px;
    height: 2px;
    background: #c0c3c7; /* Светло-серый */
    position: relative;
    transition: all 0.3s ease;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 2px;
    background: #c0c3c7; /* Светло-серый */
    transition: all 0.3s ease;
}

.menu-icon::before {
    top: -7px;
    left: 0;
}

.menu-icon::after {
    bottom: -7px;
    left: 0;
}

/* Состояние "открыто" */
.menu-toggle.active .menu-icon {
    background: transparent;
}

.menu-toggle.active .menu-icon::before {
    top: 0;
    transform: rotate(45deg);
    background: #a0a0ff; /* Синий при открытии */
}

.menu-toggle.active .menu-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
    background: #a0a0ff; /* Синий при открытии */
}

/* Основное меню (десктоп) */
.nav-menu {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-link {
    color: #d0d3d7; /* Светло-серый */
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-link:hover {
    color: #a0a0ff; /* Светло-синий */
    background: rgba(160, 160, 255, 0.1); /* Слегка синий фон */
}

.nav-button {
    background: linear-gradient(135deg, #6a5acd, #5a4bbd); /* Фиолетово-синий градиент */
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(106, 90, 205, 0.3);
}

.nav-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(106, 90, 205, 0.4);
}

/* Мобильное меню */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #2a2c30; /* Темный фон */
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.4);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        z-index: 999;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-menu .nav-link {
        width: 100%;
        padding: 15px 25px;
        font-size: 17px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        margin: 0;
    }

    .nav-menu .nav-button {
        margin: 20px 25px 0;
        width: calc(100% - 50px);
    }
}