/* css/gallery.css */
/* Complete, enhanced gallery styles for https://www.mehakbhatt.com/gallery.html */
/* Premium, luxurious, mobile-friendly design with lightbox, filters, and lazy loading support */

:root {
  --gallery-bg: #6c2626;
  --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
  --hover-glow: rgba(196, 30, 62, 0.4);
}

/* ==================== MAIN GALLERY SECTION ==================== */
.gallery-section {
  padding: 5rem 0;
  background: var(--gallery-bg);
  min-height: 100vh;
}

.gallery-header {
  text-align: center;
  margin-bottom: 4rem;
  padding: 0 1rem;
}

.gallery-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.gallery-header p {
  color: #bbbbbb;
  font-size: 1.2rem;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==================== FILTER BUTTONS (Optional Category Filter) ==================== */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.filter-btn {
  background: transparent;
  border: 2px solid #444;
  color: #cccccc;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px var(--hover-glow);
}

/* ==================== GALLERY GRID ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr; /* Mobile default - overridden in responsive.css */
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Individual Card */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  background: #111;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  aspect-ratio: 3 / 4;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 20px 40px var(--hover-glow);
  z-index: 10;
}

/* Image */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
  loading: lazy; /* Native lazy loading */
}

.gallery-item:hover img {
  transform: scale(1.15);
}

/* Overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95), transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem 1.5rem 1.8rem;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
  opacity: 1;
}

.gallery-overlay h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.gallery-overlay p {
  color: #eeeeee;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.gallery-overlay .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.gallery-overlay .tag {
  background: rgba(196, 30, 62, 0.3);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

/* ==================== LIGHTBOX MODAL ==================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.98);
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(10px);
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 95%;
  max-height: 95vh;
}

.lightbox img {
  width: 100%;
  height: auto;
  max-height: 95vh;
  border-radius: 16px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9);
  animation: zoomIn 0.5s ease forwards;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Navigation Arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.lightbox-prev { left: -80px; }
.lightbox-next { right: -80px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

/* Close Button */
.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  font-size: 3.5rem;
  color: #fff;
  cursor: pointer;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: var(--primary);
  transform: rotate(90deg);
}

/* Caption below image */
.lightbox-caption {
  text-align: center;
  margin-top: 1.5rem;
  color: #cccccc;
  font-size: 1.1rem;
}

/* ==================== AGE VERIFICATION NOTICE (Optional) ==================== */
.age-notice {
  background: linear-gradient(135deg, #1a0000, #330000);
  color: #ffcccc;
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 1.2rem;
  border-bottom: 3px solid var(--primary);
}

.age-notice strong {
  color: var(--accent);
  font-size: 1.4rem;
}

/* ==================== LOADING STATE (for JS lazy load) ==================== */
.gallery-item.loading img {
  filter: blur(10px);
}

.gallery-item.loaded img {
  filter: blur(0);
  transition: filter 0.6s ease;
}