/* ===== LIGHTBOX (AUTO GENERATED) ===== */
#global-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  padding: 20px;
}

/* show */
#global-lightbox.active {
  display: flex;
  text-align: center;
}

/* image */
#global-lightbox img {
  max-width: 90%;
  max-height: 75vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* caption */
#global-lightbox .caption {
  margin-top: 12px;
  color: #fff;
  text-align: center;
  max-width: 600px;
  font-size: 14px;
}

/* close */
#global-lightbox::after {
  content: "×";
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
}

/* ===== UX IMPROVE ===== */
figure img {
  cursor: zoom-in;
  transition: 0.2s;
}

figure img:hover {
  transform: scale(1.03);
}



/* ===== LIGHTBOX (FIXED CENTER) ===== */
#global-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}

#global-lightbox.active {
  display: flex;
  text-align: center;
}

#global-lightbox img {
  display: block;
  margin: 0 auto;
  max-width: min(90vw, 1000px);
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#global-lightbox .caption {
  margin-top: 12px;
  color: #fff;
  text-align: center;
  max-width: 600px;
  font-size: 14px;
}

#global-lightbox::after {
  content: "×";
  position: fixed;
  top: 20px;
  right: 25px;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
}

figure img {
  cursor: zoom-in;
  transition: 0.2s;
}

figure img:hover {
  transform: scale(1.03);
}