:root {
    --header-height: 78px;
    --header-max-width: 1320px;
    --header-bg: rgba(248, 250, 252, 0.82);
    --header-border: rgba(11, 81, 255, 0.12);
    --header-text: #10327a;
    --header-accent: #0b51ff;
    --header-accent-soft: rgba(11, 81, 255, 0.1);
    --header-shadow: 0 16px 40px rgba(15, 35, 95, 0.08);
}

body.has-site-header {
    padding-top: var(--header-height);
}

body.has-site-header.home-page {
    padding-top: 0;
}

.page-content {
    min-height: calc(100vh - var(--header-height));
}

.sf-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.72)),
        var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--header-shadow);
}

.sf-header-container {
    max-width: var(--header-max-width);
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.sf-header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.sf-header-logo img {
    display: block;
    height: 44px;
    width: auto;
    filter: drop-shadow(0 8px 18px rgba(11, 81, 255, 0.14));
}

.sf-header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 20px;
}

.sf-header-nav > ul {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(11, 81, 255, 0.08);
}

.sf-header-nav li {
    display: flex;
    align-items: center;
}

.sf-nav-dropdown {
    position: relative;
}

.sf-header-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--header-text);
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sf-nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--header-text);
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sf-nav-dropdown-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sf-nav-dropdown-caret {
    font-size: 0.82rem;
    transition: transform 0.25s ease;
}

.sf-header-nav a:hover {
    color: var(--header-accent);
    background: var(--header-accent-soft);
    transform: translateY(-1px);
}

.sf-nav-dropdown-toggle:hover,
.sf-nav-dropdown-toggle.active {
    color: var(--header-accent);
    background: var(--header-accent-soft);
    transform: translateY(-1px);
}

.sf-nav-dropdown-toggle.active .sf-nav-dropdown-caret {
    transform: rotate(180deg);
}

.sf-header-nav i {
    font-size: 0.98rem;
}

.sf-nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 200px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(11, 81, 255, 0.12);
    box-shadow: 0 20px 36px rgba(15, 35, 95, 0.12);
    flex-direction: column;
    display: none;
}

.sf-nav-dropdown-menu.active {
    display: flex;
}

.sf-nav-dropdown-menu a {
    width: 100%;
    justify-content: flex-start;
    border-radius: 12px;
}

.sf-header-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(11, 81, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--header-accent);
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.sf-header-mobile-toggle:hover {
    background: rgba(11, 81, 255, 0.08);
    border-color: rgba(11, 81, 255, 0.22);
}

.sf-header-mobile-toggle i {
    font-size: 1.18rem;
}

.sf-header-mobile-toggle span {
    display: none;
}

.language-selector {
    position: relative;
    flex-shrink: 0;
}

.language-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 46px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(11, 81, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--header-accent);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.language-button-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sf-site-header .language-button-caret {
    display: none !important;
    font-size: 0.82rem;
    transition: transform 0.25s ease;
}

.language-button:hover {
    background: rgba(11, 81, 255, 0.08);
    border-color: rgba(11, 81, 255, 0.24);
    transform: translateY(-1px);
}

.language-button.active .language-button-caret {
    transform: rotate(180deg);
}

.language-selector-text {
    display: none;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 164px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(11, 81, 255, 0.12);
    box-shadow: 0 20px 36px rgba(15, 35, 95, 0.12);
    display: none;
}

.language-dropdown.active {
    display: block;
}

.language-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--header-text);
    cursor: pointer;
    text-align: left;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.language-option:hover {
    background: rgba(11, 81, 255, 0.08);
    color: var(--header-accent);
}

.language-option.active {
    background: rgba(11, 81, 255, 0.12);
    color: var(--header-accent);
}

@media (max-width: 900px) {
    .sf-header-mobile-toggle {
        display: inline-flex;
    }

    .sf-header-container {
        padding: 12px 18px;
        gap: 12px;
    }

    .sf-header-logo {
        margin-right: auto;
    }

    .sf-header-logo img {
        height: 38px;
    }

    .sf-header-nav {
        position: fixed;
        top: calc(var(--header-height) - 4px);
        left: 12px;
        right: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 18px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(11, 81, 255, 0.1);
        box-shadow: 0 24px 50px rgba(15, 35, 95, 0.14);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    .sf-header-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .sf-header-nav > ul {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 0;
        background: transparent;
        border: none;
    }

    .sf-header-nav a {
        justify-content: flex-start;
        width: 100%;
        padding: 14px 16px;
        border-radius: 16px;
        background: rgba(247, 249, 252, 0.9);
    }

    .sf-nav-dropdown {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .sf-nav-dropdown-toggle {
        justify-content: space-between;
        width: 100%;
        padding: 14px 16px;
        border-radius: 16px;
        background: rgba(247, 249, 252, 0.9);
    }

    .sf-nav-dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
        border-radius: 16px;
        left: auto;
    }

    .language-selector {
        width: 100%;
    }

    .language-button {
        width: 100%;
        justify-content: space-between;
        border-radius: 16px;
        min-height: 52px;
        padding: 0 16px;
    }

    .sf-site-header .language-button-caret {
        display: inline-flex !important;
    }

    .language-selector-text {
        display: inline;
        color: var(--header-text);
        font-size: 0.95rem;
        font-weight: 600;
    }

    .language-dropdown {
        position: static;
        margin-top: 10px;
        box-shadow: none;
        border-radius: 16px;
    }
}

@media (max-width: 560px) {
    :root {
        --header-height: 72px;
    }

    .sf-header-container {
        padding: 12px 14px;
    }

    .sf-header-logo img {
        height: 34px;
    }
}
