/* ===========================
   RED MANGO — GALLERY.CSS
   =========================== */

.gallery-main {
  background: var(--white);
  padding: 60px 40px 80px;
}

/* ===== FILTER TABS ===== */

.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.gallery-filter {
  background: none;
  border: 1px solid #ddd;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gallery-filter:hover {
  border-color: var(--red);
  color: var(--red);
}

.gallery-filter.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* ===== GALLERY GRID ===== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Gallery Item */
.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e8e8e8;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

/* Caption overlay */
.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 28px 14px 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Placeholder when no image */
.gallery-item::before {
  content: 'Photo Coming Soon';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #bbb;
  background: #f0f0f0;
  z-index: 0;
}

.gallery-item img {
  position: relative;
  z-index: 1;
}

/* Hidden items (filtered out) */
.gallery-item.hidden {
  display: none;
}

/* ===== LIGHTBOX ===== */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.lightbox-caption {
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 16px;
}

/* Lightbox buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  border-color: var(--red);
  background: rgba(192,57,43,0.2);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-main {
    padding: 40px 20px 60px;
  }
}

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

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
