/* ══════════════════════════════════════════════
   HEADER v2 (2026-11-07): full-width glass bar, gold hairline,
   sliding nav ink, shining CTA, smart hide, phone menu sheet
══════════════════════════════════════════════ */
:root { --header-h: 76px; }
@media (max-width: 768px) { :root { --header-h: 64px; } }

.hdr {
    position: fixed; inset: 0 0 auto 0; z-index: 1000;
    transition: transform .45s var(--ease), background .35s, box-shadow .35s;
    background: linear-gradient(180deg, rgba(5, 5, 6, .78), rgba(5, 5, 6, 0));
}
.hdr.scrolled {
    background: rgba(7, 7, 9, .78);
    backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
    box-shadow: 0 1px 0 rgba(255, 212, 0, .14), 0 18px 40px -24px rgba(0, 0, 0, .9);
}
.hdr.hidden { transform: translateY(-110%); }
.hdr::after { /* gold hairline that fades at the edges */
    content: ""; position: absolute; inset: auto 0 0 0; height: 1px; opacity: 0; transition: opacity .35s;
    background: linear-gradient(90deg, transparent, rgba(255, 212, 0, .55) 30%, rgba(255, 233, 122, .9) 50%, rgba(255, 212, 0, .55) 70%, transparent);
}
.hdr.scrolled::after { opacity: 1; }
.hdr .scroll-progress { position: absolute; top: auto; bottom: 0; height: 2px; z-index: 2; }

.hdr-bar {
    max-width: 1320px; margin: 0 auto; height: var(--header-h); padding: 0 28px;
    display: flex; align-items: center; gap: 22px;
}

/* logo */
.hdr-logo { display: flex; align-items: center; width: 150px; height: 46px; overflow: hidden; flex-shrink: 0; }
.hdr-logo img { width: 100%; height: 100%; object-fit: contain; transform: scale(2.3); transition: filter .35s, transform .5s var(--ease); }
.hdr-logo:hover img { filter: drop-shadow(0 0 14px rgba(255, 212, 0, .55)); transform: scale(2.38); }

/* nav with sliding gold ink */
.hdr-nav { position: relative; display: flex; align-items: center; gap: 2px; margin-inline: auto; }
.hdr-nav .header-link {
    position: relative; padding: 10px 14px; border-radius: 10px; background: none !important;
    color: var(--text-secondary); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap;
    transition: color .25s;
}
.hdr-nav .header-link:hover, .hdr-nav .header-link.active { color: #fff; }
.hdr-ink {
    position: absolute; left: 0; bottom: 2px; height: 2px; width: 0; opacity: 0; border-radius: 2px; pointer-events: none;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
    box-shadow: 0 0 12px rgba(255, 212, 0, .7);
    transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s;
}

/* actions */
.hdr-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hdr .lang-switch-box { position: relative; padding: 0; background: none; border: 0; }
.hdr .lang-toggle {
    display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px;
    border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
    color: #fff; font: 800 .8rem/1 var(--font-latin); letter-spacing: .05em; cursor: pointer;
    transition: border-color .25s, background .25s;
}
.hdr .lang-toggle:hover { border-color: var(--line-gold); background: rgba(255, 212, 0, .06); }
.hdr .lang-toggle .fa-globe { color: var(--gold); }
.hdr .lang-toggle .fa-chevron-down { font-size: .6rem; opacity: .6; transition: transform .25s; }
.hdr .lang-switch-box.open .lang-toggle .fa-chevron-down { transform: rotate(180deg); }
.hdr .lang-menu {
    position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 30; min-width: 170px; padding: 6px;
    display: flex; flex-direction: column; gap: 2px;
    border-radius: 14px; border: 1px solid var(--line-gold); background: rgba(10, 10, 12, .97);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, .85);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .25s var(--ease);
}
.hdr .lang-switch-box.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.hdr .lang-menu .lang-opt-btn {
    display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 10px;
    background: none; color: var(--text-secondary); font: 600 .9rem/1 var(--font-body); text-align: start; cursor: pointer;
}
.hdr .lang-menu .lang-opt-btn b { font: 800 .75rem/1 var(--font-latin); color: var(--text-dim); width: 22px; }
.hdr .lang-menu .lang-opt-btn:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.hdr .lang-menu .lang-opt-btn.active { background: var(--gold-dim); color: var(--gold); }
.hdr .lang-menu .lang-opt-btn.active b { color: var(--gold); }

