/* =====================================================================
   Отступы и ширина — общий класс лейаута .tl-section (+ --bleed-m: на телефоне во всю ширину).
   TOPLOFT · баннер раздела (компонент) — по образцу блока toploft.shop (hm-card-row)
   От 768: большая карточка + квадратная (1:1) одной высоты. Высота и шрифты — как на старом сайте:
     > 2000 — 720 / заголовок 63;  ≤ 2000 — 520 / 37;  ≤ 1600 — 440 / 25;  ≤ 1380 — 360 / 23.
   До 768: одна карточка во всю ширину экрана без скруглений — видео (нет видео — фото), заголовок, бейдж, кнопка.
   ===================================================================== */

.tl-hero {
  --h: 720px;          /* высота ряда */
  --t: 63px;           /* заголовок */
  --pad: 3rem;         /* поля карточки */
  --gap: 24px;
  font-family: var(--tl-font, "Montserrat", system-ui, sans-serif);
  color: #fff;
}
.tl-hero *, .tl-hero *::before, .tl-hero *::after { box-sizing: border-box; }
.tl-hero :where(h2, ul, p) { margin: 0; padding: 0; }
.tl-hero :where(a) { color: inherit; text-decoration: none; }
.tl-hero :where(a):focus { outline: none; }

/* ---------- компьютер / планшет ---------- */
.tl-hero__row { display: flex; gap: var(--gap); height: var(--h); }
.tl-hero__card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #1c1c1c;
  box-shadow: 0 .125rem .25rem rgb(0 0 0 / 7.5%);
  isolation: isolate;
}
.tl-hero__card--main { flex: 1 1 auto; min-width: 0; }
.tl-hero__card--side { flex: 0 0 auto; height: 100%; aspect-ratio: 1; }

.tl-hero__bg, .tl-hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tl-hero__card--main .tl-hero__bg { object-position: right center; }
.tl-hero__video:not([src]), .tl-hero__video[src=""],
.tl-hero__bg:not([src]), .tl-hero__bg[src=""] { display: none; }

/* затемнение как на старом сайте: у большой — лёгкое сверху и снизу, у квадратной — сверху */
.tl-hero__card::after, .tl-hero__m::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tl-hero__card--main::after {
  background:
    linear-gradient(180deg, rgb(0 0 0 / 20%) 0 40px, rgb(0 0 0 / 0%) 30%),
    linear-gradient(0deg, rgb(0 0 0 / 20%) 0 40px, rgb(0 0 0 / 0%) 30%);
}
.tl-hero__card--side::after { background: linear-gradient(180deg, rgb(0 0 0 / 50%) 0 40px, rgb(0 0 0 / 0%) 30%); }

.tl-hero__in {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  padding: var(--pad);
}
.tl-hero__card--main .tl-hero__in { justify-content: space-between; padding-left: 8%; }

.tl-hero__title { display: flex; flex-direction: column; margin-bottom: 26px; font-size: var(--t); font-weight: 700; line-height: 1.2; }
.tl-hero__title span:empty { display: none; }

