/* ===== GALLERY SECTION ===== */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

/* ===== FILTERS ===== */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.5rem 1.15rem;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 500;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #fff;
  color: #444;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: #888;
  color: #222;
}
.filter-btn.active {
  background: #444;
  color: #fff;
  border-color: #444;
}

/* ===== MASONRY GRID ===== */
.gallery-grid {
  columns: 3;
  column-gap: 1rem;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}
.gallery-item:hover {
  transform: scale(1.015);
}

/* Image placeholder */
.gallery-img-placeholder {
  width: 100%;
  background: #ccc;
}
.gallery-img {
  width: 100%;
  display: block;
}

/* Caption overlay */
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 0.85rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.25s;
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
}
.caption-tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-bottom: 0.15rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox-content {
  max-width: 800px;
  width: 90%;
  text-align: center;
}
.lightbox-img-placeholder,
.lightbox-img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: #555;
  border-radius: 6px;
}
.lightbox-caption {
  color: #ccc;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 2.5rem;
  line-height: 1;
  padding: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-close { top: 1.5rem; right: 1.5rem; font-size: 2rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .gallery-grid { columns: 2; }
}
@media (max-width: 500px) {
  .gallery-grid { columns: 1; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}
