/* ІЗОЛЬОВАНІ СТИЛІ: ХЕДЕР (#site-header) */

#site-header.site-header {
    width: 100%;
    height: 70px;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    z-index: 2000;
    border-bottom: 1px solid rgba(179, 135, 40, 0.2);
}

@media (max-width: 768px) {
    #site-header.site-header {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

#site-header .header-wrapper {
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}

/* КЛІКАБЕЛЬНИЙ БРЕНД: ЛОГО + НАЗВА */
#site-header .header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 4;
    overflow: visible;
    isolation: isolate;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(520px, 46vw);
    padding: 2px 0;
    border-radius: 10px;
    transition: filter 0.22s ease;
}

#site-header .header-brand::after {
    content: '';
    position: absolute;
    top: -2px;
    bottom: -2px;
    left: -34%;
    width: 24%;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0), rgba(255, 76, 76, 0.42), rgba(252, 246, 186, 0.16), rgba(255, 0, 0, 0));
    transform: skewX(-16deg);
    filter: blur(0.7px);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 8;
    animation: brandSweep 5.2s linear infinite;
}

#site-header .header-brand:hover {
    filter: brightness(1.06);
}

#site-header .header-brand:focus-visible {
    outline: 2px solid rgba(252, 246, 186, 0.88);
    outline-offset: 3px;
}

#site-header .header-trident {
    display: none;
    height: 34px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(179, 135, 40, 0.4));
}

#site-header .logo-wrapper {
    position: relative;
    height: 52px;
    width: auto;
    display: flex;
    align-items: center;
    overflow: visible;
    border-radius: 0;
    z-index: 3;
}

#site-header .logo-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    position: relative;
    z-index: 3;
    display: block;
    border-radius: 0;
    background: transparent;
}

#site-header .logo-shimmer {
    display: none;
}

@keyframes brandSweep {
    0% {
        left: -34%;
        opacity: 0;
    }
    16% {
        opacity: 0.9;
    }
    34% {
        left: 112%;
        opacity: 0;
    }
    100% {
        left: 112%;
        opacity: 0;
    }
}

#site-header .logo-wrapper:hover .logo-img {
    transform: scale(1.05);
    transition: 0.3s;
}

#site-header .titanium-effect {
    font-family: var(--font-family-ui);
    font-weight: 900;
    font-size: clamp(0.85rem, 1.8vw, 1.15rem);
    text-transform: uppercase;
    background: linear-gradient(90deg, #b9b9b9 0%, #f2f2f2 25%, #8a8a8a 45%, #c21b1b 55%, #8a8a8a 70%, #f2f2f2 85%, #b9b9b9 100%);
    background-size: 160% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: none;
}

#site-header .header-nav { display: block; }
#site-header .nav-list { display: flex; gap: clamp(15px, 2vw, 25px); }

#site-header .nav-link {
    font-family: var(--font-family-ui);
    font-size: 0.88rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.7); transition: 0.3s; padding: 5px 0; position: relative;
    white-space: nowrap;
    line-height: 1.1;
}

#site-header .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(194, 27, 27, 0.2), var(--color-gold), rgba(194, 27, 27, 0.2));
    box-shadow: 0 0 10px rgba(179, 135, 40, 0.6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

#site-header .nav-link:hover {
    color: var(--color-gold-light);
    text-shadow: 0 0 12px rgba(179, 135, 40, 0.45);
}

#site-header .nav-link:hover::after {
    transform: scaleX(1);
}

#site-header .nav-link.active { color: var(--color-gold-light); }
#site-header .nav-link.active::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px;
    background: var(--color-gold); box-shadow: 0 0 10px var(--color-gold);
}

#site-header .header-controls { display: flex; align-items: center; gap: 20px; margin-left: auto; }
#site-header .header-lang { display: inline-flex; gap: 6px; align-items: center; }
#site-header .lang-switch-btn {
    color: #666;
    font-family: var(--font-family-ui);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(179, 135, 40, 0.2);
    transition: 0.25s;
}
#site-header .lang-switch-btn:hover { color: #b38728; border-color: rgba(179, 135, 40, 0.6); }
#site-header .lang-switch-btn.is-active {
    color: #b38728;
    border-color: rgba(179, 135, 40, 0.9);
    box-shadow: 0 0 10px rgba(179, 135, 40, 0.25);
}

#site-header .burger-menu { 
    display: none; 
    flex-direction: column; 
    justify-content: space-between; 
    align-items: center;
    width: 34px; 
    height: 24px; 
    padding: 0;
    z-index: 2100; 
    cursor: pointer;
    position: relative;
}
#site-header .burger-menu span { 
    display: block; 
    width: 100%; 
    height: 3px; 
    background-color: #fff; 
    border-radius: 10px; 
    transition: transform 0.24s ease, opacity 0.2s ease, background-color 0.2s ease;
    transform-origin: center;
}

@media (min-width: 993px) {
    #site-header .header-wrapper {
        gap: 0;
    }

    #site-header .header-nav {
        margin-left: clamp(34px, 4.4vw, 84px);
    }

    #site-header .nav-list {
        gap: clamp(18px, 1.9vw, 28px);
    }
}

