/* =============================================
   CLOUDBLOOM STUDIO — Gallery.css
   ============================================= */

/* ---- HERO ---- */
.gallery-page-hero {
  text-align: center;
  padding: 160px 40px 60px;
  background: var(--warm-white);
  position: relative;
  overflow: hidden;
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.gallery-page-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 300;
  color: var(--charcoal);
  margin: 12px 0 16px;
}

.gallery-page-sub {
  color: var(--mid);
  font-size: 1rem;
  font-weight: 300;
}

/* ---- FILTER TABS ---- */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 32px 40px 28px;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 9px 22px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mid);
  cursor: pointer;
  transition: all 0.3s ease;
}

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

/* ---- GALLERY SECTION ---- */
.gallery-page-section {
  background: var(--cream);
  padding: 60px 40px 80px;
}

/* ---- GALLERY GRID ---- */
.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1300px;
  margin: 0 auto 40px;
}

.gallery-page-grid .gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  aspect-ratio: 1 / 1;
}

.gallery-page-grid .gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

/* ---- LIGHTBOX ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.92);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(6px);
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.1);
}

.lightbox-caption {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .gallery-page-hero { padding: 120px 24px 50px; }
  .gallery-filters { padding: 20px 20px 18px; gap: 8px; }
  .filter-btn { font-size: 0.72rem; padding: 8px 14px; }
  .gallery-page-section { padding: 40px 20px 60px; }
  .gallery-page-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

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