/* =========================================================================
   N-DESTINATION-GALLERY – Manual destination galleries
   ========================================================================= */

.n-destination-gallery {
  --ndg-columns: 3;
  --ndg-gap: 24px;
  --ndg-radius: 0px;
  width: 100%;
  padding-top: clamp(3.5rem, 7vw, 6.5rem);
}

.n-destination-gallery__inner {
  width: min(100%, var(--vf-max-width, 1500px));
  margin: 0 auto;
  padding: 0 var(--vf-section-gutter, clamp(1.5rem, 3vw, 4rem));
}

.n-destination-gallery__header {
  max-width: min(100%, 56rem);
  margin-bottom: clamp(2.75rem, 5vw, 4.5rem);
}

.n-destination-gallery__eyebrow,
.n-destination-gallery__intro,
.n-destination-gallery__tab,
.n-destination-gallery__lightbox-caption {
  font-family: var(--vf-font-body, 'Montserrat', sans-serif);
}

.n-destination-gallery__eyebrow {
  display: inline-block;
  margin-bottom: var(--vf-section-eyebrow-gap, 1.25rem);
  font-size: var(--vf-section-eyebrow-size, clamp(0.65rem, 0.9vw, 0.8rem));
  letter-spacing: var(--vf-tracking-wider, 0.25em);
  text-transform: uppercase;
  color: #8f755f;
}

.n-destination-gallery__heading,
.n-destination-gallery__panel-title {
  margin: 0;
  font-family: var(--vf-font-heading, 'Cormorant Garamond', serif);
  font-weight: 300;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--vf-color-primary, #1a1a1a);
}

.n-destination-gallery__heading {
  font-size: var(--vf-section-heading-size, clamp(2rem, 3.8vw, 3.9rem));
  letter-spacing: var(--vf-section-heading-tracking, 0.12em);
}

.n-destination-gallery__intro {
  margin: 1.2rem 0 0;
  font-size: var(--vf-section-copy-size, clamp(0.92rem, 1.1vw, 1rem));
  line-height: var(--vf-section-copy-line-height, 1.85);
  color: #4e4138;
}

.n-destination-gallery__tabs {
  display: inline-flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.n-destination-gallery__tab {
  appearance: none;
  border: 1px solid var(--vf-color-border, #e8e8e8);
  background: transparent;
  padding: 0.9rem 1.35rem;
  font-size: 0.72rem;
  letter-spacing: var(--vf-tracking-wider, 0.25em);
  text-transform: uppercase;
  color: var(--vf-color-primary, #1a1a1a);
  cursor: pointer;
  transition:
    background-color 0.28s ease,
    color 0.28s ease,
    border-color 0.28s ease;
}

.n-destination-gallery__tab:hover,
.n-destination-gallery__tab:focus-visible,
.n-destination-gallery__tab.is-active {
  background: var(--vf-color-primary, #1a1a1a);
  border-color: var(--vf-color-primary, #1a1a1a);
  color: #fff;
  opacity: 1;
  outline: none;
}

.n-destination-gallery__panel {
  display: none;
}

.n-destination-gallery__panel.is-active {
  display: block;
}

.n-destination-gallery__panel-header {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.n-destination-gallery__panel-title {
  font-size: clamp(1.45rem, 2.8vw, 2.4rem);
  letter-spacing: 0.08em;
}

.n-destination-gallery__grid {
  column-count: var(--ndg-columns);
  column-gap: var(--ndg-gap);
}

.n-destination-gallery__photo {
  display: block;
  width: 100%;
  margin: 0 0 var(--ndg-gap);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--ndg-radius);
  break-inside: avoid;
}

.n-destination-gallery__photo img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.n-destination-gallery__photo:hover img,
.n-destination-gallery__photo:focus-visible img {
  transform: scale(1.03);
}

.n-destination-gallery__lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.n-destination-gallery__lightbox[hidden] {
  display: none;
}

.n-destination-gallery__lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.86);
}

.n-destination-gallery__lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(92vw, 1200px);
  height: 100%;
  margin: 0 auto;
}

.n-destination-gallery__lightbox-stage {
  display: grid;
  place-items: center;
  min-height: 0;
}

.n-destination-gallery__lightbox-image {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.n-destination-gallery__lightbox-caption {
  margin: 1rem auto 0;
  max-width: 70ch;
  font-size: 0.78rem;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
}

.n-destination-gallery__lightbox-close,
.n-destination-gallery__lightbox-control {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.n-destination-gallery__lightbox-close {
  top: 2rem;
  right: 2rem;
  font-size: 1.7rem;
  line-height: 1;
}

.n-destination-gallery__lightbox-control {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
}

.n-destination-gallery__lightbox-control--prev {
  left: 1.5rem;
}

.n-destination-gallery__lightbox-control--next {
  right: 1.5rem;
}

@media (max-width: 767px) {
  .n-destination-gallery {
    --ndg-columns: 1;
  }

  .n-destination-gallery__lightbox-control {
    display: none;
  }

  .n-destination-gallery__lightbox-close {
    top: 1rem;
    right: 1rem;
  }
}
