/* Photo gallery grid, arrows, pagination dots */

.gallery {
  padding: 9rem 0 9rem;
  max-width: 1280px;
  margin: 0 auto;
}
.gallery-head {
  padding: 0 3.2rem;
  margin-bottom: 3.4rem;
}
.gallery-head {
  text-align: center;
}
.gallery-head .section-sub {
  margin: 1.1rem auto 0;
  max-width: 520px;
}
.gallery-stage {
  position: relative;
  padding: 0 3.2rem;
}
.gallery-rows {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.gallery-row {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.gallery-row::-webkit-scrollbar {
  display: none;
  height: 0;
}
.gallery-track {
  display: flex;
  gap: 1.1rem;
  padding-right: 1.1rem;
}
.gallery-slide {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3.6;
  border-radius: 0;
  background: var(--surface);
  scroll-snap-align: start;
  flex-shrink: 0;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) saturate(0.85);
  transition: filter 0.6s ease;
}
.gallery-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(21, 15, 11, 0.55) 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(21, 15, 11, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(247, 241, 230, 0.16);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition:
    background 0.45s var(--ease-out),
    border-color 0.45s var(--ease-out),
    color 0.45s var(--ease-out),
    transform 0.45s var(--ease-out);
}
.gallery-arrow:active {
  transform: translateY(-50%) scale(0.96);
}
.gallery-arrow.prev {
  left: 1.35rem;
}
.gallery-arrow.next {
  right: 1.35rem;
}
.gallery-arrow svg {
  width: 22px;
  height: 22px;
  display: block;
}
.gallery-arrow.prev svg {
  transform: translateX(-1px);
}
.gallery-arrow.next svg {
  transform: translateX(1px);
}
.gallery-arrow svg path {
  stroke: currentColor;
  stroke-width: 2.9;
  fill: none;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}
.gallery-arrow:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}
.gallery-dots {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 2rem;
}
.gallery-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--surface-hi);
  cursor: pointer;
  padding: 0;
  transition:
    background 0.35s ease,
    transform 0.35s ease;
  position: relative;
}
.gallery-dots button::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}
.gallery-dots button.active {
  background: var(--gold);
  transform: scale(1.2);
}
.gallery-dots button:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-slide:hover img {
    filter: brightness(0.92) saturate(1);
  }
  .gallery-slide:hover::after {
    opacity: 1;
  }
  .gallery-arrow:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--espresso);
    transform: translateY(-50%) scale(1.06);
  }
  .gallery-dots button:hover:not(.active) {
    background: var(--cream-faint);
  }
}
