/* ==========================================================================
   GALLERY.CSS — Dedicated Styles for Photo Gallery & Lightbox
   ========================================================================== */

/* Gallery Hero Banner */
.gallery-hero {
  padding-block: 56px 44px;
  background: var(--gradient-hero-bg);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gallery-hero .eyebrow {
  margin-top: 4px;
  margin-bottom: 16px;
  color: #ecfdf5 !important;
  background: rgba(6, 78, 59, 0.85) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
}
.gallery-hero h1 {
  color: #fff;
  margin-block: 10px 14px;
  font-size: clamp(2.1rem, 3.4vw, 3.2rem);
  font-weight: 800;
}
.gallery-hero p {
  color: #dcfce7;
  max-width: 660px;
  margin-inline: auto;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Gallery Filter Tabs */
.gallery-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.gallery-filter-btn {
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-text-soft);
  background: var(--color-bg-alt);
  border: 1.5px solid rgba(4, 120, 87, 0.18);
  transition: all 0.3s ease;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none;
}
.gallery-filter-btn:hover,
.gallery-filter-btn:focus,
.gallery-filter-btn:active,
.gallery-filter-btn.is-active {
  background: var(--gradient-brand);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-md);
  outline: none !important;
}

/* Gallery Grid Layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.gallery-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  background: #fff;
  border: 1px solid rgba(21, 127, 72, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.gallery-card-thumb {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.gallery-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-card-thumb img {
  transform: scale(1.08);
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 40, 26, 0.2) 0%, rgba(4, 40, 26, 0.82) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-zoom-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.7);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-zoom-icon {
  transform: scale(1);
}

.gallery-card-caption {
  padding: 18px 20px;
  background: #fff;
}

.gallery-card-caption h4 {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 4px;
  font-weight: 700;
}

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   LIGHTBOX MODAL SYSTEM
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 24, 17, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 920px;
  width: 100%;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.lightbox-modal.is-open .lightbox-content {
  transform: scale(1) translateY(0);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(6, 78, 59, 0.9);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #f87171;
  transform: rotate(90deg) scale(1.08);
}

.lightbox-img-wrap {
  width: 100%;
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #041a13;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  animation: none !important;
}

.lightbox-title {
  margin-top: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-align: center;
  font-family: var(--font-display);
}
