.container--gallery-page {
  max-width: min(1300px, 96vw);
  padding-inline: clamp(1.5em, 3vw, 2.75em);
}

.gallery-actions {
  display: flex;
  gap: 0.75em;
  justify-content: flex-start;
  margin-bottom: 1em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25em;
  margin-top: 1.5em;
}

.gallery-grid__item {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1.5px solid rgba(230, 210, 255, 0.45);
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  background: linear-gradient(135deg, rgba(54, 18, 92, 0.25), rgba(101, 45, 168, 0.15));
  box-shadow: 0 12px 30px rgba(16, 2, 37, 0.35);
  color: #fdf9ff;
  cursor: pointer;
}

.gallery-grid__item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  border: none;
  margin: 0;
}

.gallery-grid__label {
  display: block;
  padding: 0.9em 1em;
  text-align: left;
  font-weight: 650;
  text-shadow: 0 2px 6px rgba(16, 2, 37, 0.35);
  background: linear-gradient(180deg, rgba(12, 2, 28, 0.15), rgba(12, 2, 28, 0.32));
  border-top: 1px solid rgba(230, 210, 255, 0.35);
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 2, 28, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  padding: 1.5em;
}

.lightbox.open {
  display: flex;
}

.lightbox__card {
  background: linear-gradient(135deg, rgba(54, 18, 92, 0.85), rgba(101, 45, 168, 0.65));
  border-radius: 18px;
  border: 1.5px solid rgba(230, 210, 255, 0.55);
  box-shadow: 0 18px 42px rgba(16, 2, 37, 0.45);
  width: min(1400px, 96vw);
  padding: 1em 1.4em 1.25em;
  display: grid;
  gap: 0.8em;
}

.lightbox__header {
  display: flex;
  justify-content: flex-end;
}

.lightbox__body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 82vh;
}

.lightbox__body img {
  width: auto;
  height: auto;
  max-height: 82vh;
  max-width: calc(96vw - 6rem);
  object-fit: contain;
  border-radius: 12px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(2.5rem, 6vw, 3.5rem);
  height: clamp(2.5rem, 6vw, 3.5rem);
  border-radius: 999px;
  border: 1.5px solid rgba(230, 210, 255, 0.45);
  background: rgba(28, 8, 54, 0.6);
  box-shadow: 0 12px 24px rgba(16, 2, 37, 0.4);
  color: #fdf9ff;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 0;
}

.lightbox__nav--prev {
  left: clamp(-0.75rem, -1vw, -0.5rem);
}

.lightbox__nav--next {
  right: clamp(-0.75rem, -1vw, -0.5rem);
}

.lightbox__body:hover .lightbox__nav,
.lightbox__nav:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1.02);
}

.lightbox__caption {
  margin: 0;
  font-style: italic;
  text-align: center;
}

@media (max-width: 600px) {
  .gallery-grid__item img {
    height: 210px;
  }

  .lightbox__body img {
    max-height: 68vh;
  }
}
