/* Gallery */
.gallery {
  padding-block: var(--space-5xl);
  background: var(--color-bg-secondary);
}
.gallery__filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-2xl);
}
.gallery__filter {
  padding: 10px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease);
}
.gallery__filter:hover { border-color: var(--color-secondary); color: var(--color-primary); }
.gallery__filter.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: var(--space-md);
}

.gallery__item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-soft);
  cursor: pointer;
}
.gallery__item img,
.gallery__item video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.gallery__item:hover img,
.gallery__item:hover video { transform: scale(1.06); }
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(41,35,33,0.5) 100%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}
.gallery__item:hover::after { opacity: 1; }
.gallery__item__label {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: all var(--dur-base) var(--ease);
  z-index: 2;
}
.gallery__item:hover .gallery__item__label { opacity: 1; transform: translateY(0); }

.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(20, 16, 14, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}
.lightbox.is-open { display: flex; }
.lightbox__img,
.lightbox__video {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: grid; place-items: center;
  transition: background var(--dur-fast) var(--ease);
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255,255,255,0.24); }
.lightbox__close { top: var(--space-lg); right: var(--space-lg); }
.lightbox__prev { left: var(--space-lg); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: var(--space-lg); top: 50%; transform: translateY(-50%); }
.lightbox__close svg, .lightbox__prev svg, .lightbox__next svg { width: 22px; height: 22px; }

.lightbox__counter {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  letter-spacing: 0.1em;
}

@media (max-width: 900px) {
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery__item--wide { grid-column: span 1; }
}