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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    font-family: var(--font-family);
}

.site-header__container {
    width: min(100%, var(--container-max-width));
}

/* Top bar utilities (lang / accessibility in main header) */

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.site-header__accessibility {
    position: relative;
    z-index: 1100;
}

.site-header__accessibility-trigger {
    padding: 0;
    border: 0;
    cursor: pointer;
}

.site-header__accessibility-trigger:focus {
    outline: none;
}

.site-header__accessibility-trigger:focus-visible {
    outline: 2px solid rgba(58, 104, 213, 0.65);
    outline-offset: 2px;
}

.site-header__accessibility-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1101;
    width: min(320px, calc(100vw - 32px));
    padding: 14px;
    border-radius: 8px 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.site-header__accessibility-panel[hidden] {
    display: none;
}

.site-header__lang {
    position: relative;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 29px;
    padding: 0 10px;
    border-radius: 20px;
    background: #efefef;
    color: #151515;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}

.site-header__lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
}

.site-header__lang-trigger:focus {
    outline: none;
}

.site-header__lang-trigger:focus-visible {
    outline: 2px solid rgba(58, 104, 213, 0.65);
    outline-offset: 2px;
    border-radius: 4px;
}

.site-header__lang-chevron {
    display: block;
    flex-shrink: 0;
    width: 6.4px;
    height: 5.5px;
    transition: transform 0.2s ease;
}

.site-header__lang.is-open .site-header__lang-chevron {
    transform: rotate(180deg);
}

.site-header__lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1101;
    min-width: 72px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    border-radius: 8px 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.site-header__lang-menu[hidden] {
    display: none;
}

.site-header__lang-option {
    display: block;
    padding: 6px 14px;
    color: #3a68d5;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
}

.site-header__lang-option:hover,
.site-header__lang-option.is-active {
    background: rgba(58, 104, 213, 0.08);
    font-weight: 600;
}

/* Main bar */

.site-header__main {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    height: 136px;
    background: #fff;
    border-bottom: 0.4px solid #9c9c9c;
}

.site-header__container--main {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "logo body";
    column-gap: 24px;
    align-items: center;
    height: 100%;
    padding-top: 24px;
    padding-bottom: 24px;
}

.site-header__logo {
    grid-area: logo;
    display: flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
}

.site-header__main-body {
    grid-area: body;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    height: 100%;
    margin-left: 6px;
    gap: 16px;
}

.site-header__main-top,
.site-header__main-bottom {
    display: flex;
    align-items: center;
    width: 100%;
}

.site-header__divider {
    width: 100%;
    height: 0;
    border: 0;
    border-top: 0.4px solid #9c9c9c;
    margin: 0;
}

.site-header__logo img {
    display: block;
    height: 94px;
    width: auto;
}

.site-header__org-name {
    margin: 0;
    max-width: 796px;
    color: #151515;
    font-size: 15px;
    font-weight: 700;
    line-height: 20px;
}

.site-header__toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-header__toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: #efefef;
}

.site-header__toolbar-btn img {
    display: block;
}

