/* ══════════════════════════════════════════════════════════════════════════
   Podstrona „Biurowce” — style modułów biuro_* (ładowane tylko na szablonie
   page-biurowce.php). Prefiks klas: .biuro-
   ══════════════════════════════════════════════════════════════════════════ */

/* Hero ma stykać się z headerem — #main z header.php ma globalny margin-top */
.page-template-page-biurowce #main { margin-top: 0; }

.biuro-page {
  --biuro-orange: #ff4200;
  --biuro-black: #0a0a0a;
  --biuro-beige: #b48a6a;
  --biuro-blue: #7fb8cf;
  --biuro-graphite: #2b2b2b;
  --biuro-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── S1 Hero: scroll-driven slider ─────────────────────────────────────── */

/* Kontener rezerwuje (liczba klatek) × 100vh scrolla; widok przypięty
   na 100vh. Po ostatniej klatce sticky „puszcza” i strona jedzie dalej —
   to daje płynne odpięcie i powrót w górę bez skoków. */
.biuro-hero {
  position: relative;
  height: calc(var(--biuro-slides, 1) * 100vh);
  height: calc(var(--biuro-slides, 1) * 100svh);
  background: var(--biuro-black);
}

.biuro-hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--biuro-black);
}

.biuro-hero__slide {
  --biuro-content-color: #fff;
  --biuro-content-shadow: 0 1px 12px rgba(0,0,0,0.45);
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}

.biuro-hero__slide--content-dark {
  --biuro-content-color: #000;
  --biuro-content-shadow: none;
}

.biuro-hero__slide.is-active,
.biuro-hero__slide.is-visible {
  visibility: visible;
  will-change: opacity;
}

.biuro-hero__slide.is-active { opacity: 1; }

/* Tło — obraz lub wideo; zoom tylko podczas przejścia między klatkami. */
.biuro-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #111;
}

/* W pełni widoczne zdjęcie ma skalę 1 — tylko kadrowanie object-fit: cover.
   Wchodzące tło łagodnie zmniejsza skalę z 1.04 do 1. Bez przesunięcia w pionie
   nie potrzeba stałego zapasu obrazu do ukrywania krawędzi. */
.biuro-hero__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--biuro-scale, 1));
}

.biuro-hero__slide.is-visible .biuro-hero__media { will-change: transform; }

.biuro-hero__content,
.biuro-hero__intro {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* Górny odstęp mieści kompaktowy sticky header motywu (~70 px), który
     pojawia się po przewinięciu i nachodziłby na wielki napis. */
  padding-top: clamp(5.5rem, 12vh, 8rem);
}

/* Treść klatek 1…n: fade-up sterowany z JS (--biuro-text / --biuro-rise),
   startuje dopiero po przełączeniu tła */
.biuro-hero__slide:not(.biuro-hero__slide--intro) .biuro-hero__word,
.biuro-hero__slide:not(.biuro-hero__slide--intro) .biuro-hero__desc {
  opacity: var(--biuro-text, 1);
  transform: translateY(var(--biuro-rise, 0));
  will-change: opacity, transform;
}

/* Wielki napis: Poppins 800, ciasne litery, skalowany do szerokości */
.biuro-hero__word {
  margin: 0;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-size: clamp(2rem, 9.5vw, 11.5rem);
  color: #fff;
}

