/*
 * iter-21 banner-1 (2026-06-13) — Hero video banners для homepage slider.
 * Owner-prepared packages:
 *   /home/crispo/Загрузки/sonel_hero_full_package_v2 (Sonel hero)
 *   /home/crispo/Загрузки/yawn_sale_overlay_package_v2 (Yawn sale, отложено)
 *
 * Adapted from vendored sonel-hero.css/yawn-sale-hero.css. Изменения:
 *   - Без `:root` глобальных переменных (scoped через CSS vars в .hero-XXX)
 *   - Mobile video swap через display @media (vendored CSS имеет standalone
 *     .hero-sonel--mobile с 9:16 aspect, но в нашем slider'е разные video
 *     для desktop+mobile, swap через display @media).
 *   - Контейнер adapt'ируется к .hv2-banner__slide (без aspect-ratio
 *     ограничения 3000:720 — родитель .hv2-banner определяет размеры).
 *   - Owner: «работать как на десктопной так и на мобильной».
 */

/* ============================================================
   Slider container: внутри .v2-container (стандартные границы сайта).
   Owner 2026-06-13: «нужен в стандартном контейнере».
   Aspect-ratio video: desktop 3000:720 (≈4.17), mobile 9:16.
   ============================================================ */
.v2-slider-fullwidth:has(.hero-sonel),
.v2-slider-fullwidth:has(.hero-sale) {
  position: relative;
  width: 100%;
  height: auto !important;
  aspect-ratio: 3000 / 720;
  max-height: 720px;
}
.v2-slider-fullwidth:has(.hero-sonel) .hv2-banner,
.v2-slider-fullwidth:has(.hero-sale) .hv2-banner {
  height: 100%;
}
.v2-slider-fullwidth:has(.hero-sonel) .hv2-banner__slide,
.v2-slider-fullwidth:has(.hero-sale) .hv2-banner__slide {
  height: 100%;
}

@media (max-width: 768px) {
  .v2-slider-fullwidth:has(.hero-sonel),
  .v2-slider-fullwidth:has(.hero-sale) {
    aspect-ratio: 9 / 16;
    max-height: 90vh;
  }
}

/* ============================================================
   Sonel Hero (Slide 1)
   ============================================================ */
.hv2-banner__slide--hero { position: relative; overflow: hidden; }

.hero-sonel {
  --hero-bg: #f5f7fa;
  --hero-text: #242424;
  --hero-accent: #149bd7;
  --hero-accent-2: #1ea7e1;
  --hero-safe-left: 20px; /* 5.1 (Owner 2026-06-27): текст баннера — в линию с лого.
     content-box баннера = край контейнера +32 (gutter); лого = +52 → padding 20px. */
  --hero-safe-right: clamp(20px, 3vw, 80px);
  --hero-safe-y: clamp(16px, 2.8vw, 40px);

  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--hero-bg);
  isolation: isolate;
  font-family: Inter, Onest, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--hero-text);
  box-sizing: border-box;
}
.hero-sonel * { box-sizing: border-box; }

.hero-sonel__poster,
.hero-sonel__video,
.hero-sonel__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-sonel__poster img,
.hero-sonel__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-sonel__poster { z-index: 0; }
.hero-sonel__video  { z-index: 1; }

/* video swap через display @media — Owner: «mobile-9x16 video» */
.hero-sonel__video--desktop { display: block; }
.hero-sonel__video--mobile  { display: none; }
@media (max-width: 768px) {
  .hero-sonel__video--desktop { display: none; }
  .hero-sonel__video--mobile  { display: block; }
}

.hero-sonel__overlay {
  z-index: 2;
  background: linear-gradient(90deg,
    rgba(247, 249, 252, 0.98) 0%,
    rgba(247, 249, 252, 0.96) 30%,
    rgba(247, 249, 252, 0.78) 45%,
    rgba(247, 249, 252, 0.42) 58%,
    rgba(247, 249, 252, 0.08) 73%,
    rgba(247, 249, 252, 0.00) 100%);
}

.hero-sonel__content {
  position: relative;
  z-index: 3;
  height: 100%;
  width: min(48%, 900px);
  padding: var(--hero-safe-y) var(--hero-safe-right) var(--hero-safe-y) var(--hero-safe-left);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-sonel__title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 46px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hero-text);
}
.hero-sonel__title span {
  display: block;
  margin-top: 4px;
  font-size: clamp(34px, 4vw, 76px);
  line-height: 0.96;
  color: var(--hero-accent);
}

.hero-sonel__subtitle {
  margin: 12px 0 0;
  font-size: clamp(13px, 1.1vw, 22px);
  line-height: 1.25;
  color: var(--hero-text);
}

.hero-sonel__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(38px, 2.8vw, 56px);
  margin-top: clamp(14px, 1.8vw, 26px);
  padding: 0 clamp(20px, 2.2vw, 42px);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--hero-accent-2) 0%, var(--hero-accent) 100%);
  color: #fff;
  text-decoration: none;
  font-size: clamp(14px, 1.2vw, 22px);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(20, 155, 215, 0.22);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.hv2-banner__slide:hover .hero-sonel__button {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(20, 155, 215, 0.28);
  filter: brightness(1.02);
}

