.gallery-page {
  background: #f4f4f4;
  color: #111;
  min-height: 100vh;
}

.gallery-page .hero-top-bar {
  position: relative;
  background: #050505;
}

.gallery-hero {
  background: #f4f4f4;
  padding: clamp(96px, 12vw, 160px) clamp(24px, 6%, 100px)
    clamp(48px, 6vw, 72px);
}

.gallery-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-hero-label {
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #09531b;
  margin: 0 0 20px;
  opacity: 0;
  transform: translateY(20px);
}

.gallery-hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(44px, 7.5vw, 96px);
  font-weight: 700;
  line-height: 0.95;
  margin: 0;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  opacity: 0;
  transform: translateY(36px);
}

.gallery-hero-title em {
  font-style: italic;
  font-weight: 400;
  color: #09531b;
}

.gallery-hero-desc {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(16px, 1.35vw, 21px);
  font-weight: 500;
  line-height: 1.55;
  color: #333;
  margin: clamp(22px, 2.8vw, 36px) 0 0;
  padding-top: 0;
  max-width: min(36em, 92vw);
  opacity: 0;
  transform: translateY(18px);
}

.gallery-wrap {
  max-width: 1700px;
  margin: 0 auto;
  padding: clamp(20px, 2.5vw, 36px) 1.5% 90px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  grid-auto-rows: clamp(165px, 15.8vw, 255px);
  gap: 8px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: #dcdcdc;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item {
  cursor: zoom-in;
}

.gallery-grid .gallery-item {
  grid-row: span 1;
}

.gallery-grid .gallery-item:nth-child(13n + 1) {
  grid-column: span 5;
}
.gallery-grid .gallery-item:nth-child(13n + 2) {
  grid-column: span 4;
}
.gallery-grid .gallery-item:nth-child(13n + 3) {
  grid-column: span 6;
}
.gallery-grid .gallery-item:nth-child(13n + 4) {
  grid-column: span 5;
}

.gallery-grid .gallery-item:nth-child(13n + 5) {
  grid-column: span 4;
}
.gallery-grid .gallery-item:nth-child(13n + 6) {
  grid-column: span 6;
}
.gallery-grid .gallery-item:nth-child(13n + 7) {
  grid-column: span 5;
}
.gallery-grid .gallery-item:nth-child(13n + 8) {
  grid-column: span 5;
}

.gallery-grid .gallery-item:nth-child(13n + 9) {
  grid-column: span 4;
}
.gallery-grid .gallery-item:nth-child(13n + 10) {
  grid-column: span 4;
}
.gallery-grid .gallery-item:nth-child(13n + 11) {
  grid-column: span 4;
}
.gallery-grid .gallery-item:nth-child(13n + 12) {
  grid-column: span 4;
}
.gallery-grid .gallery-item:nth-child(13n + 13) {
  grid-column: span 4;
}

@media (max-width: 980px) {
  .gallery-wrap {
    padding: 28px 5% 70px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: clamp(165px, 38vw, 255px);
    gap: 10px;
  }

  .gallery-grid .gallery-item {
    grid-column: span 1 !important;
  }
}

@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
  z-index: 3000;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox img {
  max-width: min(1400px, 92vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
