:root {
  --lightbox-overlay: rgba(5, 16, 31, 0.88);
  --lightbox-surface: rgba(255, 255, 255, 0.05);
  --lightbox-text: #ffffff;
}

.gallery-item {
  display: block;
}

.gallery-item img {
  box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.2s ease;
}

.gallery-item:hover img {
  box-shadow: 0 1rem 1rem rgba(0, 0, 0, 0.35);
  transform: scale(1.05);
}

.gallery-img {
  aspect-ratio: 4 / 4;
  object-fit: cover;
  width: 100%;
}

.lightbox-modal {
  background: var(--lightbox-overlay);
  z-index: 2000 !important;
}

.lightbox-modal .modal-dialog {
  height: 100vh;
  margin: 0;
  max-width: none;
  width: 100vw;
}

.lightbox-modal .modal-content {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 100vh;
}

.lightbox-modal .modal-body {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 5rem 6rem 3rem;
}

.lightbox-modal .lightbox-content {
  width: 100%;
}

.lightbox-stage {
  align-items: center;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
}

.lightbox-figure {
  margin: 0;
  text-align: center;
}

.lightbox-image {
  background: var(--lightbox-surface);
  border-radius: 18px;
  display: block;
  margin: 0 auto;
  max-height: calc(100vh - 12rem);
  max-width: 100%;
  object-fit: contain;
}

.lightbox-caption {
  color: var(--lightbox-text);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  margin-top: 1rem;
  text-align: center;
}

.lightbox-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 2.5rem;
  height: 64px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  width: 64px;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.04);
}

.lightbox-nav span {
  display: inline-block;
  transform: translateY(-2px);
}

.lightbox-modal .btn-close,
.btn-fullscreen-enlarge,
.btn-fullscreen-exit {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  opacity: 1;
  position: fixed;
  top: 1.25rem;
  z-index: 2010;
}

.lightbox-modal .btn-close {
  align-items: center;
  display: inline-flex;
  filter: none;
  font-size: 1.1rem;
  height: 46px;
  justify-content: center;
  padding: 0;
  right: 1.25rem;
  width: 46px;
}

.lightbox-modal .btn-close::before {
  content: "\00d7";
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.lightbox-modal .btn-close::after {
  display: none;
}

.btn-fullscreen-enlarge,
.btn-fullscreen-exit {
  font-size: 1.1rem;
  height: 46px;
  justify-content: center;
  padding: 0;
  right: 4.5rem;
  width: 46px;
}

.bi {
  display: inline-block;
  fill: currentcolor;
  height: 1em;
  vertical-align: -0.035em;
  width: 1em;
}

@media (max-width: 991.98px) {
  .lightbox-modal .modal-body {
    padding: 5rem 1rem 2rem;
  }

  .lightbox-stage {
    gap: 0.8rem;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .lightbox-nav {
    font-size: 2rem;
    height: 48px;
    width: 48px;
  }

  .lightbox-image {
    max-height: calc(100vh - 11rem);
  }
}

@media (max-width: 575.98px) {
  .lightbox-modal .modal-body {
    padding: 5.5rem 0.75rem 1.5rem;
  }

  .lightbox-stage {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .lightbox-nav {
    font-size: 1.8rem;
    height: 40px;
    width: 40px;
  }

  .lightbox-caption {
    font-size: 0.92rem;
  }
}
