/* === Адаптивная типографика для Tilda: только размер и вес шрифта === */

/* H1 */
h1,
.t-title.t-title_xl,
.t-title.t-title_xxl {
  font-size: clamp(28px, 2.2vw + 20px, 42px);
  font-weight: 700;
}

/* H2 */
h2,
.t-title.t-title_lg {
  font-size: clamp(24px, 1.6vw + 18px, 34px);
  font-weight: 600;
}

/* H3 */
h3,
.t-title.t-title_md {
  font-size: clamp(20px, 1.2vw + 16px, 28px);
  font-weight: 600;
}

/* H4 */
h4 {
  font-size: clamp(18px, 1vw + 14px, 24px);
  font-weight: 500;
}

/* H5 */
h5 {
  font-size: clamp(16px, 0.8vw + 13px, 20px);
  font-weight: 500;
}

/* H6 */
h6 {
  font-size: clamp(15px, 0.6vw + 13px, 18px);
  font-weight: 500;
}

/* Основной текст */
body,
.t-text,
.t-descr,
p,
li {
  font-size: clamp(16px, 0.3vw + 15px, 18px);
  font-weight: 400;
}

/* Увеличенный текст / лид */
.lead,
.t-descr.t-descr_xl,
.t-text.t-text_lg {
  font-size: clamp(17px, 0.5vw + 15px, 20px);
  font-weight: 400;
}

/* Малый текст */
small,
.t-text.t-text_sm,
.t-descr.t-descr_sm {
  font-size: clamp(13px, 0.3vw + 12px, 15px);
  font-weight: 400;
}

/* Подписи */
.caption,
figcaption {
  font-size: clamp(12px, 0.2vw + 11px, 13px);
  font-weight: 400;
}


/* =========================================================
   Универсальный 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;
  }
}