/* ================================
   TENANT GALLERY – 4 flex columns (masonry)
   Cropping ON
   ================================ */

.hp-tenant-gallery{
  width: 100%;
}

.hp-tenant-gallery-title{
  margin: 56px 0 22px;
  font-size: 28px;
  line-height: 1.2;
}

/* container - CSS columns pro masonry efekt */
.hp-masonry{
  width: 100%;
  column-count: 4;
  column-gap: 8px;
  column-fill: balance;
}

/* item as button - každá fotka je column item */
.hp-masonry-item{
  --ar: 1.333;
  --j: 1;

  width: 100%;
  margin: 0 0 8px 0;
  break-inside: avoid;
  page-break-inside: avoid;
  box-sizing: border-box;

  position: relative;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
  display: block;
}

/* wrapper pro obrázek s variabilní výškou - má fixní šířku a variabilní výšku */
.hp-masonry-item-wrapper{
  width: 100%;
  height: 0;
  position: relative;
  overflow: hidden;
  background: #eee;
  display: block;
  padding-top: calc(100% / var(--ar) * var(--j));
}

/* image fill + crop - vyplní celý wrapper */
.hp-masonry-item-wrapper img{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

/* poslední item bez mezery */
.hp-masonry-item:last-child{
  margin-bottom: 0;
}

/* Responsive - 3 sloupce na mobilu */
@media (max-width: 900px){
  .hp-masonry{
    column-count: 3;
  }
}
/* ================================
   Lightbox (modern, minimal) – FIX CLICK
   ================================ */

.hp-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.hp-lightbox.is-open{ display:block; }

/* backdrop dole */
.hp-lightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 0;
}

/* UI nad backdropem */
.hp-lightbox__ui{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none; /* ✅ defaultně nic nechytá klik */
}

/* stage je klikací (aby šly šipky/close) */
.hp-lightbox__stage{
  position: absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 18px 56px;
  overflow: hidden;
  pointer-events: auto; /* ✅ */
}

.hp-lightbox__img{
  max-width: min(1200px, 92vw);
  max-height: 82vh;
  width: auto;
  height: auto;
  display:block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

/* controls – absolutně nad vším */
.hp-lightbox__close,
.hp-lightbox__nav{
  position: absolute;
  z-index: 2;
  pointer-events: auto; /* ✅ tlačítka klikají */
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.35);
  color: #fff;
  cursor: pointer;
}

/* close */
.hp-lightbox__close{
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  font-size: 18px;
  line-height: 1;
}

/* nav */
.hp-lightbox__nav{
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 34px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
}

.hp-lightbox__prev{ left: 14px; }
.hp-lightbox__next{ right: 14px; }

/* meta/counter dole */
.hp-lightbox__meta{
  position: absolute;
  left: 0; right: 0;
  bottom: 14px;
  display:flex;
  justify-content:center;
  pointer-events: none;
  z-index: 2;
}
.hp-lightbox__counter{
  color: rgba(255,255,255,.82);
  font-size: 13px;
  letter-spacing: .04em;
}

/* mobile */
@media (max-width: 700px){
  .hp-lightbox__img{
    max-width: 92vw;
    max-height: 78vh;
  }
  .hp-lightbox__nav{
    width: 46px;
    height: 46px;
    font-size: 30px;
  }
}
