/* ==========================================================
   GALLERY.CSS — galeria.html
   ========================================================== */

/* ---- FILTER TABS ---- */
.gallery-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}

.gallery-filter {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 9px 22px;
  border: 1px solid var(--graphite);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.gallery-filter:hover { border-color: rgba(201,169,110,0.45); color: rgba(201,169,110,0.7); }
.gallery-filter.active {
  border-color: var(--gold);
  color: var(--dark);
  background: var(--gold);
}

/* ---- MASONRY GRID ---- */
.gallery-masonry {
  columns: 4 240px;
  column-gap: 6px;
}
@media (max-width: 720px) { .gallery-masonry { columns: 2 160px; } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 6px;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1), filter 0.6s;
  filter: brightness(0.9) saturate(0.92);
}
.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1) saturate(1.08);
}
.gallery-item__overlay {
  position: absolute; inset: 0;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--ease);
}
.gallery-item:hover .gallery-item__overlay { background: rgba(5,5,5,0.28); }
.gallery-item__zoom {
  color: rgba(255,255,255,0.9);
  opacity: 0;
  transform: scale(0.65);
  transition: opacity var(--ease), transform var(--ease);
  width: 28px; height: 28px;
}
.gallery-item:hover .gallery-item__zoom { opacity: 1; transform: scale(1); }

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

/* ---- LIGHTBOX ---- */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  z-index: 9000;
  background: rgba(5,5,5,0.96);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.lightbox.open { display: flex; }

.lightbox__inner {
  position: relative;
  max-width: 1100px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  animation: lbFadeIn 0.28s ease;
}
@keyframes lbFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox__close {
  position: absolute;
  top: -3rem; right: 0;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 0.5rem;
  transition: color var(--ease);
  background: none; border: none; cursor: pointer;
}
.lightbox__close:hover { color: var(--gold); }
.lightbox__close svg { width: 16px; height: 16px; }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(5,5,5,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
  cursor: pointer;
}
.lightbox__nav:hover { background: var(--gold); border-color: var(--gold); color: var(--dark); }
.lightbox__prev { left: -3.5rem; }
.lightbox__next { right: -3.5rem; }
.lightbox__nav svg { width: 18px; height: 18px; }

@media (max-width: 680px) {
  .lightbox__prev { left: 0; top: auto; bottom: -3.5rem; transform: none; }
  .lightbox__next { right: 0; top: auto; bottom: -3.5rem; transform: none; }
}

/* ---- CAPTION ---- */
.lightbox__caption {
  position: absolute;
  bottom: -2.5rem;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
