/* Shared responsive navigation. Loaded after the page-specific design layers. */
.site-premium .header__top { min-width: 0; }
.site-premium .header__logo { flex-shrink: 0; }
.site-premium .header__submenu-toggle { display: none; }
.site-premium h1 { overflow-wrap: anywhere; }
.site-premium.page-error .contacts_title { font-size: clamp(36px, 6vw, 64px); overflow-wrap: anywhere; }

@media (min-width: 1081px) {
    .site-premium .header__dropdown {
        left: auto;
        right: 0;
        top: calc(100% + 12px);
        width: 760px;
        max-width: calc(100vw - 48px);
        max-height: calc(100vh - 128px);
        max-height: calc(100dvh - 128px);
        overflow: auto;
    }
    .site-premium .header__nav-item.dropdown::before {
        left: auto;
        right: 0;
        bottom: -14px;
        width: 100%;
        height: 14px;
    }
    .site-premium .header__nav-item.dropdown:focus-within .header__dropdown { display: grid; }
}

@media (max-width: 1080px) {
    .site-premium { --ss-header-height: 72px; }
    .site-premium.home-v2 .wrapper,
    .site-premium:not(.home-v2) .wrapper { padding-top: var(--ss-header-height); }
    .site-premium .header { position: fixed; inset: 0 0 auto; height: var(--ss-header-height); }
    .site-premium .header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 8px;
    }
    .site-premium .header__top { gap: 8px; }
    .site-premium .header__logo { width: 34px; height: 40px; }
    .site-premium .header__text {
        display: block;
        min-width: 0;
        margin: 0;
        font-size: clamp(14px, 4vw, 18px);
        line-height: 1.2;
        letter-spacing: .015em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .site-premium .header__social {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0;
        min-width: 0;
        margin: 0;
    }
    .site-premium .header__call { display: none; }
    .site-premium .header__social .header__icons { display: flex; gap: 0; margin: 0; }
    .site-premium .header__social .header__icons a { display: none; }
    .site-premium .header__social .header__icons a[href*="t.me/"] {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        margin: 0;
        border: 1px solid var(--ss-line-2);
        border-radius: 12px;
        background: rgba(216, 184, 111, .05);
    }
    .site-premium .header__social .header__icons img.soc-header { width: 25px; height: 25px; }
    .site-premium .header__burger,
    .site-premium .header__burger.active {
        display: block;
        position: relative;
        inset: auto;
        width: 44px;
        height: 44px;
        margin: 0;
        background: none;
    }
    .site-premium .header__burger button,
    .site-premium .header__submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--ss-line-2);
        border-radius: 12px;
        color: var(--ss-gold-2);
        background: rgba(216, 184, 111, .05);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .site-premium .header__burger button span,
    .site-premium .header__burger button span::before,
    .site-premium .header__burger button span::after {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform .18s ease, background-color .18s ease;
    }
    .site-premium .header__burger button span { position: relative; }
    .site-premium .header__burger button span::before,
    .site-premium .header__burger button span::after { content: ""; position: absolute; left: 0; top: 0; }
    .site-premium .header__burger button span::before { transform: translateY(-6px); }
    .site-premium .header__burger button span::after { transform: translateY(6px); }
    .site-premium .header__burger.active button span { background: transparent; }
    .site-premium .header__burger.active button span::before { transform: rotate(45deg); }
    .site-premium .header__burger.active button span::after { transform: rotate(-45deg); }
    .site-premium .header__nav { display: none; margin: 0; }
    .site-premium .header__nav.show {
        display: block;
        position: absolute;
        inset: 100% 0 auto;
        width: 100%;
        height: calc(100vh - var(--ss-header-height));
        height: calc(100dvh - var(--ss-header-height));
        min-height: 0;
        margin: 0;
        padding: 16px clamp(12px, 4vw, 32px) max(32px, env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #0b0b10;
        border-top: 1px solid var(--ss-line);
        -webkit-overflow-scrolling: touch;
    }
    .site-premium.nav-open { overflow: hidden; }
    .site-premium .header__nav > .header__nav-item { margin: 0 0 8px; }
    .site-premium .header__nav > .header__nav-item > a {
        display: block;
        width: auto;
        min-width: 0;
        min-height: 44px;
        margin: 0;
        padding: 12px;
        font-size: 17px;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .site-premium .header__nav-item.dropdown { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; }
    .site-premium .header__nav-item.dropdown::before,
    .site-premium .header__nav-item.dropdown > a::after { display: none; }
    .site-premium .header__submenu-toggle { grid-column: 2; grid-row: 1; }
    .site-premium .header__submenu-toggle span {
        width: 8px;
        height: 8px;
        margin-top: -4px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
    }
    .site-premium .header__submenu-toggle[aria-expanded="true"] span { margin-top: 4px; transform: rotate(225deg); }
    .site-premium .header__nav-item.dropdown .header__dropdown {
        display: none;
        position: static;
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        margin: 8px 0;
        padding: 8px;
        overflow: visible;
        border: 1px solid var(--ss-line);
        border-radius: 14px;
        background: #111117;
        box-shadow: none;
    }
    .site-premium .header__nav-item.dropdown .header__dropdown.active { display: grid; }
    .site-premium .header__nav .header__dropdown a {
        display: block;
        min-width: 0;
        min-height: 44px;
        margin: 0;
        padding: 12px;
        font-size: 14px;
        line-height: 1.45;
        text-transform: none;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (min-width: 600px) and (max-width: 1080px) {
    .site-premium .header__social .header__icons { display: none; }
    .site-premium .header__call { display: inline-flex; min-height: 44px; white-space: nowrap; }
}

@media (max-width: 900px) {
    .site-premium .home-hero { min-height: auto; }
    .site-premium .home-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 34px; align-items: start; }
    .site-premium .home-hero__grid > * { min-width: 0; }
}

@media (max-width: 767px) {
    .site-premium .home-hero__grid > *,
    .site-premium .home-section-heading > *,
    .site-premium .systems__body > * { min-width: 0; }
    .site-premium .home-hero__title {
        font-size: clamp(32px, 9.7vw, 56px);
        line-height: 1.08;
        letter-spacing: -.03em;
        overflow-wrap: anywhere;
    }
    .site-premium .home-eyebrow { font-size: 12px; line-height: 1.6; letter-spacing: .1em; overflow-wrap: anywhere; }
    .site-premium .systems__body strong { overflow-wrap: anywhere; }
    .site-premium .home-section-heading h2,
    .site-premium .systems__title { font-size: clamp(32px, 8.5vw, 44px); line-height: 1.1; overflow-wrap: anywhere; }
    .site-premium .home-contact .contacts__title { font-size: clamp(32px, 9vw, 48px); line-height: 1.1; overflow-wrap: anywhere; }
    .site-premium .home-hero__panel h2,
    .site-premium .home-process__card h3,
    .site-premium .home-contact .contacts__heading { overflow-wrap: anywhere; }
    .site-premium.page-contacts #company-title { font-size: clamp(24px, 6.8vw, 44px); }
    .site-premium.page-policy .systems-page h1 { font-size: clamp(28px, 8.5vw, 44px); line-height: 1.12; }
}
