/* Header and search placement for /newver/ only. Live site CSS is not changed. */
.nv .topbar{display:none}

/* One-row header stretched across the same .w as the menu */
.nv .hrow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  width:100%;
  flex-wrap:nowrap;
}
.nv .logo{
  text-decoration:none;
  align-items:center;
  gap:12px;
  flex:0 1 auto;
  min-width:0;
}
.nv .logo .mk{height:44px;width:auto;flex:none}
.nv .logo .lt{display:flex;flex-direction:column;line-height:1.15;min-width:0}
.nv .logo .nv-addr{
  display:block;
  font-size:11.5px;
  font-weight:400;
  color:var(--mut);
  line-height:1.35;
  max-width:240px;
  white-space:normal;
  letter-spacing:0;
}

/* Phones + search in the middle */
.nv-mid{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:20px;
  flex:1 1 auto;
  min-width:0;
}
.nv-phones{display:flex;flex-direction:column;align-items:flex-start;gap:1px;flex:none}
.nv-phones a{
  font-weight:700;
  font-size:15.5px;
  white-space:nowrap;
  color:var(--fg);
  line-height:1.25;
  text-decoration:none;
  display:block;
  text-align:left;
  font-variant-numeric:tabular-nums lining-nums;
  font-feature-settings:"tnum" 1, "lnum" 1;
}
.nv-phones a:hover{color:var(--ac)}
.nv-mail{display:inline-flex;align-items:center;gap:6px;font-size:14.5px;font-weight:600;color:var(--ac,#3D8BFF);white-space:nowrap;letter-spacing:.01em;text-decoration:none;min-width:0}
.nv-mail:hover{filter:brightness(1.15);text-decoration:underline}
.nv-mail .ic{width:16px;height:16px;flex:none}

/* Actions flush right: MAX, Telegram, Написать письмо — same height/padding */
.nv-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  margin-left:0;
}
.nv .hdr .nv-write,
.nv .hdr .nv-msg{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  box-sizing:border-box;
  height:42px;
  padding:0 14px;
  font-size:14px;
  font-weight:600;
  font-family:var(--fb);
  white-space:nowrap;
  flex:none;
  border-radius:var(--rb,10px);
  border:0;
  color:#fff;
  text-decoration:none;
  line-height:1;
}
.nv .hdr .nv-write .ic,
.nv .hdr .nv-msg .ic{width:16px;height:16px;flex:none}
.nv .hdr .nv-write{background:var(--ac);color:var(--onac,#fff)}
.nv .hdr a.nv-msg.m-max,
.nv .hdr .nv-msg.m-max{
  background:linear-gradient(135deg,#8B5CFF 0%,#5B2BE0 55%,#4A1AD4 100%);
  color:#fff;
}
/* Top-bar MAX: icon «M» only, almost square, same 42px height as the other buttons */
.nv .hdr .nv-actions .nv-msg.m-max{
  width:42px;
  min-width:42px;
  padding:0;
}
.nv .hdr .nv-actions .nv-msg.m-max .nv-msg-txt{display:none}
.nv .hdr .nv-actions .nv-msg.m-max .ic{width:18px;height:18px}
.nv .hdr a.nv-msg.m-tg,
.nv .hdr .nv-msg.m-tg{
  background:#2AABEE;
  color:#fff;
}
.nv .hdr .nv-msg:hover,
.nv .hdr .nv-write:hover{filter:brightness(1.1)}
.nv .hdr .msgs{display:flex;align-items:center;gap:10px;flex-wrap:nowrap}
.nv .hdr .msgs.hm .ic{width:16px;height:16px}

.nv .hsearch{display:none}
.nv .hcall,.nv .hmail{display:none}
.nv-nav-contacts{display:none}

.nv .hdr{background:var(--hbg,var(--bg))}
.v2.nv .hdr{background:rgba(16,19,24,.96);backdrop-filter:blur(8px)}
.nv .navrow{border-top:1px solid var(--line);background:transparent}

/* Hidden placeholder keeps section nth-of-type banding after the in-content search was moved */
.nv-search-sec{display:none !important;padding:0 !important;margin:0 !important;height:0 !important;border:0 !important}

/* Search field in the top header row, between phones and action buttons */
.nv .hdr,.nv .navrow,.nv .nav{overflow:visible}

.nv-mid .nv-nav-search{
  position:relative;
  display:flex;
  align-items:center;
  box-sizing:border-box;
  height:42px;
  margin:0;
  flex:1 1 200px;
  width:auto;
  max-width:none;
  min-width:160px;
  padding-left:12px;
  box-shadow:none;
}
.nv-nav-search input{
  font-size:14px;
  padding:0 8px 0 0;
}
.nv-nav-search button{
  width:42px;
  min-width:42px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.nv-nav-search button .ic{width:16px;height:16px;display:block}
.nv-mid .nv-nav-search .s-res{
  z-index:120;
  left:0;
  right:auto;
  width:min(360px, calc(100vw - 64px));
  min-width:100%;
}
/* Burger copy of the search is hidden on desktop */
.nv .nav > .nv-nav-search{display:none}

.nv-nav-contacts .nv-addr{
  display:block;
  font-size:12.5px;
  color:var(--mut);
  line-height:1.4;
  max-width:none;
}

/* ~1100–1280: hide messenger labels, keep the same button height */
@media (max-width:1280px){
  .nv .hrow{gap:14px;flex-wrap:nowrap}
  .nv-mid{gap:14px}
  .nv .hdr .nv-msg .nv-msg-txt{display:none}
  .nv .hdr .hct .nv-msg,
  .nv .hdr .nv-actions .nv-msg{width:42px;padding:0}
  .nv .logo .nv-addr{max-width:190px;font-size:11px}
  .nv-mid .nv-nav-search{max-width:none;min-width:150px}
}

@media (max-width:1100px){
  .nv .hrow{gap:10px}
  .nv-mid{gap:12px}
  .nv .logo .nv-addr{max-width:160px;font-size:10.5px}
  .nv-phones a{font-size:14.5px}
  .nv-mid .nv-nav-search{min-width:140px}
}
@media (max-width:1100px) and (min-width:981px){
  .nv .nav > .ni > .nt{padding:10px 6px;font-size:13.5px}
  .nv .nav > .ni:first-of-type > .nt{padding-left:0}
}

@media (max-width:1180px){
  .nv-mail{font-size:13.5px}
}

@media (max-width:980px){
  .nv .hct .nv-write,
  .nv .nv-actions .nv-write{display:none !important}
  .nv-mid{display:none}
  .nv .logo .nv-addr{display:none}
  .nv .hcall{display:inline-flex}
  .nv .hmail{display:none !important}
  .nv-actions{flex:none;margin-left:auto;gap:8px;justify-content:flex-end}
  /* beat live .hct .btn{display:none} so MAX stays in the top bar */
  .nv .hdr .hct .nv-msg,
  .nv .hdr .nv-actions .nv-msg{display:inline-flex !important}
  /* compact icon buttons in the top bar */
  .nv .hdr .nv-actions .nv-msg{
    width:38px;height:38px;padding:0;border-radius:50%;
  }
  .nv .hdr .nv-actions .nv-msg .nv-msg-txt{display:none}
  .nv-nav-contacts{display:flex;flex-direction:column;gap:10px;padding:12px 12px 16px;border-bottom:1px solid var(--line);margin-bottom:4px}
  .nv-nav-contacts .nv-phones{display:flex}
  .nv-nav-contacts .nv-mail{display:inline-flex}
  .nv-nav-contacts .nv-write{display:inline-flex !important;align-self:flex-start;margin-top:4px}
  /* full labeled messenger buttons in the burger, same scale as «Написать письмо» */
  .nv .hdr .nv-nav-contacts .nv-msg{
    width:auto;height:42px;padding:0 14px;border-radius:var(--rb,10px);
    align-self:flex-start;
  }
  .nv .hdr .nv-nav-contacts .nv-msg .nv-msg-txt{display:inline}
  .nv-nav-contacts .msgs{display:flex;flex-wrap:wrap;gap:10px}
  .nv-nav-contacts{order:0}
  .nv .nav{align-items:stretch}
  .nv .nav > .nv-nav-search{
    display:flex;
    order:1;
    flex:0 0 auto;
    max-width:none;
    min-width:0;
    width:100%;
    margin:8px 0 12px;
    height:42px;
    min-height:42px;
    box-sizing:border-box;
    padding-left:12px;
  }
  .nv .nav > .nv-nav-search .s-res{
    z-index:120;
    left:0;
    right:0;
    width:auto;
  }
  .nv .nav > .ni{order:2}
}

@media (max-width:640px){
  .nv .hrow{gap:8px;padding-top:10px;padding-bottom:10px}
  .nv .logo .mk{height:32px}
  .nv .logo{align-items:center}
  .nv-actions{gap:6px}
  .nv .hcall{width:34px;height:34px}
  .nv .hdr .nv-actions .nv-msg{width:34px;height:34px}
  .nv .hdr .nv-actions .nv-msg .ic{width:15px;height:15px}
  .nv .hdr .hct .nv-msg.m-tg,
  .nv .hdr .nv-actions .nv-msg.m-tg{display:none !important}
  .nv .hdr .hct .nv-msg.m-max,
  .nv .hdr .nv-actions .nv-msg.m-max{display:inline-flex !important}
  .nv-nav-contacts .m-tg{display:inline-flex !important}
  .nv-phones a{font-size:16px}
}
