/* Full-bleed container — extends from viewport edge to viewport edge
   regardless of parent container width. `margin-inline: calc(50% - 50vw)`
   stretches the element out to both viewport edges without taking it out
   of flow. Using `overflow-x: clip` instead of `hidden` so clipped slides
   do not contribute to document scrollWidth (no horizontal page scroll). */
.gallery-slider {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow-x: clip;
}

/* Splide's own track already uses overflow:hidden — do NOT override it or
   all slides render side-by-side (horizontal scroll + broken slider). */

.gallery-slider__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  border-radius: 14px;
}

/* Pagination — small circles by default, active one stretches into a pill.
   Splide renders pagination as <ul class="splide__pagination"> with <li> > <button>.
   We override default positioning (absolute bottom) so it sits under the track. */
.gallery-slider .splide__pagination {
  position: static;
  /* Splide sets transform: translateX(-50%) by default — reset it or the
     pagination shifts off-screen to the left. */
  transform: none;
  left: auto;
  bottom: auto;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.gallery-slider .splide__pagination li {
  display: inline-flex;
  margin: 0;
}

/* Pagination buttons use Bricks' secondary button classes
   (bricks-button bricks-background-secondary) — no custom colors,
   sizes or transforms. Inactive ones dim via opacity, active stays solid. */
.gallery-slider .splide__pagination__page {
  opacity: 0.4;
  transform: none;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

.gallery-slider .splide__pagination__page:hover,
.gallery-slider .splide__pagination__page.is-active {
  opacity: 1;
  transform: none;
}

@media (max-width: 768px) {
  .gallery-slider .splide__pagination {
    margin-top: 20px;
  }
}
