/*  Before / after slider grid*/

.ba-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  --position: 50%;
  background-color: #000;
}

.ba-image-container {
  position: relative;
  max-width: 800px;
  max-height: 90vh;
  aspect-ratio: 1 / 1;
}

.ba-slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left;
  display: block;
}

.ba-image-before {
  position: absolute;
  inset: 0;
  width: var(--position);
}

.ba-image-after {
  position: static;
}

/* invisible range input over the whole image */
.ba-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
  width: 100%;
  height: 100%;
}

.ba-slider:focus-visible ~ .ba-slider-button {
  outline: 5px solid black;
  outline-offset: 3px;
}

/* white vertical line */
.ba-slider-line {
  position: absolute;
  inset: 0;
  width: 0.2rem;
  height: 100%;
  background-color: #fff;
  left: var(--position);
  transform: translateX(-50%);
  pointer-events: none;
}

/* round button with arrows */
.ba-slider-button {
  position: absolute;
  background-color: #fff;
  color: black;
  padding: 0.5rem;
  border-radius: 100vw;
  display: grid;
  place-items: center;
  top: 50%;
  left: var(--position);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 1px 1px 1px hsl(0 0% 2% / 0.5);
}

/* makes sure images don t overflow in small columns */
@media (max-width: 575.98px) {
  .ba-image-container {
    aspect-ratio: 1 / 1;
  }
}


/* gallery image captionas*/
.gallery-caption {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--brand-dark);
  font-size: 1.1rem;
  text-align: center;
  margin-top: 1rem;
  display: block;
}