/* --------------------------------
   Gallery Page
---------------------------------- */
.page-hero--gallery {
  background: #fbf7e6;
  padding-top: 94px; /* gives space for absolute header */
  padding-bottom: 60px;
  position: relative;
}

.page-hero--gallery .page-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 170px;
  background: linear-gradient(180deg, #ffe7a8 0%, rgba(255, 231, 168, 0) 100%);
  pointer-events: none;
}

.page-title {
  margin: 10px 0 18px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #2a1a12;
}

.gallery-feature {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
}

.gallery-feature-left {
  height: 190px;
}

.gallery-feature-right {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gallery-feature-right h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 900;
  color: #2a1a12;
}
.gallery-feature-right p {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(0, 0, 0, 0.62);
  line-height: 1.55;
}

.gallery-feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 2px;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.65);
}
.li {
  width: 16px;
  height: 16px;
  color: rgba(0, 0, 0, 0.62);
}

/* Grid */
.gallery-grid-page {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.gcard {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  height: 170px;
}
.gcard img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* occasional wide card for visual rhythm */
.gcard--wide {
  grid-column: span 2;
  height: 210px;
}

@media (max-width: 980px) {
  .gallery-feature {
    grid-template-columns: 1fr;
  }
  .gallery-feature-left {
    height: 200px;
  }
}

@media (max-width: 520px) {
  .page-hero--gallery {
    padding-top: 86px;
  }
  .gallery-grid-page {
    grid-template-columns: 1fr;
  }
  .gcard--wide {
    grid-column: auto;
    height: 180px;
  }
}
/* Home gallery variations */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.gitem {
  height: 200px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.gitem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Variations */
.gitem--wide {
  grid-column: span 2;
  height: 220px;
}

.gitem--tall {
  height: 420px;
}

/* Responsive */
@media (max-width: 980px) {
  .gallery-masonry {
    grid-template-columns: 1fr;
  }
  .gitem,
  .gitem--wide,
  .gitem--tall {
    grid-column: auto;
    height: 220px;
  }
}
/* Make cards clickable + friendly */
.gcard-btn {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}
.gcard-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}
.gcard-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition:
    transform 0.25s ease,
    filter 0.25s ease;
}
.gcard-btn:hover img {
  transform: scale(1.03);
  filter: brightness(0.95);
}
.gcard-hover {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(11, 18, 32, 0.75);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s ease;
}
.gcard-btn:hover .gcard-hover {
  opacity: 1;
  transform: translateY(0);
}

.gallery-friendly {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(229, 231, 235, 0.85);
}

/* Pagination */
.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 26px 0 10px;
  flex-wrap: wrap;
}
.pg-btn,
.pg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.7);
  color: rgba(229, 231, 235, 0.95);
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.pg-btn:hover,
.pg-num:hover {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.9);
}
.pg-btn.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}
.pg-pages {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pg-num.is-active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  font-weight: 800;
}
.pg-ellipsis {
  color: rgba(229, 231, 235, 0.55);
  padding: 0 4px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}
.lightbox.is-open {
  display: block;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}
.lightbox-dialog {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  margin: 6vh auto 0;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img {
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  display: block;
}
.lb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 34px;
  cursor: pointer;
}
.lb-prev {
  left: 10px;
}
.lb-next {
  right: 10px;
}
.lb-meta {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
}
