/* ================================================================
   WESTKATE SAFARIS — Gallery Page Styles
   assets/css/gallery.css
   Requires: global.css loaded first
================================================================ */

#heroBggallery {
  background-image: url("../img/galary-hero.jpg");
}

/* ── STATS ROW (above filter bar) ────────────────────────────── */
.stats-row {
  background: var(--char);
  border-bottom: 1px solid rgba(250, 247, 242, 0.06);
  padding: 2.5rem 5%;
}
.stats-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-num {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}
.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.35);
  margin-top: 0.4rem;
}

/* ── BREADCRUMB ───────────────────────────────────────────────── */
.breadcrumb {
  background: var(--char);
  padding: 0.85rem 5%;
  border-bottom: 1px solid rgba(250, 247, 242, 0.06);
}
.breadcrumb a,
.breadcrumb .cur,
.breadcrumb .sep {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.breadcrumb a {
  color: rgba(250, 247, 242, 0.4);
  transition: color 0.3s;
}
.breadcrumb a:hover {
  color: var(--gold);
}
.breadcrumb .sep {
  color: rgba(250, 247, 242, 0.2);
  margin: 0 0.5rem;
}
.breadcrumb .cur {
  color: var(--gold);
}

/* ── PAGE HERO (gallery-specific overrides) ───────────────────── */
.page-hero .hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}
.page-hero .hero-sub {
  font-size: 0.95rem;
  color: rgba(250, 247, 242, 0.65);
  line-height: 1.75;
  max-width: 520px;
  margin-top: 1.25rem;
}

/* ── GALLERY SECTION ──────────────────────────────────────────── */
.gallery-section {
  background: var(--char);
  padding: 3rem 5% 5rem;
}

/* ── MASONRY GRID ─────────────────────────────────────────────── */
.masonry {
  columns: 3;
  column-gap: 1rem;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}
.masonry-item.hidden {
  display: none;
}
.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease);
}
.masonry-item:hover img {
  transform: scale(1.05);
}

/* Gradient overlay that slides up on hover */
.masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 20, 9, 0.85) 0%,
    rgba(26, 20, 9, 0) 55%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
}
.masonry-item:hover .masonry-overlay {
  opacity: 1;
}

/* Caption inside overlay — HTML uses <strong> + <span> directly */
.masonry-caption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.masonry-caption strong {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ivory);
  line-height: 1.2;
}
.masonry-caption span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.55);
}

/* Expand icon — top-right corner on hover */
.masonry-expand {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(250, 247, 242, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.4s var(--ease),
    background 0.3s;
}
.masonry-item:hover .masonry-expand {
  opacity: 1;
}
.masonry-expand:hover {
  background: var(--gold);
  border-color: var(--gold);
}

/* ── EMPTY STATE ──────────────────────────────────────────────── */
.gallery-empty {
  display: none;
  text-align: center;
  padding: 5rem 0;
  color: rgba(250, 247, 242, 0.3);
}
.gallery-empty.show {
  display: block;
}
.gallery-empty p {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
}

/* ── LOAD MORE ────────────────────────────────────────────────── */
.load-more-wrap {
  text-align: center;
  padding-top: 3rem;
}
/* HTML uses class="btn-load" */
.btn-load {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: rgba(250, 247, 242, 0.7);
  border: 1.5px solid rgba(250, 247, 242, 0.2);
  padding: 0.9rem 2.5rem;
  border-radius: 3px;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.3s;
}
.btn-load:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── LIGHTBOX ─────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10, 7, 4, 0.97);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.open {
  display: flex;
}
.lb-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 3px;
}
.lb-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(250, 247, 242, 0.1);
  border: none;
  color: var(--ivory);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 510;
}
.lb-close:hover {
  background: var(--gold);
}
.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(250, 247, 242, 0.08);
  border: 1px solid rgba(250, 247, 242, 0.15);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 510;
}
.lb-prev {
  left: 1.5rem;
}
.lb-next {
  right: 1.5rem;
}
.lb-prev:hover,
.lb-next:hover {
  background: var(--gold);
  border-color: var(--gold);
}

/* lb-caption wraps strong#lbTitle + span#lbLoc — target by element */
.lb-caption {
  margin-top: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.lb-caption strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--ivory);
  display: block;
}
.lb-caption span {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.4);
  display: block;
}
.lb-counter {
  font-size: 0.7rem;
  color: rgba(250, 247, 242, 0.3);
  margin-top: 0.5rem;
  letter-spacing: 0.1em;
}

/* ── CTA STRIP ────────────────────────────────────────────────── */
.cta-strip {
  background: var(--earth);
  padding: 6rem 5%;
  text-align: center;
  max-width: 100%;
}
.cta-strip .cta-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  color: var(--ivory);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.cta-strip .cta-title em {
  font-style: italic;
  color: var(--gold);
}
.cta-strip .cta-sub {
  font-size: 0.92rem;
  color: rgba(250, 247, 242, 0.55);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.cta-strip .cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS (gallery-local) ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s;
  font-family: var(--sans);
  cursor: pointer;
  border: none;
}
.btn-gold {
  background: var(--gold);
  color: var(--ivory);
}
.btn-gold:hover {
  background: var(--gold-dk);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200, 136, 42, 0.4);
}
.btn-outline-light {
  background: transparent;
  color: var(--ivory);
  border: 1px solid rgba(250, 247, 242, 0.35);
}
.btn-outline-light:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .masonry {
    columns: 2;
  }
  .stats-inner {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .stats-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  .stat-num {
    font-size: 2rem;
  }
}
@media (max-width: 560px) {
  .masonry {
    columns: 1;
  }
  .lb-prev {
    left: 0.5rem;
  }
  .lb-next {
    right: 0.5rem;
  }
  .cta-strip .cta-btns {
    flex-direction: column;
    align-items: center;
  }
}
