/* ============================================================
   sTrips Compass — Gallery Page Styles
   ============================================================ */

/* ── FILTER ───────────────────────────────────────────────── */
.gallery-filter {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.gallery-filter-btn {
  padding: 0.5rem 1.3rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--border-light);
  color: var(--text-muted);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery-filter-btn:hover {
  background: var(--gradient-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

.gallery-filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,119,182,0.3);
}

/* ── MASONRY GRID ─────────────────────────────────────────── */
.gallery-grid {
  columns: 4;
  column-gap: 1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  display: block;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease-smooth);
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2,30,70,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}

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

.gallery-item-overlay h4 {
  color: var(--white);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.gallery-item-overlay span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

.gallery-zoom-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
}

.gallery-item:hover .gallery-zoom-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* ── LIGHTBOX ─────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 8, 24, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.92);
  transition: transform 0.3s var(--ease-bounce);
}

.lightbox.open .lightbox-inner {
  transform: scale(1);
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
}

.lightbox-caption {
  text-align: center;
  padding: 1rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.25);
  transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.lightbox-counter {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .gallery-grid { columns: 3; }
}

@media (max-width: 768px) {
  .gallery-grid { columns: 2; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

@media (max-width: 480px) {
  .gallery-grid { columns: 1; }
}