/* Narrow viewport (mobile/small tablet) — gradient bottom-up, content stack */
@media (max-width: 900px) {
  .hero-sonel__overlay {
    background: linear-gradient(180deg,
      rgba(247,249,252,0.00) 0%,
      rgba(247,249,252,0.06) 34%,
      rgba(247,249,252,0.70) 57%,
      rgba(247,249,252,0.97) 76%,
      rgba(247,249,252,1.00) 100%);
  }
  .hero-sonel__content {
    width: 100%;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 28px 24px 32px;
  }
  .hero-sonel__title { font-size: clamp(28px, 7vw, 48px); }
  .hero-sonel__title span { font-size: clamp(50px, 14vw, 96px); }
  .hero-sonel__subtitle { font-size: clamp(16px, 4vw, 24px); }
  .hero-sonel__button {
    width: min(100%, 430px);
    min-height: 56px;
    font-size: clamp(18px, 4.2vw, 26px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sonel__video { display: none !important; }
}

/* ============================================================
   Yawn-sale Hero (Slide 2). Class `.hero-sale` (Owner-package).
   Scale = тот же что Sonel — Owner: «отмасштабировать так чтобы влазил».
   ============================================================ */
.hero-sale {
  --hero-bg: #eef2f7;
  --hero-text: #1f2530;
  --hero-muted: #475467;
  --hero-accent: #1698da;
  --hero-accent-2: #1ea7e1;
  --hero-safe-left: 20px; /* 5.1 (Owner 2026-06-27): текст баннера — в линию с лого.
     content-box баннера = край контейнера +32 (gutter); лого = +52 → padding 20px. */
  --hero-safe-right: clamp(20px, 3vw, 80px);
  --hero-safe-y: clamp(16px, 2.8vw, 40px);

  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--hero-bg);
  isolation: isolate;
  font-family: Inter, Onest, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--hero-text);
  box-sizing: border-box;
}
.hero-sale * { box-sizing: border-box; }

.hero-sale__poster,
.hero-sale__video,
.hero-sale__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-sale__poster img,
.hero-sale__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-sale__poster { z-index: 0; }
.hero-sale__video  { z-index: 1; }

.hero-sale__video--desktop { display: block; }
.hero-sale__video--mobile  { display: none; }
@media (max-width: 768px) {
  .hero-sale__video--desktop { display: none; }
  .hero-sale__video--mobile  { display: block; }
}

.hero-sale__overlay {
  z-index: 2;
  background: linear-gradient(90deg,
    rgba(245, 247, 250, 0.98) 0%,
    rgba(245, 247, 250, 0.95) 28%,
    rgba(245, 247, 250, 0.78) 45%,
    rgba(245, 247, 250, 0.40) 58%,
    rgba(245, 247, 250, 0.06) 74%,
    rgba(245, 247, 250, 0.00) 100%);
}

.hero-sale__content {
  position: relative;
  z-index: 3;
  height: 100%;
  width: min(48%, 840px);
  padding: var(--hero-safe-y) var(--hero-safe-right) var(--hero-safe-y) var(--hero-safe-left);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-sale__eyebrow {
  margin: 0 0 6px;
  font-size: clamp(11px, 0.85vw, 16px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--hero-muted);
}

.hero-sale__title {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 42px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hero-text);
}
.hero-sale__title span {
  display: block;
  margin-top: 4px;
  font-size: clamp(32px, 3.8vw, 70px);
  line-height: 0.96;
  color: var(--hero-accent);
}

.hero-sale__subtitle {
  margin: 10px 0 0;
  font-size: clamp(12px, 1vw, 20px);
  line-height: 1.25;
  color: var(--hero-text);
}

.hero-sale__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(38px, 2.8vw, 56px);
  margin-top: clamp(12px, 1.6vw, 24px);
  padding: 0 clamp(20px, 2.2vw, 42px);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--hero-accent-2) 0%, var(--hero-accent) 100%);
  color: #fff;
  text-decoration: none;
  font-size: clamp(14px, 1.2vw, 22px);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(22, 152, 218, 0.22);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.hv2-banner__slide:hover .hero-sale__button {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(22, 152, 218, 0.28);
  filter: brightness(1.02);
}

@media (max-width: 900px) {
  .hero-sale__overlay {
    background: linear-gradient(180deg,
      rgba(245,247,250,0.00) 0%,
      rgba(245,247,250,0.08) 34%,
      rgba(245,247,250,0.72) 57%,
      rgba(245,247,250,0.97) 76%,
      rgba(245,247,250,1.00) 100%);
  }
  .hero-sale__content {
    width: 100%;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 28px 24px 32px;
  }
  .hero-sale__eyebrow { font-size: clamp(11px, 3vw, 16px); }
  .hero-sale__title { font-size: clamp(26px, 6.5vw, 44px); }
  .hero-sale__title span { font-size: clamp(48px, 13vw, 90px); }
  .hero-sale__subtitle { font-size: clamp(14px, 3.6vw, 22px); }
  .hero-sale__button {
    width: min(100%, 430px);
    min-height: 56px;
    font-size: clamp(17px, 4vw, 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sale__video { display: none !important; }
}
