.gallery-page {
  background: #fff;
  color: #1e1e1e;
}

.gallery-hero {
  position: relative;
  min-height: 58vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.gallery-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-hero .background {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.58) 0%, rgba(16, 16, 16, 0.45) 100%);
}

.gallery-hero .container {
  position: relative;
  z-index: 2;
}

.gallery-hero__content {
  max-width: 760px;
  color: #fff;
  padding: 3rem 0;
}

.gallery-hero__eyebrow {
  margin: 0 0 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.8rem;
  opacity: 0.95;
}

.gallery-hero__content h1 {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 1.08;
}

.gallery-hero__content p {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 64ch;
}

.gallery-section {
  padding: 5rem 0;
}

.gallery-section + .gallery-section {
  padding-top: 0;
}

.gallery-title {
  margin-bottom: 2rem;
}

.gallery-title h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.7vw, 2.15rem);
  letter-spacing: -0.01em;
}

.gallery-title p {
  margin: 0.65rem 0 0;
  max-width: 72ch;
  color: #5f5a53;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-card {
  grid-column: span 4;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #e8e2d8;
  box-shadow: 0 14px 34px rgba(25, 20, 14, 0.12);
}

.gallery-card--wide {
  grid-column: span 6;
}

.gallery-card--tall {
  grid-row: span 2;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  display: block;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1rem 0.95rem;
  font-size: 0.92rem;
  color: #fff;
  background: linear-gradient(180deg, transparent 0%, rgba(16, 16, 16, 0.68) 100%);
}

.gallery-card:hover img {
  transform: scale(1.04);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(5, 8, 14, 0.86);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0 0.5rem;
  pointer-events: auto;
}

.gallery-lightbox__frame {
  flex: 0 1 auto;
  max-width: min(1100px, calc(92vw - 120px));
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__frame img {
  width: auto;
  max-width: 100%;
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  object-fit: contain;
  background: #fff;
  vertical-align: middle;
}

.gallery-lightbox__nav {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.32);
}

.gallery-lightbox__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.gallery-lightbox__close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
}

.gallery-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.35);
}

#gallery-marquee-root .slider {
  overflow: hidden;
  width: 100%;
  background-color: #ffffff;
  position: relative;
}

#gallery-marquee-root .slider .slider-track {
  display: flex;
  gap: 24px;
  width: max-content;
  will-change: transform;
  animation: gallery-marquee-scroll 32s linear infinite;
}

@keyframes gallery-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

#gallery-marquee-root .slider .slide {
  flex: 0 0 auto;
  width: 120px;
  height: 100px;
}

#gallery-marquee-root .slider .slide img {
  border-radius: 10px;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 1024px) {
  .gallery-card,
  .gallery-card--wide {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .gallery-hero {
    min-height: 48vh;
  }

  .gallery-section {
    padding: 3.5rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .gallery-card,
  .gallery-card--wide {
    grid-column: span 1;
  }

  .gallery-card img {
    min-height: 220px;
  }

  .gallery-lightbox {
    padding: 0.65rem 0.5rem;
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  }

  .gallery-lightbox__inner {
    width: 100%;
    max-width: 100%;
    gap: 0;
    padding: 0;
  }

  .gallery-lightbox__nav {
    display: none;
  }

  .gallery-lightbox__frame {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .gallery-lightbox__frame img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 4.5rem);
    object-fit: contain;
  }

  .gallery-lightbox__close {
    top: max(0.5rem, env(safe-area-inset-top));
    right: max(0.5rem, env(safe-area-inset-right));
  }

}