.site-header__nav-list {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header__nav-item {
    position: relative;
    flex-shrink: 0;
}

.site-header__nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    border-radius: 20px;
    color: #151515;
    font-family: var(--second-family);
    font-size: 17px;
    font-weight: 400;
    line-height: 19.5px;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.site-header__nav-link--budget {
    font-family: var(--third-family);
}

.site-header__nav-trigger {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.site-header__nav-item.is-mega-open .site-header__nav-link {
    background: rgba(58, 104, 213, 0.1);
}

.site-header__nav-item.is-mega-open .site-header__nav-chevron {
    transform: rotate(180deg);
}

.site-header__nav-chevron {
    display: block;
    flex-shrink: 0;
    width: 6.4px;
    height: 5.5px;
    transform-origin: center;
    transition: transform 0.3s ease;
}

.site-header__search {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
    width: 130px;
    height: 24px;
    padding: 0 6px 0 14px;
    border-radius: 10px 0;
    background: #efefef;
    color: #777;
    font-size: 15px;
    font-weight: 400;
    line-height: 19.5px;
    transition: width 0.3s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.site-header__search:focus-within {
    width: 180px;
    background: #fff;
    box-shadow: 0 0 0 1.5px #3a68d5;
}

.site-header__search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #151515;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 400;
    line-height: 19.5px;
    outline: none;
}

.site-header__search-input::placeholder {
    color: #777;
}

.site-header__search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.site-header__search-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 8px 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.site-header__search:focus-within .site-header__search-btn {
    background: #3a68d5;
}

.site-header__search:focus-within .site-header__search-btn img {
    filter: brightness(0) invert(1);
}

.site-header__search-btn img {
    display: block;
    flex-shrink: 0;
}

.site-header__menu-toggle,
.site-header__sidebar,
.site-header__sidebar-overlay {
    display: none;
}

/* Mega menu */

.site-header__mega {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 100vw;
    height: 520px;
    margin-left: -50vw;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-16px);
    pointer-events: none;
    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        visibility 0.35s ease;
}

.site-header__mega.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.site-header__mega-bg {
    position: absolute;
    inset: 0;
    background: #3a68d5;
}

.site-header__mega-decor {
    position: absolute;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.site-header__mega--news .site-header__mega-decor,
.site-header__mega--about .site-header__mega-decor,
.site-header__mega--gov .site-header__mega-decor {
    right: 0;
    bottom: 0;
    width: auto;
    height: 100%;
    max-width: 80%;
    object-fit: contain;
    object-position: right bottom;
}

.site-header__mega-inner {
    position: relative;
    z-index: 1;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 78px 38px 40px;
    opacity: 0;
    transform: translateY(-10px);
    transition:
        opacity 0.35s ease 0.05s,
        transform 0.35s ease 0.05s;
}

.site-header__mega.is-open .site-header__mega-inner {
    opacity: 1;
    transform: translateY(0);
}

.site-header__mega-title {
    margin: 0 0 42px;
    color: #fff;
    font-size: 62px;
    font-weight: 600;
    line-height: 46px;
}

.site-header__mega-tabs {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 34px;
    padding: 20px 0;
    list-style: none;
}

.site-header__mega-tabs::before,
.site-header__mega-tabs::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px solid #fff;
}

.site-header__mega-tabs::before {
    top: 0;
}

.site-header__mega-tabs::after {
    bottom: 0;
}

.site-header__mega-tabs a {
    color: #fff;
    font-size: 21px;
    font-weight: 600;
    line-height: 20px;
}

.site-header__mega-tabs a:hover,
.site-header__mega-tabs a.is-active {
    opacity: 0.85;
}

.site-header__mega-links a.is-active {
    opacity: 0.85;
    font-weight: 400;
}

.site-header__mega-tabs-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 23px;
    font-weight: 300;
    line-height: 20px;
}

.site-header__mega-section-title {
    margin: 0 0 22px;
    color: #fff;
    font-size: 23px;
    font-weight: 600;
    line-height: 20px;
}

.site-header__mega-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header__mega-links li+li {
    margin-top: 12px;
}

.site-header__mega-links a {
    color: #fff;
    font-size: 19px;
    font-weight: 300;
    line-height: 20px;
}

.site-header__mega-links a:hover {
    opacity: 0.85;
}

.site-header__mega-links--gov {
    padding-top: 20px;
}

.site-header__mega-links--gov li+li {
    margin-top: 16px;
}

.site-header__mega-links--gov a {
    font-size: 23px;
    font-weight: 600;
    line-height: 28px;
}

.site-header__mega-tabs-block--about .site-header__mega-tabs,
.site-header__mega-tabs-block--news .site-header__mega-tabs {
    margin-bottom: 0;
}

.site-header__mega-tabs--about a,
.site-header__mega-tabs--news a {
    font-size: 23px;
    line-height: 20px;
}

.site-header__mega--about.is-open {
    overflow: visible;
}

.site-header__mega-tabs-block--about {
    position: relative;
    overflow: visible;
}

.site-header__mega-tab-item {
    position: relative;
}

.site-header__mega-tab-item--has-sub {
    align-self: stretch;
    display: flex;
    align-items: center;
}

.site-header__mega-tab-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: var(--font-family);
    font-size: 23px;
    font-weight: 600;
    line-height: 20px;
    cursor: default;
    pointer-events: none;
}

.site-header__mega-tab-trigger:focus {
    outline: none;
}

.site-header__mega-tab-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 4px;
    border-radius: 2px;
}

.site-header__mega-tab-item--has-sub:hover .site-header__mega-tab-trigger {
    opacity: 0.85;
}

