/* Gallery page — matched to hibachinow.com/gallery */

.hn-gallery-page {
  padding-bottom: 4rem;
}

.hn-gallery-page__intro {
  width: min(100% - 2rem, 80rem);
  margin: 0 auto;
  padding: 7.5rem 1rem 2.5rem;
  text-align: center;
}

.hn-gallery-page__intro h1 {
  margin: 0 0 1.5rem;
  color: #dc2626;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
}

.hn-gallery-page__intro > p {
  margin: 0 auto;
  max-width: 56rem;
  color: #525252;
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  line-height: 1.625;
}

.hn-gallery-page__body {
  width: min(100% - 2rem, 80rem);
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
}

.hn-gallery-page__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .hn-gallery-page__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .hn-gallery-page__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .hn-gallery-page__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hn-gallery-page__tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.5rem;
}

.hn-gallery-page__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0.5rem;
}

.hn-gallery-page__asset {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hn-gallery-page__tile:hover .hn-gallery-page__asset,
.hn-gallery-page__tile:focus-visible .hn-gallery-page__asset {
  transform: scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

.hn-gallery-page__hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.hn-gallery-page__tile:hover .hn-gallery-page__hover,
.hn-gallery-page__tile:focus-visible .hn-gallery-page__hover {
  background: rgba(0, 0, 0, 0.2);
  opacity: 1;
}

.hn-gallery-page__share {
  border-top: 1px solid #e5e7eb;
  padding-top: 2rem;
  text-align: center;
}

.hn-gallery-page__share h2 {
  margin: 0;
  color: #171717;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.hn-gallery-page__share > p {
  margin: 0.5rem auto 0;
  max-width: 42rem;
  color: #525252;
  font-size: 1rem;
  line-height: 1.625;
}

.hn-gallery-page__share-btn {
  margin-top: 1.25rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
}

/* Lightbox */
.hn-gallery-page__lightbox {
  padding: 0;
  border: 0;
  max-width: min(92vw, 56rem);
  max-height: 90vh;
  width: min(92vw, 56rem);
  background: transparent;
  color: #fff;
  overflow: visible;
}

.hn-gallery-page__lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.hn-gallery-page__stage {
  display: grid;
  place-items: center;
  min-height: 40vh;
}

.hn-gallery-page__stage img,
.hn-gallery-page__stage video {
  display: block;
  max-width: 92vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
  background: #111;
}

.hn-gallery-page__close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.hn-gallery-page__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hn-gallery-page__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.hn-gallery-page__nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hn-gallery-page__nav--prev { left: -3.25rem; }
.hn-gallery-page__nav--next { right: -3.25rem; }

@media (max-width: 860px) {
  .hn-gallery-page__nav--prev { left: 0.5rem; }
  .hn-gallery-page__nav--next { right: 0.5rem; }
  .hn-gallery-page__close { top: 0.5rem; right: 0.5rem; }
}
