/* ══════════════════════════════════════
   ШАПКА / NAVBAR
══════════════════════════════════════ */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(11, 12, 16, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--accent-border);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background: rgba(11, 12, 16, 0.97);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(249, 115, 22, 0.4);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    gap: 20px;
}

/* Логотип */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
}


.logo-icon {
    width: 45px;
    height: 45px;
    /* background: linear-gradient(135deg, #F97316, #FFB347);
    border-radius: 10px; */
    display: flex;
    align-items: center;
    justify-content: center;
    /* font-size: 1.1rem; */
    color: #0B0C10;
    flex-shrink: 0;
    /* box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35); */
    transition: transform var(--transition), box-shadow var(--transition);
}

/* .logo a:hover .logo-icon {
    transform: rotate(-8deg) scale(1.08);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
} */

.logo-text {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff, #F97316);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    line-height: 1;
}

.logo a:hover .logo-text {
    background: linear-gradient(135deg, #F97316, #FFB347);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.logo-accent {
    background: linear-gradient(135deg, #F97316, #FFB347);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Навигационные ссылки */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links li a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.1px;
    position: relative;
    padding: 4px 0;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width var(--transition);
}

.nav-links li a:hover {
    color: var(--accent);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

/* CTA в навбаре */
.nav-cta {
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    font-weight: 700 !important;
    padding: 8px 20px !important;
    border-radius: var(--radius-full) !important;
    transition: var(--transition) !important;
}

.nav-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-btn);
}

.nav-cta::after { display: none !important; }

/* Бургер */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
    flex-shrink: 0;
}

.burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.burger.open .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger.open .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.burger.open .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Мобильное меню ── */
@media (max-width: 1024px) {
    .burger { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;          /* ← убираем inset: 0 0 0 auto — он давал баг */
        width: min(75vw, 320px);
        height: 100dvh;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
        padding: 100px 32px 40px;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--accent-border);
        z-index: 999;
        overflow-y: auto;
        overflow-x: hidden;  /* ← страховка */
        visibility: hidden;  /* ← скрываем полностью когда не активно */
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible; /* ← показываем только когда активно */
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-links li a {
        display: block;
        padding: 14px 0;
        font-size: 1.15rem;
        font-weight: 600;
    }

    .nav-links li:last-child {
        border-bottom: none;
        margin-top: 16px;
    }

    .nav-cta {
        display: block;
        text-align: center;
        padding: 12px 20px !important;
    }

    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(4px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

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