.site-header__mega-tab-chevron {
    display: block;
    width: 8px;
    height: 6px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    transition: transform 0.25s ease;
}

.site-header__mega-tab-item--has-sub:hover .site-header__mega-tab-chevron {
    transform: rotate(180deg);
}

.site-header__mega-tab-sub {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 5;
    min-width: 240px;
    margin: 0;
    padding: 14px 0;
    list-style: none;
    border-radius: 0 0 8px 8px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

.site-header__mega-tab-sub::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

.site-header__mega-tab-item--has-sub:hover .site-header__mega-tab-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
}

.site-header__mega-tab-item--has-sub:not(:hover) .site-header__mega-tab-sub {
    transition-delay: 0.12s;
}

.site-header__mega-tab-sub li + li {
    margin-top: 10px;
}

.site-header__mega-tab-sub a {
    display: inline-block;
    color: #fff;
    font-size: 19px;
    font-weight: 300;
    line-height: 24px;
    pointer-events: auto;
    cursor: pointer;
}

.site-header__mega-tab-sub a:hover,
.site-header__mega-tab-sub a.is-active {
    opacity: 0.85;
}

.site-header__mega-submenus {
    display: flex;
    gap: 40px;
    padding-top: 58px;
}

.site-header__mega-submenus--legacy {
    padding-top: 58px;
}

/* .site-header__mega-tabs-block--about .site-header__mega-submenus,
.site-header__mega-tabs-block--news .site-header__mega-submenus {
    padding-left: 458px;
} */

.site-header__mega-tabs-block--about .site-header__mega-submenus .site-header__mega-links:first-child,
.site-header__mega-tabs-block--news .site-header__mega-submenus .site-header__mega-links:first-child {
    min-width: 158px;
}

