/**
 * Responsive layer for the Chester preset.
 * Loaded after chester.css. !important is used only to beat Chester rules
 * that already lock grids and the hero height.
 */

.submenu-toggle,
.menu-close {
  display: none;
}

body.sad337-preset-strict .site-header,
body.sad337-preset-strict .site-content,
body.sad337-preset-strict .site-footer,
body.sad337-preset-strict .site-main,
body.sad337-preset-strict .entry__content,
body.sad337-preset-strict .site-sidebar,
body.sad337-preset-strict .site-sidebar-b {
  min-width: 0;
  max-width: 100%;
}

body.sad337-preset-strict .entry__content,
body.sad337-preset-strict .site-footer,
body.sad337-preset-strict .primary-nav a,
body.sad337-preset-strict .sidebar-menu a {
  overflow-wrap: anywhere;
}

body.sad337-preset-strict .entry__content img,
body.sad337-preset-strict .site-footer img,
body.sad337-preset-strict .site-top img,
body.sad337-preset-strict .sad337-grid img {
  max-width: 100%;
  height: auto;
}

body.sad337-preset-strict .sad337-yandex-map img {
  max-width: none;
  height: unset;
}

body.sad337-preset-strict .entry__content table,
body.sad337-preset-strict table.category {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.sad337-preset-strict .entry__content iframe,
body.sad337-preset-strict .entry__content video,
body.sad337-preset-strict .entry__content embed,
body.sad337-preset-strict .entry__content pre {
  max-width: 100%;
}

body.sad337-preset-strict .entry__content pre {
  overflow-x: auto;
}

@media (max-width: 1219px) and (min-width: 960px) {
  body.sad337-preset-strict .site-navbar__search {
    right: 0;
  }
}

@media (max-width: 959px) {
  body.sad337-preset-strict .site-top-banner {
    flex-wrap: wrap;
    padding: 8px 0;
  }

  body.sad337-preset-strict .site-top-banner__col,
  body.sad337-preset-strict .site-top-banner__col--logo,
  body.sad337-preset-strict .site-top-banner__col--contact,
  body.sad337-preset-strict .site-top-banner__col--title {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }

  body.sad337-preset-strict .site-top-banner__col--contact > div {
    margin-top: 12px;
  }

  body.sad337-preset-strict .site-navbar__inner {
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 0 12px;
  }

  body.sad337-preset-strict .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid #999;
    border-radius: 30px;
    background: #f1ebdb;
    color: #444;
    font-family: Cuprum, "Arial Narrow", sans-serif;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }

  body.sad337-preset-strict .menu-toggle__bars,
  body.sad337-preset-strict .menu-toggle__bars::before,
  body.sad337-preset-strict .menu-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
  }

  body.sad337-preset-strict .menu-toggle__bars {
    position: relative;
  }

  body.sad337-preset-strict .menu-toggle__bars::before,
  body.sad337-preset-strict .menu-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  body.sad337-preset-strict .menu-toggle__bars::before {
    top: -6px;
  }

  body.sad337-preset-strict .menu-toggle__bars::after {
    top: 6px;
  }

  body.sad337-preset-strict .site-navbar__inner > .primary-nav {
    display: none;
  }

  body.nav-open.sad337-preset-strict {
    position: fixed;
    width: 100%;
    overflow: hidden;
  }

  body.nav-open.sad337-preset-strict .site-navbar__inner > .primary-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--sad337-nav-top, 0px);
    z-index: 2000;
    width: 100%;
    height: var(--sad337-nav-height, 100dvh);
    max-height: var(--sad337-nav-height, 100dvh);
    margin: 0;
    padding: 12px 16px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    box-sizing: border-box;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  }

  body.nav-open.sad337-preset-strict .menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    min-height: 44px;
    margin: 0 0 12px;
    padding: 8px 18px;
    border: 1px solid #999;
    border-radius: 30px;
    background: #fff;
    color: #333;
    font-family: Cuprum, "Arial Narrow", sans-serif;
    font-size: 18px;
    cursor: pointer;
  }

  body.nav-open.sad337-preset-strict .primary-nav > ul {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
    margin: 0;
    padding: 0;
  }

  body.nav-open.sad337-preset-strict .primary-nav > ul > li {
    margin: 0;
    padding: 0;
  }

  body.nav-open.sad337-preset-strict .primary-nav li.menu-item-has-children {
    position: relative;
  }

  body.nav-open.sad337-preset-strict .primary-nav a {
    height: auto;
    white-space: normal;
    line-height: 1.35;
  }

  body.nav-open.sad337-preset-strict .primary-nav > ul > li > a {
    min-height: 44px;
    padding: 12px 52px 12px 16px;
    line-height: 1.3;
  }

  body.nav-open.sad337-preset-strict .submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #333;
    cursor: pointer;
  }

  body.nav-open.sad337-preset-strict .submenu-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }

  body.nav-open.sad337-preset-strict li.is-open > .submenu-toggle::before {
    margin-top: 4px;
    transform: rotate(225deg);
  }

  body.nav-open.sad337-preset-strict .primary-nav .sub-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 4px 0 4px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.nav-open.sad337-preset-strict .primary-nav .sub-menu::before {
    display: none;
  }

  body.nav-open.sad337-preset-strict .primary-nav li.menu-item-has-children:hover > .sub-menu,
  body.nav-open.sad337-preset-strict .primary-nav li.menu-item-has-children:focus-within > .sub-menu {
    display: none;
  }

  body.nav-open.sad337-preset-strict .primary-nav li.menu-item-has-children.is-open > .sub-menu,
  body.nav-open.sad337-preset-strict .primary-nav li.menu-item-has-children.is-open:hover > .sub-menu,
  body.nav-open.sad337-preset-strict .primary-nav li.menu-item-has-children.is-open:focus-within > .sub-menu {
    display: flex;
    flex-direction: column;
  }

  body.nav-open.sad337-preset-strict .primary-nav .sub-menu a {
    min-height: 44px;
    padding: 10px 12px;
  }

  body.sad337-preset-strict .site-navbar__search {
    position: static;
    top: auto;
    right: auto;
    flex: 1 1 180px;
    width: auto;
    min-width: 0;
  }

  body.sad337-preset-strict .site-navbar__search .site-search__field {
    width: 100%;
    height: 44px;
    padding: 8px 40px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-size: 16px;
    cursor: text;
  }

  body.sad337-preset-strict .site-navbar__search .site-search__field::placeholder {
    color: #888;
  }

  body.sad337-preset-strict .site-footer .sad337-cols,
  body.sad337-preset-strict .site-footer .sad337-cols[style] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.sad337-preset-strict .site-layout,
  body.sad337-preset-strict .site-layout--three {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  body.sad337-preset-strict .site-main {
    order: 1;
  }

  body.sad337-preset-strict .site-sidebar {
    order: 2;
  }

  body.sad337-preset-strict .site-sidebar-b {
    order: 3;
  }

  body.sad337-preset-strict .slider1 {
    min-height: 0 !important;
    height: auto !important;
    margin: 0 0 16px !important;
    padding: 20px 16px 24px;
    background-size: cover;
  }

  body.sad337-preset-strict .site-top-b .sad337-slideshow {
    max-height: none;
  }

  body.sad337-preset-strict .sad337-slideshow,
  body.sad337-preset-strict .sad337-slideshow__viewport,
  body.sad337-preset-strict .sad337-slideshow__track {
    min-height: 0;
    height: auto;
  }

  body.sad337-preset-strict .sad337-slideshow__slide,
  body.sad337-preset-strict .sad337-slideshow__figure {
    height: auto;
  }

  body.sad337-preset-strict .sad337-slideshow__figure img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 70dvh;
    object-fit: contain;
  }

  body.sad337-preset-strict .sad337-slideshow__nav,
  body.sad337-preset-strict .site-top-b .sad337-slideshow__nav {
    display: block;
    width: 44px;
    height: 44px;
    line-height: 44px;
  }

  body.sad337-preset-strict .site-top-b .sad337-slideshow {
    padding-bottom: 52px;
  }

  body.sad337-preset-strict .site-top-b .sad337-slideshow__nav {
    top: auto;
    bottom: 4px;
    transform: none;
  }

  body.sad337-preset-strict .sad337-slideshow__dot {
    position: relative;
  }

  body.sad337-preset-strict .sad337-slideshow__dot::after {
    content: "";
    position: absolute;
    inset: -17px;
  }

  body.sad337-preset-strict .wpcf7 input[type="text"],
  body.sad337-preset-strict .wpcf7 input[type="email"],
  body.sad337-preset-strict .wpcf7 input[type="tel"],
  body.sad337-preset-strict .wpcf7 input[type="url"],
  body.sad337-preset-strict .wpcf7 input[type="number"],
  body.sad337-preset-strict .wpcf7 input[type="search"],
  body.sad337-preset-strict .wpcf7 textarea,
  body.sad337-preset-strict .wpcf7 select {
    font-size: 16px;
  }

  body.sad337-preset-strict .wpcf7-submit {
    min-height: 44px;
    padding: 12px 20px;
  }

  body.sad337-preset-strict .wpcf7-acceptance label {
    min-height: 44px;
  }

  body.sad337-preset-strict .wpcf7 .wpcf7-captchar {
    display: block;
    width: 100%;
    max-width: 240px;
    margin: 8px 0 0;
  }

  body.sad337-preset-strict .sad337-lightbox {
    align-items: flex-start;
    overflow: auto;
    padding: 56px 12px 16px;
  }

  body.sad337-preset-strict .sad337-lightbox__img {
    max-width: 100%;
    max-height: calc(100dvh - 80px);
  }

  body.sad337-preset-strict .sad337-lightbox__close,
  body.sad337-preset-strict .sad337-lightbox__prev,
  body.sad337-preset-strict .sad337-lightbox__next {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 900px) {
  body.sad337-preset-strict .sad337-grid.sad337-grid--cols-3,
  body.sad337-preset-strict .sad337-grid.sad337-grid--cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  body.sad337-preset-strict .contacts-block,
  body.sad337-preset-strict .contacts-block.sad337-cols,
  body.sad337-preset-strict .site-bottom-d .contacts-block.sad337-cols,
  body.sad337-preset-strict .site-bottom-c .contacts-block {
    position: static;
    left: auto;
    top: auto;
    width: auto;
    max-width: 100%;
    margin: 12px 0 0;
  }

  body.sad337-preset-strict #map,
  body.sad337-preset-strict .map,
  body.sad337-preset-strict .sad337-yandex-map,
  body.sad337-preset-strict .site-bottom-c .sad337-yandex-map,
  body.sad337-preset-strict .site-bottom-a .sad337-yandex-map {
    height: 280px;
    min-height: 240px;
  }

  body.sad337-preset-strict .redlist-line,
  body.sad337-preset-strict .whitelist-line {
    margin-left: 28px;
  }
}

