.nav--gallery {
  background: #2A1D15;
}

.gallery-back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.3s;
}
.gallery-back-link:hover { color: #fff; }
.gallery-back-link svg { flex-shrink: 0; }
@media (max-width: 768px) {
  .gallery-back-link span { display: none; }
}

.gallery-hero {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 8rem 1.5rem 4rem;
}
.gallery-hero .section-label { color: var(--primary); }
.gallery-hero .section-title { color: var(--white); margin-bottom: 1rem; }
.gallery-hero-sub {
  color: rgba(255,255,255,0.5);
  font-weight: 300;
  max-width: 28rem;
  margin: 0 auto;
}

.gallery-filters {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #2A1D15;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.gallery-filters-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.filter-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Karu', sans-serif;
}
.filter-btn:hover {
  border-color: #9c8777;
  color: #9c8777;
}
.filter-btn.active {
  background: #9c8777;
  color: #fff;
  border-color: #9c8777;
}

.gallery-page-grid-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}
.gallery-grid-page {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: dense;
  gap: 1rem;
  grid-auto-rows: 200px;
}
@media(min-width:768px) {
  .gallery-grid-page {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    grid-auto-rows: 280px;
  }
}

.grid-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease;
}
.grid-item:hover img {
  transform: scale(1.05);
}
.grid-item--hero { grid-column: span 2; grid-row: span 2; }
.grid-item--wide { grid-column: span 2; }

.grid-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.5s;
}
.grid-item:hover .grid-overlay {
  background: rgba(0,0,0,0.2);
}
.grid-eye {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255,255,255,0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.75);
  transition: all 0.5s;
  color: #fff;
}
.grid-item:hover .grid-eye {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  opacity: 1;
  transform: scale(1);
}
.grid-cat {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  color: rgba(255,255,255,0.8);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0;
  transition: opacity 0.5s;
}
.grid-item:hover .grid-cat { opacity: 1; }

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.gallery-lightbox.open {
  opacity: 1;
  visibility: visible;
}
.gallery-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: color 0.3s;
  z-index: 10;
}
.gallery-lightbox-close:hover { color: #fff; }
.gallery-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  user-select: none;
}
.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.gallery-lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.gallery-lightbox-prev { left: 1rem; }
@media(min-width:768px) { .gallery-lightbox-prev { left: 2rem; } }
.gallery-lightbox-next { right: 1rem; }
@media(min-width:768px) { .gallery-lightbox-next { right: 2rem; } }
.gallery-lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
}
