/* ==========================================================================
   IMAGE GALLERIES & EVENT ALBUMS
   White to Soft Sky Blue Gradient Canvas + Geometry Mesh + Locked Parallax
   ========================================================================== */

.ehs-gallery-section {
  position: relative !important;
  z-index: 5 !important;
  padding: 85px 0 120px 0 !important;
  background-color: #f0f9ff !important;
  border-top: 1px solid #bae6fd !important;
  border-bottom: 1px solid #bae6fd !important;
  overflow: hidden !important;
  clear: both !important;
  display: block !important;

  /* TRUE OPTICAL LOCKED PARALLAX */
  background-attachment: fixed !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  -webkit-background-size: cover !important;
}

/* White to Light Sky Blue Gradient Canvas Overlay */
.ehs-gal-bg-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(240, 249, 255, 0.90) 35%,
    rgba(224, 242, 254, 0.86) 70%,
    rgba(186, 230, 253, 0.88) 100%
  ) !important;
  z-index: 1 !important;
  pointer-events: none !important;
}

/* Light Blue Subtle Radar Mesh Overlay */
.ehs-gal-mesh-overlay {
  position: absolute !important;
  inset: 0 !important;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(2, 132, 199, 0.16) 1.5px, transparent 1.5px),
    linear-gradient(rgba(2, 132, 199, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.05) 1px, transparent 1px),
    repeating-radial-gradient(circle at 50% 50%, transparent 0, transparent 40px, rgba(2, 132, 199, 0.04) 41px, transparent 42px) !important;
  background-size: 32px 32px, 32px 32px, 32px 32px, 160px 160px !important;
  opacity: 0.95 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* Header */
.ehs-gallery-header {
  text-align: center !important;
  max-width: 820px !important;
  margin: 0 auto 50px auto !important;
  position: relative !important;
  z-index: 5 !important;
}

.ehs-gallery-badge {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #0284c7 !important;
  border: 1.5px solid #38bdf8 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  padding: 6px 16px !important;
  border-radius: 20px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1) !important;
}

.ehs-gallery-title {
  font-size: 36px !important;
  font-weight: 900 !important;
  color: #002244 !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.25 !important;
}

.ehs-gallery-sub {
  font-size: 15.5px !important;
  color: #334155 !important;
  line-height: 1.65 !important;
  margin: 0 !important;
}

/* Cards Grid */
.ehs-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  position: relative !important;
  z-index: 5 !important;
}

.ehs-gallery-card-inner {
  background: #ffffff !important;
  border: 1.5px solid rgba(186, 230, 253, 0.8) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 12px 30px rgba(0, 34, 68, 0.08) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.ehs-gallery-card:hover .ehs-gallery-card-inner {
  transform: translateY(-7px) !important;
  border-color: #0284c7 !important;
  box-shadow: 0 20px 42px rgba(2, 132, 199, 0.2) !important;
}

.ehs-gallery-img-box {
  position: relative !important;
  width: 100% !important;
  height: 200px !important;
  overflow: hidden !important;
  background: #002244 !important;
}

.ehs-gallery-cover-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.5s ease !important;
}

.ehs-gallery-card:hover .ehs-gallery-cover-img {
  transform: scale(1.07) !important;
}

.ehs-gallery-count-badge {
  position: absolute !important;
  bottom: 12px !important;
  right: 12px !important;
  background: rgba(0, 34, 68, 0.85) !important;
  color: #ffffff !important;
  backdrop-filter: blur(6px) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.ehs-gallery-card-body {
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
}

.ehs-gallery-card-title {
  font-size: 17px !important;
  font-weight: 900 !important;
  color: #002244 !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.35 !important;
}

.ehs-gallery-card-desc {
  font-size: 13px !important;
  color: #64748b !important;
  line-height: 1.55 !important;
  margin: 0 0 18px 0 !important;
  flex: 1 1 auto !important;
}

.ehs-gallery-open-btn {
  background: linear-gradient(135deg, #0056b3 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 11px 16px !important;
  border-radius: 8px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-top: auto !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
}

.ehs-gallery-open-btn:hover {
  background: #002244 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(0, 34, 68, 0.3) !important;
}

/* ==========================================================================
   POPUP LIGHTBOX MODAL (DEFAULT: HIDDEN)
   ========================================================================== */

.ehs-gallery-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none !important; /* Always hidden by default */
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  box-sizing: border-box !important;
}

/* Active state for modal when button is clicked */
.ehs-gallery-modal.is-active {
  display: flex !important;
}

.ehs-gallery-modal-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 20, 45, 0.85) !important;
  backdrop-filter: blur(8px) !important;
}

.ehs-gallery-modal-content {
  position: relative !important;
  z-index: 2 !important;
  background: #ffffff !important;
  border-radius: 20px !important;
  width: 100% !important;
  max-width: 950px !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4) !important;
}

.ehs-gallery-modal-head {
  padding: 20px 26px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #f8fafc !important;
}

.ehs-gallery-modal-close {
  background: #e2e8f0 !important;
  border: none !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  font-size: 22px !important;
  cursor: pointer !important;
  color: #002244 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s ease !important;
}

.ehs-gallery-modal-close:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

.ehs-gallery-photos-grid {
  padding: 24px 26px !important;
  overflow-y: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
}

.ehs-gallery-single-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.ehs-gallery-item-wrap {
  width: 100% !important;
  height: 180px !important;
  background: #002244 !important;
  overflow: hidden !important;
}

.ehs-gallery-item-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.ehs-gallery-item-caption {
  padding: 10px 12px !important;
  font-size: 12.5px !important;
  color: #334155 !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  background: #ffffff !important;
  border-top: 1px solid #f1f5f9 !important;
}

@media (max-width: 1024px) {
  .ehs-gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .ehs-gallery-section {
    padding: 60px 0 80px 0 !important;
    background-attachment: scroll !important;
  }
  .ehs-gallery-title {
    font-size: 28px !important;
  }
  .ehs-gallery-grid {
    grid-template-columns: 1fr !important;
  }
  .ehs-gallery-photos-grid {
    grid-template-columns: 1fr !important;
  }
}