/* ============ hero (Bootstrap Carousel, carousel-fade) ============ */
.hero-shell {
  position: relative; width: 100%; height: 660px; overflow: hidden; color: #fff;
  isolation: isolate;
}
.hero-shell .carousel-inner, .hero-shell .carousel-item { height: 100%; }
/* отключаем дефолтный Bootstrap-transform слайд — carousel-fade уже даёт кроссфейд по opacity */
.hero-shell .carousel-item { position: absolute; inset: 0; }
.hero-shell .carousel-item.active { position: relative; }
.hero-shell::after {
  content: ""; position: absolute; opacity: .14; background-image: var(--stripes-white); background-repeat: no-repeat; background-size: contain; background-position: center; pointer-events: none;
  right: 4vw; top: 32px; width: 300px; height: 193px; z-index: 1;
}

.hero-media {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-repeat: no-repeat;
  transform: scale(1);
}
.hero-media--desktop { background-position: center; }
.hero-media--mobile { background-position: center top; display: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero-media.is-zooming { animation: hero-kenburns 8s ease-out forwards; }
}
@keyframes hero-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-frame { position: relative; z-index: 2; height: 100%; display: flex; align-items: flex-end; padding-bottom: 64px; }

.hero-glass {
  /* Ширина = ширине колонки .cat-card в «Каталоге»: .hero-frame — тот же .container, что и */
  /* у каталога, поэтому 100% здесь — та же content-box ширина, что у ряда карточек; формула */
  /* повторяет мат Bootstrap-грида для col-md-6 с gutter-x 20px (см. .cat-grid-row) — держится */
  /* на любой ширине ≥1024px сама, без подгонки под конкретный viewport. */
  width: 100%; max-width: calc((100% - 20px) / 2); border-radius: var(--bs-border-radius-xl); padding: 36px 40px 28px;
  background: linear-gradient(165deg, rgba(0, 29, 36, 0.56) 0%, rgba(16, 63, 69, 0.34) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  ;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 24px 60px -12px rgba(0, 29, 36, 0.5);
}
.hero-eyebrow { font-family: "Manrope", Arial, sans-serif; font-weight: 700; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: #BFF3E2; margin-bottom: 1rem; }
/* h2 — на слайдах 2-7 кроме первого (SEO: один h1 на странице, см. скилл дизайн-мсб/раздел «SEO»), стиль одинаковый */
.hero-glass h1, .hero-glass h2, .hero-glass .h1, .hero-glass .h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1.1; margin-bottom: 1rem; color: #fff; }
.hero-glass .sub { font-size: .96875rem; color: rgba(255, 255, 255, .86); margin-bottom: 1.5rem; line-height: 1.55; }
.hero-glass .ctas { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.375rem; }

.hero-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .18); }

