/* ========================================
   Header
   ======================================== */
.u-header {
    position: fixed !important;
    z-index: 5000;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(244, 244, 244, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(16, 108, 181, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 86px;
}

.header-logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
}

.u-logo-image-1 {
    width: auto;
    height: 67px;
    object-fit: contain;
    padding: 0.75rem 0;
}

.header-desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-desktop-nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-tablet-shortcut {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
    color: var(--brand-blue);
    background: rgba(43, 143, 235, 0.06);
    border: 1px solid rgba(43, 143, 235, 0.1);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-tablet-shortcut:hover,
.header-tablet-shortcut:focus-visible {
    color: #0a3658;
    background: rgba(43, 143, 235, 0.12);
    transform: translateY(-1px);
}

.header-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.65rem 0.95rem;
    border-radius: 999px;
    color: var(--brand-blue);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-nav-link:hover,
.header-nav-link:focus-visible {
    color: #0a3658;
    background: rgba(43, 143, 235, 0.1);
    transform: translateY(-1px);
}

.header-desktop-nav .ico {
    display: none;
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 0 0 auto;
    margin-left: 0;
}

.header_link {
    margin: 0;
    color: var(--brand-blue);
}

.header-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: rgba(43, 143, 235, 0.06);
    border: 1px solid rgba(43, 143, 235, 0.1);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-contact-link strong {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.header-contact-link:hover,
.header-contact-link:focus-visible {
    color: #0a3658;
    background: rgba(43, 143, 235, 0.12);
    transform: translateY(-1px);
}

.header-menu {
    position: relative;
    flex: 0 0 auto;
}

.header-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(43, 143, 235, 0.1);
    border-radius: 999px;
    background: rgba(43, 143, 235, 0.06);
    color: var(--brand-blue);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-menu-toggle:hover,
.header-menu-toggle:focus-visible,
.header-menu[data-menu-open="true"] .header-menu-toggle {
    color: #000;
    background: rgba(43, 143, 235, 0.12);
    transform: translateY(-1px);
}

.header-menu-toggle__label {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.header-burger-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 20px;
    height: 16px;
}

.header-burger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--brand-blue);
    transform-origin: center;
    transition: transform 0.24s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.header-menu-toggle:hover .header-burger-icon span,
.header-menu-toggle:focus-visible .header-burger-icon span,
.header-menu[data-menu-open="true"] .header-burger-icon span {
    background: #000;
}

.header-menu[data-menu-open="true"] .header-burger-icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.header-menu[data-menu-open="true"] .header-burger-icon span:nth-child(2) {
    opacity: 0;
}

.header-menu[data-menu-open="true"] .header-burger-icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.header-menu-panel-wrap {
    position: fixed;
    inset: 0;
    z-index: 5100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.header-menu-panel-wrap[aria-hidden="false"],
body.menu-open [data-menu-overlay] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.header-menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(100vw, 420px);
    max-width: 100vw;
    margin: 0 !important;
    color: #106cb5 !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(241,248,255,0.98) 100%),
        url('/public/img/spider-r.svg') top right / 340px auto no-repeat !important;
    box-shadow: -18px 0 48px rgba(10, 28, 43, 0.16);
    transform: translateX(100%);
    transition: transform 0.28s ease;
}

[data-menu-panel][aria-hidden="false"] .header-menu-panel {
    transform: translateX(0);
}

.header-menu-panel__inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    padding: 1.25rem;
    overflow-y: auto;
}

.header-menu-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(16, 108, 181, 0.12);
}

.header-menu-panel__title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-blue);
}

.u-menu-close.header-menu-close {
    position: relative;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(43, 143, 235, 0.09);
}

.u-menu-close.header-menu-close::before,
.u-menu-close.header-menu-close::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 11px;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #0a3658;
}

.u-menu-close.header-menu-close::before {
    transform: rotate(45deg);
}

.u-menu-close.header-menu-close::after {
    transform: rotate(-45deg);
}

.header-menu-list {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}

