/* Neshka Gallery — event gallery (tabs, Photos / Videos, lightbox).
   Brand: #0d0508 / #1a0b10 / #c9a55a / #f7f2ed · Cormorant Garamond + Jost.
   Uses the theme's custom properties when present, with fallbacks. */
.ngu-gallery,
.ngu-lb {
  --ngu-dark: var(--clr-dark, #0d0508);
  --ngu-dark-2: var(--clr-dark-2, #1a0b10);
  --ngu-dark-3: var(--clr-dark-3, #2a1218);
  --ngu-gold: var(--clr-gold, #c9a55a);
  --ngu-gold-lt: var(--clr-gold-lt, #e6c980);
  --ngu-cream: var(--clr-cream, #f7f2ed);
  --ngu-serif: var(--ff-serif, 'Cormorant Garamond', Georgia, serif);
  --ngu-sans: var(--ff-sans, 'Jost', system-ui, sans-serif);
  --ngu-ease: var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}
.ngu-gallery {
  position: relative;
  min-width: 0;
  margin: 0 0 1rem;
  color: var(--ngu-cream);
  font-family: var(--ngu-sans);
}
.ngu-gallery [hidden] { display: none !important; }
/* The theme's own grid / empty note are replaced by the event gallery. */
.ngu-gallery ~ .nsb-gallery-empty,
.ngu-gallery ~ .nsb-gallery-masonry { display: none !important; }

.ngu-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Event tabs (chips) ---------- */
.ngu-tabs-wrap {
  position: relative;
  margin: 0 0 2rem;
  min-width: 0;
}
.ngu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0;
  padding: 0;
}
.ngu-tab {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: .45rem 1.1rem;
  border: 1px solid rgba(201,165,90,.35);
  background: rgba(26,11,16,.6);
  color: var(--ngu-cream);
  font-family: var(--ngu-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.ngu-tab:hover { border-color: var(--ngu-gold); color: var(--ngu-gold); }
.ngu-tab:focus-visible { outline: 2px solid var(--ngu-gold); outline-offset: 3px; }
.ngu-tab[aria-selected="true"] {
  background: var(--ngu-gold);
  border-color: var(--ngu-gold);
  color: var(--ngu-dark);
}
.ngu-tab__count {
  min-width: 1.6em;
  padding: .1rem .4rem;
  border-radius: 999px;
  background: rgba(201,165,90,.16);
  color: var(--ngu-gold);
  font-size: .75rem;
  letter-spacing: .04em;
  text-align: center;
}
.ngu-tab[aria-selected="true"] .ngu-tab__count { background: rgba(13,5,8,.18); color: var(--ngu-dark); }
.ngu-tab.is-empty { opacity: .6; border-style: dashed; }

/* ---------- Event header ---------- */
.ngu-head {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0 0 1.8rem;
  padding: 0 0 1.6rem;
  border-bottom: 1px solid rgba(201,165,90,.16);
}
.ngu-head__cover {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  padding: 4px;
  border: 1px solid rgba(201,165,90,.5);
}
.ngu-head__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ngu-head__text { min-width: 0; }
.ngu-head__date {
  margin: 0 0 .45rem;
  color: var(--ngu-gold);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.ngu-head__title {
  margin: 0 0 .35rem;
  color: var(--ngu-cream);
  font-family: var(--ngu-serif);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.08;
}
.ngu-head__desc {
  margin: 0 0 .4rem;
  max-width: 46rem;
  color: rgba(247,242,237,.78);
  font-size: 1rem;
  line-height: 1.6;
}
.ngu-head__meta {
  margin: 0;
  color: rgba(247,242,237,.62);
  font-size: .8rem;
  letter-spacing: .08em;
}

/* ---------- Photos / Videos switch ---------- */
.ngu-switch {
  display: inline-flex;
  margin: 0 0 1.6rem;
  border: 1px solid rgba(201,165,90,.45);
}
.ngu-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  min-width: 44px;
  padding: .4rem 1.3rem;
  border: 0;
  background: transparent;
  color: rgba(247,242,237,.82);
  font-family: var(--ngu-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.ngu-switch__btn + .ngu-switch__btn { border-left: 1px solid rgba(201,165,90,.45); }
.ngu-switch__btn:hover { color: var(--ngu-gold); }
.ngu-switch__btn[aria-pressed="true"] { background: rgba(201,165,90,.16); color: var(--ngu-gold); }
.ngu-switch__btn:focus-visible { outline: 2px solid var(--ngu-gold); outline-offset: 2px; }
.ngu-switch__count { color: rgba(247,242,237,.6); font-size: .75rem; }

/* ---------- Grids ---------- */
.ngu-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.ngu-grid--photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ngu-grid--videos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem 1rem; }
.ngu-item { min-width: 0; margin: 0; }
.ngu-item__link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ngu-dark-2);
  border: 1px solid rgba(201,165,90,.12);
  color: inherit;
  text-decoration: none;
}
.ngu-item--photo .ngu-item__link { aspect-ratio: 4 / 5; cursor: zoom-in; }
.ngu-item__img,
.ngu-poster__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform .6s var(--ngu-ease);
}
.ngu-item__link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13,5,8,.5), transparent 50%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.ngu-item__link:hover .ngu-item__img,
.ngu-item__link:focus-visible .ngu-item__img,
.ngu-item__link:hover .ngu-poster__img,
.ngu-item__link:focus-visible .ngu-poster__img { transform: scale(1.02); }
.ngu-item__link:hover::after,
.ngu-item__link:focus-visible::after { opacity: 1; }
.ngu-item__link:focus-visible { outline: 2px solid var(--ngu-gold); outline-offset: 2px; }

/* Videos */
.ngu-item__link--video { aspect-ratio: 16 / 9; cursor: pointer; }
.ngu-poster { position: absolute; inset: 0; display: block; }
.ngu-poster__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 1rem 1.1rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(201,165,90,.28), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(139,58,82,.45), transparent 55%),
    var(--ngu-dark-3);
}
.ngu-poster__fallback--instagram {
  background:
    radial-gradient(circle at 30% 110%, rgba(253,186,80,.55), transparent 45%),
    radial-gradient(circle at 90% 0%, rgba(139,58,82,.75), transparent 55%),
    linear-gradient(135deg, #2a1218 0%, #4a1630 55%, #1a0b10 100%);
}
.ngu-poster__brand {
  color: rgba(247,242,237,.85);
  font-family: var(--ngu-serif);
  font-size: 1.3rem;
  font-style: italic;
}
.ngu-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border: 1px solid rgba(201,165,90,.85);
  border-radius: 50%;
  background: rgba(13,5,8,.62);
  color: var(--ngu-gold);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.ngu-play svg { margin-left: 3px; }
.ngu-item__link--video:hover .ngu-play,
.ngu-item__link--video:focus-visible .ngu-play { background: var(--ngu-gold); color: var(--ngu-dark); transform: scale(1.06); }
.ngu-badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  z-index: 1;
  padding: .2rem .5rem;
  background: rgba(13,5,8,.75);
  border: 1px solid rgba(201,165,90,.35);
  color: var(--ngu-cream);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ngu-item__title {
  margin: .6rem 0 0;
  color: rgba(247,242,237,.86);
  font-family: var(--ngu-serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* ---------- Empty state ---------- */
.ngu-empty {
  padding: 3rem 1.5rem;
  border: 1px dashed rgba(201,165,90,.3);
  background: rgba(201,165,90,.04);
  text-align: center;
}
.ngu-empty__title {
  margin: 0 0 .5rem;
  color: rgba(247,242,237,.85);
  font-family: var(--ngu-serif);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-style: italic;
}
.ngu-empty__sub { margin: 0; color: rgba(247,242,237,.62); font-size: .9rem; }

/* ---------- Lightbox ---------- */
html.ngu-lb-open { overflow: hidden; }
.ngu-lb {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  gap: .75rem;
  padding: clamp(3.75rem, 6vw, 4.5rem) clamp(.5rem, 2.5vw, 2rem) clamp(3.5rem, 5vw, 4rem);
  background: rgba(13,5,8,.985);
  color: var(--ngu-cream);
  font-family: var(--ngu-sans);
  opacity: 0;
  transition: opacity .22s ease;
}
.ngu-lb[hidden] { display: none; }
.ngu-lb.is-open { opacity: 1; }
.ngu-lb__stage {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  touch-action: pan-y pinch-zoom;
}
.ngu-lb__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
}
.ngu-lb__img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 10rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  user-select: none;
  -webkit-user-drag: none;
}
.ngu-lb__frame {
  position: relative;
  width: min(100%, calc((100dvh - 10rem) * 16 / 9), 1200px);
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.ngu-lb__frame--vertical {
  width: min(100%, calc((100dvh - 10rem) * 9 / 16), 420px);
  aspect-ratio: 9 / 16;
}
.ngu-lb__frame--instagram {
  width: min(100%, 440px);
  aspect-ratio: auto;
  height: min(calc(100dvh - 11rem), 760px);
  background: #fff;
}
.ngu-lb__frame iframe,
.ngu-lb__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
.ngu-lb__frame--instagram iframe { background: #fff; }
.ngu-lb__caption {
  margin: .9rem 0 0;
  max-width: 62ch;
  text-align: center;
  color: rgba(247,242,237,.85);
  font-size: .95rem;
  line-height: 1.5;
}
.ngu-lb__caption:empty { display: none; }
.ngu-lb__sub { display: block; margin-top: .2rem; color: var(--ngu-gold); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; }
.ngu-lb__out {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: .4rem;
  color: var(--ngu-gold);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ngu-lb__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(201,165,90,.45);
  background: rgba(13,5,8,.6);
  color: var(--ngu-gold);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.ngu-lb__btn:hover,
.ngu-lb__btn:focus-visible { background: var(--ngu-gold); color: var(--ngu-dark); outline: none; }
.ngu-lb__btn:focus-visible { box-shadow: 0 0 0 3px rgba(247,242,237,.6); }
.ngu-lb__btn[hidden] { display: none; }
.ngu-lb__close { position: absolute; top: clamp(.5rem, 2vw, 1.1rem); right: clamp(.5rem, 2vw, 1.1rem); z-index: 2; }
.ngu-lb__prev { grid-column: 1; grid-row: 1; }
.ngu-lb__next { grid-column: 3; grid-row: 1; }
.ngu-lb__count {
  position: absolute;
  left: 50%;
  bottom: clamp(.75rem, 2vw, 1.25rem);
  transform: translateX(-50%);
  margin: 0;
  color: rgba(247,242,237,.72);
  font-size: .8rem;
  letter-spacing: .16em;
}
.ngu-lb__spinner {
  width: 36px; height: 36px;
  border: 2px solid rgba(201,165,90,.25);
  border-top-color: var(--ngu-gold);
  border-radius: 50%;
  animation: ngu-spin .8s linear infinite;
}
@keyframes ngu-spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ngu-grid--photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ngu-grid--videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  /* Event chips become one horizontal swipe row. */
  .ngu-tabs-wrap { margin-bottom: 1.5rem; }
  .ngu-tabs-wrap::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 28px;
    background: linear-gradient(90deg, rgba(13,5,8,0), var(--ngu-dark));
    pointer-events: none;
  }
  .ngu-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0 28px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 28px;
  }
  .ngu-tabs::-webkit-scrollbar { display: none; }
  .ngu-tab { flex: 0 0 auto; scroll-snap-align: start; padding-inline: 1rem; }
  .ngu-head { gap: 1rem; align-items: flex-start; }
  .ngu-head__cover { width: 72px; height: 72px; padding: 3px; }
  .ngu-switch { display: flex; width: 100%; }
  .ngu-switch[hidden] { display: none !important; }
  .ngu-switch__btn { flex: 1 1 50%; justify-content: center; padding-inline: .6rem; }
}
@media (max-width: 599px) {
  .ngu-grid { gap: .6rem; }
  .ngu-grid--photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ngu-grid--videos { grid-template-columns: 1fr; gap: 1.2rem; }
  .ngu-lb { grid-template-columns: minmax(0, 1fr); padding: 3.75rem .5rem 4rem; }
  .ngu-lb__stage { grid-column: 1; }
  .ngu-lb__img { max-height: calc(100dvh - 10.5rem); }
  .ngu-lb__prev, .ngu-lb__next { position: absolute; bottom: .6rem; }
  .ngu-lb__prev { left: .6rem; }
  .ngu-lb__next { right: .6rem; }
  .ngu-lb__count { bottom: 1.4rem; }
  .ngu-lb__frame--instagram { height: calc(100dvh - 11.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .ngu-item__img, .ngu-poster__img, .ngu-lb, .ngu-play, .ngu-tab { transition: none; }
  .ngu-lb__spinner { animation-duration: 2s; }
}
