/* ==========================================================================
   Sagar Interior Work — photos.css
   Real-photos page: image fade-in + full-screen lightbox viewer.
   Old-browser friendly: fallbacks precede custom properties.
   ========================================================================== */

/* ---------- Photo tiles (fade in when loaded) ---------- */
.masonry-item .ph-img {
  opacity: 0;
  -webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.masonry-item.is-loaded .ph-img { opacity: 1; }
.masonry-item.is-hidden { display: none; }

/* ---------- Video tiles ---------- */
.masonry-item video.ph-img {
  width: 100%;
  height: auto;
  display: block;
  background: #070C16;
  background: var(--bg);
}
#lbVid {
  display: none;
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(96, 130, 190, 0.35);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  background: #070C16;
}

.photo-note {
  margin-top: 34px;
  text-align: center;
  font-size: 0.9rem;
  color: #93A3BF;
  color: var(--muted);
}

/* ---------- Empty state ---------- */
.gallery-empty { text-align: center; color: #93A3BF; padding: 40px 0 10px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 200;
  display: none;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  background: rgba(4, 8, 16, 0.95);
  padding: 24px;
}
.lightbox.is-open { display: -webkit-flex; display: flex; }

.lb-body {
  max-width: min(1100px, 92vw);
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  gap: 12px;
}
.lb-body img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid rgba(96, 130, 190, 0.35);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
.lb-caption { text-align: center; }
.lb-caption .masonry-cat { display: block; margin-bottom: 3px; }
.lb-title { color: #EAF0FB; color: var(--text); font-weight: 700; font-size: 1rem; }
.lb-empty-title { display: none; }

.lb-count {
  position: absolute;
  top: 20px;
  left: 26px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #93A3BF;
  color: var(--muted);
}

.lb-close,
.lb-nav {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(96, 130, 190, 0.4);
  background: rgba(13, 21, 38, 0.85);
  color: #EAF0FB;
  color: var(--text);
  -webkit-transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.lb-close:hover, .lb-nav:hover {
  border-color: rgba(245, 158, 11, 0.65);
  color: #FBBF24;
  background: rgba(245, 158, 11, 0.12);
}
.lb-close svg, .lb-nav svg { width: 22px; height: 22px; }

.lb-close { top: 18px; right: 20px; }
.lb-prev { left: 20px; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox { padding: 14px; }
  .lb-body img { max-height: 66vh; border-radius: 10px; }
  #lbVid { max-height: 66vh; border-radius: 10px; }
  .lb-count { top: 14px; left: 16px; }
  .lb-close { top: 10px; right: 12px; width: 42px; height: 42px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-nav { width: 42px; height: 42px; }
}