.hero-dots {
  display: flex; gap: .4375rem;
}
.hero-dots button {
  position: relative; overflow: hidden; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, .35); border: none; padding: 0; transition: width .2s ease;
}
.hero-dots button.active { width: 26px; border-radius: 5px; }
.hero-dots .fill { position: absolute; inset: 0; background: #fff; border-radius: inherit; transform: scaleX(0); transform-origin: 0 50%; }
.hero-dots .fill.is-filling { animation: hero-dot-fill 10s linear forwards; }
.hero-shell.is-paused .hero-dots .fill.is-filling { animation-play-state: paused; }
@keyframes hero-dot-fill {
  to { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-dots .fill.is-filling { animation: none; }
  .hero-dots button.active .fill { transform: scaleX(1); }
}

/* .btn-outline-white — не только кнопка героя: тот же класс стоит на кнопке drawer'а
   (templates/components/drawer/drawer.twig), а drawer есть на всех страницах. Поэтому вариант
   общий и живёт в общем бандле — assets/css/sections.css, секция «кнопки». Основная CTA-кнопка
   героя — .btn-brick (Bootstrap сам сгенерировал из $theme-colors). */

.hero-arrows { display: flex; gap: .625rem; }
.hero-arrow {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: background-color .2s ease, transform .2s ease;
}
.hero-arrow svg { width: 1rem; height: 1rem; }
.hero-arrow:hover { background: rgba(255, 255, 255, .3); transform: scale(1.08); }

/* ---- «Реклама»: маркировка по 38-ФЗ поверх слайда/карточки — на ховере/фокусе всплывает */
/* название рекламодателя, ИНН, erid (см. образец на evoleasing.ru). Общий класс .ad-mark — */
/* см. assets/css/sections.css, здесь только позиция метки внутри геро-слайда (верхний правый угол). */
.ad-mark--hero { top: 16px; right: 16px; }

@media (min-width: 992px) {
  .hero-shell { height: 660px; }
}
/* На узком десктопе сохраняем кадрирование техники и высоту первого экрана. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-shell.carousel { height: 560px; }
  .hero-shell.carousel .hero-frame { padding-bottom: 44px; }
}
@media (max-width: 991.98px) {
  .hero-shell { height: 560px; }
  .hero-frame { padding-bottom: 44px; }
  .hero-glass { max-width: 100%; padding: 28px 32px 24px; }
}
@media (max-width: 767.98px) {
  /* Высота героя на телефоне: не больше 600px и не выше видимой области (100svh минус шапка 76px). */
  /* Фиксированные 780px оставляли кнопки за нижним краем; а «100svh − шапка» одно не спасает: в части */
  /* браузеров/эмуляторов нижняя панель рисуется поверх страницы и svh её не вычитает — поэтому ещё и */
  /* потолок 600px (кнопки остаются в видимой зоне, при этом фото занимает ≥ половины высоты). Герой растёт под самый длинный текст слайда (padding-top панели оставляет не менее */
  /* ~110px фото сверху), так что текстовая панель, прижатая к низу, не обрезается. */
  .hero-shell { --hero-h: min(600px, calc(100vh - 76px)); --hero-h: min(600px, calc(100svh - 76px)); height: auto; min-height: var(--hero-h); }
  .hero-shell .carousel-inner, .hero-shell .carousel-item { height: auto; min-height: var(--hero-h); }
  .hero-media--desktop { display: none; }
  .hero-media--mobile { display: block; }
  .hero-frame { height: auto; min-height: var(--hero-h); padding-top: 110px; padding-bottom: 16px; }
  .hero-glass { padding: 20px 18px 16px; border-radius: var(--bs-border-radius-lg); }
  .hero-eyebrow { margin-bottom: .625rem; }
  .hero-glass h1, .hero-glass h2, .hero-glass .h1, .hero-glass .h2 { font-size: clamp(24px, 6.6vw, 30px); margin-bottom: .75rem; }
  .hero-glass .sub { font-size: .875rem; line-height: 1.5; margin-bottom: 1.125rem; }
  /* две кнопки в один ряд — экономит ~60px высоты (и обе видны на первом экране) */
  .hero-glass .ctas { flex-wrap: nowrap; gap: .5rem; margin-bottom: 1rem; }
  .hero-glass .ctas .btn { flex: 1 1 0; min-width: 0; width: auto; padding-left: .5rem; padding-right: .5rem; white-space: normal; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.2; }
  .hero-foot { padding-top: .75rem; }
  /* стрелки на телефоне лишние: слайды листаются свайпом, точки-индикаторы остаются; ряд стал ниже на ~30px */
  .hero-foot .hero-arrow:not(.hero-playback) { display: none; }
}

/* Управление автопрокруткой доступно также на телефоне; использует оформление стрелок. */
.hero-playback { width: auto; padding: 0 .75rem; border-radius: var(--bs-border-radius-pill); font-size: .75rem; margin-left: auto; margin-right: .625rem; }
.hero-playback:disabled { opacity: .65; cursor: default; transform: none; }
.hero-shell.is-paused .hero-media.is-zooming { animation-play-state: paused; }
