/* عارضُ الصور المكبَّر (lightbox.js) ومعرضُ صفحة التطبيق. */
/* استوديو عارض الصور المكبّر (Studio Lightbox Modal) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 10, 24, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fade 0.25s ease both;
}
.lb-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 95vw;
  max-height: 94vh;
}
.lb-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 16px;
  color: #fff;
  gap: 16px;
}
.lb-caption {
  font-size: var(--fs-base);
  font-weight: 700;
  color: #f1f5f9;
}
.lb-counter {
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.lb-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.lb-image {
  max-width: min(88vw, 420px);
  max-height: 80vh;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  border: 5px solid #1e293b;
  object-fit: contain;
}
.lb-btn {
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition);
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.3); transform: scale(1.08); }
.lb-close { width: 40px; height: 40px; flex-shrink: 0; }
.lb-prev, .lb-next {
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
}
.lb-prev { inset-inline-start: -68px; }
.lb-next { inset-inline-end: -68px; }

/* صفحة المشروع المفردة (project.php) إن طُلبت */
.gallery-head { margin: 48px 0 20px; }
.gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px 4px 28px;
  scrollbar-width: thin;
}
.gallery .shot {
  flex: 0 0 auto;
  scroll-snap-align: center;
  position: relative;
  cursor: zoom-in;
  padding: 0;
  border: 4px solid #0f172a;
  background: #090e1a;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  transition: transform .3s var(--ease-out);
}
.gallery .shot:hover { transform: translateY(-4px); }
.gallery .shot img {
  display: block;
  height: 320px;
  width: auto;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 768px) {
  .lb-prev { inset-inline-start: 12px; background: rgba(0, 0, 0, .6); }
  .lb-next { inset-inline-end: 12px; background: rgba(0, 0, 0, .6); }
  .gallery .shot img { height: 260px; }
}
