/* Shared fixed M1 header, rendered at build time. */
.m1-nav-spacer { height: var(--m1-header-height); }
body:has(.m1-global-header) :is(#catalog, #calculator, #features, #contacts, #header-form, #grafik-platezhey, #normativnye-akty, .m1-article-contents ~ [id]) {
  scroll-margin-top: calc(var(--m1-header-height) + 12px);
}
.m1-global-header {
  --m1-header-gold: #dcc198;
  position: fixed;
  z-index: 900;
  inset: 0 0 auto;
  width: 100%;
  min-height: var(--m1-header-height);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--m1-sans);
  padding: 8px var(--m1-page-edge);
  background: rgba(4, 24, 47, .96);
  border-bottom: 1px solid rgba(234, 216, 181, .12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.m1-global-header :is(.m1-brand-side, .m1-contact-side) { display: flex; align-items: center; min-width: 0; }
.m1-global-header .m1-brand-side { flex: 0 0 auto; }
.m1-global-header .m1-brand-side .m1-header-logo { display: block; width: 148px; height: 42px; margin-left: 16px; flex: 0 0 auto; }
.m1-global-header .m1-brand-side .m1-header-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.m1-global-header .m1-contact-side { display: flex; flex: 0 0 auto; align-items: center; }
.m1-global-header .m1-contact-row { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.m1-global-header .m1-contact-row > a { margin: 0; flex: 0 0 auto; }
.m1-header-social {
  --m1-social-gold: var(--m1-header-gold, #dcc198);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid rgba(234, 216, 181, .36);
  border-radius: 50%;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.m1-header-social:hover { border-color: var(--m1-social-gold); background: rgba(220, 193, 152, .08); transform: translateY(-1px); }
.m1-header-social svg { display: block; width: 22px; height: 22px; fill: var(--m1-social-gold); }
.m1-global-header .m1-phone-block { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 4px; margin-left: 2px; }
.m1-global-header .m1-header-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 184px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(234, 216, 181, .36);
  border-radius: var(--m1-control-radius);
  color: var(--m1-gold-light);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.m1-global-header .m1-header-phone:hover { background: rgba(234, 216, 181, .1); }
.m1-global-header .m1-header-callback {
  display: inline-block;
  margin: 0;
  color: rgba(234, 216, 181, .9);
  font-size: 11px;
  font-weight: 450;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: rgba(220, 193, 152, .48);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.m1-global-header .m1-menu-toggle {
  display: block;
  position: relative;
  z-index: 2;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(234, 216, 181, .38);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
.m1-global-header .m1-menu-toggle span { position: absolute; left: 50%; width: 19px; height: 1.5px; background: var(--m1-header-gold); transform: translateX(-50%); }
.m1-global-header .m1-menu-toggle span:nth-of-type(1) { top: 15px; }
.m1-global-header .m1-menu-toggle span:nth-of-type(2) { top: 22px; }
.m1-global-header .m1-menu-toggle span:nth-of-type(3) { top: 29px; }
.m1-global-header .m1-menu-toggle.active span:nth-of-type(1) { opacity: 0; }
.m1-global-header .m1-menu-toggle.active span:nth-of-type(2) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.m1-global-header .m1-menu-toggle.active span:nth-of-type(3) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}
.m1-global-header .m1-menu-toggle:focus-visible,
.m1-global-header a:focus-visible { outline: 2px solid var(--m1-header-gold); outline-offset: 3px; }
/* M1 navigation drawer: one shared menu for desktop and mobile. */
.m1-global-header .m1-menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(4, 17, 32, .58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: opacity .24s ease, visibility .24s ease;
}
.m1-global-header .m1-menu.active { visibility: visible; opacity: 1; pointer-events: auto; }
.m1-global-header .m1-menu-inner {
  width: min(410px, 100%);
  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 84px 40px 36px;
  background: linear-gradient(155deg, #102946 0%, #081b33 72%);
  box-shadow: 20px 0 60px rgba(3, 14, 27, .2);
  transform: translateX(-24px);
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.m1-global-header .m1-menu.active .m1-menu-inner { transform: translateX(0); }
.m1-global-header .m1-menu-brand { display: inline-flex; margin-bottom: 26px; }
.m1-global-header .m1-menu-brand img { display: block; width: 148px; height: auto; }
.m1-global-header .m1-menu ul { width: 100%; margin: 0; padding: 0; }
.m1-global-header .m1-menu li { list-style: none; border-bottom: 1px solid rgba(234, 216, 181, .13); }
.m1-global-header .m1-menu li:first-child { border-top: 1px solid rgba(234, 216, 181, .13); }
.m1-global-header .m1-menu li a {
  display: block;
  padding: 11px 0;
  color: rgba(255, 255, 255, .88);
  font-family: var(--m1-sans);
  font-size: 18px;
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: .005em;
  text-decoration: none;
  transition: color .2s ease, padding-left .2s ease;
}
.m1-global-header .m1-menu li a:hover,
.m1-global-header .m1-menu li a:focus-visible { padding-left: 5px; color: var(--m1-header-gold); }
.m1-global-header .m1-menu-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; margin-top: 22px; font-family: var(--m1-sans); font-size: 15px; }
.m1-global-header .m1-menu-contact a { color: rgba(255,255,255,.78); text-decoration: none; }
.m1-global-header .m1-menu-contact a:first-child { color: var(--m1-header-gold); font-size: 17px; font-weight: 650; }
@media (max-width: 760px) {
  .m1-global-header { gap: 10px; padding: 6px var(--m1-page-edge); }
  .m1-global-header .m1-menu-toggle { width: 44px; height: 44px; flex-basis: 44px; }
  .m1-global-header .m1-menu-toggle span:nth-of-type(1) { top: 14px; }
  .m1-global-header .m1-menu-toggle span:nth-of-type(2) { top: 21px; }
  .m1-global-header .m1-menu-toggle span:nth-of-type(3) { top: 28px; }
  .m1-global-header .m1-brand-side .m1-header-logo { width: clamp(100px, 32vw, 132px); height: 34px; margin-left: 10px; }
  .m1-global-header .m1-contact-row { gap: 5px; }
  .m1-global-header .m1-header-social { width: 40px; height: 40px; }
  .m1-global-header .m1-header-social svg { width: 18px; height: 18px; }
  .m1-global-header .m1-phone-block { gap: 3px; margin-left: 1px; }
  .m1-global-header .m1-header-phone { min-width: 0; height: 36px; padding: 0 9px; font-size: 12px; }
  .m1-global-header .m1-header-callback { font-size: 11px; }
  .m1-global-header .m1-menu-inner { padding: 76px 28px 28px; }
  .m1-global-header .m1-menu-brand { margin-bottom: 22px; }
}
@media (max-width: 700px) {
  body:has(.m1-global-header) #header > .header-slider-controls {
    inset: auto;
    align-self: flex-end;
    width: min(100%, 460px);
    margin: 1rem 0 0;
  }
}
@media (max-width: 540px) {
  .m1-global-header .m1-contact-row > .m1-header-social { display: none; }
}
