/* Gallery Page Styles */

.gallery-section {
  background: var(--background);
}

/* Gallery Tabs */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--color-beige);
}

.tab-btn {
  background: white;
  border: 2px solid var(--color-amber);
  color: var(--color-dark-brown);
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: var(--color-amber);
  color: white;
  transform: translateY(-2px);
}

.tab-btn.active {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: white;
  box-shadow: 0 4px 15px rgba(217, 118, 57, 0.3);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 20, 16, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.gallery-icon {
  font-size: 3rem;
  color: var(--color-gold);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-icon {
  transform: scale(1);
}

/* Hidden items (for filtering) */
.gallery-item.hidden {
  display: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  color: white;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10001;
  line-height: 1;
  user-select: none;
}

.lightbox-close:hover {
  color: var(--color-gold);
  transform: rotate(90deg);
}

#lightboxImage {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26, 20, 16, 0.8);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  z-index: 10001;
}

.lightbox-nav:hover {
  background: rgba(26, 20, 16, 0.95);
  transform: translateY(-50%) scale(1.1);
  color: var(--color-gold);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

.lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-nav {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .gallery-tabs {
    gap: 0.75rem;
  }

  .tab-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    font-size: 2.5rem;
  }

  .lightbox-counter {
    bottom: 10px;
  }

  #lightboxImage {
    max-width: 95vw;
    max-height: 80vh;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}
