/* Project detail galleries and their full-viewport image viewer. */
.prj-hero-link {
  display: block;
  height: 100%;
  cursor: zoom-in;
}
.prj-hero-link:focus-visible {
  outline-color: var(--accent);
  outline-offset: -6px;
}
#galeri {
  scroll-margin-top: 80px;
}

.gallery-shared .g-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
}
.gallery-shared .g-grid .figure {
  aspect-ratio: auto;
}
.gallery-shared .g-grid .g-landscape {
  grid-column: span 3;
}
.gallery-shared .g-grid .g-portrait {
  grid-column: span 2;
}
.gallery-shared .figure > picture,
.gallery-shared .figure img {
  display: block;
  height: auto;
}
.gallery-room {
  margin: clamp(24px, 4vw, 52px) 0 14px;
  color: var(--ink);
}
.gallery-shared .section-head + .gallery-room {
  margin-top: 0;
}

@media (max-width: 760px) {
  .gallery-shared .g-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-shared .g-grid .g-landscape {
    grid-column: 1 / -1 !important;
  }
  .gallery-shared .g-grid .g-portrait {
    grid-column: span 1 !important;
  }
}

body.project-gallery-locked {
  position: fixed;
  top: var(--gallery-scroll-offset);
  left: 0;
  right: 0;
  overflow: hidden;
}
.project-lightbox {
  z-index: 1050;
  background: #041014;
  touch-action: pan-y pinch-zoom;
}
.project-lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}
.project-lightbox button,
.project-lightbox .lb-idx {
  z-index: 1;
  background: rgba(4, 16, 20, 0.82);
  color: #f0f0f0;
}
.project-lightbox button {
  min-height: 44px;
  min-width: 44px;
}
.project-lightbox .lb-close {
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
}
.project-lightbox .lb-idx {
  max-width: calc(100% - 112px);
  padding: 7px 12px;
  text-align: center;
}
