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

/* INTRO */
.gal-intro {
  padding: 72px 0 52px;
  background: var(--ivory);
  text-align: center;
}
.gal-intro-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.75;
}

/* FILTER TABS */
.gal-filters {
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 80px;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.gal-filters-inner {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 40px;
}
.gal-filters-inner::-webkit-scrollbar { display: none; }
.gal-filter-btn {
  padding: 16px 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s;
  letter-spacing: 0.3px;
}
.gal-filter-btn:hover { color: var(--green); }
.gal-filter-btn.active { color: var(--green); border-bottom-color: var(--gold); }

/* GALLERY SECTIONS */
.gal-section {
  padding: 60px 0 40px;
  background: var(--ivory);
}
.gal-section:nth-child(even) { background: var(--white); }
.gal-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.gal-section-title em { color: var(--gold); font-style: italic; }
.gal-section-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.6;
}
.gal-section-header {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.gal-count {
  font-size: 12px;
  color: var(--muted);
  background: var(--ivory-dark);
  padding: 4px 12px;
  border-radius: 50px;
  flex-shrink: 0;
}

/* 3x4 GRID */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 12px;
}

/* GALLERY ITEM */
.gal-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--ivory-dark);
}
.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gal-item:hover img { transform: scale(1.07); }
.gal-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(46,79,20,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.gal-item:hover .gal-item-overlay { background: rgba(46,79,20,0.45); }
.gal-item-zoom {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.3s;
  color: var(--green);
  font-size: 18px;
}
.gal-item:hover .gal-item-zoom { opacity: 1; transform: scale(1); }
.gal-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s;
}
.gal-item:hover .gal-item-label { opacity: 1; transform: translateY(0); }

/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.94);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.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 {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 0 80px rgba(0,0,0,0.9);
  object-fit: contain;
  display: block;
}
.lb-close {
  position: fixed;
  top: 22px;
  right: 28px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10000;
}
.lb-close:hover { background: var(--gold); border-color: var(--gold); }
.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10000;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { background: var(--gold); border-color: var(--gold); }
.lb-info {
  margin-top: 18px;
  text-align: center;
}
.lb-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: #fff;
  margin-bottom: 4px;
}
.lb-counter { font-size: 13px; color: rgba(255,255,255,0.5); }

/* RESPONSIVE */
@media(max-width:1100px) { .gal-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:700px) {
  .gal-grid { grid-template-columns: repeat(2,1fr); grid-auto-rows: 180px; }
  .gal-section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media(max-width:450px) {
  .gal-grid { grid-template-columns: repeat(2,1fr); grid-auto-rows: 150px; }
}

/* ── 360° Virtual Tour CTA in Gallery Intro ── */
.gal-vt-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, var(--green-dark) 0%, #2d5a14 100%);
  border-radius: 16px;
  padding: 28px 32px;
  margin-top: 32px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(63,107,28,0.25);
}
.gal-vt-cta-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.gal-vt-cta-icon svg { width: 28px; height: 28px; }
.gal-vt-cta-text { flex: 1; }
.gal-vt-cta-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  font-family: var(--font-serif);
  line-height: 1.35;
}
.gal-vt-cta-title em { color: var(--gold); font-style: normal; }
.gal-vt-cta-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.80);
  line-height: 1.6;
}
.gal-vt-cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 14px 22px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}
.gal-vt-cta-btn:hover { background: #b8892a; transform: translateY(-2px); }

@media(max-width: 768px) {
  .gal-vt-cta {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 24px 20px;
  }
  .gal-vt-cta-btn { width: 100%; justify-content: center; }
}