.biuro-hero__word--white  { color: #fff; }
/* Exclusion: biel odwraca kolory tła pod literami (jak warstwa „Exclusion” w
   projekcie). Blend działa tylko względem tła we wspólnym kontekście
   nakładania, więc kontener treści nie może go tworzyć (patrz niżej). */
.biuro-hero__word--exclusion {
  color: #fff;
  mix-blend-mode: exclusion;
}
.biuro-hero__content:has(.biuro-hero__word--exclusion),
.biuro-hero__intro:has(.biuro-hero__word--exclusion) {
  z-index: auto;
}
.biuro-hero__word--dark   { color: #000; }
.biuro-hero__word--gradient-1 { --biuro-gradient-direction: to bottom right; }
.biuro-hero__word--gradient-2 { --biuro-gradient-direction: to bottom left; }
.biuro-hero__word--gradient-3 { --biuro-gradient-direction: to top; }

.biuro-hero__word--gradient-1,
.biuro-hero__word--gradient-2,
.biuro-hero__word--gradient-3 {
  color: #000;
  text-shadow: none;
  /* Gradient obejmuje napis, a nie pustą część szerokiego kontenera. */
  width: fit-content;
  max-width: 100%;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .biuro-hero__word--gradient-1,
  .biuro-hero__word--gradient-2,
  .biuro-hero__word--gradient-3 {
    background-image: linear-gradient(var(--biuro-gradient-direction), var(--biuro-gradient-color, #ff4200) 0%, #000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* Zgodność z wcześniejszymi wartościami pól ACF. */
.biuro-hero__word--green  { color: #0f4a2f; }
.biuro-hero__word--orange,
.biuro-hero__word--bronze {
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}
.biuro-hero__word--orange { background-image: linear-gradient(90deg, #3a1a00 0%, #8a2f00 35%, var(--biuro-orange) 100%); }
.biuro-hero__word--bronze { background-image: linear-gradient(90deg, #4d3416 0%, #8a6a3a 50%, #c8a15a 100%); }

/* Numer + opis pod napisem (klatki 1…n) */
.biuro-hero__desc {
  display: grid;
  grid-template-columns: max-content minmax(0, 34rem);
  justify-content: start;
  gap: 0 1.5rem;
  margin-top: clamp(0.75rem, 2vh, 1.5rem);
  align-items: start;
}

.biuro-hero__num {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 300;
  line-height: 1;
  color: var(--biuro-content-color);
}

.biuro-hero__text {
  margin: 0;
  font-size: clamp(0.9rem, 1.05vw, 1.05rem);
  line-height: 1.55;
  color: var(--biuro-content-color);
  text-shadow: var(--biuro-content-shadow);
}

/* Klatka 0 — intro (czarna) */
.biuro-hero__slide--intro {
  background: var(--biuro-black);
  color: var(--biuro-content-color);
}

.biuro-hero__glow {
  position: absolute;
  right: -10%;
  bottom: -25%;
  width: 55vw;
  height: 55vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,66,0,0.95) 0%, rgba(255,66,0,0.55) 30%, rgba(255,66,0,0) 68%);
  filter: blur(20px);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.biuro-hero__intro {
  justify-content: center;
  padding-top: 0;
  opacity: var(--biuro-text, 1);
}

.biuro-hero__crumbs { margin-bottom: 0.75rem; }
.biuro-hero__crumbs #breadcrumbs,
.biuro-hero__crumbs #breadcrumbs a { color: var(--biuro-content-color) !important; }
.biuro-hero__crumbs #breadcrumbs a:hover { text-decoration: underline; }

.biuro-hero__h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.5rem);
  color: var(--biuro-content-color);
  border-left: 5px solid var(--biuro-orange);
  padding-left: 0.75rem;
  margin: 0 0 clamp(2rem, 7vh, 5rem);
  max-width: 45%;
}

.biuro-hero__intro .biuro-hero__word {
  transform: none;
}

.biuro-hero__lead {
  align-self: center;
  max-width: 36rem;
  margin: clamp(2rem, 7vh, 5rem) 0 0;
  text-align: center;
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  line-height: 1.6;
  color: var(--biuro-content-color);
}

/* Animacja wejścia intro — odpalana klasą .is-loaded na sekcji */
.biuro-hero__crumbs,
.biuro-hero__h1,
.biuro-hero__intro .biuro-hero__word,
.biuro-hero__lead {
  opacity: 0;
  transform: translateY(28px);
}

.biuro-hero.is-loaded .biuro-hero__crumbs,
.biuro-hero.is-loaded .biuro-hero__h1,
.biuro-hero.is-loaded .biuro-hero__intro .biuro-hero__word,
.biuro-hero.is-loaded .biuro-hero__lead {
  animation: biuro-rise 0.9s var(--biuro-ease) forwards;
}

.biuro-hero.is-loaded .biuro-hero__h1                     { animation-delay: 0.15s; }
.biuro-hero.is-loaded .biuro-hero__intro .biuro-hero__word { animation-delay: 0.35s; animation-duration: 1.1s; }
.biuro-hero.is-loaded .biuro-hero__lead                   { animation-delay: 0.65s; }
.biuro-hero.is-loaded .biuro-hero__glow                   { animation: biuro-glow 1.6s var(--biuro-ease) 0.3s forwards; }

@keyframes biuro-rise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes biuro-glow {
  to { opacity: 1; transform: scale(1); }
}

/* Kropki postępu (prawa krawędź) + podpowiedź scrolla */
.biuro-hero__dots {
  position: absolute;
  right: clamp(0.75rem, 2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.biuro-hero__dot {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.65) 0 5px, transparent 6px);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

.biuro-hero__dot.is-active {
  background: radial-gradient(circle, var(--biuro-orange) 0 6px, transparent 7px);
}

.biuro-page button:focus-visible,
.biuro-page a:focus-visible { outline: 3px solid var(--biuro-orange); outline-offset: 3px; }

.biuro-hero__hint {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  z-index: 3;
  width: 22px;
  height: 36px;
  margin-left: -11px;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: difference;
}

/* Ikona scrolla widoczna na wszystkich klatkach hero */
.biuro-hero.is-loaded .biuro-hero__hint { opacity: 0.85; }

.biuro-hero__hint span {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: biuro-hint 1.6s ease-in-out infinite;
}

@keyframes biuro-hint {
  0%   { transform: translateY(0);   opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0; }
}

/* Tryb statyczny: bez JS lub prefers-reduced-motion — klatki jedna pod drugą */
.biuro-hero--static { height: auto; }
.biuro-hero--static .biuro-hero__sticky { position: static; height: auto; overflow: visible; }
.biuro-hero--static .biuro-hero__slide {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  display: flex;
  will-change: auto;
}
.biuro-hero--static .biuro-hero__content,
.biuro-hero--static .biuro-hero__intro {
  height: auto;
  padding-top: clamp(3rem, 8vh, 6rem);
  padding-bottom: clamp(3rem, 8vh, 6rem);
}
.biuro-hero--static .biuro-hero__media { transform: none; will-change: auto; }
.biuro-hero--static .biuro-hero__dots,
.biuro-hero--static .biuro-hero__hint { display: none; }
.biuro-hero--static .biuro-hero__crumbs,
.biuro-hero--static .biuro-hero__h1,
.biuro-hero--static .biuro-hero__word,
.biuro-hero--static .biuro-hero__lead,
.biuro-hero--static .biuro-hero__glow { opacity: 1; transform: none; animation: none; }

@media (prefers-reduced-motion: reduce) {
  .biuro-hero__hint span { animation: none; }
}

@media (max-width: 991.98px) {
  .biuro-hero__h1 { max-width: 100%; }
  .biuro-hero__desc { grid-template-columns: 1fr; gap: 0.5rem; }
  .biuro-hero__dots { right: 0.5rem; }
}

/* ── Wspólne: sekcje, nagłówki, dwie kolumny ───────────────────────────── */

.biuro-section {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.biuro-section--flush-bottom { padding-bottom: 0; }

.biuro-section__title {
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  margin: 0 0 1.5rem;
  color: #1c1c1c;
}

.biuro-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2.5rem;
  color: #333;
  line-height: 1.7;
}

.biuro-cols__col > :last-child { margin-bottom: 0; }

/* ── S3 Obraz na całą szerokość ────────────────────────────────────────── */

.biuro-full-image img {
  display: block;
  width: 100%;
  height: var(--biuro-full-h, 520px);
  object-fit: cover;
}

/* ── S4–S6 Przestrzeń: kolaż ───────────────────────────────────────────── */

.biuro-przestrzen {
  --biuro-radius: 10px;
  --biuro-box-padding-inline: 1.5rem;
  /* Połowa domyślnego odstępu sekcji (.biuro-section). */
  padding-top: clamp(1.5rem, 3vw, 2.75rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.75rem);
}

.biuro-przestrzen--orange { --biuro-box: var(--biuro-orange); }
.biuro-przestrzen--beige  { --biuro-box: var(--biuro-beige); }
.biuro-przestrzen--blue   { --biuro-box: var(--biuro-blue); }
.biuro-przestrzen--dark   { --biuro-box: var(--biuro-graphite); }
.biuro-przestrzen--black        { --biuro-box: var(--biuro-black); } /* COBOUW 2026-11-06 */
.biuro-przestrzen--light-gray   { --biuro-box: #f4f4f4; }
.biuro-przestrzen--light-orange { --biuro-box: #ffb899; }

/* Siatka 2 kolumn × 2 wierszy: intro / kafel, zdjęcie / box.
   Kafel jest wyższy niż wiersz i nachodzi na box (margin ujemny). */
.biuro-przestrzen__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "intro tile"
    "photo box";
  gap: 2rem 1.5rem;
  align-items: start;
}

.biuro-przestrzen--left .biuro-przestrzen__grid {
  grid-template-areas:
    "tile  intro"
    "box   photo";
}

.biuro-przestrzen__intro { grid-area: intro; padding-top: 1rem; }
.biuro-przestrzen__tile  { grid-area: tile; }
.biuro-przestrzen__photo { grid-area: photo; }
.biuro-przestrzen__box   { grid-area: box; }

.biuro-przestrzen__text { color: #333; line-height: 1.7; }
.biuro-przestrzen__text > :last-child { margin-bottom: 0; }

.biuro-przestrzen__tile {
  position: relative;
  z-index: 2;
  margin: 0 0 -4.5rem;          /* nachodzi na box poniżej */
  width: 82%;
  justify-self: end;
  aspect-ratio: 5 / 4;
  border-radius: var(--biuro-radius);
  overflow: hidden;
}

.biuro-przestrzen--left .biuro-przestrzen__tile { justify-self: start; }

.biuro-przestrzen__tile img,
.biuro-przestrzen__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.biuro-przestrzen__tile figcaption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  color: #fff;
  font-size: clamp(1.5rem, 2.4vw, 2.4rem);
  font-weight: 300;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0,0,0,0.45);
  z-index: 1;
}

.biuro-przestrzen__tile::after {
  content: '';
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  pointer-events: none;
}

/* Zdjęcie i box tworzą jeden rząd: zaokrąglamy tylko jego zewnętrzne narożniki.
   Górny narożnik boxu pozostaje prosty pod nachodzącym kaflem. */
.biuro-przestrzen__photo {
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--biuro-radius) 0 0 var(--biuro-radius);
  overflow: hidden;
}

.biuro-przestrzen--left .biuro-przestrzen__photo {
  border-radius: 0 var(--biuro-radius) var(--biuro-radius) 0;
}

.biuro-przestrzen__box {
  --biuro-box-text: #fff;
  align-self: stretch;
  min-height: 100%;
  padding: 6rem var(--biuro-box-padding-inline) 2rem; /* górny odstęp robi miejsce pod kafel */
  background: var(--biuro-box);
  color: var(--biuro-box-text);
  border-radius: 0 0 var(--biuro-radius) 0;
  display: flex;
  align-items: flex-end;
}

.biuro-przestrzen__box--text-dark { --biuro-box-text: #000; }

.biuro-przestrzen--left .biuro-przestrzen__box {
  border-radius: 0 0 0 var(--biuro-radius);
}

.biuro-przestrzen__box p {
  margin: 0;
  line-height: 1.7;
  max-width: 34rem;
}

.biuro-przestrzen__cols {
  margin-top: 2.5rem;
  column-gap: 1.5rem; /* ta sama siatka co box i zdjęcie powyżej */
}

.biuro-przestrzen--left .biuro-przestrzen__col--left,
.biuro-przestrzen--right .biuro-przestrzen__col--right {
  padding-inline: var(--biuro-box-padding-inline);
}

/* Box i tekst pod nim są cofnięte względem zewnętrznej krawędzi kafla.
   W układzie jednokolumnowym zachowują pełną szerokość. */
@media (min-width: 992px) {
  .biuro-przestrzen--right .biuro-przestrzen__box,
  .biuro-przestrzen--right .biuro-przestrzen__col--right { margin-right: 50px; }

  .biuro-przestrzen--left .biuro-przestrzen__box,
  .biuro-przestrzen--left .biuro-przestrzen__col--left { margin-left: 50px; }

  .biuro-przestrzen__col--left { grid-column: 1; }
  .biuro-przestrzen__col--right { grid-column: 2; }
}

/* ── Galeria Slick ze strzałkami (S4/S5 dół + S9) ──────────────────────── */

.biuro-gallery {
  position: relative;
  margin-top: 2.5rem;
}

.biuro-gallery__track { margin: 0 -0.75rem; }

.biuro-gallery__item {
  display: block;
  margin: 0;
  padding: 0 0.75rem;
}

.biuro-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.biuro-przestrzen .biuro-gallery__item img { border-radius: var(--biuro-radius); }

/* Strzałki w narożnikach jak w projekcie: ukośne, pomarańczowe */
.biuro-gallery__arrow {
  display: none;
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.biuro-gallery:has(.slick-initialized) .biuro-gallery__arrow:not(.slick-hidden) { display: block; }
.biuro-gallery__track:not(.slick-initialized) { display: flex; overflow-x: auto; }
.biuro-gallery__track:not(.slick-initialized) > * { flex: 0 0 50%; min-width: 0; }
.biuro-gallery--full .biuro-gallery__track:not(.slick-initialized) > * { flex-basis: 100%; }

.biuro-gallery__arrow::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--biuro-orange);
  border-right: 2px solid var(--biuro-orange);
  transform: translate(-60%, -50%) rotate(45deg);
}

.biuro-gallery__arrow--prev { left: 1.25rem; }
.biuro-gallery__arrow--prev::before { transform: translate(-40%, -50%) rotate(-135deg); }
.biuro-gallery__arrow--next { right: 1.25rem; }

.biuro-gallery__arrow:hover { background: var(--biuro-orange); transform: scale(1.06); }
.biuro-gallery__arrow:hover::before { border-color: #fff; }

/* Pełnoekranowy wariant (S9) */
.biuro-gallery--full { margin-top: 3rem; }
.biuro-gallery--full .biuro-gallery__track { margin: 0; }
.biuro-gallery--full .biuro-gallery__item { padding: 0; }
.biuro-gallery--full .biuro-gallery__item img {
  aspect-ratio: auto;
  height: clamp(320px, 42vw, 640px);
}
.biuro-gallery--full .biuro-gallery__arrow--prev { left: clamp(1rem, 4vw, 4rem); }
.biuro-gallery--full .biuro-gallery__arrow--next { right: clamp(1rem, 4vw, 4rem); }

/* Stałe przejście od białego tła strony, również podczas przesuwania slajdów. */
.biuro-realizacje .biuro-gallery--full::after {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(100px, 16vw, 240px);
  background: linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.biuro-realizacje__slide { position: relative; color: #fff; text-decoration: none; }
.biuro-realizacje__label {
  position: absolute;
  left: clamp(1rem, 4vw, 4rem);
  bottom: 1.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(0,0,0,0.55);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* ── S7 Dwa kafle ──────────────────────────────────────────────────────── */

.biuro-kafle {
  /* Połowa domyślnego odstępu sekcji (.biuro-section). */
  padding-top: clamp(1.5rem, 3vw, 2.75rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.75rem);
}

.biuro-kafle__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.biuro-kafle__item {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 10px;
  color: #fff;
  background: #1c1c1c;
}

.biuro-kafle__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--biuro-ease);
}

.biuro-kafle__item:hover .biuro-kafle__bg { transform: scale(1.04); }

.biuro-kafle__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: inherit;
  gap: 2rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.7) 100%);
}

.biuro-kafle__title {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 300;
  color: #fff;
}

.biuro-kafle__text {
  margin: 0;
  max-width: 28rem;
  line-height: 1.6;
  color: #fff;
}

/* ── S8 Wirtualny spacer ───────────────────────────────────────────────── */

.biuro-spacer__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 2.5rem;
  align-items: end;
  margin-bottom: 2rem;
}

.biuro-spacer__head .biuro-section__title { margin: 0; }
.biuro-spacer__text { color: #333; line-height: 1.7; }
.biuro-spacer__text > :last-child { margin-bottom: 0; }

.biuro-spacer__media iframe { width: 100%; height: 100%; border: 0; }
.biuro-spacer__media--video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.biuro-spacer__media--image { margin: 0; }
.biuro-spacer__media--image img {
  display: block;
  width: 100%;
  height: clamp(320px, 40vw, 600px);
  object-fit: cover;
}

/* ── RWD ───────────────────────────────────────────────────────────────── */

@media (max-width: 991.98px) {
  .biuro-cols,
  .biuro-kafle__grid,
  .biuro-spacer__head { grid-template-columns: 1fr; }

  .biuro-przestrzen__grid,
  .biuro-przestrzen--left .biuro-przestrzen__grid {
    grid-template-columns: 1fr;
    grid-template-areas: "intro" "tile" "box" "photo";
    gap: 1.25rem;
  }

  .biuro-przestrzen__tile { width: 100%; margin-bottom: -3rem; justify-self: stretch; }
  .biuro-przestrzen__box { padding-top: 4.5rem; }
  /* W jednej kolumnie box domyka kafel od dołu, a zdjęcie jest osobnym elementem. */
  .biuro-przestrzen .biuro-przestrzen__box { border-radius: 0 0 var(--biuro-radius) var(--biuro-radius); }
  .biuro-przestrzen .biuro-przestrzen__photo { border-radius: var(--biuro-radius); }
  .biuro-full-image img { height: clamp(220px, 55vw, var(--biuro-full-h, 520px)); }
  .biuro-hero__dots { top: auto; bottom: 0.5rem; right: 50%; transform: translateX(50%); flex-direction: row; gap: 0.25rem; }
  .biuro-hero__hint { display: none; }
  .biuro-hero:not(.biuro-hero--static) .biuro-hero__intro { padding-bottom: 2.5rem; }
}

@media (max-width: 767.98px) {
  /* Rozmiar dopasowuje JS (fitWords): każde słowo na całą szerokość, max 26vw. */
  .biuro-hero__word { font-size: var(--biuro-word-size, clamp(2.25rem, 14.5vw, 4.5rem)); }
}

@media (max-width: 767.98px) {
  .biuro-gallery__track:not(.slick-initialized) > * { flex-basis: 100%; }
}

@media (max-width: 375px) {
  .page-template-page-biurowce #site-header .navbar-brand { min-width: 0; flex-shrink: 1; }
  .page-template-page-biurowce #site-header .navbar-brand img { width: 100%; max-width: 160px; height: auto; }
  .page-template-page-biurowce #site-header .header-top .gap-3 { gap: 0.5rem !important; flex-shrink: 0; }
}

/* ── Reveal przy scrollu ───────────────────────────────────────────────── */
/* Stany startowe tylko przy html.biuro-js (dokłada JS, pomija reduced-motion),
   więc bez JavaScriptu wszystko jest widoczne od razu. */

html.biuro-js [data-biuro-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--biuro-ease),
    transform 0.9s var(--biuro-ease);
  transition-delay: calc(var(--biuro-i, 0) * 0.12s);
}

html.biuro-js [data-biuro-reveal].is-inview {
  opacity: 1;
  transform: none;
}

/* Zoom: kontener wchodzi fade-upem, obraz w środku dojeżdża ze skali 1.08 */
html.biuro-js [data-biuro-reveal="zoom"] { overflow: hidden; }

html.biuro-js [data-biuro-reveal="zoom"] img,
html.biuro-js [data-biuro-reveal="zoom"] .biuro-kafle__bg {
  transform: scale(1.08);
  transition: transform 1.4s var(--biuro-ease);
  transition-delay: calc(var(--biuro-i, 0) * 0.12s);
}

html.biuro-js [data-biuro-reveal="zoom"].is-inview img,
html.biuro-js [data-biuro-reveal="zoom"].is-inview .biuro-kafle__bg { transform: none; }

/* Kafle S7 mają własny hover-zoom — po reveal wraca normalna transition */
html.biuro-js .biuro-kafle__item.is-inview .biuro-kafle__bg { transition: transform 0.6s var(--biuro-ease); }

/* Wipe: kolorowy box odsłania się od strony kafla. Zasłona to ::after w kolorze
   tła strony, która kurczy się do zera — sam box zostaje pełnowymiarowy, więc
   IntersectionObserver widzi go normalnie (clip-path na elemencie by to psuł). */
html.biuro-js [data-biuro-reveal="wipe"] {
  transform: none;
  opacity: 1;
  position: relative;
}

html.biuro-js [data-biuro-reveal="wipe"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 1s var(--biuro-ease) 0.15s;
  pointer-events: none;
}

html.biuro-js .biuro-przestrzen--left [data-biuro-reveal="wipe"]::after { transform-origin: right center; }

html.biuro-js [data-biuro-reveal="wipe"].is-inview::after { transform: scaleX(0); }

html.biuro-js [data-biuro-reveal="wipe"] p {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--biuro-ease) 0.7s, transform 0.7s var(--biuro-ease) 0.7s;
}

html.biuro-js [data-biuro-reveal="wipe"].is-inview p { opacity: 1; transform: none; }

/* Podpis kafla „PRZESTRZEŃ BIUROWA”: każda linia wychodzi spod maski, z opóźnieniem po zoomie */
.biuro-line { display: block; overflow: hidden; }
.biuro-line > span { display: block; }

html.biuro-js .biuro-przestrzen__tile .biuro-line > span {
  transform: translateY(110%);
  transition: transform 0.9s var(--biuro-ease);
}

html.biuro-js .biuro-przestrzen__tile .biuro-line:nth-child(1) > span { transition-delay: 0.45s; }
html.biuro-js .biuro-przestrzen__tile .biuro-line:nth-child(2) > span { transition-delay: 0.6s; }
html.biuro-js .biuro-przestrzen__tile .biuro-line:nth-child(3) > span { transition-delay: 0.75s; }

html.biuro-js .biuro-przestrzen__tile.is-inview .biuro-line > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .biuro-page *, .biuro-page *::before, .biuro-page *::after {
    animation: none !important;
    transition: none !important;
  }
  html.biuro-js [data-biuro-reveal],
  html.biuro-js [data-biuro-reveal] img,
  html.biuro-js [data-biuro-reveal] p,
  html.biuro-js .biuro-line > span { opacity: 1; transform: none; }
  html.biuro-js [data-biuro-reveal="wipe"]::after { display: none; }
  .biuro-kafle__item:hover .biuro-kafle__bg { transform: none; }
}

/* ── Listy z pomarańczowym „ptaszkiem” (COBOUW 2026-10-30) ────────────────
   Dotyczy list z edytora w sekcjach tekstowych, kolumnach, FAQ i CTA tej
   podstrony — redaktor nie musi niczego zaznaczać. Poza .biuro-page listy
   serwisu zostają bez zmian. Ikona to maska SVG kolorowana tłem (#ff4200). */
.biuro-page :is(.modul-tekst-prosty__tresc, .biuro-cols__col, .biuro-przestrzen__text, .biuro-txtimg__text, .modul-tabela__tekst, .biuro-spacer__text, .accordion-body) ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 1.25rem;
}

.biuro-page :is(.modul-tekst-prosty__tresc, .biuro-cols__col, .biuro-przestrzen__text, .biuro-txtimg__text, .modul-tabela__tekst, .biuro-spacer__text, .accordion-body) ul > li {
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 0.85rem;
}

.biuro-page :is(.modul-tekst-prosty__tresc, .biuro-cols__col, .biuro-przestrzen__text, .biuro-txtimg__text, .modul-tabela__tekst, .biuro-spacer__text, .accordion-body) ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 1.25em;
  height: 1.25em;
  background-color: var(--biuro-orange);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.2 5.2L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5.2 5.2L20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Hero: tekst do lewej, szerszy blok tekstu (COBOUW 2026-10-30) ─────────
   Klatka 0: lead wyrównany do lewej, równo z nagłówkiem (desktop i tablet).
   Klatki 1…n: opis do 75% szerokości kontenera na desktopie. */
@media (min-width: 768px) {
  .biuro-hero__lead {
    align-self: flex-start;
    max-width: 42rem;
    text-align: left;
  }
}

@media (min-width: 992px) {
  .biuro-hero__lead { max-width: 75%; }

  .biuro-hero__desc {
    grid-template-columns: max-content minmax(0, 1fr);
    width: 75%;
  }
}

/* ── Sekcje: nadtytuł, wyróżniony nagłówek, tekst + obraz ─────────────────── */
.biuro-section__kicker {
  margin: 0 0 0.75rem;
  color: var(--biuro-orange);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.biuro-naglowek__title {
  position: relative;
  margin: 0;
  padding-top: 1.5rem;
  font-size: clamp(2.1rem, 4.6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #1c1c1c;
}

.biuro-naglowek__title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4.5rem;
  height: 0.4rem;
  background: var(--biuro-orange);
}

.biuro-txtimg--gray { background: #f4f4f4; }

.biuro-txtimg__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.biuro-txtimg__body { color: #333; line-height: 1.7; }
.biuro-txtimg__text > :last-child { margin-bottom: 0; }

.biuro-txtimg__media { margin: 0; }
.biuro-txtimg__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}

@media (min-width: 992px) {
  .biuro-txtimg--image_left .biuro-txtimg__media { order: -1; }
}

@media (max-width: 991.98px) {
  .biuro-txtimg__grid { grid-template-columns: 1fr; }
}

/* Tabela porównawcza na jasnoszarym tle */
.biuro-page .modul-tabela { background: #f4f4f4; }

/* Wirtualny spacer: tytuł + pierwszy akapit po lewej, reszta po prawej, góra w jednej linii */
.biuro-spacer__head { align-items: start; }
.biuro-spacer__lead .biuro-section__title { margin-bottom: 1rem; }
.biuro-spacer__head > .biuro-spacer__text { padding-top: 0; }

/* Stopka: pierwszy rząd w szarości (jak na GW i Karierze) — reguła tutaj, żeby jechała
   razem ze stroną Biurowce i nie wymagała zmiany wspólnego cobouw.css. */
.page-template-page-biurowce .footer--first-row { background: #737373; }

/* Hero: tytuły klatek 1…n (KONCEPCJA, PROJEKT, WIZJA, REALIZACJA) o 20% mniejsze;
   napis intro (BIUROWCE) bez zmian. Opis podciąga się wtedy wyżej, na jasne tło
   nad budynkiem (COBOUW 2026-11-03). */
.biuro-hero__slide:not(.biuro-hero__slide--intro) .biuro-hero__word {
  font-size: calc(clamp(2rem, 9.5vw, 11.5rem) * 0.8);
}

@media (max-width: 767.98px) {
  .biuro-hero__slide:not(.biuro-hero__slide--intro) .biuro-hero__word {
    font-size: calc(var(--biuro-word-size, clamp(2.25rem, 14.5vw, 4.5rem)) * 0.8);
  }
}

/* Tabela w stylu BIM (moduł bim_table): jej style używają zmiennych zdefiniowanych
   tylko na kontenerze .bim-page — tutaj te same wartości na .biuro-page. */
.biuro-page {
  --bim-orange: #ff4f00;
  --bim-black: #090909;
}
