/* =============================================
   GALLERY PAGE
   ============================================= */

.gallery-page {
  background: var(--white);
  min-height: 100vh;
}

/* ── Hero header ── */
.gallery-page-hero {
  background: linear-gradient(160deg, var(--green-deep) 0%, #0e4a32 55%, #0d3d2b 100%);
  padding: 8rem 2rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gallery-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(78, 203, 141, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.gallery-page-hero::after {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(44,160,110,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.gallery-page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.gallery-page-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  color: white;
  line-height: 1.15;
  margin: 0.75rem 0 1rem;
  letter-spacing: -0.01em;
}

.gallery-page-title em {
  font-style: italic;
  color: var(--gold-light);
}

.gallery-page-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

/* Stats row */
.gallery-page-stats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1rem 2rem;
  backdrop-filter: blur(10px);
}

.gp-stat {
  text-align: center;
  padding: 0 1.5rem;
}

.gp-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-light);
  line-height: 1.1;
}

.gp-stat span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.gp-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* ── Filter tabs ── */
.gallery-page-filters {
  background: white;
  border-bottom: 1px solid rgba(13,61,43,0.08);
  position: sticky;
  top: 80px;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(13,61,43,0.06);
}

.gallery-filters-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-filters-inner::-webkit-scrollbar {
  display: none;
}

.gp-filter {
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-mid);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  letter-spacing: 0.02em;
}

.gp-filter:hover {
  color: var(--green-bright);
}

.gp-filter.active {
  color: var(--green-deep);
  border-bottom-color: var(--green-bright);
}

/* ── Main container ── */
.gallery-page-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── Masonry grid ── */
.gp-grid {
  columns: 4;
  column-gap: 1rem;
  margin-bottom: 3rem;
}

.gp-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--green-pale);
  display: block;
}

/* Tall items span more visual height */
.gp-item.gp-tall img {
  aspect-ratio: 3/4;
}

.gp-item.gp-wide {
  break-inside: avoid;
}

.gp-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
  aspect-ratio: 4/3;
}

.gp-item.gp-tall img {
  aspect-ratio: 3/4;
}

.gp-item:hover img {
  transform: scale(1.06);
}

/* Hidden state for filter */
.gp-item.gp-hidden {
  display: none;
}

/* Appear animation */
.gp-item.gp-visible {
  animation: gpFadeIn 0.4s ease forwards;
}

@keyframes gpFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Overlay ── */
.gp-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,25,15,0.9) 0%, rgba(5,25,15,0.3) 50%, transparent 75%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gp-item:hover .gp-overlay {
  opacity: 1;
}

.gp-overlay-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.gp-cat-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-light);
  background: rgba(13,61,43,0.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(78,203,141,0.3);
  padding: 0.18rem 0.55rem;
  border-radius: 50px;
  width: fit-content;
}

.gp-overlay-info p {
  font-size: 0.82rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  margin: 0;
}

.gp-credit {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
}

.gp-zoom-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: flex-end;
  transition: background var(--transition-fast);
}

.gp-zoom-btn svg { width: 14px; height: 14px; }
.gp-zoom-btn:hover { background: var(--green-bright); border-color: var(--green-bright); }

/* ── Load more ── */
.gp-load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

.gp-count {
  font-size: 0.875rem;
  color: var(--text-mid);
}

.gp-count strong {
  color: var(--green-bright);
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: white;
  border: 2px solid rgba(13,61,43,0.15);
  color: var(--green-deep);
  cursor: pointer;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(13,61,43,0.08);
}

.btn-load-more svg { width: 16px; height: 16px; transition: transform var(--transition-fast); }
.btn-load-more:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13,61,43,0.2);
}
.btn-load-more:hover svg { transform: translateY(3px); }
.btn-load-more:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── Share CTA ── */
.gp-share-cta {
  background: linear-gradient(135deg, var(--green-deep) 0%, #0e4a32 100%);
  border-radius: 24px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.gp-share-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(78,203,141,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.gp-share-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.gp-share-text h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.gp-share-text h3 em {
  font-style: italic;
  color: var(--gold-light);
}

.gp-share-text p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  font-weight: 300;
}

.gp-share-text a {
  color: var(--green-light);
  text-decoration: none;
}

.gp-share-text strong {
  color: white;
}

.gp-share-btns {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.btn-instagram,
.btn-email-photo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-instagram svg,
.btn-email-photo svg { width: 16px; height: 16px; }

.btn-instagram {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366);
  color: white;
  box-shadow: 0 4px 14px rgba(220,39,67,0.4);
}

.btn-instagram:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220,39,67,0.5);
}

.btn-email-photo {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
}

.btn-email-photo:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

/* ── Lightbox ── */
.gp-lb-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  backdrop-filter: blur(10px);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gp-lb-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.gp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gp-lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.gp-lb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 88vw;
  max-height: 90vh;
}

.gp-lb-content img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  display: block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gp-lb-info {
  text-align: center;
}

.gp-lb-info p {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 0.25rem;
}

.gp-lb-info span {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
}

.gp-lb-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 9002;
}

.gp-lb-close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }
.gp-lb-close svg { width: 18px; height: 18px; }

.gp-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 9002;
}

.gp-lb-nav svg { width: 19px; height: 19px; }
.gp-lb-nav:hover { background: var(--green-bright); border-color: var(--green-bright); transform: translateY(-50%) scale(1.1); }
.gp-lb-prev { left: 1.25rem; }
.gp-lb-next { right: 1.25rem; }

.gp-lb-counter {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  z-index: 9002;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .gp-grid { columns: 3; }
}

@media (max-width: 768px) {
  .gallery-page-hero { padding: 7rem 1.25rem 4rem; }
  .gallery-page-stats { flex-wrap: wrap; padding: 1rem; gap: 0.5rem; }
  .gp-stat-divider { display: none; }
  .gp-stat { padding: 0.5rem 1rem; }
  .gp-grid { columns: 2; }
  .gp-share-inner { flex-direction: column; }
  .gp-share-cta { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .gp-grid { columns: 2; column-gap: 0.6rem; }
  .gp-item { margin-bottom: 0.6rem; }
  .gallery-page-container { padding: 2rem 1rem 4rem; }
  .gp-lb-prev { left: 0.5rem; }
  .gp-lb-next { right: 0.5rem; }
  .gp-share-btns { flex-direction: column; width: 100%; }
  .btn-instagram, .btn-email-photo { justify-content: center; }
}