/* =========================================================
   IPC 2026 — Gallery Section
   Visual refresh for the existing #gallery Swiper/lightbox.
   Existing image paths, Swiper markup and lightbox behaviour are kept.
   ========================================================= */

#gallery.gallery-2026,
#gallery {
  position: relative;
  padding: 92px 0 100px;
  background: #f7f8f5;
  overflow: hidden;
}

#gallery.gallery-2026::before,
#gallery::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(18,63,52,.08);
  border-radius: 50%;
  right: -230px;
  top: -180px;
  pointer-events: none;
}

#gallery .container {
  position: relative;
  z-index: 2;
  max-width: 1180px;
}

#gallery .section-header {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

#gallery .section-header::before {
  content: "54TH ANNUAL SESSION";
  display: block;
  margin-bottom: 10px;
  color: #b2873d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.5px;
}

#gallery .section-header h2 {
  margin: 0 0 12px;
  color: #153e33;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -1px;
  font-weight: 600;
}

#gallery .section-header p {
  margin: 0;
  color: #718079;
  font-size: 15px;
  line-height: 1.7;
}

/* Existing Swiper remains the gallery engine. */
#gallery .gallery-slider {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 48px;
  overflow: hidden;
}

#gallery .swiper-wrapper {
  align-items: stretch;
}

#gallery .swiper-slide {
  height: auto;
  padding: 0 7px;
}

#gallery .swiper-slide > a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(18,63,52,.10);
  transform: translateZ(0);
}

#gallery .swiper-slide > a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,35,29,.35), transparent 45%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

#gallery .swiper-slide img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .45s ease;
}

#gallery .swiper-slide > a:hover img {
  transform: scale(1.045);
}

#gallery .swiper-slide > a:hover::after {
  opacity: 1;
}

/* Pagination */
#gallery .swiper-pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

#gallery .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  margin: 0 4px !important;
  background: #b9c3bd;
  opacity: 1;
  transition: all .2s ease;
}

#gallery .swiper-pagination-bullet-active {
  width: 22px;
  border-radius: 10px;
  background: #b2873d;
}

/* Keep the gallery compact on desktop even if legacy styles are loaded. */
@media (min-width: 992px) {
  #gallery .swiper-slide {
    width: 25% !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #gallery.gallery-2026,
  #gallery {
    padding: 76px 0 88px;
  }

  #gallery .swiper-slide {
    width: 33.333% !important;
  }
}

@media (max-width: 767px) {
  #gallery.gallery-2026,
  #gallery {
    padding: 65px 0 78px;
  }

  #gallery .section-header {
    margin-bottom: 30px;
    padding: 0 14px;
  }

  #gallery .section-header h2 {
    font-size: 34px;
  }

  #gallery .section-header p {
    font-size: 14px;
  }

  #gallery .gallery-slider {
    width: calc(100% - 24px);
  }

  #gallery .swiper-slide {
    width: 82% !important;
    padding: 0 5px;
  }

  #gallery .swiper-slide img {
    aspect-ratio: 4 / 3;
  }
}
