/* Slider strony glownej. Siatka 1200x740 skalowana do szerokosci ekranu; napisy w bloku
   po wolnej stronie slajdu (nie nachodza na ilustracje). */
.bz-slider { position: relative; overflow: hidden; }
.bz-slide {
  background-repeat: no-repeat; background-size: cover; background-position: left bottom;
  height: min(740px, calc(100vw * 740 / 1200));
}
.bz-slide.bg-right-bottom { background-position: right bottom; }
.bz-slide.bg-left-bottom { background-position: left bottom; }
.bz-slide.bg-center { background-position: center; }
.bz-slide-grid {
  position: relative; width: min(1200px, 100vw); height: 100%; margin: 0 auto;
  container-type: inline-size; --u: calc(100cqw / 1200);
}
.bz-slide-text {
  position: absolute; top: 50%; width: 48%; transform: translateY(-46%);
  text-align: center; z-index: 2;
}
.bz-slide-text--right { right: 1%; }
.bz-slide-text--left { left: 1%; }
.bz-line { white-space: nowrap; }
.bz-layer { display: inline-block; vertical-align: middle; }
.bz-layer-text {
  font-family: var(--bz-font-heading); font-weight: 700;
  font-size: max(calc(var(--fs) * var(--k) * var(--u)), 11px);
  line-height: max(calc(var(--lh) * var(--k) * var(--u)), 13px);
  text-shadow: 2px 2px 2px #222;
}
.bz-layer-image img { width: calc(var(--w) * var(--k) * var(--u)); max-width: 100%; height: auto; }
.bz-layer-link { color: inherit; }
@media (max-width: 1024px) { .bz-layer-text { text-shadow: 1px 1px 1px #222; } }

/* Animacja napisow przy kazdym pokazaniu slajdu. */
.bz-slide .bz-layer { opacity: 0; }
.bz-slide.is-shown .bz-layer { animation: bz-pop-up .6s cubic-bezier(.23, 1, .32, 1) both; animation-delay: var(--delay, .5s); }
@keyframes bz-pop-up {
  from { opacity: 0; transform: translateY(60%) scale(.9); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .bz-slide .bz-layer { opacity: 1; animation: none !important; } }

/* Przenikanie slajdow (wlasny slider, bez Bootstrap JS). */
.bz-slider .carousel-inner { position: relative; display: grid; width: 100%; overflow: hidden; }
.bz-slider .carousel-item {
  grid-area: 1 / 1; width: 100%; opacity: 0; visibility: hidden;
  transition: opacity .6s ease, visibility 0s linear .6s;
}
.bz-slider .carousel-item.active { opacity: 1; visibility: visible; z-index: 1; transition: opacity .6s ease; }
/* Przed uruchomieniem skryptu widoczny jest pierwszy slajd (szybsze LCP). */
.bz-slider:not(.is-ready) .carousel-item:first-child { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .bz-slider .carousel-item { transition: none; } }

/* Strzalki i kropki */
.bz-slider-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 0; border: 0; margin: 0 20px; cursor: pointer;
  background: rgba(0, 0, 0, .25); border-radius: 0; color: #fff; font-size: 16px; transition: background .3s;
}
.bz-slider-arrow.carousel-control-prev { left: 0; }
.bz-slider-arrow.carousel-control-next { right: 0; }
.bz-slider-arrow:hover, .bz-slider-arrow:focus-visible { background: var(--bz-pink); }
.bz-slider-dots {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; margin: 0 0 14px; padding: 0;
}
/* Pole dotyku 24 px, widoczna kropka mniejsza (::before). */
.bz-slider-dots button {
  width: 24px; height: 24px; padding: 0; border: 0; margin: 0 1px; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bz-slider-dots button::before {
  content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent;
  box-sizing: border-box; transition: background .3s, border-color .3s;
}
.bz-slider-dots .active::before { border-color: var(--bz-pink); background: var(--bz-pink); }
@media (max-width: 767.98px) {
  .bz-slider-arrow { display: none; }
  .bz-slider-dots { margin-bottom: 0; }
  .bz-slider-dots button::before { width: 8px; height: 8px; border-width: 1px; }
}

/* Telefon: ilustracje zajmuja wieksza czesc kadru – wezszy blok napisow przy krawedzi. */
@media (max-width: 575.98px) {
  .bz-slide-text { width: 40%; }
  .bz-slide-text--right { right: 2%; }
  .bz-slide-text--left { left: 2%; }
  .bz-layer-text { font-size: max(calc(var(--fs) * var(--k) * var(--u) * .82), 9px); line-height: max(calc(var(--lh) * var(--k) * var(--u) * .82), 11px); }
}

/* Komputer (od 992 px): oryginalne pozycje napisow jak w poprzednim sliderze. */
@media (min-width: 992px) {
  .bz-slide:not(.text-flow) .bz-slide-text { position: absolute; inset: 0; width: auto; transform: none; text-align: left; }
  .bz-slide:not(.text-flow) .bz-line { display: contents; }
  .bz-slide:not(.text-flow) .bz-layer { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); white-space: nowrap; }
  .bz-slide:not(.text-flow) .bz-layer-text { font-size: calc(var(--fs) * var(--u)); line-height: calc(var(--lh) * var(--u)); }
  .bz-slide:not(.text-flow) .bz-layer-image img { width: calc(var(--w) * var(--u)); max-width: none; }
}

/* Telefon: ilustracja przesunieta do blizszej krawedzi (czesciowo poza kadrem),
   wiecej miejsca i wieksze litery dla napisow. */
@media (max-width: 575.98px) {
  .bz-slide.bg-left-bottom { background-position: left -20vw bottom; }
  .bz-slide.bg-right-bottom { background-position: right -20vw bottom; }
  .bz-slide-text { width: 56%; }
  .bz-slide-text--right { right: 1%; }
  .bz-slide-text--left { left: 1%; }
  .bz-layer-text { font-size: max(calc(var(--fs) * var(--k) * var(--u) * 1.15), 11px); line-height: max(calc(var(--lh) * var(--k) * var(--u) * 1.15), 13px); }
}

/* Slajd z wariantem text-flow: napisy w wysrodkowanych liniach takze na komputerze. */
@media (min-width: 992px) {
  .bz-slide.text-flow .bz-slide-text { width: 48%; }
}

/* Odstep miedzy slowami w jednej linii napisu (w trybie liniowym). */
.bz-line > * + * { margin-left: .28em; }
.bz-line > a + a, .bz-line > a + span, .bz-line > span + a { margin-left: .28em; }
