/* =========================================
   GALLERY PAGE STYLES
   ========================================= */

.gallery-section {
  padding: 80px 0 48px;
  background: var(--white);
}

/* Filters */
.gallery-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 10px 28px;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.filter-btn.active {
  background: var(--gradient-orange);
  border-color: transparent;
  color: var(--white);
  box-shadow: var(--shadow-orange);
}

/* Gallery Grid */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-item.large {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,20,40,0.85) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: var(--transition);
}

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

.gallery-overlay-content {
  align-self: flex-start;
  margin-top: auto;
}

.gallery-overlay-content h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 4px;
}

.gallery-overlay-content p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.gallery-zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-zoom:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: scale(1.1);
}

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

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 25, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  gap: 16px;
}

.lightbox-img {
  max-width: 80vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover { background: var(--orange); border-color: var(--orange); }

.lightbox-prev,
.lightbox-next {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.lightbox-prev:hover,
.lightbox-next:hover { background: var(--orange); border-color: var(--orange); }

.lightbox-caption {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  padding: 8px 24px;
  border-radius: 50px;
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-masonry { grid-template-columns: 1fr 1fr; }
  .gallery-item.large { grid-column: span 2; }
}

@media (max-width: 480px) {
  .gallery-masonry { grid-template-columns: 1fr; }
  .gallery-item.large { grid-column: span 1; aspect-ratio: 4/3; }
}
