/**
 * Petla wideo w tle bloku "Poznaj nas lepiej".
 * Warstwy: wideo (0) < gradient slajdu ::before (1) < tresc slajdu (2).
 * Zdjecia slajdow znikaja dopiero, gdy wideo faktycznie gra (.is-video-playing).
 */

.banner-bottom--has-video .banner-bottom__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.banner-bottom--has-video.is-video-playing .banner-bottom__video {
  opacity: 1;
}

.banner-bottom--has-video .banner-bottom_slider {
  position: relative;
  z-index: 1;
}

.banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser {
  background-image: none !important;
}

.banner-bottom--has-video .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__content-wrapper {
  position: relative;
  z-index: 2;
}

/* Tytul (pionowy) jest juz pozycjonowany przez motyw - wystarczy z-index. */
.banner-bottom--has-video .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__title {
  z-index: 2;
}

/* Desktop: zdjecia maja "wypalone" przejscie w biel pod tekstem po prawej -
   przy wideo robimy je gradientem. Ponizej 1201px motyw ma juz ciemny gradient. */
@media (min-width: 1201px) {
  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.85) 66%, #fff 78%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .banner-bottom--has-video .banner-bottom__video {
    display: none;
  }
}
