/* ============================================
   GALLERY SECTION (shared across pages)
============================================ */
.gallery-main {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  aspect-ratio: 16/9;
}
@media (min-width: 640px) { .gallery-main { aspect-ratio: 21/9; } }

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  background: linear-gradient(to top, rgba(10,10,11,0.9) 0%, transparent 100%);
}
@media (min-width: 640px) { .gallery-caption { padding: 2rem; } }

.gallery-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(201,168,76,0.1);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(201,168,76,0.2);
}
.gallery-caption h3 {
  font-size: 1.125rem;
  font-weight: 700;
}
@media (min-width: 640px) { .gallery-caption h3 { font-size: 1.5rem; } }

.gallery-expand-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(10,10,11,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 0.2s;
  cursor: pointer;
}
.gallery-expand-btn:hover { color: var(--gold); border-color: rgba(201,168,76,0.3); }

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(10,10,11,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: all 0.2s;
  z-index: 10;
  cursor: pointer;
}
@media (min-width: 640px) { .gallery-prev, .gallery-next { width: 3rem; height: 3rem; } }
.gallery-prev { left: 0.5rem; }
.gallery-next { right: 0.5rem; }
@media (min-width: 640px) { .gallery-prev { left: -1.25rem; } .gallery-next { right: -1.25rem; } }
.gallery-prev:hover, .gallery-next:hover { color: var(--gold); border-color: rgba(201,168,76,0.3); }

.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  justify-content: center;
}
.gallery-thumb {
  flex-shrink: 0;
  width: 5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.5;
  transition: all 0.3s;
  cursor: pointer;
  background: none;
  padding: 0;
}
@media (min-width: 640px) { .gallery-thumb { width: 7rem; height: 5rem; } }
.gallery-img { width: 100%; height: 100%; object-fit: cover; border-radius: 0.5rem; transition: transform 0.5s; }
.gallery-slide.active .gallery-img { transform: scale(1); }
.gallery-slide:not(.active) .gallery-img { transform: scale(0.95); opacity: 0.8; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 0.8; }
.gallery-thumb.active { border-color: var(--gold); opacity: 1; box-shadow: 0 0 0 1px rgba(201,168,76,0.3); }

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.gallery-dot {
  height: 0.375rem;
  border-radius: 9999px;
  background: rgba(250,250,249,0.2);
  cursor: pointer;
  transition: all 0.3s;
  width: 0.375rem;
  border: none;
}
.gallery-dot.active { width: 2rem; background: var(--gold); }

/* Gallery Modal */
#gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
}
#gallery-modal.open { display: flex; }
#gallery-modal img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.5rem;
}
#gallery-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
}
#gallery-modal-close:hover { background: rgba(255,255,255,0.2); }
