/* ============================================
   TOURVIR — Gallery Page Styles
   ============================================ */

.gallery-section {
  padding-top: var(--space-3xl);
}

.gallery-grid--masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gutter);
}

.gallery-item--tall {
  grid-row: span 2;
  aspect-ratio: auto;
  height: 100%;
}

.gallery-item--wide {
  grid-column: span 2;
  aspect-ratio: auto;
  height: 320px;
}

.gallery-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  padding: var(--space-2xl) 0;
  margin-bottom: var(--space-xl);
}

.gallery-stat {
  text-align: center;
}

.gallery-stat__number {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.gallery-stat__label {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .gallery-item--tall {
    grid-row: span 1;
    aspect-ratio: 4/3;
  }

  .gallery-item--wide {
    grid-column: span 1;
    height: auto;
    aspect-ratio: 4/3;
  }

  .gallery-stats {
    gap: var(--space-xl);
  }
}

/* ============================================
   Lightbox Styles
   ============================================ */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox__image {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  border-radius: var(--radius-lg);
}

.lightbox.is-active .lightbox__image {
  transform: scale(1);
}

.lightbox__caption {
  color: #fff;
  text-align: center;
  margin-top: var(--space-lg);
  max-width: 800px;
  padding: var(--space-sm) var(--space-lg);
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lightbox__caption h4 {
  color: #fff;
  margin-bottom: var(--space-xs);
  font-size: 1.25rem;
}

.lightbox__caption p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox__close {
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: 1.25rem;
}

.lightbox__prev {
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prev:hover,
.lightbox__next:hover {
  transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
  .lightbox__prev,
  .lightbox__next {
    display: none;
  }
}
