/* ==========================================================================
   IMAGE GALLERY HERO SECTION (Gallery.css)
   ========================================================================== */

.gallery-hero-section {
  padding: 1.5rem 0 2rem 0;
  width: 100%;
  background-color: #ffffff;
}

.gallery-hero-card {
  background-color: #ffffff;
  background-image: url('../image/image-gallery/image-galery-hero-image.png');
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 410px;
  padding: 3rem 4.5rem;
  width: 100%;
  box-shadow: 0 12px 36px rgba(0, 46, 132, 0.05);
  border: 1px solid rgba(0, 46, 132, 0.08);
  position: relative;
  overflow: hidden;
}

.gallery-hero-content {
  max-width: 42%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 4;
  position: relative;
  margin-top: -1.5rem;
  /* Center/shift text slightly upwards */
}

/* Breadcrumb Styles inside Card */
.gallery-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.gallery-breadcrumb-link {
  color: #2563eb;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.gallery-breadcrumb-link svg {
  width: 18px;
  height: 18px;
}

.gallery-breadcrumb-link:hover {
  opacity: 0.8;
}

.gallery-breadcrumb-sep {
  font-size: 0.9rem;
  color: #2563eb;
  font-weight: 500;
  font-family: var(--font-secondary), sans-serif;
}

.gallery-breadcrumb-current {
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.9rem;
  color: #2563eb;
  font-weight: 600;
}

