/* ---------- "View the full gallery" row ---------- */
.tour__more {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(-2rem, -3vw, -1rem);
}

.tour__more-rule {
  flex: 1;
  height: 1px;
  background: var(--color-gold);
}

.tour__more .btn {
  padding: 1.1rem 1.9rem;
  font-size: 1.05rem;
}

.tour__more-count {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgb(251 244 230 / 0.2);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ---------- Photos that open the gallery ---------- */
.is-zoomable {
  cursor: zoom-in;
}

.arch img.is-zoomable,
.room-card img.is-zoomable {
  transition: filter var(--duration-normal) ease;
}

.arch img.is-zoomable:hover,
.room-card img.is-zoomable:hover {
  filter: brightness(1.06) saturate(1.05);
}

.hero:not(.is-collapsed) .hero__photo {
  cursor: default;
}

.has-gallery-open {
  overflow: hidden;
}

/* ---------- The gallery itself ---------- */
.gallery {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--color-cream);
  background:
    radial-gradient(ellipse at 50% 0%, rgb(184 145 74 / 0.18), transparent 60%),
    #21140b;
}

.gallery[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  animation: gallery-in 320ms var(--ease-out-expo);
}

.gallery::backdrop {
  background: rgb(20 12 6 / 0.7);
}

@keyframes gallery-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
}

.gallery__bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem var(--gutter);
}

.gallery__title {
  font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem);
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.gallery__count {
  margin: 0 0 0 auto;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: var(--color-gold-light);
}

.gallery__close,
.gallery__nav {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid rgb(251 244 230 / 0.3);
  border-radius: 50%;
  background: rgb(251 244 230 / 0.08);
  color: var(--color-cream);
  cursor: pointer;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}

.gallery__close:hover,
.gallery__nav:hover {
  background: var(--color-cream);
  color: var(--color-walnut);
}

.gallery__close:active,
.gallery__nav:active {
  transform: scale(0.94);
}

.gallery__close svg,
.gallery__nav svg {
  width: 1.3rem;
  height: 1.3rem;
}

.gallery__stage {
  position: relative;
  min-height: 0;
}

.gallery__track {
  display: flex;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

.gallery__slide {
  flex: 0 0 100%;
  display: grid;
  place-items: center;
  padding: 0 clamp(1rem, 8vw, 7.5rem);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.gallery__slide figure {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  margin: 0;
  max-height: 100%;
}

.gallery__slide img {
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 14rem);
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.7);
}

.gallery__slide figcaption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-gold-light);
}

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.gallery__nav:active {
  transform: translateY(-50%) scale(0.94);
}

.gallery__nav--prev {
  left: var(--gutter);
}

.gallery__nav--next {
  right: var(--gutter);
}

.gallery__thumbs {
  display: flex;
  justify-content: safe center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.9rem var(--gutter) 1.25rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gallery__thumbs li {
  flex: none;
}

.gallery__thumb {
  display: block;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.45rem;
  background: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.gallery__thumb:hover {
  opacity: 0.85;
}

.gallery__thumb[aria-current="true"] {
  opacity: 1;
  border-color: var(--color-gold-light);
}

.gallery__thumb img {
  width: 5.5rem;
  height: 3.6rem;
  object-fit: cover;
  border-radius: 0.3rem;
}

@media (max-width: 640px) {
  /* Swipe instead of arrows on phones */
  .gallery__nav {
    display: none;
  }

  .gallery__slide {
    padding: 0 0.75rem;
  }

  .gallery__thumb img {
    width: 4.25rem;
    height: 2.9rem;
  }

  .tour__more {
    flex-direction: column;
    margin-top: 0;
  }

  .tour__more-rule {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery[open] {
    animation: none;
  }
}
