/* ==========================================================================
   GALLERY.CSS — Editorial Masonry Grid, Filter Bar & Accessible Lightbox
   ========================================================================== */
.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-filter-btn {
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  background-color: var(--white);
  border: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  transition: all var(--transition-fast);
}

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

.gallery-filter-btn.is-active {
  background-color: var(--sapphire);
  border-color: var(--sapphire);
  color: var(--white);
  box-shadow: var(--shadow-xs);
}

.gallery-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  background-color: var(--background-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.gallery-card {
  grid-column: span 4;
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: var(--sapphire-deep);
  cursor: pointer;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.gallery-card--wide {
  grid-column: span 6;
  aspect-ratio: 16 / 10;
}

.gallery-card.is-hidden {
  display: none;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow), opacity var(--transition-base);
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 28, 54, 0.05) 35%, rgba(14, 28, 54, 0.84) 100%);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  transition: background var(--transition-base);
}

.gallery-card-category {
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lavender);
  margin-bottom: 4px;
}

.gallery-card-title {
  font-size: 1.12rem;
  color: var(--white);
  margin-bottom: 4px;
}

.gallery-card-zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sapphire);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.gallery-card:hover .gallery-card-zoom {
  transform: scale(1.08);
  background: var(--white);
}

/* LIGHTBOX MODAL */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 20, 40, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

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

.lightbox-dialog {
  position: relative;
  max-width: 980px;
  width: 100%;
  background-color: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
}

.lightbox-media {
  background-color: var(--black);
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-info {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lightbox-counter {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--sapphire);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.lightbox-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.lightbox-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.lightbox-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  transition: all var(--transition-fast);
}

.lightbox-nav-btn:hover {
  border-color: var(--sapphire);
  color: var(--sapphire);
  background-color: var(--background-secondary);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--background-secondary);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  background-color: var(--sapphire);
  color: var(--white);
}
