/* ── Lightbox ── */
.wb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wb-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.wb-lightbox[aria-hidden="true"] {
  pointer-events: none;
}

.wb-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.wb-lightbox-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wb-lightbox-head {
  position: absolute;
  top: -50px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.wb-lightbox-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1.13;
}

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

.wb-lightbox-download {
  color: #fff;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}

.wb-lightbox-download:hover {
  opacity: 1;
}

.wb-lightbox-prev,
.wb-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 40px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
  line-height: 1;
}

.wb-lightbox-prev {
  left: -60px;
}
.wb-lightbox-next {
  right: -60px;
}

.wb-lightbox-prev:hover,
.wb-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
  .wb-lightbox-prev {
    left: 10px;
  }
  .wb-lightbox-next {
    right: 10px;
  }
}

.wb-lightbox-media {
  margin: 0;
  max-width: 100%;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wb-lightbox-media img,
.wb-lightbox-media video {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.wb-lightbox-media iframe {
  width: 853px;
  height: 480px;
  max-width: 90vw;
  max-height: 75vh;
  border: none;
  border-radius: 4px;
}

.wb-lightbox-caption {
  margin: 12px 0 0;
  color: #fff;
  font-size: 14px;
  text-align: center;
  font-weight: 400;
}

.wb-lightbox-footer {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.wb-lightbox-album-title {
  margin: 0;
  font-weight: 500;
  color: #fff;
}

.wb-lightbox-counter {
  font-weight: 400;
}

/* Slide animations */
.slide-left-out {
  animation: slideLeftOut 0.2s ease forwards;
}

.slide-left-in {
  animation: slideLeftIn 0.3s ease forwards;
}

.slide-right-out {
  animation: slideRightOut 0.2s ease forwards;
}

.slide-right-in {
  animation: slideRightIn 0.3s ease forwards;
}

.fade-out {
  animation: fadeOut 0.15s ease forwards;
}

@keyframes slideLeftOut {
  to {
    transform: translateX(-30px);
    opacity: 0;
  }
}

@keyframes slideLeftIn {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideRightOut {
  to {
    transform: translateX(30px);
    opacity: 0;
  }
}

@keyframes slideRightIn {
  from {
    transform: translateX(-30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}
