/* ================================================================
   RSC LIGHTBOX — shared stylesheet
   ================================================================ */

/* Overlay */
.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(12,12,10,0.96);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}
.lb-overlay.is-open { display: flex; }

/* Image wrapper */
.lb-img-wrap {
  max-width: min(92vw, 1100px);
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.lb-img-wrap img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid rgba(240,227,205,0.14);
  display: block;
}

/* Caption — below the image, always visible */
.lb-caption {
  text-align: center;
  font-size: 13px;
  color: rgba(240,227,205,0.65);
  letter-spacing: 0.08em;
  max-width: min(92vw, 1100px);
  padding: 0 1rem;
  min-height: 1.5em;
  line-height: 1.5;
}

/* Counter */
.lb-counter {
  font-size: 11px;
  color: rgba(87,81,74,0.9);
  letter-spacing: 0.12em;
  background: rgba(12,12,10,0.7);
  padding: 3px 12px;
  border-radius: 20px;
}

/* Buttons */
.lb-btn {
  position: fixed;
  background: rgba(26,26,24,0.88);
  border: 1px solid rgba(240,227,205,0.14);
  color: #F0E3CB;
  width: 48px;
  height: 48px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
}
.lb-btn:hover { background: #E84E1B; border-color: #E84E1B; }
.lb-btn:focus-visible { outline: 2px solid #E84E1B; outline-offset: 3px; }
.lb-close { top: 1.25rem; right: 1.25rem; font-size: 1.5rem; }
.lb-prev  { top: 50%; left: 1.25rem;  transform: translateY(-50%); }
.lb-next  { top: 50%; right: 1.25rem; transform: translateY(-50%); }

/* Clickable image hint */
.lb-trigger {
  cursor: zoom-in;
  display: block;
  position: relative;
}
.lb-trigger::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12,12,10,0);
  transition: background 0.2s;
  pointer-events: none;
}
.lb-trigger:hover::after { background: rgba(12,12,10,0.18); }

/* Gallery thumbs (projects page style) */
.gallery-thumb {
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  display: block;
}
.gallery-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12,12,10,0);
  transition: background 0.25s;
  pointer-events: none;
}
.gallery-thumb:hover::after { background: rgba(12,12,10,0.25); }
.gallery-thumb:focus-visible { outline: 3px solid #E84E1B; outline-offset: 2px; }
.gallery-thumb:focus:not(:focus-visible) { outline: none; }
.gallery-zoom {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(12,12,10,0.7);
  border-radius: 2px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 1;
  pointer-events: none;
}
.gallery-thumb:hover .gallery-zoom,
.lb-trigger:hover .gallery-zoom { opacity: 1; }
.gallery-zoom svg { width: 14px; height: 14px; color: #F0E3CB; }

@media (max-width: 900px) {
  .lb-prev { left: 0.4rem; }
  .lb-next { right: 0.4rem; }
  .lb-close { top: 0.75rem; right: 0.75rem; }
}
@media (max-width: 640px) {
  .lb-img-wrap img { max-height: 70vh; }
}
