/* ── Case page gallery + lightbox ─────────────────────────────── */

.case-gallery { padding: 64px 0 80px; }
.case-gallery__title {
  font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 32px;
}

/* Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-grid--featured .gallery-thumb:first-child {
  grid-column: 1 / -1;
}

.gallery-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: zoom-in;
  background: #111;
  aspect-ratio: 16/10;
}
.gallery-grid--featured .gallery-thumb:first-child {
  aspect-ratio: 16/7;
}

.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  display: block;
  transition: transform .5s ease, filter .4s ease;
}
.gallery-thumb:hover img {
  transform: scale(1.04);
  filter: brightness(1.08);
}

.gallery-thumb__label {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 55%);
  color: #fff;
  font-size: 12px; font-weight: 600;
  letter-spacing: .04em;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.gallery-thumb:hover .gallery-thumb__label { opacity: 1; }

/* ── Lightbox ─────────────────────────────────────────────────── */

.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox.is-open {
  opacity: 1; pointer-events: auto;
}

.lightbox__img-wrap {
  position: relative;
  max-width: min(90vw, 1280px);
  max-height: 88vh;
  display: flex; flex-direction: column; align-items: center;
}
.lightbox__img {
  max-width: 100%; max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
  user-select: none;
}
.lightbox__caption {
  margin-top: 14px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.55);
  letter-spacing: .04em;
  text-align: center;
}
.lightbox__counter {
  font-size: 11px; color: rgba(255,255,255,.3);
  margin-top: 6px; letter-spacing: .06em;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: fixed;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
  backdrop-filter: blur(8px);
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255,255,255,.2);
}
.lightbox__close { top: 24px; right: 24px; font-size: 20px; line-height: 1; }
.lightbox__prev  { left: 24px;  top: 50%; transform: translateY(-50%); font-size: 20px; }
.lightbox__next  { right: 24px; top: 50%; transform: translateY(-50%); font-size: 20px; }
.lightbox__prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox__next:hover { transform: translateY(-50%) translateX(2px); }

.lightbox__prev[disabled],
.lightbox__next[disabled] {
  opacity: .25; pointer-events: none;
}

/* Swipe indicator on mobile */
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .gallery-grid--featured .gallery-thumb:first-child { grid-column: 1 / -1; }
  .lightbox__prev { left: 10px; }
  .lightbox__next { right: 10px; }
  .lightbox__close { top: 16px; right: 16px; width: 40px; height: 40px; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