@media (max-width: 1364px) {
    .site-header {
        overflow-x: clip;
    }

    .site-header__main {
        height: 90px;
    }

    /* --- Header bar: [logo]  ....  [search] [hamburger] --- */
    .site-header__container--main {
        display: flex;
        align-items: center;
        gap: 16px;
        padding-top: 0;
        padding-bottom: 0;
        height: 100%;
    }

    .site-header__logo {
        flex-shrink: 0;
        align-self: center;
        height: auto;
        padding: 14px 0;
    }

    .site-header__logo img {
        height: 62px;
        width: auto;
        display: block;
    }

    .site-header__main-body {
        flex: 1;
        min-width: 0;
        width: auto;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-left: 0;
    }

    .site-header__main-top,
    .site-header__divider,
    .site-header__nav,
    .site-header__actions,
    .site-header__org-name {
        display: none;
    }

    /* main-bottom: содержимое прижато вправо, вертикально отцентровано */
    .site-header__main-bottom {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        width: 100%;
    }

    /* Поиск левее гамбургера */
    .site-header__search {
        order: 1;
        flex-shrink: 0;
        width: 180px;
        margin-left: 0;
    }

    .site-header__search:focus-within {
        width: 220px;
    }

    /* Гамбургер — крайний правый */
    .site-header__menu-toggle {
        order: 2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 10px;
        background: #efefef;
        cursor: pointer;
    }

    .site-header__menu-toggle img {
        display: block;
        width: 24px;
        height: 24px;
    }

    .site-header__mega {
        display: none;
    }

    .site-header__sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 1020;
        display: block;
        background: rgba(0, 0, 0, 0.36);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }

    .site-header__sidebar {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 1030;
        display: flex;
        flex-direction: column;
        width: min(420px, calc(100% - 72px));
        height: 100vh;
        background: #fff;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.16);
        transform: translateX(104%);
        transition: transform 0.34s ease;
        will-change: transform;
        pointer-events: none;
    }

    .site-header__sidebar-head {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-height: 90px;
        padding: 16px 24px;
        border-bottom: 1px solid #e5e5e5;
    }

    .site-header__sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 10px;
        background: #efefef;
        cursor: pointer;
    }

    .site-header__sidebar-close img {
        display: block;
        width: 24px;
        height: 24px;
    }

    .site-header__sidebar-body {
        flex: 1;
        overflow-y: auto;
        padding: 18px 24px 28px;
    }

    .site-header__sidebar-top-nav {
        position: relative;
        padding-bottom: 20px;
        margin-bottom: 22px;
    }

    .site-header__sidebar-top-nav::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 1px;
        background: #e5e5e5;
    }

    .site-header__sidebar-main-nav {
        padding-bottom: 20px;
    }

    .site-header__sidebar-section-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #151515;
        font-family: var(--second-family);
        font-size: 18px;
        font-weight: 500;
        line-height: 1.35;
        text-align: left;
        cursor: pointer;
    }

    .site-header__sidebar-section-toggle img {
        width: 8px;
        height: 6px;
        flex-shrink: 0;
        transition: transform 0.3s ease;
    }

    .site-header__sidebar-section-toggle[aria-expanded="true"] img {
        transform: rotate(180deg);
    }

    .site-header__sidebar-section-toggle--nested {
        padding: 0;
        font-size: 18px;
        font-weight: 500;
    }

    .site-header__sidebar-section-panel {
        overflow: hidden;
    }

    .site-header__sidebar-section-panel[hidden] {
        display: none;
    }

    .site-header__sidebar-section-panel--nested {
        padding-top: 10px;
        padding-bottom: 0;
    }

    .site-header__sidebar-section-panel--a11y {
        padding-left: 14px;
        border-left: 2px solid #efefef;
    }

    .site-header__sidebar-list {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .site-header__sidebar-list--top a {
        font-size: 16px;
        font-weight: 400;
    }

    .site-header__sidebar-list a,
    .site-header__sidebar-title {
        display: inline-block;
        max-width: 100%;
        color: #151515;
        font-family: var(--second-family);
        font-size: 18px;
        font-weight: 500;
        line-height: 1.35;
        word-break: break-word;
    }

    .site-header__sidebar-sublist a.is-active {
        color: #3a68d5;
        font-weight: 600;
    }

    .site-header__sidebar-sublist {
        margin: 0;
        padding: 0 0 0 14px;
        list-style: none;
        border-left: 2px solid #efefef;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .site-header__sidebar-sublist+.site-header__sidebar-sublist {
        margin-top: 8px;
    }

    .site-header__sidebar-sublist a {
        font-size: 16px;
        font-weight: 400;
        line-height: 1.35;
    }

    .site-header__sidebar-sublist .site-header__sidebar-item--nested {
        list-style: none;
    }

    .site-header__sidebar-sublist .site-header__sidebar-section-toggle {
        font-size: 16px;
        font-weight: 500;
    }

    .site-header__sidebar-sublist .site-header__sidebar-section-panel {
        margin-top: 8px;
    }

    .site-header.is-sidebar-open .site-header__sidebar-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .site-header.is-sidebar-open .site-header__sidebar {
        transform: translateX(0);
        pointer-events: auto;
    }
}

@media (max-width: 1000px) {
    .site-header__search {
        width: 170px;
    }

    .site-header__search:focus-within {
        width: 194px;
    }

    .site-header__sidebar {
        width: min(390px, calc(100% - 56px));
    }
}

@media (max-width: 900px) {
    .site-header__main {
        height: 76px;
    }

    .site-header__logo {
        padding: 12px 0;
    }

    .site-header__logo img {
        height: 52px;
    }

    .site-header__sidebar-head {
        min-height: 76px;
    }
}

@media (max-width: 700px) {
    .site-header__search {
        width: 144px;
        height: 40px;
        padding: 0 8px 0 10px;
    }

    .site-header__search:focus-within {
        width: 168px;
    }

    .site-header__menu-toggle,
    .site-header__sidebar-close {
        width: 40px;
        height: 40px;
    }

    .site-header__sidebar {
        width: min(360px, calc(100% - 24px));
    }
}

@media (max-width: 600px) {
    .site-header__search {
        width: 132px;
    }

    .site-header__search:focus-within {
        width: 150px;
    }

    .site-header__sidebar-head,
    .site-header__sidebar-body {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 480px) {
    .site-header__main {
        height: 68px;
    }

    .site-header__logo {
        padding: 8px 0;
    }

    .site-header__logo img {
        height: 52px;
    }

    .site-header__sidebar {
        width: 100%;
    }

    .site-header__sidebar-head {
        min-height: 68px;
    }

    .site-header__sidebar-list a,
    .site-header__sidebar-title {
        font-size: 17px;
    }

    .site-header__sidebar-sublist a {
        font-size: 15px;
    }
}