/* Lightbox for article images and carousels */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7, 26, 53, 0.92);
  backdrop-filter: blur(5px);
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  animation: lightboxFadeIn 0.3s ease-out;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  color: white;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  line-height: 1;
}

.lightbox-close {
  top: -50px;
  right: 0;
  font-size: 20px;
  width: 44px;
  height: 44px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  width: 50px;
  height: 50px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background-color: rgba(0, 0, 0, 0.75);
}

.lightbox-nav:hover {
  transform: translateY(-50%) scale(1.08);
}

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

.lightbox-caption {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  color: white;
  text-align: center;
  font-size: 14px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

@keyframes lightboxFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
  .lightbox-content { max-width: 95%; max-height: 85%; }
  .lightbox-close { top: -45px; font-size: 18px; width: 40px; height: 40px; }
  .lightbox-nav { font-size: 22px; width: 45px; height: 45px; }
  .lightbox-prev { left: -60px; }
  .lightbox-next { right: -60px; }
  .lightbox-caption { bottom: -45px; font-size: 13px; padding: 10px 14px; }
}

.image-gallery-index a { cursor: pointer; }
