.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 var(--space-xl);
    background-color: rgba(15, 15, 20, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header__left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.95);
}

.header__logo img {
    height: 24px;
    width: auto;
}

.header__brandName {
    font-family: var(--font-family-display);
    font-size: 1.25em;
    font-weight: 400;
    white-space: nowrap;
}

.header__center {
    display: flex;
    align-items: center;
}

.header__center .menu__items {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-lg);
}

.header__center .menu__item {
    display: inline-flex;
}

.header__center .menu__link {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.header__center .menu__link:hover {
    color: rgba(255, 255, 255, 0.95);
}

.header__center .menu__item--active .menu__link {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.header__center .menu__label {
    display: inline;
}

.header__right {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    gap: var(--space-xs);
}

.headerAction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.15s ease;
}

.headerAction--icon {
    position: relative;
    width: 36px;
    height: 36px;
    font-size: 1.1em;
    border-radius: var(--radius-s, 8px);
}

.headerAction__badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background-color: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    border-radius: 8px;
    text-align: center;
    pointer-events: none;
}

.headerAction:hover {
    color: rgba(255, 255, 255, 0.95);
}

.header__menuToggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.2em;
}

.header__center .menu__item--sub {
    position: relative;
}

.header__center .menu__link--main[aria-haspopup="true"] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.header__center .menu__link--main[aria-haspopup="true"]::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    opacity: 0.7;
    flex-shrink: 0;
}

.header__center .submenu__items {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background-color: rgba(15, 15, 20, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-s, 8px);
    padding: var(--space-xs) 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 200;
}

.header__center .menu__item--sub:hover > .submenu__items {
    visibility: visible;
    opacity: 1;
}

.header__center .submenu__item {
    display: block;
}

.header__center .menu__link--sub {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--text-sm);
    font-weight: 400;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.15s ease;
}

.header__center .menu__link--sub:hover {
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
    .header {
        padding: 0 var(--space-md);
    }

    .header__center {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: rgba(15, 15, 20, 0.97);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: var(--space-md);
        z-index: 100;
    }

    .header__center--open {
        display: flex;
    }

    .header__center .menu__items {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .header__center .menu__item {
        display: flex;
    }

    .header__center .menu__link {
        padding: var(--space-sm) 0;
        font-size: var(--text-md);
        width: 100%;
    }

    .header__menuToggle {
        display: flex;
    }

    .header__center .submenu__items {
        position: static;
        transform: none;
        visibility: visible;
        opacity: 1;
        display: none;
        border-radius: 0;
        padding: 0 0 0 var(--space-md);
    }

    .header__center .submenu__items--open {
        display: flex;
    }

    .header__center .menu__link--sub {
        padding: var(--space-xs) 0;
    }
}
