/* ===== Gallery page ===== */
.gallery-main {
  padding: 0;
  padding-top: 6rem; /* start below fixed header */
  min-height: 60vh;
}

/* Gallery header (teal) */
.gallery-header {
  background: #0C5780;
  padding: 3rem 1.5rem;
  text-align: center;
}
.gallery-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
}
.gallery-subtitle {
  margin: 0;
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Orange divider */
.gallery-divider {
  height: 4px;
  background: #f97316;
  width: 100%;
}

/* Carousel section (light blue bg) */
.gallery-carousel-section {
  background: #e0f2fe;
  padding: 2.5rem 1.5rem 3rem;
}
.gallery-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: #374151;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gallery-prev {
  left: -1.25rem;
}
.gallery-next {
  right: -1.25rem;
}
.gallery-arrow:hover {
  background: #f3f4f6;
  color: #111827;
}
.gallery-arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.gallery-track-wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.gallery-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.4s ease;
  will-change: transform;
  width: var(--gallery-track-width, 800%);
}
.gallery-item {
  flex: 0 0 calc(100% / 32);
  background: #e0f2fe;
  border-radius: 8px;
  overflow: hidden;
  margin: 0.075rem;
  min-width: 0;
  box-sizing: border-box;
  height: auto;
}
.gallery-item img {
  width: 95%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Pagination (dark grey box, white text) */
.gallery-pagination {
  text-align: center;
  margin-top: 1.5rem;
}
.gallery-pagination-box {
  display: inline-block;
  background: #475569;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
}

/* Responsive: visible count and track width per breakpoint */
.gallery-carousel-section {
  --gallery-visible: 4;
  --gallery-track-width: 800%;
}
/* Tablet */
@media (max-width: 992px) {
  .gallery-carousel-section {
    --gallery-visible: 3;
    --gallery-track-width: 1066.67%;
  }
}
/* Mobile */
@media (max-width: 768px) {
  .gallery-carousel-section {
    --gallery-visible: 2;
    --gallery-track-width: 1600%;
  }
}
/* Mobile */
@media (max-width: 600px) {
  .gallery-arrow {
    width: 40px;
    height: 40px;
  }
  .gallery-prev { left: 0.5rem; }
  .gallery-next { right: 0.5rem; }
  .gallery-header { padding: 2rem 1rem; }
  .gallery-carousel-section { padding: 1.5rem 1rem 2rem; }
}

@media (max-width: 480px) {
  .gallery-carousel-section {
    --gallery-visible: 1;
    --gallery-track-width: 3200%;
  }
  .gallery-item { margin: 0; }
}

