.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.site-header .header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 76px;
    padding: 12px 0;
    flex-wrap: nowrap;
}

.site-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 0 0 auto;
    min-width: 0;
}

.site-header .brand__logo {
    display: block;
    max-height: 42px;
    width: auto;
    object-fit: contain;
}

.site-header .brand__text {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    white-space: nowrap;
}

.site-header .main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.site-header .main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-header .main-nav a:hover,
.site-header .main-nav a:focus-visible {
    background: #f1f5f9;
    color: #0f172a;
    outline: none;
}

.site-header .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.site-header .header-actions > a,
.site-header .header-actions .inline-form button,
.site-header .header-lang__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.site-header .inline-form {
    margin: 0;
}

.site-header .inline-form button {
    appearance: none;
    -webkit-appearance: none;
}

.site-header .header-lang {
    position: relative;
    flex: 0 0 auto;
}

.site-header .header-lang__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    padding: 8px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.site-header .header-lang:hover .header-lang__menu,
.site-header .header-lang:focus-within .header-lang__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-header .header-lang__menu a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.site-header .header-lang__menu a:hover,
.site-header .header-lang__menu a.is-active {
    background: #f1f5f9;
    color: #0f172a;
}

@media (max-width: 767.98px) {
    .site-header .header-row {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "brand nav"
            "actions actions";
        align-items: center;
        gap: 10px 12px;
        min-height: auto;
        padding: 10px 0;
    }

    .site-header .brand {
        grid-area: brand;
        justify-self: start;
        max-width: 110px;
        overflow: hidden;
    }

    .site-header .brand__logo {
        max-height: 34px;
    }

    .site-header .brand__text {
        font-size: 18px;
    }

    .site-header .main-nav {
        grid-area: nav;
        justify-content: flex-start;
        align-items: center;
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        min-width: 0;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .site-header .main-nav::-webkit-scrollbar {
        display: none;
    }

    .site-header .main-nav a {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0 8px;
        font-size: 12px;
        border-radius: 8px;
    }

    .site-header .header-actions {
        grid-area: actions;
        justify-content: flex-start;
        width: 100%;
        gap: 6px;
        padding-top: 2px;
    }

    .site-header .header-actions > a,
    .site-header .header-actions .inline-form button,
    .site-header .header-lang__toggle {
        min-height: 36px;
        padding: 0 10px;
        font-size: 12px;
        border-radius: 8px;
    }

    .site-header .header-lang__menu {
        right: auto;
        left: 0;
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .site-header .brand {
        max-width: 92px;
    }

    .site-header .brand__logo {
        max-height: 30px;
    }

    .site-header .brand__text {
        font-size: 16px;
    }

    .site-header .main-nav a {
        min-height: 32px;
        padding: 0 7px;
        font-size: 11px;
    }

    .site-header .header-actions > a,
    .site-header .header-actions .inline-form button,
    .site-header .header-lang__toggle {
        min-height: 34px;
        padding: 0 9px;
        font-size: 11px;
    }
}