/* ──────────────────────────────────────────────────────
   THE BREAK · GALLERY & LIGHTBOX STYLES
   Gallery grid, filtering, lightbox modal
   ────────────────────────────────────────────────────── */

#galeria {
  background: linear-gradient(160deg, #FDF4E3 0%, #F5E8C8 100%);
  position: relative;
}

#galeria::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--verde), var(--verde-mid), var(--amber));
}

/* Gallery filters */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.gf-btn {
  padding: 0.5rem 1.4rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  cursor: pointer;
  transition: all 0.22s;
}

.gf-btn:hover {
  border-color: var(--verde);
  color: var(--verde-dk);
}

.gf-btn.active {
  background: var(--verde);
  border-color: var(--verde);
  color: var(--blanco);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.g-item {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  background: var(--crema2);
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  display: block;
}

.g-item:hover img {
  transform: scale(1.08);
}

.g-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(92, 58, 26, 0.65), transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s;
}

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

.g-overlay span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blanco);
  font-weight: 500;
}

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

.g-item.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 8, 3, 0.93);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lb-img-wrap {
  max-width: 88vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.lb-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--blanco);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-close:hover {
  background: rgba(111, 163, 32, 0.5);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--blanco);
  font-size: 2rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lb-nav:hover {
  background: rgba(111, 163, 32, 0.4);
}

.lb-prev {
  left: 1.5rem;
}

.lb-next {
  right: 1.5rem;
}