.header-menu-list .u-nav-item {
    margin: 0;
    list-style: none;
}

.header-menu-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 60px;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(16, 108, 181, 0.1);
    box-shadow: 0 12px 24px rgba(16, 108, 181, 0.06);
    color: #106cb5;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.header-menu-link i {
    width: 1.25rem;
    text-align: center;
    font-size: 1.05rem;
}

.header-menu-link:hover,
.header-menu-link:focus-visible {
    color: #0a3658;
    background: #fff;
    border-color: rgba(16, 108, 181, 0.2);
    transform: translateX(-3px);
}

.header-menu-meta {
    display: grid;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(16, 108, 181, 0.12);
}

.header-menu-meta__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(43, 143, 235, 0.08);
    color: #0a3658;
    font-weight: 600;
}

.header-menu-meta__link:last-child span {
    text-transform: uppercase;
}

body.menu-open {
    overflow: hidden;
}

[data-menu-overlay] {
    background: rgba(10, 28, 43, 0.44);
    backdrop-filter: blur(4px);
}

@media (max-width: 1440px) {
    .header-desktop-nav li:first-child,
    .header-desktop-nav li:last-child {
        display: none;
    }
}

@media (max-width: 1279px) {
    .header-desktop-nav .ico {
        display: inline-block;
        font-size: 1rem;
    }

    .header-desktop-nav .txt {
        display: none;
    }

    .header-nav-link {
        min-width: 44px;
        justify-content: center;
        padding-inline: 0.8rem;
    }
}

@media (max-width: 1023px) {
    .header-inner {
        position: relative;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .header-desktop-nav {
        display: none;
    }

    .header-tablet-shortcut {
        display: inline-flex;
        margin-left: 44px;
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        border-radius: 12px;
    }

    .header-logo {
        flex: 0 0 auto;
    }

    .header-contacts {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        flex: 0 0 auto;
        gap: 0.375rem;
        margin-left: 0;
        padding-left: 0;
    }

    .header-contact-link {
        justify-content: center;
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        border-radius: 12px;
    }

    .header-contact-link strong {
        display: none !important;
    }

    .header-menu-toggle {
        min-height: 40px;
        padding: 0.5rem 0.8rem 0.5rem 0.85rem;
    }

    .header-menu-toggle__label {
        font-size: 0.72rem;
    }

    .header-menu {
        margin-left: auto;
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    .header-tablet-shortcut {
        display: none;
        margin-left: 0;
    }

    .header-contacts {
        position: static;
        left: auto;
        transform: none;
        margin-left: auto;
    }

    .header-menu {
        margin-left: 12px;
    }

    .header-inner {
        gap: 0.4rem;
        min-height: 64px;
    }

    .u-logo-image-1 {
        height: 40px !important;
        padding: 0;
    }

    .header-menu-panel {
        width: 100vw;
    }

    .header-menu-panel__inner {
        padding: 1rem;
    }

    .header-menu-link {
        min-height: 56px;
        font-size: 0.96rem;
    }
}

@media (min-width: 400px) and (max-width: 767px) {
    .header-tablet-shortcut {
        display: inline-flex;
        margin-left: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .header-contacts {
        position: static;
        left: auto;
        transform: none;
        margin-left: auto;
    }

    .header-menu {
        margin-left: 12px;
    }
}

@media (max-width: 479px) {
    .header-inner {
        gap: 0.3rem;
        min-height: 56px;
    }

    .header-menu {
        margin-left: 10px;
    }

    .header-logo {
        min-width: 0;
    }

    .header-tablet-shortcut {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        border-radius: 12px;
    }

    .u-logo-image-1 {
        height: 34px !important;
    }

    .header-contact-link {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
        font-size: 0.92rem;
    }

    .header-contacts {
        gap: 0.25rem;
    }

    .header-menu-toggle {
        gap: 0.55rem;
        padding: 0.45rem 0.7rem 0.45rem 0.75rem;
    }

    .header-menu-toggle__label {
        display: none;
    }
}
