/* ============================================================
   header.css — Стили навигационной панели
   Команда InIProject | Code & Games
   ============================================================ */

/* ---------- ОСНОВНОЙ БЛОК ---------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: var(--z-header);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(230, 57, 70, 0.15);
    transition: background var(--transition-normal),
                border-color var(--transition-normal);
}

/* Шапка становится более плотной при скролле */
.header--scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: rgba(230, 57, 70, 0.4);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- ЛОГОТИП ---------- */
.header__logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: text-shadow var(--transition-normal);
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.header__logo:hover {
    text-shadow: 0 0 15px var(--accent-glow);
    color: var(--text-on-accent);
}

.header__logo-bracket {
    color: var(--accent);
    font-weight: 400;
    transition: color var(--transition-normal);
}

.header__logo:hover .header__logo-bracket {
    color: var(--accent-hover);
}

.header__logo-text {
    position: relative;
}

.header__logo-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-normal);
}

.header__logo:hover .header__logo-text::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ---------- НАВИГАЦИЯ ---------- */
.header__nav-list {
    display: flex;
    gap: 0.5rem;
}

.header__nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--transition-normal);
    position: relative;
}

.header__nav-link::before {
    content: '/';
    color: var(--accent);
    margin-right: 4px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.header__nav-link:hover {
    color: var(--text-primary);
    background: rgba(230, 57, 70, 0.1);
}

.header__nav-link:hover::before {
    opacity: 1;
}

/* Активный пункт меню (подсвечивается JS при скролле) */
.header__nav-link--active {
    color: var(--accent) !important;
    background: rgba(230, 57, 70, 0.08);
}

.header__nav-link--active::before {
    opacity: 1;
}

/* ---------- КНОПКА DISCORD ---------- */
.header__cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem !important;
    font-size: 0.8rem !important;
}

.header__cta-icon {
    font-size: 1rem;
}

/* ---------- БУРГЕР-МЕНЮ (Мобильная версия) ---------- */
.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    cursor: pointer;
    z-index: calc(var(--z-header) + 1);
    border-radius: 4px;
    transition: background var(--transition-fast);
}

.header__burger:hover {
    background: rgba(230, 57, 70, 0.1);
}

.header__burger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
    transform-origin: center;
}

/* Анимация бургера в крестик */
.header__burger--active .header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header__burger--active .header__burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.header__burger--active .header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- ПРОГРЕСС-БАР СКРОЛЛА ---------- */
.header__progress {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow-strong);
    transition: width 0.1s linear;
}

/* ---------- АДАПТИВ ---------- */
@media (max-width: 768px) {
    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 350px;
        height: 100vh;
        background: rgba(17, 17, 17, 0.98);
        backdrop-filter: blur(20px);
        padding: 6rem 2rem 2rem;
        transition: right var(--transition-slow);
        border-left: 1px solid rgba(230, 57, 70, 0.3);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    }

    .header__nav--open {
        right: 0;
    }

    .header__nav-list {
        flex-direction: column;
        gap: 0.3rem;
    }

    .header__nav-link {
        display: block;
        font-size: 1rem;
        padding: 1rem;
        border-radius: 6px;
    }

    .header__burger {
        display: flex;
    }

    .header__cta {
        display: none;
    }
}

/* Оверлей при открытом мобильном меню */
.header__overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: calc(var(--z-header) - 1);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.header__overlay--visible {
    display: block;
    opacity: 1;
}