.nw-lightbox-trigger {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  cursor: zoom-in;
}

.nw-lightbox-trigger:focus-visible {
  outline: 3px solid #8f008f;
  outline-offset: -5px;
}

/* Keep galleries moving during hover; pause only behind the enlarged view. */
html.nw-lightbox-open .gallery-column,
html.nw-lightbox-open [data-static-gallery-ticker] {
  animation-play-state: paused !important;
}

/* Match the contact dialog's lock: never fix the body or change its overflow,
   which would detach the sticky hero and planning sequence from the viewport. */
html.nw-lightbox-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.nw-lightbox {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  border: 0;
  background: #141416;
  color: #fff;
  font: 400 16px/1.45 "Switzer", "Inter Local", "Avenir Next", Arial, sans-serif;
  overscroll-behavior: contain;
  overflow: hidden;
}

.nw-lightbox:not([open]) { display: none; }
.nw-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; }
.nw-lightbox::backdrop { background: rgb(14 14 16 / 95%); }
.nw-lightbox *, .nw-lightbox *::before, .nw-lightbox *::after { box-sizing: border-box; }

.nw-lightbox__header {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nw-lightbox__title { margin: 0 auto 0 0; font-size: 17px; font-weight: 500; }
.nw-lightbox__counter { color: #d5d3d7; font-size: 14px; white-space: nowrap; }

.nw-lightbox__button {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 12px;
  background: #29282c;
  color: #fff;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.nw-lightbox__button:hover { background: #8f008f; }
.nw-lightbox__button:focus-visible { outline: 3px solid #d891da; outline-offset: 3px; }
.nw-lightbox__button[hidden] { display: none; }
.nw-lightbox__button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.nw-lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 64px;
  touch-action: pan-y pinch-zoom;
}

.nw-lightbox__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}

.nw-lightbox__image[hidden] { display: none; }
.nw-lightbox__status { position: absolute; padding: 20px; color: #dedce1; text-align: center; pointer-events: none; }
.nw-lightbox__controls { display: contents; }
.nw-lightbox__previous, .nw-lightbox__next { position: absolute; top: calc(50% - 24px); }
.nw-lightbox__previous { left: 0; }
.nw-lightbox__next { right: 0; }
.nw-lightbox__caption { margin: 0; color: #dedce1; font-size: 15px; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .nw-lightbox { padding-inline: max(12px, env(safe-area-inset-left)); }
  .nw-lightbox[open] { gap: 10px; }
  .nw-lightbox__stage { grid-template-rows: minmax(0, 1fr) auto; gap: 12px; padding: 0; }
  .nw-lightbox__controls { display: flex; justify-content: center; gap: 14px; }
  .nw-lightbox__previous, .nw-lightbox__next { position: static; }
  .nw-lightbox__caption { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-nw-lightbox-gallery] .gallery-column { animation: none !important; }
  .nw-lightbox__button { transition: none; }
}
