
/* =========================================================
   Универсальный hero-блок для Tilda
   Работает на любом блоке с классом .uc-hero
   Под CR50 / CR50E / t1241
   ========================================================= */

/* Общая оболочка блока */
.uc-hero {
  width: calc(100% - 40px) !important;
  max-width: 1160px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-radius: 30px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Десктоп: нижний отступ у блока */
@media screen and (min-width: 981px) {
  .uc-hero {
    padding-bottom: 70px !important;
  }
}

/* Убираем искусственное растягивание блока */
.uc-hero .t1241 {
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0 !important;
}

.uc-hero .t1241__container {
  display: flex !important;
  min-height: 0 !important;
  height: auto !important;
  align-items: stretch !important;
}

/* Внутренние текстовые обертки */
.uc-hero .t1241__content-wrapper,
.uc-hero .t1241__content {
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}

/* Десктоп: ширина текстового блока + правый отступ 20px */
@media screen and (min-width: 981px) {
  .uc-hero .t1241__descr {
    width: 600px !important;
    max-width: 600px !important;
  }

  .uc-hero .t1241__content-wrapper {
    padding-left: 20px !important;
  }
}

/* Колонка с изображением */
.uc-hero .t1241__image,
.uc-hero .t1241__imgage {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
}

/* Блоки, в которых может жить изображение как фон */
.uc-hero .t1241__cover,
.uc-hero .t-bgimg,
.uc-hero .t-cover__carrier,
.uc-hero .t-img,
.uc-hero .tn-atom {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 280px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
}

/* Если изображение вставлено как обычный img */
.uc-hero img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

/* ===== Десктоп ===== */
@media screen and (min-width: 981px) {
  .uc-hero .t1241__image,
  .uc-hero .t1241__imgage {
    padding-right: 20px !important;
  }

  .uc-hero .t1241__cover,
  .uc-hero .t-bgimg,
  .uc-hero .t-cover__carrier,
  .uc-hero .t-img,
  .uc-hero .tn-atom {
    min-height: 320px !important;
    background-position: center top 40px !important;
    margin-bottom: 0 !important;
  }

  .uc-hero img {
    margin-top: 40px !important;
  }
}

/* ===== Мобилка ===== */
@media screen and (max-width: 980px) {
  .uc-hero {
    width: calc(100% - 40px) !important; /* по 20px слева и справа */
    padding-bottom: 0 !important;
  }

  /* убрать верхний отступ у текстовой части */
  .uc-hero .t1241__content-wrapper {
    padding-top: 0 !important;
    padding-right: 0 !important;
  }

  .uc-hero .t1241__descr {
    width: auto !important;
    max-width: 100% !important;
  }

  /* кнопки во всю ширину */
  .uc-hero .t1241__buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .uc-hero .t1241__buttons .t-btn,
  .uc-hero .t1241__buttons a {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .uc-hero .t1241__image,
  .uc-hero .t1241__imgage {
    padding-left: 0 !important;
  }

  /* мобилка: отступ сверху у изображения */
  .uc-hero .t1241__cover,
  .uc-hero .t-bgimg,
  .uc-hero .t-cover__carrier,
  .uc-hero .t-img,
  .uc-hero .tn-atom {
    min-height: 200px !important;
    margin-top: 40px !important;
    margin-bottom: 20px !important;
    background-position: center center !important;
  }

  .uc-hero img {
    margin-top: 40px !important;
  }
}