/* ============================================================
   GALLERY PAGE — gallery.php
============================================================ */

/* ============================================================
   PAGE HERO
============================================================ */
.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
  color: var(--c-white);
  background: var(--c-dark);
}
.page-hero-bg { position: absolute; inset: 0; z-index: 0; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.page-hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(16,42,29,.55) 0%, rgba(16,42,29,.80) 100%),
    linear-gradient(90deg, rgba(16,42,29,.88) 0%, rgba(16,42,29,.20) 70%);
}
.page-hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 100px 110px;
  max-width: 780px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #C7D2C9;
  margin-bottom: 22px;
}
.breadcrumb a { color: #C7D2C9; transition: color var(--dur) var(--ease); }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb i { font-size: 10px; opacity: .7; }
.breadcrumb span { color: var(--c-accent); font-weight: 600; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #E6EDE7;
  margin-bottom: 22px;
}
.hero-eyebrow i { color: var(--c-accent); }

.page-hero-title {
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: 1.08;
  font-weight: 800;
  color: var(--c-white);
  margin: 0 0 20px;
  letter-spacing: -0.025em;
}
.page-hero-text {
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.7;
  color: #D6DED7;
  max-width: 640px;
  margin: 0;
}

/* ============================================================
   GALLERY — GRID
============================================================ */
.gallery-section { padding-top: 88px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-cream-2);
  padding: 0;
  border: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 1s var(--ease);
}
.gallery-item:hover img { transform: scale(1.07); }

/* Zoom icon */
.gallery-item-zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: var(--c-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  box-shadow: var(--shadow-sm);
}
.gallery-item:hover .gallery-item-zoom,
.gallery-item:focus-visible .gallery-item-zoom {
  opacity: 1;
  transform: none;
}

/* ============================================================
   LIGHTBOX
============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  background: rgba(10,20,14,.96);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-figure {
  position: relative;
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  background: #0d1d13;
  transform: scale(.96);
  opacity: 0;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.lightbox.is-open .lightbox-img {
  transform: none;
  opacity: 1;
}

.lightbox-counter {
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--c-accent);
  text-transform: uppercase;
}

/* Close */
.lightbox-close {
  position: absolute;
  top: 22px; right: 22px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--c-white);
  border: 1px solid rgba(255,255,255,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  z-index: 2;
}
.lightbox-close:hover { background: rgba(255,255,255,.18); transform: rotate(90deg); }

/* Prev / Next */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: var(--c-white);
  border: 1px solid rgba(255,255,255,.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
  z-index: 2;
}
.lightbox-nav:hover { background: rgba(255,255,255,.18); }
.lightbox-prev { left: 22px; }
.lightbox-prev:hover { transform: translate(-3px, -50%); }
.lightbox-next { right: 22px; }
.lightbox-next:hover { transform: translate(3px, -50%); }

body.lightbox-open { overflow: hidden; }

/* ============================================================
   FINAL CTA
============================================================ */
.final-cta {
  position: relative;
  overflow: hidden;
  background: var(--c-primary);
  color: var(--c-white);
  margin-top: 96px;
}
.final-cta-bg { position: absolute; inset: 0; z-index: 0; }
.final-cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.final-cta-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(16,42,29,.92) 0%, rgba(16,42,29,.70) 60%, rgba(16,42,29,.55) 100%);
}
.final-cta-inner { position: relative; z-index: 1; padding-block: 96px; }
.final-cta-content { max-width: 640px; }
.final-cta-title {
  font-size: clamp(28px, 3.6vw, 46px);
  color: var(--c-white);
  margin: 0 0 16px;
}
.final-cta-text {
  font-size: 17px;
  color: #D6DED7;
  line-height: 1.7;
  margin: 0 0 30px;
}
.final-cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============================================================
   REVEAL
============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1100px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  .lightbox { padding: 40px 20px; }
  .lightbox-close { top: 14px; right: 14px; width: 42px; height: 42px; font-size: 16px; }
  .lightbox-nav { width: 46px; height: 46px; font-size: 16px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-img { max-height: 76vh; }
}

@media (max-width: 640px) {
  .page-hero { min-height: 420px; }
  .page-hero-inner { padding-block: 80px 90px; }

  .gallery-section { padding-top: 64px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 12px; }

  .final-cta { margin-top: 72px; }
  .final-cta-inner { padding-block: 72px; }
  .final-cta-actions .btn { flex: 1 1 100%; }
}