/* Единая сетка по меню (только русская версия). Переменные задаёт grid.js. */

/* Zero-блоки: сдвигаем макет так, чтобы его поля совпали с полями меню */
.hh-grid .t396__artboard > .t396__elem:not(.hh-bleed):not(.hh-win),
.hh-grid .t396__artboard > .t396__group:not(.hh-bleed):not(.hh-win) {
  translate: var(--hh-shift, 0px) 0;
}

/* Элементы во всю ширину макета (фон, фото, карта) — от края до края экрана */
.hh-grid .t396__artboard > .hh-bleed {
  left: 0 !important;
  width: calc(var(--hh-w) / var(--zoom, 1)) !important;
}

/* Стандартные блоки Tilda (слайдеры, форма, документы, отзывы).
   На 640–1199px Tilda держит их в контейнере фиксированной ширины (640/960px) по центру —
   растягиваем контейнер так, чтобы контент начинался и заканчивался на полях меню (20px). */

/* 960–1199px: у колонок Tilda поля 10px — контейнеру даём ещё 10px */
@media (min-width: 960px) and (max-width: 1200px) {
  #allrecords .t-rec:not([data-record-type="396"]):not(#rec2414768161):not(#rec-hh-nearby) :is(.t-container, .t-container_flex, .t942__cover.t-cover__wrapper) {
    max-width: none !important;
    width: auto !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
  #allrecords .t-rec:not([data-record-type="396"]):not(#rec2414768161):not(#rec-hh-nearby) .t-col_12 { max-width: none !important; width: calc(100% - 20px) !important; }
  #allrecords .t-rec:not([data-record-type="396"]):not(#rec2414768161):not(#rec-hh-nearby) .t-col_10 { max-width: none !important; width: calc(100% * 10 / 12 - 20px) !important; }
  #allrecords .t-rec:not([data-record-type="396"]):not(#rec2414768161):not(#rec-hh-nearby) .t-col_2 { max-width: none !important; width: calc(100% * 2 / 12 - 20px) !important; }
  #allrecords .t-rec:not([data-record-type="396"]):not(#rec2414768161):not(#rec-hh-nearby) .t-col_4 { max-width: none !important; width: calc(100% * 4 / 12 - 20px) !important; }
  /* контейнер, вложенный в колонку, уже стоит на поле — без дополнительных отступов */
  #allrecords .t-rec:not([data-record-type="396"]):not(#rec2414768161):not(#rec-hh-nearby) .t-col :is(.t-container, .t-container_flex) {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* 640–959px: у колонок Tilda внутренний отступ 20px — контейнер во всю ширину без полей */
@media (min-width: 640px) and (max-width: 959px) {
  #allrecords .t-rec:not([data-record-type="396"]):not(#rec2414768161):not(#rec-hh-nearby) :is(.t-container, .t-container_flex, .t942__cover.t-cover__wrapper) {
    max-width: none !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Карусели (планировки, виды отделки, преимущества): первая карточка — на поле меню */
.t1148__slider,
.t1196__slider {
  padding-left: var(--hh-m, max(20px, calc((100% - 1160px) / 2))) !important;
  padding-right: var(--hh-m, max(20px, calc((100% - 1160px) / 2))) !important;
  scroll-padding-left: var(--hh-m, max(20px, calc((100% - 1160px) / 2)));
}

/* Блоки обрезают содержимое по краям, но не должны прокручиваться вбок
   (например, когда кнопка получает фокус с клавиатуры) — overflow: clip вместо hidden */
.hh-grid:not(#rec1235009841):not(#rec1233949686) .t396__artboard {
  overflow: clip !important;
}

/* Фон страницы белый явно — иначе прозрачные блоки показывают фон браузера (в тёмной теме он чёрный) */
html, body.t-body {
  background-color: #ffffff;
}
