/* ═══════════════════════════════════════
   RESOLUTE — Gallery & Lightbox
   ═══════════════════════════════════════ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 560px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 0.6rem; } }

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--radius-sm);
  position: relative;
  background: var(--navy-deep);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  will-change: transform;
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11,31,58,0.45);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover::after { opacity: 1; }

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
  pointer-events: none;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(196,28,28,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  backdrop-filter: blur(4px);
}

/* ── LIGHTBOX ───────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4,8,16,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.lightbox:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transition: opacity 0.2s;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  z-index: 1;
}

.lightbox-close:hover {
  background: var(--red-bright);
  transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--red);
  border-color: var(--red);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--gray);
  background: rgba(0,0,0,0.4);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}
