/**
 * 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 przy filmie: tak jak ponizej 1201px (motyw, $banner-bottom-gradient) -
   film na cala szerokosc z ciemnym gradientem pod trescia po prawej, tekst,
   liczba, ikona, strzalki i przycisk na bialo (decyzja klienta 2026-11-05;
   wczesniej biala zaslona z ciemnym tekstem). Bez filmu zostaje uklad motywu
   ze zdjeciem "wypalonym" w biel. */
@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(0, 0, 0, 0) -33%, rgba(51, 51, 51, 0.6) 29%);
  }

  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__subtitle {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  }

  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__body p {
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  }

  /* Ikona to jasnoszary obrazek - na bialo. */
  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__icon img {
    filter: brightness(0) invert(1);
  }

  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__prev {
    background-image: url("/themes/custom/domel/img/icons/arrow-basic-left-white.svg");
  }

  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__next {
    background-image: url("/themes/custom/domel/img/icons/arrow-basic-right-white.svg");
  }

  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__link a {
    background-color: transparent;
    background-image: url("/themes/custom/domel/img/icons/arrow-right-white.svg");
    border-color: #fff;
    color: #fff;
  }

  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__link a:hover,
  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__link a:focus,
  .banner-bottom--has-video.is-video-playing .node-banner-bottom.node--view-mode-teaser .node-banner-bottom__link a:active {
    border-color: #028946;
  }
}

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