.hdr-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px;
    border: 1px solid rgba(34, 158, 217, .35); background: rgba(34, 158, 217, .1); color: #4cc2f5; font-size: 1.15rem;
    transition: background .25s, transform .25s var(--ease);
}
.hdr-icon:hover { background: rgba(34, 158, 217, .2); transform: translateY(-1px); }
.hdr-login { color: var(--text-secondary); font-weight: 700; font-size: .9rem; text-decoration: none; padding: 10px 6px; white-space: nowrap; transition: color .25s; }
.hdr-login:hover { color: #fff; }

.hdr-cta {
    position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px;
    border-radius: 12px; text-decoration: none; white-space: nowrap;
    background: linear-gradient(180deg, #ffe55c, var(--gold) 55%, #e6b800);
    color: #0a0800; font-weight: 800; font-size: .95rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 10px 30px -8px rgba(255, 212, 0, .6);
    transition: transform .25s var(--ease), box-shadow .25s;
}
.hdr-cta::before { /* light sweep */
    content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
    animation: hdrShine 3.6s ease-in-out infinite;
}
@keyframes hdrShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.hdr-cta:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 16px 36px -8px rgba(255, 212, 0, .75); }
.hdr-cta i { font-size: .8rem; transition: transform .25s var(--ease); }
.hdr-cta:hover .fa-arrow-left { transform: translateX(-3px); }
.hdr-cta:hover .fa-arrow-right { transform: translateX(3px); }

/* burger (phones / tablets) */
.hdr-burger { display: none; position: relative; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); cursor: pointer; }
.hdr-burger span { position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: #fff; transition: transform .35s var(--ease), top .35s var(--ease); }
.hdr-burger span:first-child { top: 17px; }
.hdr-burger span:last-child { top: 25px; right: 18px; background: var(--gold); }
body.sheet-open .hdr-burger span:first-child { top: 21px; transform: rotate(45deg); }
body.sheet-open .hdr-burger span:last-child { top: 21px; right: 12px; transform: rotate(-45deg); }

/* phone menu sheet */
.hdr-sheet {
    position: fixed; inset: 0; z-index: 990; padding: calc(var(--header-h) + 24px) 24px 32px;
    display: flex; flex-direction: column; gap: 26px; overflow-y: auto;
    background: radial-gradient(120% 70% at 50% 0%, rgba(255, 212, 0, .10), transparent 60%), rgba(5, 5, 6, .97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    opacity: 0; visibility: hidden; transition: opacity .3s;
}
body.sheet-open { overflow: hidden; }
body.sheet-open .hdr-sheet { opacity: 1; visibility: visible; }
body.sheet-open .hdr { background: rgba(5, 5, 6, .6); }
.hdr-sheet-nav { display: flex; flex-direction: column; }
.hdr-sheet-nav a {
    padding: 16px 4px; border-bottom: 1px solid var(--line); color: #fff; text-decoration: none;
    font: 700 1.35rem/1.2 var(--font-display);
    opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .5s var(--ease), color .2s;
}
.hdr-sheet-nav a:active { color: var(--gold); }
body.sheet-open .hdr-sheet-nav a { opacity: 1; transform: none; }
body.sheet-open .hdr-sheet-nav a:nth-child(2) { transition-delay: .04s; }
body.sheet-open .hdr-sheet-nav a:nth-child(3) { transition-delay: .08s; }
body.sheet-open .hdr-sheet-nav a:nth-child(4) { transition-delay: .12s; }
body.sheet-open .hdr-sheet-nav a:nth-child(5) { transition-delay: .16s; }
.hdr-sheet-langs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hdr-sheet-langs .lang-opt-btn {
    min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
    color: var(--text-secondary); font: 800 .85rem/1 var(--font-latin); cursor: pointer;
}
.hdr-sheet-langs .lang-opt-btn.active { background: var(--gold); color: #050506; border-color: var(--gold); }
.hdr-sheet-cta { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.hdr-sheet-cta .btn { width: 100%; min-height: 54px; justify-content: center; }
.hdr-sheet-login { text-align: center; color: var(--text-secondary); font-weight: 700; text-decoration: none; padding: 12px; }

/* program-terms band under the hero (was a ticker inside the header) */
.live-stream-bar.band {
    width: 100%; max-width: none; margin: 0; height: 48px; border-radius: 0;
    border-left: 0; border-right: 0; border-color: rgba(255, 212, 0, .18);
    background: linear-gradient(180deg, rgba(255, 212, 0, .06), rgba(0, 0, 0, .35));
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.live-stream-bar.band .stream-title { display: none; }
.live-stream-bar.band .stream-track { padding-left: 0; gap: 44px; }
.live-stream-bar.band .stream-pill { font-size: .9rem; color: #f1f2f6; }
.live-stream-bar.band .stream-pill i { font-size: .9rem; }

/* responsive */
@media (max-width: 1180px) {
    .hdr-nav { display: none; }
    .hdr-actions { margin-inline-start: auto; }
    .hdr-burger { display: inline-block; }
    .hdr-login { display: none; }
}
@media (max-width: 768px) {
    .hdr-bar { padding: 0 14px; gap: 10px; }
    .hdr-logo { width: 104px; height: 40px; }
    .hdr-icon { display: none; } /* the bottom dock has Telegram */
    .hdr-actions { gap: 8px; }
    .hdr-cta { height: 44px; padding: 0 14px; font-size: .85rem; }
    .hdr-cta i { display: none; }
    .hdr .lang-toggle { height: 44px; padding: 0 10px; }
    .hdr .lang-toggle .fa-chevron-down { display: none; }
    .hdr .lang-toggle { min-width: 46px; justify-content: center; }
    .hdr .lang-switch-box.open .lang-menu { display: grid; }
    .hdr .lang-menu { position: fixed; top: calc(var(--header-h) + 6px); left: 12px; right: 12px; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
    .hdr .lang-menu .lang-opt-btn { min-height: 48px; justify-content: center; }
    .live-stream-bar.band { height: 42px; }
    .live-stream-bar.band .stream-pill { font-size: .82rem; }
}
@media (max-width: 380px) {
    .hdr-logo { width: 88px; }
    .hdr-cta { padding: 0 12px; font-size: .8rem; }
    .hdr .lang-toggle .fa-globe { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hdr-cta::before { animation: none; } }
.hdr .lang-opt-btn, .hdr-sheet .lang-opt-btn { transition: background .2s, color .2s; }
body.sheet-open .bottom-floating-dock, body.sheet-open .float-tg { opacity: 0; visibility: hidden; pointer-events: none; }
