/* 1) Обрезаем фон по краям у всех card_–карточек */
.t396__group[class*="card_"] {
  overflow: hidden !important;
}

/* 2) Начальное состояние фоновой картинки */
.t396__group[class*="card_"] .tn-molecule.t-bgimg {
  background-size: 100% 100% !important;
  background-position: center center !important;
  transition: background-size 0.6s ease !important;
}

/* 3) При hover увеличиваем фон на 5% */
.t396__group[class*="card_"]:hover .tn-molecule.t-bgimg {
  background-size: 105% 105% !important;
}








/* делаем artboard абсолютным, чтобы T396 не считал его fixed */
#rec1116675926 .t396__artboard {
  position: absolute !important;
  top: 0;
  width: 100%;
  /* высоту (если нужно) можно задать вручную или auto */
  height: auto !important;
}
/* сбрасываем padding у body */
body {
  padding-top: 0 !important;
}





/* 0) «Приклеиваем» текстовую обёртку к низу плитки */
.t401__table {
  position: relative !important;
}

.t401__textwrapper {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  margin: 0 !important;    /* сбросим любые лишние отступы */
}


/* ——— 0. СБРОС ВСЕХ ФИКСИРОВАННЫХ ОТСТУПОВ TILDA ——— */
.t401__col,
.t401__table,
.t401__cell,
.t401__textwrapper,
.t401__textwrapper__content {
  margin: 0 !important;
  padding: 0 !important;
}

/* ——— 1. БАЗОВЫЕ СТИЛИ .t401 ——— */
.t401 {
  position: relative!important;
  left: 50%!important;
  transform: translateX(-50%)!important;
  width: 100vw!important;
  box-sizing: border-box!important;
}

/* Flex-контейнер: боковые отступы задаются в медиа-запросах */
.t401 > .t-container:first-child {
  display: flex!important;
  flex-wrap: wrap!important;
  width: 100vw!important;
  max-width: none!important;
  box-sizing: border-box!important;
}

/* Контент плитки на 100% */
.t401__table {
  width: 100%!important;
  box-sizing: border-box!important;
}

/* Заголовок: динамический размер */
.t401__title {
  font-size: max(12px, 1.25vw)!important;
}

/* ——— 2. ПРОПОРЦИОНАЛЬНЫЕ ПРАВИЛА ПО БРЕЙКПОИНТАМ ——— */

/* 320–639px */
@media (min-width:320px) and (max-width:639px) {
  /* отступы контейнера и gap от 10→20px */
  .t401 > .t-container:first-child {
    padding: 0 calc(10px + ((100vw - 320px) * 10 / 319))!important;
    flex-direction: column!important;
  }
  .t401__col {
    flex: 0 0 100%!important;
    margin-bottom: calc(10px + ((100vw - 320px) * 10 / 319))!important;
  }
  .t401__textwrapper {
    padding: calc(10px + ((100vw - 320px) * 10 / 319))!important;
  }
  .t401__title {
    font-size: calc(12px + ((100vw - 320px) * 12 / 319))!important;
  }
}

/* 640–959px */
@media (min-width:640px) and (max-width:959px) {
  .t401 > .t-container:first-child {
    padding: 0 calc(10px + ((100vw - 640px) * 5  / 319))!important;
  }
  .t401__col {
    flex: 0 0 calc((100% - (2 * (calc(10px + ((100vw - 640px) * 5 / 319))))) / 2)!important;
    margin: 0 calc(calc(10px + ((100vw - 640px) * 5 / 319))) calc(calc(10px + ((100vw - 640px) * 5 / 319))) 0!important;
  }
  .t401__col:nth-child(2n) {
    margin-right: 0!important;
  }
  .t401__textwrapper {
    padding: calc(10px + ((100vw - 640px) * 5 / 319))!important;
  }
  .t401__title {
    font-size: calc(12px + ((100vw - 640px) * 6 / 319))!important;
  }
}

/* 960–1920px */
@media (min-width:960px) and (max-width:1920px) {
  .t401 > .t-container:first-child {
    padding: 0 calc(10px + ((100vw - 960px) * 10 / 960))!important;
  }
  .t401__col {
    flex: 0 0 40vw!important;
    margin: 0 calc(10px + ((100vw - 960px) * 10 / 960)) calc(10px + ((100vw - 960px) * 10 / 960)) 0!important;
  }
  .t401__col:nth-child(2n) {
    margin-right: 0!important;
  }
  .t401__textwrapper {
    padding: calc(10px + ((100vw - 960px) * 10 / 960))!important;
  }
  .t401__title {
    font-size: calc(12px + ((100vw - 960px) * 12 / 960))!important;
  }
}

/* от 1921px */
@media (min-width:1921px) {
  .t401 > .t-container:first-child {
    padding: 0 20px!important;
  }
  .t401__col {
    margin: 0 20px 20px 0!important;
  }
  .t401__textwrapper {
    padding: 20px!important;
  }
  .t401__title {
    font-size: 24px!important;
  }
}


::selection {
  background-color: #000000; /* Цвет фона выделения */
  color: #ffffff;            /* Цвет текста при выделении */
}

::-moz-selection {
  background-color: #000000; /* Цвет фона выделения */
  color: #ffffff;            /* Цвет текста при выделении */
}