/* One shared header; all dimensions and mobile states live here. */
.hdr { position: absolute; z-index: 60; inset: 0 0 auto; height: var(--hdr-h); background: #090909; border-bottom: 1px solid #292929; }
.hdr-inner { display: flex; align-items: center; width: 100%; max-width: 1320px; height: 100%; padding-inline: 40px; margin-inline: auto; gap: 32px; }
.hdr-logo { position: relative; z-index: 2; flex: 0 0 148px; margin-right: 24px; }
.hdr-logo a { display: block; }
.hdr-logo-img { width: 148px; height: auto; }
.hdr-panel { display: flex; align-items: center; justify-content: space-between; flex: 1; min-width: 0; gap: 28px; }
.hdr-menu, .hdr-socials { list-style: none; display: flex; align-items: center; margin: 0; padding: 0; }
.hdr-menu { gap: 28px; }
.hdr-menu a { display: inline-block; font: 500 15px/1.4 var(--font); text-decoration: none; white-space: nowrap; transition: color .2s; }
.hdr .hdr-menu a { padding-block: 14px; color: #c5c5c5; }
.hdr .hdr-menu a:hover, .hdr .hdr-menu a[aria-current="page"] { color: #ff8562; }
.hdr-aside { display: flex; align-items: center; gap: 18px; }
.hdr-socials { gap: 4px; }
.hdr-socials a { display: grid; place-items: center; width: 32px; height: 40px; color: #d1d1d1; border-radius: 4px; transition: color .2s, background-color .2s; }
.hdr-socials svg { width: 17px; height: 17px; fill: currentColor; }
.hdr-socials .icon-phone { fill: none; }
.hdr-socials a:hover { color: #ff8562; background: #222; }
.hdr-map { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 13px; border: 1px solid #494949; border-radius: 4px; font: 500 13px/1.4 var(--font); text-decoration: none; white-space: nowrap; transition: border-color .2s, color .2s; }
.hdr-map svg { width: 16px; height: 16px; }
.hdr-map:hover { border-color: #ff8562; color: #ff8562; }
.hdr-quick { display: flex; align-items: center; flex-shrink: 0; }
.hdr-quick-map { display: none; }
/* Языки: в шапке текущий, по клику — список из четырёх. Разметка — <details>, см. enigma_lang_switcher(). */
.hdr .lang-switch { position: relative; padding-left: 14px; border-left: 1px solid #3c3c3c; }
.hdr .lang-switch-btn { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px; border-radius: 4px; color: #fff; font: 500 12px/1 var(--font); text-transform: uppercase; list-style: none; cursor: pointer; transition: color .2s; }
.hdr .lang-switch-btn::-webkit-details-marker { display: none; }
.hdr .lang-switch-btn::marker { content: ''; }
.hdr .lang-switch-btn .icon-chevron-down { width: 14px; height: 14px; color: #969696; transition: transform .2s; }
.hdr .lang-switch[open] .lang-switch-btn .icon-chevron-down { transform: rotate(180deg); }
.hdr .lang-switch-btn:hover { color: #ff8562; }
.hdr .lang-switch-btn:focus-visible { outline: 2px solid #ff8562; outline-offset: 2px; }
.hdr .lang-switch-list { position: absolute; z-index: 70; top: calc(100% + 12px); right: 0; min-width: 196px; margin: 0; padding: 6px; list-style: none; background: #101010; border: 1px solid #2e2e2e; border-radius: 6px; box-shadow: 0 14px 36px rgba(0, 0, 0, .5); }
.hdr .lang-switch-list a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 4px; color: #d1d1d1; font: 500 14px/1.2 var(--font); text-decoration: none; transition: background-color .15s, color .15s; }
.hdr .lang-switch-list a:hover, .hdr .lang-switch-list a:focus-visible { background: #1c1c1c; color: #fff; outline: 0; }
.hdr .lang-switch-list a[aria-current] { color: #ff8562; }
.hdr .lang-switch-code { margin-left: auto; color: #6f6f6f; font-size: 12px; letter-spacing: .5px; }
.hdr-burger { display: none; }
.hdr-phone-text { display: none; }
/* Desktop only: the mobile panel keeps its own square buttons below.
   Accent icon + text for phone and map, muted brand glyphs between them. */
@media (min-width: 981px) {
 .hdr-aside { gap: 0; }
 .hdr-socials { gap: 2px; }
 .hdr-socials a { width: 36px; height: 36px; border-radius: 50%; color: #9d9d9d; }
 .hdr-socials svg { width: 18px; height: 18px; }
 /* Filled circles read heavier than open glyphs — one pixel smaller evens them out. */
 .hdr-socials .icon-telegram, .hdr-socials .icon-messenger { width: 17px; height: 17px; }
 .hdr-socials a:hover { color: #fff; background: #1d1d1d; }
 .hdr-socials .hdr-social-phone svg { color: #ff8562; }
 .hdr-map { min-height: 40px; margin-left: 14px; padding: 0 0 0 18px; gap: 8px; border: 0; border-left: 1px solid #3c3c3c; border-radius: 0; color: #c5c5c5; font: 500 14px/1.4 var(--font); }
 .hdr-map svg { width: 17px; height: 17px; color: #ff8562; }
 .hdr-map:hover { color: #ff8562; }
}
@media (min-width: 1280px) {
 .hdr-socials .hdr-social-phone { width: auto; gap: 8px; text-decoration: none; margin-right: 8px; padding-right: 2px; border-radius: 0; color: #ededed; font: 500 14px/1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: center; }
 .hdr-socials .hdr-social-phone svg { width: 16px; height: 16px; }
 .hdr-socials .hdr-social-phone:hover { background: none; color: #ff8562; }
 .hdr-phone-text { display: inline; }
}
@media (min-width: 981px) and (max-width: 1199px) {
 .hdr-inner { padding-inline: 24px; gap: 20px; }
 .hdr-logo { flex-basis: 128px; margin-right: 4px; }
 .hdr-logo-img { width: 128px; }
 .hdr-panel { gap: 20px; }
 .hdr-menu { gap: 18px; }
 .hdr-menu a { font-size: 14px; }
 .hdr-socials a { width: 32px; height: 32px; }
 .hdr-socials svg { width: 16px; height: 16px; }
 .hdr-socials .icon-telegram, .hdr-socials .icon-messenger { width: 15px; height: 15px; }
 .hdr-map { margin-left: 10px; padding-left: 12px; font-size: 13px; }
 .hdr .lang-switch { padding-left: 8px; }
}
@media (max-width: 980px) {
 :root { --hdr-h: 72px; }
 .hdr { position: sticky; top: 0; }
 .hdr.is-open { position: fixed; }
 .hdr-inner { padding-inline: 24px; gap: 16px; }
 .hdr-logo { flex-basis: 132px; margin-right: auto; }
 .hdr-logo-img { width: 132px; }
 .hdr .lang-switch { border: 0; padding: 0; }
 .hdr .lang-switch-btn { min-height: 44px; gap: 5px; padding: 8px 6px; }
 .hdr .lang-switch-list { top: calc(100% + 14px); }
 .hdr-burger { display: grid; place-items: center; position: relative; z-index: 2; flex: 0 0 44px; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; background: transparent; cursor: pointer; }
 .hdr-burger-box { position: absolute; top: 50%; left: 10px; width: 24px; height: 2px; margin-top: -1px; border-radius: 2px; background: #fff; transition: background-color .16s; }
 .hdr-burger-box::before, .hdr-burger-box::after { content: ''; position: absolute; left: 0; width: 24px; height: 2px; border-radius: 2px; background: #fff; transition: transform .28s cubic-bezier(.4,.01,.2,1); }
 .hdr-burger-box::before { top: -7px; }
 .hdr-burger-box::after { top: 7px; }
 .hdr.is-open .hdr-burger-box { background: transparent; }
 .hdr.is-open .hdr-burger-box::before { transform: translateY(7px) rotate(45deg); }
 .hdr.is-open .hdr-burger-box::after { transform: translateY(-7px) rotate(-45deg); }
 .hdr-panel { position: fixed; z-index: 1; top: var(--hdr-h); right: 0; bottom: 0; width: min(420px, 92vw); padding: 32px 28px max(32px, env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 36px; overflow-y: auto; overscroll-behavior: contain; background: #101010; border-left: 1px solid #292929; transform: translateX(100%); visibility: hidden; transition: transform .32s cubic-bezier(.4,.01,.2,1), visibility 0s linear .32s; }
 .hdr.is-open .hdr-panel { transform: translateX(0); visibility: visible; transition-delay: 0s; }
 .hdr-nav { flex-shrink: 0; }
 .hdr .hdr-menu { flex-direction: column; align-items: stretch; gap: 0; }
 .hdr .hdr-menu li { border-bottom: 1px solid #333; }
 .hdr .hdr-menu a { display: block; padding-block: 20px; font-size: 26px; font-weight: 500; }
 .hdr-aside { margin-top: auto; align-items: flex-start; flex-direction: column; gap: 24px; padding-top: 16px; }
 .hdr-socials { gap: 10px; }
 .hdr-socials a { width: 44px; height: 44px; border: 1px solid #3c3c3c; }
 .hdr-socials svg { width: 19px; height: 19px; }
 .hdr-map { min-height: 46px; padding-inline: 20px; }
 .hdr-panel > * { opacity: 0; transform: translateX(12px); transition: opacity .25s, transform .25s; }
 .hdr.is-open .hdr-panel > * { opacity: 1; transform: none; transition-delay: .1s; }
 .hdr.is-open .hdr-panel > :nth-child(2) { transition-delay: .16s; }
 .hdr::after { content: ''; position: fixed; z-index: 0; inset: var(--hdr-h) 0 0; background: rgba(0,0,0,.65); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s; }
 .hdr.is-open::after { opacity: 1; visibility: visible; transition-delay: 0s; }
 html.hdr-locked, body.hdr-locked { overflow: hidden; }
 body.hdr-locked { padding-top: var(--hdr-h); }
 .hero { padding-top: 40px; }
}
@media (max-width: 359px) {
 .hdr-inner { padding-inline: 20px; gap: 8px; }
 .hdr-logo, .hdr-logo-img { width: 116px; }
 .hdr-logo { flex-basis: 116px; }
}
@media (prefers-reduced-motion: reduce) {
 .hdr *, .hdr *::before, .hdr *::after, .hdr::after { transition: none !important; }
}
