/*
 * Moscow-v.com v18
 * Mobile compatibility layer for Yandex Webmaster requirements.
 * Loaded after the template stylesheet in every theme.
 */

html {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  max-width: 100%;
  overflow-wrap: anywhere;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  max-width: 100%;
}

img,
svg,
video,
canvas {
  height: auto;
}

iframe,
embed,
object {
  width: 100%;
}

.mv-story__content,
.mv-legacy-content,
.mv-box,
.mv-page,
.mv-layout,
.mv-layout > *,
.mv-story,
.mv-story__body,
.mv-sidebar {
  min-width: 0;
  max-width: 100%;
}

.mv-story__content table,
.mv-legacy-content table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.mv-story__content pre,
.mv-story__content code,
.mv-legacy-content pre,
.mv-legacy-content code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mv-story__content input,
.mv-story__content select,
.mv-story__content textarea,
.mv-legacy-content input,
.mv-legacy-content select,
.mv-legacy-content textarea {
  max-width: 100%;
}

@media (max-width: 959px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  .mv-brand__copy small,
  .mv-menu__messengers a,
  .mv-menu__messengers i,
  .mv-kicker,
  .mv-hero__benefits,
  .mv-hero-contact > span,
  .mv-hero-contact > p,
  .mv-hero-contact nav small,
  .mv-route__heading small,
  .mv-route li > span,
  .mv-route li b,
  .mv-route li small,
  .mv-route__contact,
  .mv-direction-icon,
  .mv-directions small,
  .mv-section-heading > div > span,
  .mv-section-heading p,
  .mv-direction-search button,
  .mv-direction-subtopics i,
  .mv-direction-feature > span,
  .mv-direction-feature > p,
  .mv-direction-feature ul,
  .mv-direction-feature > div a,
  .mv-steps-intro > span,
  .mv-steps-intro p,
  .mv-steps-intro a,
  .mv-steps-layout li small,
  .mv-update-card > header span,
  .mv-home-news-item > span,
  .mv-home-news-item small,
  .mv-home-question > small,
  .mv-update-all,
  .mv-home-news-heading > span,
  .mv-home-news-heading p,
  .mv-template-identity__inner > span,
  .mv-template-identity p,
  .mv-context-menu a,
  .mv-speedbar,
  .mv-page-title > small,
  .mv-story__visual small,
  .mv-story__meta,
  .mv-story__tags,
  .mv-story__footer,
  .mv-story__footer b,
  .mv-admin-tools,
  .mv-edit-date,
  .mv-rating,
  .mv-inline-contact small,
  .mv-contact-card small,
  .mv-inline-contact p,
  .mv-contact-card p,
  .mv-inline-contact > a,
  .mv-contact-card > a,
  .mv-next-prev a,
  .mv-box__kicker,
  .mv-comments__head > b,
  .mv-comment__body header b,
  .mv-comment__body time,
  .mv-comment__text,
  .mv-comment__body footer,
  .mv-comment__signature,
  .mv-upload a,
  .ux-form label,
  .mv-side-card > header span,
  .mv-topnews-item > span,
  .mv-topnews-item b,
  .mv-question-link span,
  .mv-question-link small,
  .mv-side-all,
  .mv-side-navigation summary,
  .mv-side-navigation details nav a,
  .navigation a,
  .navigation span,
  .mv-info,
  .mv-footer nav a,
  .mv-footer p,
  .mv-contact-bar b,
  .mv-footer nav button,
  .mv-passport-assistant > header > span,
  .mv-passport-assistant > header p,
  .mv-passport-assistant legend span,
  .mv-passport-assistant label,
  .mv-passport-result > span,
  .mv-passport-result ol,
  .mv-side-group nav a,
  .mv-form-consent,
  .mv-form-consent p,
  .mv-cookie p,
  .mv-menu-contact dt,
  .mv-menu-contact dd,
  .mv-passport-fast__inner > span,
  .mv-passport-fast p,
  .mv-experience-card__body > small,
  .mv-mobile-section-menu__heading small,
  .mv-mobile-section-menu__heading span,
  .mv-mobile-section-menu__group,
  .mv-mobile-section-menu__scroller a {
    font-size: 12px;
  }

  .mv-hero p,
  .mv-story__content,
  .mv-legacy-content,
  .mv-legal-page,
  .mv-form-consent {
    font-size: 16px;
    line-height: 1.65;
  }

  a,
  button,
  input,
  select,
  textarea,
  summary {
    touch-action: manipulation;
  }

  .mv-menu > a,
  .mv-menu__messengers a,
  .mv-hero__actions a,
  .mv-hero-contact nav a,
  .mv-context-menu a,
  .mv-direction-search button,
  .mv-direction-feature > div a,
  .mv-steps-intro a,
  .mv-update-all,
  .mv-story__footer b,
  .mv-inline-contact > a,
  .mv-contact-card > a,
  .mv-next-prev a,
  .mv-side-all,
  .mv-side-navigation summary,
  .mv-side-navigation details nav a,
  .mv-side-group nav a,
  .navigation a,
  .navigation span,
  .mv-mobile-section-menu__scroller a,
  .mv-contact-bar a,
  .btn,
  button,
  input,
  select {
    min-height: 44px;
  }

  .mv-menu > a,
  .mv-side-navigation details nav a,
  .mv-side-group nav a {
    display: flex;
    align-items: center;
  }

  .mv-shell,
  .mv-header__inner,
  .mv-menu,
  .mv-contact-strip .mv-contact-card {
    max-width: 100%;
  }

  .mv-mobile-section-menu__heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .mv-mobile-section-menu__heading strong,
  .mv-mobile-section-menu__heading span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .mv-mobile-section-menu__scroller {
    max-width: 100%;
    contain: inline-size;
  }

  .mv-cookie,
  .mv-offer__dialog,
  .mv-cookie-settings__panel {
    max-width: calc(100vw - 20px);
  }
}

