.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  background: rgba(6, 10, 18, 0.94);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(201, 163, 90, 0.22);
  color: rgba(244, 248, 255, 0.96);
}

.gallery-lightbox__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.gallery-lightbox__counter {
  font-size: 0.82rem;
  color: rgba(204, 216, 232, 0.82);
}

.gallery-lightbox__close {
  border: 1px solid rgba(201, 163, 90, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  cursor: pointer;
}

.gallery-lightbox__stage {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 1rem 3.5rem;
}

.gallery-lightbox__media {
  max-width: min(96vw, 1280px);
  max-height: calc(100vh - 8rem);
}

.gallery-lightbox__media img,
.gallery-lightbox__media video {
  display: block;
  max-width: min(96vw, 1280px);
  max-height: calc(100vh - 8rem);
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox__caption {
  margin: 0.75rem 0 0;
  max-width: 64ch;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(204, 216, 232, 0.88);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 163, 90, 0.35);
  background: rgba(8, 14, 24, 0.72);
  color: #f4f8ff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-lightbox__nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gallery-lightbox__nav--prev { left: 0.75rem; }
.gallery-lightbox__nav--next { right: 0.75rem; }

html[data-theme="executive-light"] .gallery-lightbox {
  background: rgba(247, 245, 241, 0.96);
}

html[data-theme="executive-light"] .gallery-lightbox__toolbar {
  color: var(--text-strong);
  border-bottom-color: var(--khb-line);
}

html[data-theme="executive-light"] .gallery-lightbox__counter,
html[data-theme="executive-light"] .gallery-lightbox__caption {
  color: var(--text-muted);
}

html[data-theme="executive-light"] .gallery-lightbox__close,
html[data-theme="executive-light"] .gallery-lightbox__nav {
  border-color: var(--khb-line-strong);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text-strong);
}
