.site-header,
.site-header *,
.site-header *::before,
.site-header *::after {
    box-sizing: border-box;
}

.site-header {
    --header-color-navy: #0a2d47;
    --header-color-mint: #00f6a9;
    --header-color-muted: #f8f8f8;

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: #fff;
    font-family: var(--font-family);
    font-weight: 300;
}

.site-header__container {
    width: 100%;
    max-width: calc(var(--content-max-width) + var(--page-inline) * 2);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--page-inline);
    display: flex;
    flex-direction: column;
}

.site-header__top {
    position: relative;
    flex-shrink: 0;
    height: 54px;
    min-width: 0;
    overflow: hidden;
}

/* Старые баннер/логотип больше не выводятся, файлы в теме сохранены */
.site-header__banner {
    display: block;
    width: calc(100% - 158px);
    max-width: 1228px;
    height: 54px;
    object-fit: cover;
}

.site-header__partner-logo {
    position: absolute;
    top: 2px;
    right: 0;
    display: block;
    width: 146px;
    height: 52px;
    object-fit: contain;
}

/* Компактная панель котировок: 4 карточки в одну строку, без кликов */
.site-header__markets {
    width: 100%;
    height: 54px;
    min-width: 0;
    pointer-events: none;
    user-select: none;
    cursor: default;
}

.site-header__markets-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.site-header__markets-set {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

.site-header__markets-set[aria-hidden="true"] {
    display: none;
}

.site-header__market {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 54px;
    max-height: 54px;
    padding: 4px 10px;
    overflow: hidden;
    background: #fff;
    pointer-events: none;
    cursor: default;
}

.site-header__market + .site-header__market {
    border-left: 1px solid #e7e7e7;
}

.site-header__market-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    flex: 0 1 auto;
}

.site-header__market-name {
    color: var(--header-color-navy);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.site-header__market-values {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.site-header__market-price {
    color: var(--header-color-navy);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.1;
    white-space: nowrap;
}

.site-header__market-change {
    color: #8a8a8a;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.1;
    white-space: nowrap;
}

.site-header__market-change.is-up {
    color: #089981;
}

.site-header__market-change.is-down {
    color: #f23645;
}

/* Спарклайн Chart.js: клики и hover отключены и в CSS, и в конфиге графика */
.site-header__market-chart {
    flex: 1 1 auto;
    min-width: 64px;
    height: 36px;
    pointer-events: none;
}

.site-header__market-chart canvas {
    display: block;
    width: 100% !important;
    height: 36px !important;
    pointer-events: none;
}

.site-header__bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-height: 0;
}

.site-header__bar::before,
.site-header__bar::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 100vw;
    height: 1px;
    background: #e7e7e7;
    transform: translateX(-50%);
    pointer-events: none;
}

.site-header__bar::before {
    top: 0;
}

.site-header__bar::after {
    bottom: 0;
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.site-header__logo {
    display: block;
    width: auto;
    height: 29px;
    object-fit: contain;
}

.site-header__nav {
    flex: 1;
    min-width: 0;
    padding: 0 24px;
}

.site-header__nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: clamp(16px, 2.8vw, 40px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header__nav-item {
    position: relative;
}

.site-header__nav-link:hover {
    opacity: 0.75;
}

.site-header__nav-item.is-section-active > .site-header__nav-link {
    color: var(--header-color-navy);
    font-weight: 400;
}

.site-header__nav-arrow {
    display: block;
    width: 6px;
    height: 3px;
    flex-shrink: 0;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.site-header__nav-item--dropdown {
    padding-bottom: 12px;
    margin-bottom: -12px;
}

.site-header__nav-item--dropdown:hover .site-header__nav-arrow,
.site-header__nav-item--dropdown:focus-within .site-header__nav-arrow,
.site-header__nav-item--dropdown.is-open .site-header__nav-arrow {
    transform: rotate(180deg);
}

.site-header__dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 1001;
    min-width: 240px;
    padding-top: 8px;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%);
    transition:
        opacity 0.2s ease,
        visibility 0s linear 0.2s,
        transform 0.2s ease;
}

.site-header__nav-item--dropdown:hover .site-header__dropdown,
.site-header__nav-item--dropdown:focus-within .site-header__dropdown,
.site-header__nav-item--dropdown.is-open .site-header__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%);
    transition-delay: 0s;
}

.site-header__dropdown-list {
    margin: 0;
    padding: 10px 0;
    list-style: none;
    border: 1px solid #e7e7e7;
    background: #fff;
    box-shadow: 0 12px 32px rgba(10, 45, 71, 0.1);
}

.site-header__dropdown-link {
    display: block;
    padding: 10px 20px;
    color: #477191;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.2;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-header__dropdown-link:hover,
.site-header__dropdown-link.is-active {
    color: var(--header-color-navy);
    background: var(--header-color-muted);
}

.site-header__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--header-color-navy);
    font-size: clamp(14px, 1.15vw, 16px);
    font-weight: 300;
    line-height: 1;
    white-space: nowrap;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.site-header__lang {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0;
}

.site-header__lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 27px;
    padding: 0 4px;
    background: var(--header-color-muted);
    color: var(--header-color-navy);
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    text-align: center;
    transition: opacity 0.2s ease;
}

.site-header__lang-link:hover {
    opacity: 0.75;
}

.site-header__lang-link.is-active {
    background: var(--header-color-mint);
}

.site-header__lang-divider {
    display: block;
    width: 1px;
    height: 14px;
    flex-shrink: 0;
    background: var(--header-color-navy);
    opacity: 0.25;
}

.site-header__menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.site-header__menu-toggle:hover {
    opacity: 0.75;
}

.site-header__menu-icon {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.site-header__drawer {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 0;
}

.site-header__drawer-panel {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 0;
}

.site-header__drawer-head,
.site-header__drawer-close {
    display: none;
}

.site-header__drawer-body {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.site-header__drawer-foot {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-header__overlay {
    display: none;
}