﻿.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    font-weight: 800;
    color: #000000;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-links .menu-separator {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 1rem;
    margin: 0 1rem;
    user-select: none;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    color: var(--text-main);
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

@media (min-width: 769px) {
    header .header-inner {
        gap: 2.5rem;
    }

    header .logo-main-wrapper {
        flex-shrink: 0;
    }

    .nav-links {
        -webkit-flex: 1 1 auto;
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        -webkit-justify-content: space-between;
        justify-content: space-between;
        -webkit-flex-wrap: nowrap;
        flex-wrap: nowrap;
        gap: 0.5rem;
        margin: 0;
        padding: 0 0 0 1.5rem;
        background: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    header.scrolled .nav-links {
        background: none;
        box-shadow: none;
    }

    .nav-links .menu-separator {
        display: none;
    }

    .nav-links a {
        -webkit-flex: 1 1 0;
        flex: 1 1 0;
        -webkit-justify-content: center;
        justify-content: center;
        min-height: 52px;
        padding: 0.75rem 0.5rem;
        border-radius: 0;
        font-size: 0.98rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--text-main);
        white-space: nowrap;
        background: none;
        box-shadow: none;
    }

    .nav-links a.active {
        background: none;
        color: var(--primary);
        box-shadow: none;
    }

    .nav-links a.active::after {
        display: block;
        bottom: 10px;
        left: 18%;
        width: 64%;
        height: 3px;
        border-radius: 99px;
    }

    .nav-links a:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 3px;
    }

    .header-cta {
        display: none;
    }
}

@media (min-width: 1100px) {
    header .header-inner {
        gap: 3.5rem;
    }

    .nav-links {
        padding-left: 2.5rem;
    }

    .nav-links a {
        min-height: 56px;
        font-size: 1.05rem;
        padding: 0.85rem 0.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1099px) {
    header .header-inner {
        gap: 1.5rem;
    }

    .nav-links {
        padding-left: 0.75rem;
        gap: 0.15rem;
    }

    .nav-links a {
        min-height: 46px;
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        padding: 0.55rem 0.2rem;
    }

    .nav-links a.active::after {
        left: 12%;
        width: 76%;
        bottom: 8px;
    }
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
    .nav-links a:hover {
        background: none;
        color: var(--primary);
    }

    .nav-links a:hover::after {
        content: '';
        position: absolute;
        bottom: 10px;
        left: 18%;
        width: 64%;
        height: 3px;
        background: var(--primary-light);
        border-radius: 99px;
    }

    .nav-links a.active:hover {
        background: none;
        color: var(--primary);
    }

    .nav-links a.active:hover::after {
        background: var(--primary);
    }
}

@media (max-width: 768px) {
    header .header-inner {
        position: relative;
        height: auto;
        min-height: var(--header-height);
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
        padding-right: 3.4rem;
        gap: 0.5rem;
        align-items: center;
    }

    .header-cta {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        position: absolute;
        top: 50%;
        right: 0;
        z-index: 1102;
        transform: translateY(-50%);
    }

    .hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 0.4rem;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        background: var(--bg-base);
        color: var(--text-main);
        z-index: 1102;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: 100%;
        max-width: 100%;
        height: 100%;
        height: 100dvh;
        margin: 0;
        padding: calc(var(--header-height) + var(--top-bar-height) + env(safe-area-inset-top, 0px) + 0.75rem) 1.5rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
        background: #FFFFFF;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: center;
        gap: 0.25rem;
        transform: translate3d(100%, 0, 0);
        visibility: hidden;
        pointer-events: none;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        z-index: 1100;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
    }

    .nav-links.active {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links .menu-separator {
        display: none;
    }

    .nav-links a {
        flex: 0 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 52px;
        padding: 0.85rem 1rem;
        border-radius: var(--radius-md);
        font-size: 1.2rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--text-main);
        white-space: normal;
        text-align: center;
        background: none;
        box-shadow: none;
    }

    .nav-links a.active {
        color: var(--primary);
        background: rgba(124, 58, 237, 0.08);
    }

    .nav-links a.active::after {
        display: none;
    }

    .nav-links a:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

    body.menu-open header {
        z-index: 1200;
    }

    body.menu-open .top-bar {
        z-index: 1190;
    }
}
