/* ============================================================
   GALLERY PAGE
============================================================ */

/* ============================================================
   PAGE HEADER
============================================================ */
.gl-header {
  background: var(--off-white);
  padding: 120px 0 3rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.gl-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
}

.gl-eyebrow {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--brand-red);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.gl-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--brand-red);
}

.gl-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 7vw, 7rem);
  letter-spacing: 0.04em;
  color: var(--navy-deep);
  line-height: 0.9;
  margin-bottom: 0.8rem;
}

.gl-sub {
  font-size: 0.92rem;
  color: #777;
  line-height: 1.7;
  max-width: 460px;
}

.gl-header-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-shrink: 0;
}

.gl-stat { text-align: center; }

.gl-stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.5rem;
  color: var(--brand-blue);
  line-height: 1;
  letter-spacing: 0.04em;
}

.gl-stat-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid-grey);
  margin-top: 0.3rem;
}

.gl-stat-sep {
  width: 1px;
  height: 40px;
  background: rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* ============================================================
   FILTER BAR
============================================================ */
.gl-filters-wrap {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  position: sticky;
  top: 70px;
  z-index: 50;
}

.gl-filters {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.gl-filters::-webkit-scrollbar { display: none; }

.gl-filter {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 1.1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--mid-grey);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.gl-filter:hover { color: var(--navy-deep); }

.gl-filter.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

/* ============================================================
   MASONRY GRID
============================================================ */
.gl-section {
  background: #ffffff;
  padding: 3rem 0 var(--sp-3xl);
}

.gl-masonry {
  columns: 4;
  column-gap: 12px;
}

/* Each item */
.gl-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  display: block;
}

.gl-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gl-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.gl-item:hover img { transform: scale(1.05); }

/* Overlay */
.gl-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,24,41,0.8) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gl-item:hover .gl-overlay { opacity: 1; }

.gl-overlay-edition {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.2rem;
}

.gl-overlay-cat {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: #ffffff;
}

/* Expand icon on hover */
.gl-item::after {
  content: '⤢';
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
  line-height: 30px;
  text-align: center;
}

.gl-item:hover::after { opacity: 1; }

/* ============================================================
   LIGHTBOX
============================================================ */
.gl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gl-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.gl-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
}

.gl-lightbox-inner {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gl-lb-img-wrap {
  max-height: 80vh;
  overflow: hidden;
  border-radius: 6px;
}

.gl-lb-img-wrap img {
  max-width: 85vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.gl-lb-caption {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#glLbEdition {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

#glLbCat {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  letter-spacing: 0.06em;
}

/* Close button */
.gl-lb-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.gl-lb-close:hover { background: rgba(255,255,255,0.2); }

/* Prev / Next */
.gl-lb-prev,
.gl-lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 3;
}

.gl-lb-prev { left: 1.5rem; }
.gl-lb-next { right: 1.5rem; }

.gl-lb-prev:hover,
.gl-lb-next:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .gl-masonry { columns: 3; }
}

@media (max-width: 768px) {
  .gl-masonry { columns: 2; }
  .gl-header-inner { flex-direction: column; align-items: flex-start; gap: 2rem; }
  .gl-lb-prev { left: 0.5rem; }
  .gl-lb-next { right: 0.5rem; }
}

@media (max-width: 480px) {
  .gl-masonry { columns: 1; }
  .gl-header-stats { gap: 1.2rem; }
}