.tl-hero__points { display: flex; flex-direction: column; gap: 1rem; width: 300px; max-width: 40%; margin-bottom: auto; list-style: none; }
.tl-hero__points li { padding-left: 1rem; border-left: 2px solid #fff; font-size: 14px; font-weight: 600; line-height: 1.25; }
.tl-hero__points li:empty { display: none; }
.tl-hero__points:not(:has(li:not(:empty))) { display: none; }

.tl-hero__badge {
  display: block;
  padding: .25rem 1rem;
  border-radius: 0 2rem 2rem 2rem;   /* срезан левый верхний угол — как на старом сайте */
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  background: #198754;
}
.tl-hero__badge:empty { display: none; }
.tl-hero__card--side .tl-hero__badge { margin-bottom: auto; }
.tl-hero__text { width: 100%; margin: -12px 0 14px; font-size: 16px; font-weight: 500; line-height: 1.3; }   /* подзаголовок — сразу под заголовком */
.tl-hero__card--side .tl-hero__btn { margin-top: auto; }   /* кнопка второй карточки — всегда внизу */
.tl-hero__text:empty { display: none; }

/* блок цен: крупная цена + старая в светлой «таблетке», зачёркнута; пусто — скрыт */
.tl-hero__price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 20px; }
.tl-hero__price b { font-size: calc(var(--t) * .9); font-weight: 800; line-height: 1.1; }
.tl-hero__price s { padding: .15rem .9rem; border-radius: 2rem; font-size: 14px; color: #111; background: #f8f9fa; }
.tl-hero__price b:empty, .tl-hero__price s:empty { display: none; }
.tl-hero__price:not(:has(:not(:empty))) { display: none; }
.tl-hero__badge--yellow { color: #111; background: var(--tl-c-accent, #fffd00); }

/* вариант «стеклянная панель справа» (у старого сайта — hm-card-img-overlay-2): фото прижато влево,
   текст на размытой панели в правой половине */
.tl-hero__card--glass .tl-hero__bg { object-position: left center; }
.tl-hero__card--glass::after { background: none; }
.tl-hero__card--glass .tl-hero__in {
  position: absolute;
  top: 20px;
  right: 20px;
  bottom: 20px;
  width: min(50%, 520px);
  height: auto;
  padding: var(--pad);
  border-radius: 14px;
  background: rgb(0 0 0 / 18%);
  -webkit-backdrop-filter: blur(15px) brightness(.8);
  backdrop-filter: blur(15px) brightness(.8);
}
.tl-hero__card--glass .tl-hero__points { width: 100%; max-width: none; }

.tl-hero__btn {
  padding: 1rem 1.5rem;
  border-radius: 2rem;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-transform: uppercase;
  color: #111;
  background: #f8f9fa;
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 17.5%);
  transition: background-color .2s;
}
.tl-hero__btn:hover { background: #e2e6ea; }
.tl-hero__btn:not([href]), .tl-hero__btn[href=""] { display: none; }
/* своя кнопка телефона: задана — вместо кнопки большой карточки */
.tl-hero__btn--m:empty { display: none; }
.tl-hero__btn--m[href]:not([href=""]):not(:empty) + .tl-hero__btn { display: none; }

@media (max-width: 2000px) { .tl-hero { --h: 520px; --t: 37px; } }
@media (max-width: 1600px) {
  .tl-hero { --h: 440px; --t: 25px; --pad: 2rem; }
  .tl-hero__btn { padding: 8px 16px; font-size: 12px; }
}
@media (max-width: 1380px) {
  .tl-hero { --h: 360px; --t: 23px; --pad: 1.75rem; --gap: 32px; }
  .tl-hero__title { margin-bottom: 19px; }
  .tl-hero__points { gap: .5rem; }
  .tl-hero__points li { font-size: 12px; }
  .tl-hero__text { font-size: 14px; }
  .tl-hero__btn { padding: .5rem 1rem; font-size: .75rem; }
}
@media (max-width: 1023.98px) {
  .tl-hero { --h: 320px; --gap: 16px; }
  .tl-hero__card--side { display: none; }   /* как на старом сайте: квадратная — только от lg */
}

/* ---------- телефон: одна карточка во всю ширину ---------- */
.tl-hero__m { display: none; }
@media (max-width: 767.98px) {
  .tl-hero__row { display: none; }
  .tl-hero__m {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1;           /* видео квадратное */
    background: #1c1c1c;
    isolation: isolate;
  }
  .tl-hero__m .tl-hero__bg { object-position: 72% center; }
  .tl-hero__m::after { background: linear-gradient(180deg, rgb(0 0 0 / 55%) 0 30px, rgb(0 0 0 / 0%) 40%); }
  .tl-hero__m .tl-hero__in { padding: 1.25rem 1.25rem 1.25rem; }
  .tl-hero__m .tl-hero__title { max-width: 300px; margin: .25rem 0 .5rem; font-size: 20px; font-weight: 800; line-height: 1.15; }
  .tl-hero__m .tl-hero__badge { margin-bottom: auto; padding: .2rem .75rem; font-size: 10px; }
  .tl-hero__m .tl-hero__btn { margin-top: auto; padding: .3rem .85rem; font-size: 11px; }   /* кнопка всегда внизу, даже без бейджа */
}