.gallery-hero-title {
  font-family: var(--font-primary), sans-serif;
  font-size: 2.65rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1.25rem 0;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.gallery-hero-title .title-accent {
  color: #2563eb;
}

.gallery-hero-desc {
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.6;
  color: #475569;
  margin: 0;
  max-width: 440px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .gallery-hero-card {
    padding: 2.5rem 3rem;
  }

  .gallery-hero-title {
    font-size: 2.3rem;
  }

  .gallery-hero-content {
    max-width: 45%;
  }
}

@media (max-width: 992px) {
  .gallery-hero-card {
    min-height: auto;
    padding: 2.5rem 2rem;
    background-position: 70% center;
  }

  .gallery-hero-content {
    max-width: 55%;
  }
}

@media (max-width: 768px) {
  .gallery-hero-card {
    background-image: none !important;
    background: #f8fafc !important;
    padding: 2.5rem 1.5rem;
    min-height: auto;
    border: 1px solid rgba(0, 46, 132, 0.08);
  }

  .gallery-hero-content {
    max-width: 100%;
    margin-top: 0;
  }

  .gallery-hero-title {
    font-size: 2rem;
  }

  .gallery-hero-desc {
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   DYNAMIC GALLERY CONTENT SECTION
   ========================================================================== */

.gallery-main-section {
  padding: .5rem 0;
  background-color: #ffffff;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Background Decors */
.gal-dots-decor-tl {
  position: absolute;
  top: 25px;
  left: 25px;
  width: 110px;
  height: 110px;
  pointer-events: none;
  z-index: 1;
}

.gal-wavy-decor-tr {
  position: absolute;
  top: 0;
  right: 0;
  width: 440px;
  height: 300px;
  pointer-events: none;
  z-index: 1;
}

.gallery-section-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  display: block;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
  z-index: 2;
}

.gallery-section-header .gallery-subtitle-tag {
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.gallery-section-header .gallery-main-title {
  font-family: var(--font-primary), sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1rem 0;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.gallery-section-header .gallery-main-title .title-accent {
  color: #2563eb;
}

.gallery-section-header .title-underline {
  width: 50px;
  height: 3px;
  background-color: #2563eb;
  margin: 0 auto 1rem auto;
  border-radius: 2px;
}

.gallery-section-header .gallery-desc {
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 680px;
}

/* Tabs & Corner Search Bar Wrapper */
.gallery-filter-wrapper {
  margin-bottom: 1.75rem;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.gallery-tabs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  background-color: #f8fafc;
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

/* Corner Search Box */
.gallery-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
}

.gallery-search-input {
  width: 100%;
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.85rem;
  padding: 0.6rem 2.4rem 0.6rem 1rem;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #1e293b;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.gallery-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.gallery-search-icon {
  position: absolute;
  right: 0.85rem;
  font-size: 0.88rem;
  color: #64748b;
  pointer-events: none;
}

/* Individual tab buttons */
.gallery-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  background-color: transparent;
  border: none;
  border-radius: 12px;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gallery-tab-btn:hover {
  color: #2563eb;
  background-color: rgba(37, 99, 235, 0.04);
}

.gallery-tab-btn.active {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.gallery-tab-btn i {
  font-size: 0.9rem;
}

/* Grid Layout */
.gallery-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Grid Cards */
.gallery-photo-card {
  background-color: #ffffff;
  border: 1px solid rgba(0, 46, 132, 0.05);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 46, 132, 0.015);
  height: 250px;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-photo-card:hover {
  /* transform: translateY(-5px); */
  box-shadow: 0 12px 30px rgba(0, 46, 132, 0.06);
}

.gallery-photo-img-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: #f1f5f9;
}

.gallery-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-photo-card:hover .gallery-photo-img {
  transform: scale(1.05);
}

/* Description Overlay at bottom left */
.gallery-photo-tag-overlay {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background-color: #ffffff;
  border-radius: 10px;
  padding: 0.2rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.02);
  z-index: 3;
  max-width: calc(100% - 1.5rem);
}

.gallery-photo-tag-overlay .tag-icon-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
}

.gallery-photo-tag-overlay .tag-text-block {
  display: flex;
  flex-direction: column;
}

.gallery-photo-tag-overlay .tag-text-block h5,
.gallery-photo-tag-overlay .tag-text-block .gallery-date-label {
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-photo-tag-overlay .tag-text-block p {
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.65rem;
  color: #64748b;
  margin: 0;
  line-height: 1.1;
}

/* Lazy Load Button — centered below the photo grid */
.gallery-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.btn-gallery-load-more {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: #ffffff;
  color: #2563eb;
  border: 1.5px solid rgba(37, 99, 235, 0.35);
  border-radius: 50px;
  padding: 0.75rem 2.4rem;
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.06);
}

.btn-gallery-load-more i {
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}

.btn-gallery-load-more:hover {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
  transform: translateY(-2px);
}

.btn-gallery-load-more:hover i {
  transform: translateY(2px);
}

.btn-gallery-load-more:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* Loading spinner shown on the Load More button while the AJAX
   request is in flight (toggled via the .is-loading class in JS) */
.btn-gallery-load-more .btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0.85;
  animation: gallery-spinner-spin 0.7s linear infinite;
}

.btn-gallery-load-more.is-loading .btn-spinner {
  display: inline-block;
}

.btn-gallery-load-more.is-loading .btn-chevron {
  display: none;
}

@keyframes gallery-spinner-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
.gallery-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gallery-empty-state i {
  font-size: 3rem;
  color: #cbd5e1;
}

.gallery-empty-state p {
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .gallery-photos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-section-header .gallery-main-title {
    font-size: 2rem;
  }

  .gallery-tabs-container {
    padding: 0.35rem;
    border-radius: 12px;
  }

  .gallery-tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .gallery-photos-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .gallery-photo-card {
    height: 220px;
  }
}

/* ==========================================================================
   GALLERY LIGHTBOX MODAL (Our-Team style slider)
   ========================================================================== */

/* Overlay */
.gal-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: rgba(5, 10, 25, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.gal-lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Inner wrapper */
.gal-lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Close button */
.gal-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 9100;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.gal-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.1) rotate(90deg);
}

.gal-lightbox-close svg {
  width: 20px;
  height: 20px;
}

/* Counter badge */
.gal-lightbox-counter {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9100;
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 4px 14px;
  letter-spacing: 0.04em;
}

/* Viewport — fixed height, overflow visible for blurred side slides */
.gal-lightbox-viewport {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 78vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}

/* Track — flex row of slides */
.gal-lightbox-track {
  display: flex;
  align-items: center;
  gap: 28px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  height: 100%;
}

/* Each slide */
.gal-lb-slide {
  flex: 0 0 520px;
  max-width: calc(100vw - 160px);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  filter: blur(5px) grayscale(40%);
  opacity: 0.3;
  transform: scale(0.8);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

/* Active slide — center, sharp, full scale */
.gal-lb-slide.active {
  filter: none;
  opacity: 1;
  transform: scale(1);
  cursor: default;
  z-index: 5;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

/* Image — fixed height, compact */
.gal-lb-slide-img-wrap {
  width: 100%;
  flex: 0 0 46%;
  min-height: 0;
  overflow: hidden;
  background: #0a0f1e;
}

.gal-lb-slide-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Compact info bar */
.gal-lb-slide-info {
  flex-shrink: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.gal-lb-info-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.gal-lb-info-text {
  display: flex;
  flex-direction: column;
}

.gal-lb-info-date {
  font-family: var(--font-primary), sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.gal-lb-info-cat {
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.67rem;
  font-weight: 600;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 1px;
}

/* Description — compact with scroll */
.gal-lb-slide-desc {
  flex: 1 1 auto;
  width: 100%;
  max-height: 140px;
  overflow-y: auto;
  background: #f8fafc;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding: 12px 18px 14px;
  font-family: var(--font-secondary), sans-serif;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #334155;
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.gal-lb-slide-desc::-webkit-scrollbar {
  width: 4px;
}

.gal-lb-slide-desc::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Nav arrows */
.gal-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9100;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gal-lb-nav:hover {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.gal-lb-nav svg {
  width: 22px;
  height: 22px;
}

.gal-lb-prev {
  left: 28px;
}

.gal-lb-next {
  right: 28px;
}

.gal-lb-nav.disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

/* Mobile */
@media (max-width: 768px) {
  .gal-lb-nav {
    display: flex;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 9200;
  }

  .gal-lb-prev {
    left: 8px;
  }

  .gal-lb-next {
    right: 8px;
  }

  .gal-lb-nav svg {
    width: 18px;
    height: 18px;
  }

  .gal-lb-slide {
    flex: 0 0 calc(100vw - 80px);
    max-width: calc(100vw - 80px);
    max-height: 82vh;
    transform: scale(0.92);
  }

  .gal-lb-slide.active {
    transform: scale(1);
  }

  .gal-lb-slide-img-wrap {
    flex: 1 1 auto;
  }

  .gal-lb-slide-desc {
    max-height: none;
    overflow-y: visible;
    flex: 0 0 auto;
    padding: 12px 16px 14px;
    font-size: 0.8rem;
  }

  .gal-lightbox-counter {
    top: 14px;
  }

  .gal-lightbox-close {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
  }
}