/*
 * gallery.css
 * ─────────────────────────────────────────────────────────
 * Filterable photo gallery grid, hover overlays,
 * category badges, and fullscreen lightbox.
 * ─────────────────────────────────────────────────────────
 */

/* ── Filter Buttons ──────────────────────────────────── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 9px 22px;
  border-radius: 30px;
  border: 2px solid var(--blue);
  background: transparent;
  color: var(--blue);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--blue);
  color: #fff;
}

/* ── Gallery Grid ────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(5, 36, 109, 0.18);
}

.gallery-item.hidden {
  display: none;
}

/* Thumbnail */
.gallery-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder gradient colors per category */
.gp-int-1 { background: linear-gradient(135deg, #c8d8f0, #8facd8); }
.gp-int-2 { background: linear-gradient(135deg, #d0e4f8, #96bce0); }
.gp-int-3 { background: linear-gradient(135deg, #dce8f4, #a4c4e4); }
.gp-ext-1 { background: linear-gradient(135deg, #c8e0c8, #88b888); }
.gp-ext-2 { background: linear-gradient(135deg, #d4e8d0, #98c098); }
.gp-ext-3 { background: linear-gradient(135deg, #dcecd8, #a8cca4); }
.gp-com-1 { background: linear-gradient(135deg, #f0d8d8, #d8a0a0); }
.gp-com-2 { background: linear-gradient(135deg, #f4dcd8, #dca8a4); }
.gp-cab-1 { background: linear-gradient(135deg, #f0e8c0, #d8c880); }

/* Hover overlay with caption */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 36, 109, 0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}

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

.gallery-caption { color: #fff; }
.gallery-caption h4 { font-size: 1.1rem; font-weight: 700; }
.gallery-caption p  { font-size: 0.82rem; opacity: 0.85; }

/* Category badge */
.gallery-cat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red);
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

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

#lightbox.open {
  display: flex;
}

#lb-placeholder {
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
}

#lb-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  pointer-events: none;
  width: 90vw;
}

#lb-caption h3 { font-size: 1.3rem; }
#lb-caption p  { font-size: 0.9rem; opacity: 0.7; }

#lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.15s;
}

#lb-close:hover { opacity: 1; }

#lb-prev,
#lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

#lb-prev:hover,
#lb-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

#lb-prev { left: 20px; }
#lb-next { right: 20px; }
