/* =============================================
   BATOI BHAI - Gallery Page Styles
   ============================================= */

.gallery-section {
  padding: 70px 5% 90px;
  background: var(--light);
}

.gallery-section .section-inner {
  max-width: 1300px;
  margin: 0 auto;
}

/* --- Filter Bar --- */
.gallery-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 9px 22px;
  border: 1px solid rgba(0,0,0,0.15);
  background: transparent;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  border-radius: 0;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.filter-btn.active {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--primary);
}

/* --- Masonry Grid --- */
.gallery-masonry {
  columns: 3;
  column-gap: 12px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
  filter: brightness(0.92);
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  transition: background 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  background: rgba(10, 22, 40, 0.55);
}

.gallery-overlay-content {
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay-content {
  transform: translateY(0);
  opacity: 1;
}

.gallery-overlay-content .g-location {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}

.gallery-overlay-content .g-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--white);
  font-weight: 600;
  margin-top: 3px;
}

.gallery-zoom-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.85rem;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition);
  cursor: pointer;
  border-radius: 0;
}

.gallery-item:hover .gallery-zoom-btn {
  opacity: 1;
  transform: scale(1);
}

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

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  transition: color var(--transition);
}

.lightbox-close:hover {
  color: var(--secondary);
}

.lightbox-caption {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

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

.lightbox-nav:hover {
  background: var(--secondary);
  color: var(--primary);
}

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

@media (max-width: 768px) {
  .gallery-masonry {
    columns: 2;
  }

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

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