@media (max-width: 359px) {
  .mv-shell {
    width: calc(100% - 24px);
  }

  .mv-header__inner,
  .mv-menu {
    padding-right: 12px;
    padding-left: 12px;
  }

  .mv-story--full,
  .mv-box,
  .mv-story__body,
  .mv-story--home .mv-story__body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .mv-contact-bar b {
    font-size: 12px;
  }
}

/* =========================================================
 * FINAL RESPONSIVE NAVIGATION HOTFIX — 2026-09-28
 * Moscow-v.com
 * Goal: no section-menu items may disappear beyond viewport.
 * Top context menus wrap; mobile/sidebar navigation reflows.
 * ========================================================= */

/* 1) Top contextual menu: wrap to the next row instead of clipping/scrolling. */
.mv-template-identity .mv-context-menu,
.mv-context-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  max-width: 100%;
  overflow-x: visible;
  overflow-y: visible;
  padding-bottom: 0;
  scrollbar-width: auto;
}

.mv-template-identity .mv-context-menu a,
.mv-context-menu a {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* 2) Mobile version of the right/sidebar menu: show all items by wrapping.
      Remove the old horizontal-scroll affordance and fade on the right. */
.mv-mobile-section-menu__heading span {
  display: none;
}

.mv-mobile-section-menu__rail {
  min-width: 0;
  max-width: 100%;
}

.mv-mobile-section-menu__rail::after {
  display: none;
}

.mv-mobile-section-menu__scroller {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1px 0 7px;
  overflow: visible;
  overscroll-behavior-inline: auto;
  scroll-snap-type: none;
  scrollbar-width: auto;
  -webkit-overflow-scrolling: auto;
  contain: none;
}

.mv-mobile-section-menu__group {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  padding: 8px 0 2px;
  white-space: normal;
  overflow-wrap: anywhere;
  scroll-snap-align: none;
}

.mv-mobile-section-menu__scroller a {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  height: auto;
  padding: 8px 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-align: left;
  scroll-snap-align: none;
}

/* 3) Right column / sidebar: never force the page wider than the viewport. */
.mv-layout,
.mv-layout > *,
.mv-sidebar,
.mv-side-card,
.mv-side-navigation,
.mv-side-navigation details,
.mv-side-navigation details nav,
.mv-side-group,
.mv-side-group nav {
  min-width: 0;
  max-width: 100%;
}

.mv-side-navigation details nav a,
.mv-side-group nav a {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Main content + sidebar become one column below desktop breakpoint. */
@media (max-width: 899px) {
  .mv-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .mv-sidebar {
    position: static;
    width: 100%;
  }
}

/* On tablets the sidebar cards may use two safe columns. */
@media (min-width: 640px) and (max-width: 899px) {
  .mv-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mv-side-navigation {
    grid-column: 1 / -1;
  }
}

/* On phones everything in the former right column is a single column. */
@media (max-width: 639px) {
  .mv-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }
}
