/* ===== GALLERY PAGE ===== */
.gallery-section { padding: 80px 0; }

.masonry-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.masonry-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.masonry-item.tall { grid-row: span 2; }
.masonry-item.wide { grid-column: span 2; }
.masonry-ph {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 500;
}
.masonry-ph i { font-size: 2.5rem; opacity: 0.8; }
.masonry-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px;
  opacity: 0;
  transition: all 0.35s ease;
}
.masonry-overlay span {
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
}
.lightbox-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.lightbox-btn:hover { background: var(--primary); }
.masonry-item:hover { transform: scale(1.02); box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.masonry-item:hover .masonry-overlay { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.lb-close { top: 24px; right: 24px; width: 44px; height: 44px; font-size: 1.1rem; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.2rem; }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 1.2rem; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--primary); }
.lb-content {
  max-width: 800px;
  width: 90%;
  text-align: center;
}
.lb-ph {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.lb-caption { color: rgba(255,255,255,0.8); font-size: 1rem; }

@media (max-width: 768px) {
  .masonry-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  .masonry-item.tall { grid-row: span 1; }
  .masonry-item.wide { grid-column: span 2; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
@media (max-width: 480px) {
  .masonry-gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  .masonry-item.wide { grid-column: span 1; }
}
