/* Static-only extras: keep original look when Next.js / Swiper JS are gone. */

.swiper {
  overflow: hidden;
}
.swiper-wrapper {
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
.swiper-button-prev,
.swiper-button-next {
  cursor: pointer;
}
.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Brand logos: scroll-linked parallax (matches msforyou.ru Scroll component) */
.styles_logotypes__DPL39 > [data-direction] {
  width: 100%;
}
.styles_logotypes__list__kTdiT {
  transition: transform 0.15s linear;
}
.styles_animation__F7J3U[data-effect=fade-in-up][data-state=done] {
  opacity: 1;
  transform: translateY(0);
}

/* Видимый фокус для навигации с клавиатуры (Tab). При клике мышью рамка не появляется. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid #ff1f1f !important;
  outline-offset: 2px;
}

/* Подменю «Продукты» раскрывается и с клавиатуры (фокус внутри), а не только по наведению мыши */
.styles_navigation__QO69E > .styles_navigation__item__Ga4ZH:focus-within > .styles_navigation__list__TLrN2 {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile/tablet menu from existing nav markup */
@media (max-width: 1100px) {
  body.menu-open {
    overflow: hidden;
  }
  body.menu-open .styles_header__navigation__pVykP {
    display: block !important;
    position: fixed;
    top: var(--header-height, 8rem);
    right: 0;
    bottom: 0;
    width: min(42rem, 100%);
    background: #fff;
    z-index: 120;
    padding: 3.2rem;
    overflow: auto;
    box-shadow: -1.6rem 0 4rem rgba(18, 18, 18, 0.12);
  }
  .menu-backdrop {
    display: none;
    position: fixed;
    inset: var(--header-height, 8rem) 0 0 0;
    background: rgba(18, 18, 18, 0.35);
    z-index: 110;
  }
  body.menu-open .menu-backdrop {
    display: block;
  }
  /* Панель меню живёт внутри шапки (z-index 100): подложка должна быть ниже шапки,
     иначе она ложится поверх открытого меню */
  .menu-backdrop {
    z-index: 90;
  }
  /* Пункты — вертикальным списком, подменю «Продукты» сразу раскрыто */
  body.menu-open .styles_header__navigation__pVykP .styles_navigation__QO69E {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  body.menu-open .styles_header__navigation__pVykP .styles_navigation__QO69E > .styles_navigation__item__Ga4ZH {
    border-bottom: 1px solid rgba(18, 18, 18, 0.08);
  }
  body.menu-open .styles_header__navigation__pVykP .styles_navigation__link__12lAb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.6rem 0;
    font-size: 1.8rem;
  }
  body.menu-open .styles_header__navigation__pVykP .styles_navigation__list__TLrN2 {
    position: static !important;
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    box-shadow: none !important;
    background: none !important;
    min-width: 0 !important;
    padding: 0 0 0.8rem 1.6rem !important;
    margin: 0 !important;
  }
  body.menu-open .styles_header__navigation__pVykP .styles_navigation__list__TLrN2 .styles_navigation__link__12lAb {
    padding: 1rem 0;
    font-size: 1.6rem;
    text-transform: none;
  }
  body.menu-open .styles_header__navigation__pVykP .styles_navigation__link__12lAb svg {
    display: none;
  }
}

/* Consultation / demo dialog */
.ms-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.45);
  z-index: 300;
  opacity: 0;
  transition: opacity 250ms ease;
}
.ms-dialog-backdrop.is-open {
  opacity: 1;
}
.ms-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  z-index: 310;
  width: min(56rem, calc(100vw - 3.2rem));
  max-height: calc(100vh - 4rem);
  overflow: auto;
  background: #fff;
  border-radius: 2.4rem;
  padding: 3.2rem;
  opacity: 0;
  transition: opacity 250ms ease, transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2.4rem 6.4rem rgba(18, 18, 18, 0.18);
}
.ms-dialog.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.ms-dialog__title {
  font-size: 2.4rem;
  line-height: 1.2;
  margin: 0 0 1.6rem;
}
.ms-dialog__close {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  width: 4rem;
  height: 4rem;
  border: 0;
  border-radius: 50%;
  background: var(--color-black-10, #f3f3f3);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.consult-open #consultation {
  scroll-margin-top: 10rem;
}

/* Collapse accordions (about/contacts): hide inactive panels */
.styles_accordion__CzcIh .styles_accordion__item__7b8Bb[data-state="inactive"] > .styles_accordion__body__U_bWV,
.styles_accordion__CzcIh .styles_accordion__item__7b8Bb[data-state="inactive"] > .styles_accordion__body__sxFwu {
  display: none;
}

[data-radix-popper-content-wrapper] {
  z-index: 200;
}

/* Product pages: hero matches live (gray frame + cover fill) */
.page_hero__nucy4 .styles_hero__0FDCr {
  overflow: hidden;
  background-color: var(--color-black-10, #f3f3f3);
}
.styles_hero__cover__E4q4U,
.styles_hero__cover__E4q4U picture {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.styles_hero__cover__E4q4U img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  object-position: center;
}
.styles_block__cover__ZHN0z,
.styles_step__cover__odlMT {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
}
/* Product card footers: keep orig aspect-ratios; on mobile let image height match live */
.styles_card__footer__W93yk picture {
  display: block;
  width: 100%;
  height: 100%;
}
.styles_card__footer__W93yk img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 700px) {
  .styles_card__footer__W93yk {
    aspect-ratio: auto;
  }
  .styles_card__footer__W93yk img {
    height: auto;
  }
}
.styles_card__image__S8ZeN img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Blog/cases slider: width:auto so negative margins expand like live Swiper */
.styles_slider__V0zHI.swiper,
.styles_slider__V0zHI {
  width: auto;
}
.styles_slider__V0zHI .swiper-wrapper {
  display: flex;
}
.styles_slider__V0zHI .swiper-slide {
  flex-shrink: 0;
  height: auto;
  box-sizing: border-box;
}
.styles_card__metaImage__QQC78 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.page_title__UB_Gb .styles_typography_variant_h1__qTzTd {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* Layout */
html {
  overflow-x: clip;
}

.styles_product__cover__Y84Aq picture {
  display: block;
  width: 100%;
  height: 100%;
}
.styles_product__cover__Y84Aq img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 1100.1px) {
  .styles_product__cover__Y84Aq img {
    object-fit: contain;
  }
}

.styles_footer__navigationMobile__cPjLv .styles_accordion__body__U_bWV {
  padding-top: 1.6rem;
}
.styles_footer__navigationMobile__cPjLv .styles_navigation__fNf91 {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Product tile sliders: show 2 cards on desktop (matches msforyou.ru) */
.styles_slider__G17Nr.swiper,
.styles_slider__G17Nr {
  overflow: visible;
}
@media (min-width: 1100.1px) {
  .styles_slider__G17Nr .swiper-wrapper,
  .styles_slider__G17Nr .styles_slider__wrapper__xosFF {
    display: flex;
    gap: var(--spacing-16, 1.6rem);
  }
  .styles_slider__G17Nr .swiper-slide,
  .styles_slider__G17Nr .styles_slider__slide__v8Qhf {
    width: 24rem;
    flex-shrink: 0;
  }
  .styles_tiles__ixn6g[data-tile-count="6"] .styles_slider__wrapper__xosFF:before {
    content: "";
    visibility: hidden;
    width: 24rem;
    height: 21.6rem;
    margin-right: 15px;
    flex-shrink: 0;
  }
  .styles_tiles__ixn6g[data-tile-count="6"] .styles_slider__wrapper__xosFF > :nth-child(2),
  .styles_tiles__ixn6g[data-tile-count="6"] .styles_slider__wrapper__xosFF > :nth-child(4),
  .styles_tiles__ixn6g[data-tile-count="6"] .styles_slider__wrapper__xosFF > :nth-child(6) {
    margin-top: 16px;
  }
}

/* Blog filters (restored from original): mobile "Фильтр" button reveals the controls */
@media (max-width: 700px) {
  .styles_filters__YFhwR.ms-filters-open .styles_filtersDesktop__dHVUW {
    display: grid;
    margin-top: var(--spacing-16);
  }
}

/* ===== QA 2026-11-11 ===== */
/* never allow sideways page scroll (sliders/marquees bleed outside the container) */
html, body { overflow-x: clip; }

/* brand logos in circles: keep proportions */
.styles_logotype__6RlMx img { object-fit: contain; max-width: 100%; height: auto; max-height: 100%; }

/* language switcher: always in the header (compact on small screens); no floating button over content */
.ms-lang-fab { display: none !important; }
@media (max-width: 1100px) {
  #header .ms-lang-switch { display: block; margin-right: 0.4rem; }
  #header .ms-lang-switch[hidden] { display: none; }
}
@media (max-width: 700px) {
  #header .ms-lang-toggle { min-height: 4rem; padding: 0.4rem 0.8rem; }
  .ms-lang-toggle #lang-header-code { display: none; }
  .ms-lang-toggle img, #lang-header-flag { width: 2.4rem; height: 1.8rem; }
}

/* SEO: page heading that is visually provided by the design (hero / Tilda frame) */
.ms-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Blog: articles published on external platforms */
.ms-external-article { display: flex; flex-direction: column; align-items: flex-start; gap: 1.6rem; padding: 3.2rem; border-radius: 2.4rem; background: var(--color-black-5, #f5f5f5); margin-bottom: 3.2rem; }
.ms-external-article__note { color: var(--color-black-50, #888); }
@media (max-width: 700px) { .ms-external-article { padding: 2.4rem; } .ms-external-article .styles_button__Fjke4 { width: 100%; } }

/* long Russian words in page titles must not break mid-word without a hyphen */
.styles_title__6jkO5, .styles_typography_variant_h1__qTzTd, .styles_typography_variant_h2__v051Z { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 700px) {
  h1.styles_title__6jkO5 { font-size: 2.8rem; }
}

@media (min-width: 700.1px) and (max-width: 1100px) {
  .styles_header__actionsMobile__LMDnf { display: flex; align-items: center; gap: var(--spacing-8); }
  .styles_header__actionsMobile__LMDnf > * { flex: none; white-space: nowrap; }
}
#header .styles_header__actionsMobile__LMDnf .ms-lang-switch { margin-right: 0; }
#header .styles_header__actionsMobile__LMDnf .ms-lang-toggle { height: 4rem; border-radius: 1.2rem; background: var(--color-black-5, #f3f3f3); border: 0; }

/* ---- 2026-11-12: no wrapping phone number in the tablet header ---- */
.styles_header__actionButton__4MxNw, .styles_header__actionButton__4MxNw * { white-space: nowrap; }

/* ---- 2026-11-12: incomplete last row of cards is centered instead of hanging on the left ---- */
@media (min-width: 1100.1px) {
  /* 3-column grids: steps «Как это работает», tiles under product hero */
  .styles_steps__hfGAA, .styles_block__tiles__1S12O { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .styles_steps__hfGAA > *, .styles_block__tiles__1S12O > * { grid-column: span 2; }
  .styles_steps__hfGAA > :last-child:nth-child(3n+1), .styles_block__tiles__1S12O > :last-child:nth-child(3n+1) { grid-column: 3 / span 2; }
  .styles_steps__hfGAA > :nth-last-child(2):nth-child(3n+1), .styles_block__tiles__1S12O > :nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
  .styles_steps__hfGAA > :last-child:nth-child(3n+2), .styles_block__tiles__1S12O > :last-child:nth-child(3n+2) { grid-column: 4 / span 2; }
  /* 2-column grids: «Другие продукты», advantages cards */
  .styles_products__5eQ3H, .styles_slider__wrapper__ngVeV { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .styles_products__5eQ3H > *, .styles_slider__wrapper__ngVeV > * { grid-column: span 2; }
  .styles_products__5eQ3H > :last-child:nth-child(2n+1), .styles_slider__wrapper__ngVeV > :last-child:nth-child(2n+1) { grid-column: 2 / span 2; }
}
@media (min-width: 700.1px) and (max-width: 1100px) {
  .styles_steps__hfGAA { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .styles_steps__hfGAA > * { grid-column: span 2; }
  .styles_steps__hfGAA > :last-child:nth-child(2n+1) { grid-column: 2 / span 2; }
}

/* ---- 2026-12-02: header is taller than 8rem because of the logo (2212x832); without this it covers
   the top of the first block on every page. Height = logo + paddings + border ---- */
@media (min-width: 1100.1px) { :root { --header-height: calc(17.2rem * 832 / 2212 + 4rem + 1px); } }
@media (min-width: 700.1px) and (max-width: 1100px) { :root { --header-height: calc(17.2rem * 832 / 2212 + 3.2rem + 1px); } }
@media (max-width: 700px) { :root { --header-height: calc(13.8rem * 832 / 2212 + 2.4rem + 1px); } }
