:root { --header-offset: 120px; }
.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 20;
    background: #111;
    backdrop-filter: blur(6px);
    transition: padding 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.site-main { padding-top: var(--header-offset); }
.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-template-areas: "logo menu left cta";
    align-items: center;
    gap: 20px;
    padding: 30px 0;
    transition: padding 0.25s ease;
}
.logo { grid-area: logo; }
.header-menu { grid-area: menu; justify-self: center; }
.header-left { grid-area: left; display: flex; align-items: center; gap: 12px; }
.header-cta { grid-area: cta; justify-self: end; transition: padding 0.25s ease, font-size 0.25s ease, letter-spacing 0.25s ease, width 0.25s ease, margin-left 0.25s ease, transform 0.25s ease; }
.mobile-menu-actions { display: none; }
.header-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(30, 213, 193, 0.28);
    background: #0f1416;
    color: #e8eef7;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.header-toggle:hover,
.header-toggle:focus-visible { border-color: #1ed5c1; box-shadow: 0 0 0 2px rgba(30, 213, 193, 0.18); }
.header-toggle-line {
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.site-header.is-open .header-toggle-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.is-open .header-toggle-line:nth-child(2) { opacity: 0; }
.site-header.is-open .header-toggle-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.site-header.shrink { box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.site-header.shrink .header-inner { padding: 21px 0; }
.logo img { height: 64px; width: auto; display: block; transition: transform 0.25s ease, height 0.25s ease; }
.site-header.shrink .logo img { height: 54px; transform: translateY(-2px); }
.logo a { color: #f5f5f5; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.main-nav { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.main-nav a { color: #c8d2e0; padding: 6px 4px; position: relative; font-weight: 600; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0%; height: 2px; background: #1ed5c1; opacity: 0; transition: width 0.25s ease, opacity 0.25s ease; }
.main-nav a:hover { color: #fff; }
.main-nav a:hover::after { width: 100%; opacity: 1; }
.main-nav a.active { color: #1ed5c1; }
.main-nav a.active::after { width: 100%; opacity: 1; }
.lang-switcher { position: relative; display: inline-flex; flex-direction: column; }
.lang-toggle {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1c1c1c;
    color: #e8eef7;
    border: 1px solid #1ed5c1;
    padding: 10px 36px 10px 14px;
    border-radius: 12px;
    min-width: 90px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    text-transform: uppercase;
}
.lang-toggle::after {
    content: "";
    position: absolute;
    right: 12px;
    width: 10px;
    height: 6px;
    background: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23c8d2e0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
}
.lang-switcher:hover .lang-toggle,
.lang-switcher:focus-within .lang-toggle { box-shadow: 0 0 0 2px rgba(30,213,193,0.25); }
.lang-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1c1c1c;
    border: 1px solid #1ed5c1;
    border-radius: 12px;
    padding: 6px;
    min-width: 90px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 12px 28px rgba(0,0,0,0.4);
    display: none;
    z-index: 30;
}
.lang-menu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}
.lang-switcher:hover .lang-menu,
.lang-switcher:focus-within .lang-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lang-option {
    color: #c8d2e0;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    display: block;
}
.lang-option:hover { color: #fff; background: #222; }
.lang-option.active { color: #0d0d0d; background: #1ed5c1; }
.btn-cta { background: #1ed5c1; color: #fff; padding: 16px 26px; border-radius: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2px; min-width: 220px; text-align: center; box-shadow: 0 10px 24px rgba(30,213,193,0.28); }
@media (max-width: 900px) {
    :root { --header-offset: 108px; }
    .header-inner {
        --header-side: clamp(120px, 30vw, 150px);
        grid-template-columns: var(--header-side) 1fr var(--header-side);
        grid-template-areas:
            "left logo cta"
            "menu menu menu";
        align-items: center;
        gap: 12px 14px;
        padding: 18px 0;
    }
    .logo { justify-self: center; }
    .header-left {
        justify-self: start;
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        column-gap: 8px;
    }
    .header-left .lang-switcher { justify-self: end; margin-right: -8px; }
    .header-cta {
        width: calc(100% + 20px);
        margin-left: -20px;
        min-width: 0;
        padding: 6px 10px;
        font-size: 10px;
        letter-spacing: 0.06px;
        border-radius: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .site-header.shrink .header-cta {
        width: calc(100% + 12px);
        margin-left: -12px;
        padding: 5px 8px;
        font-size: 9px;
        letter-spacing: 0.04px;
    }
    .header-toggle { display: inline-flex; }
    .header-menu {
        display: grid;
        width: 100%;
        gap: 16px;
    }
    .site-header.has-toggle .header-menu {
        max-height: 0;
        opacity: 0;
        transform: translateY(-6px);
        pointer-events: none;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.2s ease, transform 0.2s ease;
    }
    .site-header.is-open .header-menu {
        max-height: 520px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        overflow: visible;
        padding-top: 8px;
        margin-top: 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    .main-nav { justify-content: center; gap: 10px; flex-direction: column; align-items: center; text-align: center; }
    .main-nav a { padding: 8px 0; }
    .main-nav a::after { left: 50%; transform: translateX(-50%); }
    .lang-toggle {
        min-width: 0;
        padding: 8px 28px 8px 12px;
        border-radius: 10px;
        font-size: 12px;
    }
    .lang-toggle::after { right: 10px; }
    .logo img { height: 58px; }
    .site-header.shrink .header-inner { padding: 18px 0; }
    .site-header.shrink .logo img { height: 60px; transform: none; }
    .site-header.is-hero .header-inner { padding: 26px 0 22px; }
    .site-header.is-hero .logo img { height: 70px; }
    .site-header.is-hero .header-cta { padding: 7px 12px; font-size: 11px; }
    .mobile-menu-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding: 14px 0 6px;
    }
    .menu-contacts {
        display: flex;
        justify-content: center;
        gap: 16px;
    }
    .menu-social {
        width: 56px;
        height: 56px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        display: grid;
        place-items: center;
        color: #e8eef7;
        background: #0f1416;
        transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }
    .menu-social svg { width: 22px; height: 22px; }
    .menu-instagram { border-color: rgba(30, 213, 193, 0.45); color: #1ed5c1; }
    .menu-social:hover { border-color: rgba(255, 255, 255, 0.6); color: #fff; transform: translateY(-1px); }
}
