/* ── GALLERY PAGE STYLES ── */

body.allegros-page-gallery { background: var(--espresso); color: var(--cream); }

/* FILTER */
.gallery-filters {
  padding: 40px 60px 0;
  background: var(--espresso);
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  max-width: 1520px;
  margin: 0 auto;
}

.filter-btn {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 24px;
  background: var(--warm-dark);
  color: rgba(250,246,240,0.4);
  cursor: pointer;
  border: none;
  font-family: 'Jost', sans-serif;
  transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover { background: var(--gold); color: var(--espresso); }

/* MASONRY GRID */
.gallery-section {
  padding: 40px 60px 100px;
  background: var(--espresso);
}

.gallery-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: 4px;
}

.gallery-item { position: relative; overflow: hidden; cursor: pointer; background: var(--warm-surface); }
.gallery-item.wide    { grid-column: span 2; }
.gallery-item.tall    { grid-row: span 2; }
.gallery-item.feature { grid-column: span 2; grid-row: span 2; }

.gallery-item-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
  transition: transform 0.6s ease;
  opacity: 0.12;
}

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

.gallery-item:hover .gallery-item-bg,
.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28,20,16,0.85) 0%, rgba(28,20,16,0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex; align-items: flex-end; padding: 28px;
}

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

.gallery-cap-cat { font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.gallery-cap-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: var(--cream); font-weight: 400; }

.gallery-plus {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px;
  background: rgba(201,169,110,0.2);
  border: 1px solid rgba(201,169,110,0.4);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 22px;
  opacity: 0; transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}

.gallery-item:hover .gallery-plus { opacity: 1; }
.gallery-placeholder-label { position: absolute; bottom: 12px; left: 16px; font-size: 12px; letter-spacing: 0.15em; color: rgba(250,246,240,0.2); text-transform: uppercase; }

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,6,4,0.97);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s;
  backdrop-filter: blur(8px);
}

.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-inner { max-width: 900px; width: 90%; }
.lightbox-img { width: 100%; height: 560px; background: var(--warm-surface); display: flex; align-items: center; justify-content: center; font-size: 120px; opacity: 0.1; }
.lightbox-img img { width: 100%; height: 100%; object-fit: contain; opacity: 1; }
.lightbox-meta { padding: 24px 0; display: flex; justify-content: space-between; align-items: center; }
.lightbox-caption { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-style: italic; color: rgba(250,246,240,0.7); }
.lightbox-nav { display: flex; gap: 16px; }
.lb-btn { width: 44px; height: 44px; background: var(--warm-surface); border: 1px solid rgba(201,169,110,0.2); color: var(--gold); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.lb-btn:hover { background: var(--gold); color: var(--espresso); }
.lightbox-close { position: absolute; top: 32px; right: 40px; font-size: 32px; color: rgba(250,246,240,0.3); cursor: pointer; background: none; border: none; transition: color 0.3s; line-height: 1; }
.lightbox-close:hover { color: var(--gold); }

/* GALLERY BOOK CTA (dark bg variant) */
.book-cta {
  background: var(--warm-dark);
  padding: 120px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.book-cta-inner { position: relative; z-index: 1; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .gallery-filters { padding: 32px 24px 0; }
  .gallery-section { padding: 32px 24px 80px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .gallery-item.wide, .gallery-item.feature { grid-column: span 2; }
  .book-cta { padding: 80px 24px; }
}