@media (max-width: 700px) {
  body.sad337-preset-strict .sad337-cols,
  body.sad337-preset-strict .entry__content .sad337-cols,
  body.sad337-preset-strict .site-footer .sad337-cols,
  body.sad337-preset-strict .site-footer .sad337-cols[style],
  body.sad337-preset-strict .site-bottom-a .sad337-cols,
  body.sad337-preset-strict .site-top-b .sad337-cols,
  body.sad337-preset-strict .main-bottom .sad337-cols,
  body.sad337-preset-strict .slider1 .sad337-cols {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.sad337-preset-strict .sad337-slideshow .sad337-cols,
  body.sad337-preset-strict .sad337-slideshow__track.sad337-cols,
  body.sad337-preset-strict .sad337-yandex-map .sad337-cols {
    display: block !important;
    grid-template-columns: unset !important;
  }

  body.sad337-preset-strict .sad337-cols > div,
  body.sad337-preset-strict .site-footer .sad337-cols[style] > div {
    width: auto !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }

  body.sad337-preset-strict .site-footer .sad337-cols details > summary,
  body.sad337-preset-strict .site-bottom-a details > summary,
  body.sad337-preset-strict .entry__content details > summary {
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

@media (max-width: 640px) {
  body.sad337-preset-strict h1,
  body.sad337-preset-strict .entry__title,
  body.sad337-preset-strict .entry__content h1 {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.2;
  }

  body.sad337-preset-strict h2,
  body.sad337-preset-strict .entry__content h2 {
    font-size: clamp(22px, 6.2vw, 30px);
    line-height: 1.25;
  }

  body.sad337-preset-strict .sad337-grid.sad337-grid--cols-2,
  body.sad337-preset-strict .sad337-grid.sad337-grid--cols-3,
  body.sad337-preset-strict .sad337-grid.sad337-grid--cols-4 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.sad337-preset-strict .site-bottom-a .sad337-slideset__grid--cols-2,
  body.sad337-preset-strict .site-bottom-a .sad337-slideset__grid--cols-3,
  body.sad337-preset-strict .site-bottom-a .sad337-slideset__grid--cols-4,
  body.sad337-preset-strict .site-bottom-a .sad337-slideset__grid--cols-5 {
    grid-template-columns: minmax(0, 1fr);
  }

  body.sad337-preset-strict a.tzar,
  body.sad337-preset-strict .tzar,
  body.sad337-preset-strict .site-top-banner .btn-zapis,
  body.sad337-preset-strict .site-top-banner .button-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 360px;
    height: auto;
    min-height: 44px;
    margin-right: auto;
    margin-left: auto;
    padding: 10px 16px;
    line-height: 1.25;
    white-space: normal;
  }

  body.sad337-preset-strict .entry__content [style*="width"],
  body.sad337-preset-strict .site-bottom-a [style*="width"],
  body.sad337-preset-strict .site-top-b [style*="width"] {
    max-width: 100%;
  }

  body.sad337-preset-strict .sad337-yandex-map,
  body.sad337-preset-strict .sad337-yandex-map [style*="width"] {
    max-width: none;
  }

  body.sad337-preset-strict .chester-totop {
    right: 12px;
  }
}

@media (max-width: 380px) {
  body.sad337-preset-strict .site-container {
    width: calc(100% - 24px);
  }

  body.sad337-preset-strict .menu-toggle,
  body.nav-open.sad337-preset-strict .menu-close {
    font-size: 16px;
  }
}
