/* ===== Gallery Page Styles ===== */

/* Gallery Hero */
.gallery-hero {
  position: relative;
  height: 45vh;
  min-height: 320px;
  max-height: 450px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--color-forest-deep);
  z-index: 0;
}

.gallery-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10, 26, 18, 0.9) 0%, rgba(10, 26, 18, 0.5) 100%);
  z-index: 1;
}

.gallery-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--edge-padding);
  padding-bottom: clamp(40px, 6vw, 70px);
}

.gallery-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gallery-hero-desc {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
  color: rgba(255, 255, 255, 0.5);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Filter Tabs removed */

/* Gallery Page Grid */
.gallery-page-section {
  padding: var(--space-3xl) var(--edge-padding);
  background: var(--color-charcoal);
  min-height: 50vh;
}

.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.gallery-page-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.gallery-page-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.gallery-page-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 26, 18, 0.85) 0%, rgba(10, 26, 18, 0.1) 40%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
}

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

.gallery-page-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-amber);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.gallery-page-zoom {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.3s ease, transform 0.3s ease;
}

.gallery-page-item:hover .gallery-page-zoom {
  color: #fff;
  transform: scale(1.1);
}

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

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

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

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.active .lightbox-content img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s ease, transform 0.3s ease;
  line-height: 1;
  padding: 8px;
}

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

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 2.5rem;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(212, 168, 67, 0.15);
  border-color: var(--color-amber);
  color: var(--color-amber);
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 2px;
}

/* Gallery CTA */
.gallery-cta {
  padding: var(--section-padding) var(--edge-padding);
  background: var(--color-forest-deep);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gallery-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.3), transparent);
}

.gallery-cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.gallery-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-md);
}

.gallery-cta p {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-2xl);
  line-height: 1.8;
}

.gallery-cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Active nav link */
.nav-links a.active {
  color: var(--color-amber) !important;
}

.nav-links a.active::after {
  transform: scaleX(1) !important;
  transform-origin: left !important;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .gallery-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    height: 35vh;
    min-height: 260px;
  }

  .gallery-page-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .gallery-page-item {
    aspect-ratio: 1 / 1;
  }

  .gallery-page-item {
    aspect-ratio: 1 / 1;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 42px;
    height: 42px;
    font-size: 1.8rem;
  }

  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }

  .gallery-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .gallery-cta-buttons .btn-primary,
  .gallery-cta-buttons .btn-secondary {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

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

  .gallery-page-item {
    aspect-ratio: 16 / 10;
  }
}
