.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: all;
}

body.lightbox-active header::before {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.lightbox-content {
  position: relative;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrapper {
  position: relative;
  width: 100%;
}

.lightbox-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 1rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.lightbox-overlay-image {
  position: absolute;
  inset: 0;
  object-fit: cover;
  border-radius: inherit;
  mix-blend-mode: multiply;
  opacity: 0.75;
  pointer-events: none;
}

.lightbox-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-control:hover {
  background: rgba(255, 255, 255, 0.35);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
}
