/* =====================================================
   GALLERY PAGE – gallery.css
   Order matches gallery.html top → bottom
===================================================== */

/* =====================================================
   HERO
===================================================== */
.gallery-hero-home {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  overflow: hidden;
  background: #000; /* fallback color while image loads */
}
.gallery-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Overlay using pseudo-element to keep same look */
.gallery-hero-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-hero);
  z-index: 1;
}

.gallery-hero-content {
  max-width: 900px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.gallery-hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 20px;
}

.gallery-hero-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.gallery-hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}


/* =====================================================
   FILTER BAR
===================================================== */
.gallery-controls {
  background: var(--bg-section);
  padding: 30px;
}

.gallery-controls-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease;
}

.filter-btn.active {
  background: var(--brand-primary);
  box-shadow: var(--shadow-soft);
}

/* =====================================================
   GRID
===================================================== */
.gallery-section {
  padding: 80px 30px;
  background: var(--bg-page);
}

.gallery-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  font-size: 0.85rem;
  color: #fff;
}

/* Hidden when filtered out */
.gallery-item.hidden {
  display: none;
}

/* =====================================================
   LIGHTBOX
===================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 90%;
  max-height: 80%;
}

.lightbox-caption {
  position: absolute;
  bottom: 30px;
  color: #fff;
  font-size: 0.9rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

.lightbox-close { top: 20px; right: 30px; }
.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

/* =====================================================
   UTILITIES
===================================================== */
.no-js .gallery-item {
  display: block;
}
