.gallery-section {
  background-color: var(--bg-main);
  width: 100%;
  padding: 40px 0;
}

/* Main wrapper / gx-slider */
.gallery-section .gallery-container {
  margin: 0 auto;
  padding: 0 16px;
}

/* --- ROW 1: HEADER ROW --- */
.gallery-section .gallery-container .gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  position: relative;
}

/* Pill Badge */
.gallery-section .gallery-container .gallery-header .header-block .pill-badge {
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 4px 18px;
  display: inline-block;
  margin-bottom: 12px;
}

/* Section Heading */
.gallery-section .gallery-container .gallery-header .header-block .section-heading {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  /* color: var(--text-color); */
  line-height: 1.3;
  max-width: 800px;
  margin-bottom: 0;
}

/* Navigation Arrow Buttons */
.gallery-section .gallery-container .gallery-header .nav-arrow-group {
  display: flex;
  gap: 8px;
  align-self: flex-end;
}

.gallery-section .gallery-container .gallery-header .nav-arrow-group .btn-nav {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.gallery-section .gallery-container .gallery-header .nav-arrow-group .btn-nav-left {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.gallery-section .gallery-container .gallery-header .nav-arrow-group .btn-nav-right {
  background-color: var(--brand-teal);
  border: 1px solid var(--brand-teal);
  color: #ffffff;
}

/* Hover States (ignored if disabled) */
.gallery-section .gallery-container .gallery-header .nav-arrow-group .btn-nav-left:not(:disabled):hover {
  background-color: var(--brand-teal);
  border-color: var(--brand-teal);
  color: #ffffff;
}

.gallery-section .gallery-container .gallery-header .nav-arrow-group .btn-nav-right:not(:disabled):hover {
  background-color: var(--brand-teal-hover);
  border-color: var(--brand-teal-hover);
}

/* Disabled States (controlled by your JS) */
.gallery-section .gallery-container .gallery-header .nav-arrow-group .btn-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- ROW 2: GALLERY ROW (gx-slider-track) --- */
.gallery-section .gallery-container .gx-slider-track {
  --gx-gap: 16px;
  --gx-items: 3; /* fallback, overwritten by JS */
  display: flex;
  gap: var(--gx-gap);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gallery-section .gallery-container .gx-slider-track::-webkit-scrollbar {
  display: none;
}

/* Dragging state applied by JS */
.gallery-section .gallery-container .gx-slider-track.is-dragging {
  cursor: grab;
  user-select: none;
}

.gallery-section .gallery-container .gx-slider-track.is-dragging .gallery-card {
  pointer-events: none;
}

/* Photo Cards (gallery-card / gx-slider-slide) */
.gallery-section .gallery-container .gx-slider-track .gallery-card {
  flex: 0 0 calc((100% - ((var(--gx-items) - 1) * var(--gx-gap))) / var(--gx-items));
  height: 300px; /* adjust to taste */
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.gallery-section .gallery-container .gx-slider-track .gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed) ease;
}

.gallery-section .gallery-container .gx-slider-track .gallery-card:hover img {
  transform: scale(1.02);
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 991px) {
  .gallery-section .gallery-container .gallery-header .header-block .section-heading {
    font-size: calc(var(--text-xl) * 0.9);
  }
}

@media (max-width: 767px) {
  .gallery-section .gallery-container .gallery-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px;
  }

  .gallery-section .gallery-container .gallery-header .nav-arrow-group {
    position: absolute;
    top: 0;
    right: 0;
  }

  .gallery-section .gallery-container .gx-slider-track {
    --gx-items: 1.15 !important;
  }
}