body.home .pzw-gateway-shared .pzw-shared-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.pzw-shared-scene {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  aspect-ratio: 1448 / 816;
  transform: translate(-50%, -50%);
}
body.home .pzw-shared-scene img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  transition: opacity .35s ease, filter .35s ease;
}
.pzw-shared-base { filter: brightness(.82); }
.pzw-shared-domki {
  opacity: 0;
  mask-image: linear-gradient(82deg, #000 56%, transparent 65%);
}
.pzw-shared-willa {
  opacity: 0;
  mask-image: linear-gradient(82deg, transparent 56%, #000 65%);
}
.pzw-gateway-shared:has(.pzw-choice:focus-visible) .pzw-shared-base { filter: brightness(.55); }
.pzw-gateway-shared:has(.pzw-choice:first-child:focus-visible) .pzw-shared-domki,
.pzw-gateway-shared:has(.pzw-choice:last-child:focus-visible) .pzw-shared-willa { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .pzw-gateway-shared:has(.pzw-choice:hover) .pzw-shared-base { filter: brightness(.55); }
  .pzw-gateway-shared:has(.pzw-choice:first-child:hover) .pzw-shared-domki,
  .pzw-gateway-shared:has(.pzw-choice:last-child:hover) .pzw-shared-willa { opacity: 1; }
}
body.home .pzw-gateway-shared .pzw-choice::after { background: none; }
body.home .pzw-gateway-shared .pzw-choice:first-child { border: 0; }
.pzw-shared-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#0d181589, transparent 42%, transparent 72%, #0d181580);
}
@media (min-width: 768px) and (max-aspect-ratio: 1448/816) {
  body.home .pzw-gateway-shared .pzw-shared-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("pzw-assets/podglad-wspolne-zdjecie.png") center / cover;
    filter: blur(18px) brightness(.48);
    transform: scale(1.06);
  }
  .pzw-shared-scene {
    mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent);
  }
}
@media (max-width: 767px) {
  body.home .pzw-gateway-shared .pzw-choices {
    position: relative;
    padding-top: min(60dvh, calc(160px + 56vw));
    padding-bottom: 48px;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  body.home .pzw-gateway-shared .pzw-choice:first-child,
  body.home .pzw-gateway-shared .pzw-choice:last-child { padding: 4px 20px; }
  .pzw-gateway-shared .pzw-shared-scene {
    width: 100%;
    top: min(29dvh, 160px);
    transform: translateX(-50%);
  }
  body.home .pzw-gateway-shared .pzw-choice .pzw-choice-content { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body.home .pzw-shared-scene img { transition: none; }
}
@media (max-width: 767px) and (max-height: 670px) {
  body.home .pzw-gateway-shared .pzw-choice .pzw-choice-content { padding: 8px 16px; }
  body.home .pzw-gateway-shared .pzw-choice .pzw-choice-content h2 { font-size: 27px; }
  body.home .pzw-gateway-shared .pzw-choice .pzw-choice-content p { font-size: 10px; }
}

/* Telefon: logo nad zdjęciem, przyciski z niezależnymi odstępami. */
@media (max-width: 767px) {
  body.home:has(.pzw-gateway-shared) {
    --pzw-mobile-heading-height: clamp(176px, 22dvh, 204px);
    --pzw-mobile-logo-width: clamp(80px, 12dvh, 110px);
    --pzw-mobile-photo-height: calc(100vw * 816 / 1448);
    --pzw-mobile-card-height: 76px;
    --pzw-mobile-bottom-space: 64px;
  }
  body.home .pzw-gateway-shared {
    height: auto;
    min-height: 100dvh;
  }
  body.home .pzw-gateway-shared .pzw-home-logo {
    top: 40px;
    width: var(--pzw-mobile-logo-width);
  }
  body.home:has(.pzw-gateway-shared).page-template-template-front-page .site-content .site-main > .hentry .front-page-header-wrapper {
    top: calc(40px + var(--pzw-mobile-logo-width) * 256 / 485 + 6px);
    padding: 0 16px !important;
  }
  body.home:has(.pzw-gateway-shared) .front-page-header-wrapper .entry-title {
    font-size: 24px !important;
    line-height: 1.2 !important;
  }
  body.home:has(.pzw-gateway-shared) .front-page-header-wrapper .page-excerpt {
    margin-top: 8px !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
  }
  body.home .pzw-gateway-shared .pzw-shared-scene {
    top: var(--pzw-mobile-heading-height);
  }
  body.home .pzw-gateway-shared .pzw-choices {
    height: auto;
    min-height: max(100dvh, calc(var(--pzw-mobile-heading-height) + var(--pzw-mobile-photo-height) + 26px + 2 * var(--pzw-mobile-card-height) + var(--pzw-mobile-bottom-space)));
    padding-top: calc(var(--pzw-mobile-heading-height) + var(--pzw-mobile-photo-height) + 12px);
    padding-bottom: var(--pzw-mobile-bottom-space);
    grid-template-rows: repeat(2, max-content);
    align-content: center;
    row-gap: 14px;
  }
  body.home .pzw-gateway-shared .pzw-choice:first-child,
  body.home .pzw-gateway-shared .pzw-choice:last-child {
    height: auto;
    padding: 0 20px;
    overflow: visible;
  }
  body.home .pzw-gateway-shared .pzw-choice .pzw-choice-content {
    min-height: var(--pzw-mobile-card-height);
    padding: 8px 16px;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 12px;
  }
  body.home .pzw-gateway-shared .pzw-choice .pzw-choice-content h2 {
    font-size: clamp(26px, 4dvh, 36px);
    line-height: 1.15;
    margin-bottom: 4px;
  }
  body.home .pzw-gateway-shared .pzw-choice .pzw-choice-content p {
    font-size: 10px;
    line-height: 1.4;
  }
  body.home .pzw-gateway-shared .pzw-choice-next { width: 38px; height: 38px; font-size: 33px; }
  body.home .pzw-gateway-shared .pzw-gateway-location { display: block; bottom: 12px; }
}
@media (max-width: 374px) {
  body.home:has(.pzw-gateway-shared) {
    --pzw-mobile-heading-height: 200px;
    --pzw-mobile-logo-width: 80px;
  }
}
@media (max-width: 359px) {
  body.home:has(.pzw-gateway-shared) {
    --pzw-mobile-card-height: 64px;
    --pzw-mobile-bottom-space: 20px;
  }
  body.home .pzw-gateway-shared .pzw-choice .pzw-choice-content { padding: 6px 14px; }
  body.home .pzw-gateway-shared .pzw-choice .pzw-choice-content h2 { font-size: 25px; }
  body.home .pzw-gateway-shared .pzw-gateway-location { display: none; }
}
