/* Shared site header */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

header.site-header {
    width: 100%;
    max-width: 100%;
    max-height: none !important;
    height: auto !important;
    min-height: 126px;
    padding: 12px clamp(18px, 4vw, 54px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(34px, 4.2vw, 74px);
    background: rgba(28, 28, 32, 0.58) !important;
    color: #fff;
    border: 0;
    border-bottom: 1px solid rgba(255, 204, 0, 0.28);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    position: sticky !important;
    top: 0;
    z-index: 1000;
    overflow: visible;
    transition: top 0.32s ease, background 0.25s ease, box-shadow 0.25s ease;
}

header.site-header a {
    text-decoration: none;
}

header.site-header .site-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
}

header.site-header .logo {
    width: clamp(155px, 13vw, 220px) !important;
    height: auto !important;
    max-height: 104px !important;
    display: block;
    object-fit: contain;
    background: none;
}

header.site-header .main-nav {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

header.site-header .main-nav:first-of-type {
    justify-content: center;
}

header.site-header .main-nav:last-of-type {
    justify-content: center;
}

header.site-header .main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(30px, 3.4vw, 58px);
    margin: 0;
    padding: 0;
}

header.site-header .main-nav ul li a,
header.site-header .mobile-nav ul li a {
    color: #fff;
    font-size: clamp(1.05rem, 1.4vw, 1.45rem);
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.72);
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

header.site-header .main-nav ul li a:hover,
header.site-header .mobile-nav ul li a:hover {
    color: #ffcc00;
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.85);
}

.footer-language-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.footer-language-btn:hover {
    background: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
}

.footer-language-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

footer {
    position: relative !important;
}

.site-footer-auto {
    width: 100%;
    padding: 20px;
    margin-top: 30px;
    background: rgba(18, 18, 20, 0.72);
    border-top: 1px solid rgba(255, 204, 0, 0.28);
}

.footer-language-switcher .language-icon {
    width: 30px !important;
    height: 30px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.25s ease;
}

.footer-language-switcher .language-icon:hover,
.footer-language-switcher .language-icon.active {
    background: rgba(255, 255, 255, 0.24);
}

.footer-language-switcher .flag-icon {
    width: 20px !important;
    height: 15px !important;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.22);
}

header.site-header .menu-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

header.site-header .mobile-nav {
    display: none;
}

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(20, 20, 24, 0.88);
    color: #fff;
    border: 1px solid rgba(255, 204, 0, 0.45);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    z-index: 999;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease, background 0.22s ease;
}

.back-to-top::before {
    content: "\2191";
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.back-to-top i {
    display: none;
}

.back-to-top.show {
    opacity: 1 !important;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: #ffcc00;
    color: #111;
}

@media (max-width: 768px) {
    header.site-header {
        min-height: 88px;
        padding: 10px 12px;
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr) 46px;
        gap: 8px;
    }

    header.site-header .main-nav {
        display: none !important;
    }

    header.site-header .site-logo-wrap {
        grid-column: 2;
        justify-self: center;
        min-width: 0;
    }

    header.site-header .logo {
        width: clamp(112px, 38vw, 152px) !important;
        max-height: 68px !important;
    }

    header.site-header .menu-icon {
        display: flex !important;
        grid-column: 3;
        justify-self: end;
        margin: 0 !important;
    }

    header.site-header .mobile-nav {
        display: block !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 0;
        overflow: hidden;
        background: rgba(16, 16, 19, 0.92);
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        border-bottom: 1px solid rgba(255, 204, 0, 0.24);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        transition: height 0.32s ease;
    }

    header.site-header .mobile-nav ul {
        list-style: none;
        margin: 0;
        padding: 12px 20px 16px;
        display: flex;
        flex-direction: column;
        gap: 2px;
        text-align: left;
    }

    header.site-header .mobile-nav ul li a {
        display: block;
        padding: 13px 4px;
        font-size: 1.08rem;
    }

    .back-to-top {
        right: 14px;
        bottom: 14px;
        width: 42px;
        height: 42px;
    }

    .footer-language-switcher {
        position: static;
        transform: none;
        margin-top: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1050px) {
    header.site-header {
        min-height: 116px;
        gap: 24px;
    }

    header.site-header .main-nav ul {
        gap: 24px;
    }

    header.site-header .logo {
        width: 170px !important;
        max-height: 88px !important;
    }
}