#site-header .burger-menu.open span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
    background-color: var(--color-gold);
}
#site-header .burger-menu.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#site-header .burger-menu.open span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
    background-color: var(--color-gold);
}

@media (max-width: 992px) {
    #site-header .burger-menu {
        display: flex;
        width: 42px;
        height: 42px;
        padding: 9px 8px;
        border-radius: 10px;
        background: rgba(10, 12, 9, 0.42);
        border: 1px solid rgba(179, 135, 40, 0.22);
    }
    #site-header .burger-menu span {
        width: 24px;
        height: 2.5px;
    }
    #site-header .header-nav { 
        position: fixed; 
        top: 0; 
        right: -110%; 
        width: min(84vw, 360px); 
        height: 100vh; 
        background: linear-gradient(180deg, rgba(20, 24, 19, 0.94), rgba(12, 15, 12, 0.95));
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        display: flex; 
        justify-content: flex-start; 
        align-items: flex-start; 
        transition: right 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
        z-index: 2050;
        box-shadow: -8px 0 26px rgba(0, 0, 0, 0.42);
        border-left: 1px solid rgba(179, 135, 40, 0.4);
        padding: 94px 18px 28px;
    }
    #site-header .header-nav.active { right: 0; }
    #site-header .nav-list { 
        flex-direction: column; 
        align-items: stretch; 
        gap: 8px; 
        width: 100%;
    }
    #site-header .nav-list li {
        width: 100%;
        display: flex;
        justify-content: stretch;
    }
    #site-header .nav-link { 
        font-size: clamp(1.18rem, 4.9vw, 1.34rem); 
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-height: 50px;
        padding: 10px 12px;
        border-radius: 10px;
        border: 1px solid rgba(179, 135, 40, 0.16);
        background: rgba(255, 255, 255, 0.015);
        text-align: left;
        line-height: 1.2;
        white-space: normal;
        opacity: 0;
        transform: translateX(12px);
        transition: opacity 0.2s ease, transform 0.22s ease, border-color 0.2s ease, background-color 0.2s ease;
    }
    #site-header .header-nav.active .nav-link {
        opacity: 1;
        transform: translateX(0);
    }
    #site-header .header-nav .nav-link:hover,
    #site-header .header-nav .nav-link:focus-visible {
        border-color: rgba(179, 135, 40, 0.5);
        background: rgba(179, 135, 40, 0.08);
    }
    #site-header .header-nav .nav-link.active::after {
        display: none;
    }
    #site-header .header-nav .nav-link.active {
        color: #f6e8be;
        border-color: rgba(179, 135, 40, 0.58);
        background: rgba(179, 135, 40, 0.12);
    }
    #site-header .header-nav.active .nav-list li:nth-child(1) .nav-link { transition-delay: 0.03s; }
    #site-header .header-nav.active .nav-list li:nth-child(2) .nav-link { transition-delay: 0.06s; }
    #site-header .header-nav.active .nav-list li:nth-child(3) .nav-link { transition-delay: 0.09s; }
    #site-header .header-nav.active .nav-list li:nth-child(4) .nav-link { transition-delay: 0.12s; }
}

/* Великі екрани: більше повітря між логотипом і текстом */
@media (min-width: 1400px) {
    #site-header .header-brand { gap: 14px; max-width: 600px; }
}

/* Samsung S22 Ultra та подібні: компактний текст без перекриття */
@media (max-width: 430px) and (min-width: 361px) {
    #site-header.site-header { height: 80px; }
    #site-header .header-wrapper { height: 100%; gap: 8px; }
    #site-header .logo-wrapper { height: 46px; flex: 0 0 auto; }
    #site-header .header-brand { max-width: calc(100% - 130px); }
    #site-header .logo-text {
        font-size: 0.72rem;
        line-height: 1.1;
        max-width: calc(100% - 104px);
        white-space: normal;
        min-width: 0;
    }
    #site-header .header-controls { flex: 0 0 auto; }
}

@media (max-width: 420px) {
    #site-header .logo-text {
        display: none;
    }
    #site-header .header-trident { display: block; }
    #site-header .header-wrapper { gap: 6px; }
    #site-header .header-brand { max-width: calc(100% - 110px); }
    #site-header .logo-wrapper {
        height: 44px;
        flex: 0 0 auto;
        overflow: visible;
        border-radius: 0;
    }
    #site-header .logo-img {
        height: 44px;
        width: auto;
    }
    #site-header .logo-shimmer {
        display: block;
        opacity: 0.6;
    }
    #site-header .header-controls { gap: 12px; }
    #site-header .lang-switch-btn {
        min-height: 38px;
        min-width: 44px;
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    #site-header .burger-menu {
        width: 40px;
        height: 40px;
        padding: 8px 7px;
    }
}

/* Pixel 8 Pro та схожі: відсунути текст від логотипа */
@media (max-width: 520px) and (min-width: 421px) {
    #site-header .logo-wrapper {
        height: 48px;
        flex: 0 0 auto;
    }
    #site-header .header-brand {
        max-width: calc(100% - 118px);
    }
    #site-header .logo-text {
        padding-left: 4px;
        font-size: 0.76rem;
        line-height: 1.15;
        max-width: 190px;
        white-space: normal;
    }
}