/* ==========================================================================
   Photo Gallery & Lightbox Styles
   ========================================================================== */

.gallery-section {
  background: var(--color-champagne-light);
  position: relative;
}

.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-charcoal-muted);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border-subtle);
  transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--grad-gold);
  color: var(--color-brown);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-sm);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 260px;
  gap: 1.25rem;
  max-width: 1140px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--color-border-subtle);
  background: var(--color-card-bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.gallery-item.span-2-row {
  grid-row: span 2;
}

.gallery-item.span-2-col {
  grid-column: span 2;
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--color-gold);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(44, 44, 44, 0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.35s ease;
}

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

.gallery-caption {
  color: #FFFDF9;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-serif);
  transform: translateY(10px);
  transition: transform 0.35s ease;
}

.gallery-category {
  color: var(--color-champagne);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Lightbox Modal */
.lightbox-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 2100;
}

.lightbox-modal[open] {
  display: flex;
}

.lightbox-modal::backdrop {
  background: rgba(20, 15, 12, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-content-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-border-gold);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

/* Navigation Controls */
.lightbox-close-btn {
  position: absolute;
  top: -2.5rem;
  right: 0;
  color: var(--color-white);
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

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

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-nav-btn:hover {
  background: var(--grad-gold);
  color: var(--color-brown);
  border-color: var(--color-gold);
}

.lightbox-prev {
  left: -4rem;
}

.lightbox-next {
  right: -4rem;
}
