/* Gallery-only before/after sliders. Linked from gallery/index.html only. */

.sp-ba-module { width: 100%; padding-bottom: 8px; }

.sp-ba-block {
  width: 100%;
  margin: 8px 0 22px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.sp-ba-block__title {
  margin: 0 0 4px;
  padding: 0;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #013B85;
}

.sp-ba-block__hint {
  margin: 0 0 14px;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  color: #102e63;
}

.sp-ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px; /* Oct 2026, Adam: more space between before/after cards */
  padding: 12px; /* breathing room so card shadows aren't crowded */
  align-items: start;
}

.sp-ba {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 4px 16px rgba(18, 48, 107, 0.16);
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.sp-ba--land { aspect-ratio: 4 / 3; }

.sp-ba:focus { outline: none; }
.sp-ba:focus-visible { outline: 3px solid #22d7eb; outline-offset: 3px; }

.sp-ba-module .sp-ba__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.sp-ba__img--before {
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.sp-ba__label {
  position: absolute;
  top: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 4px;
  background: #013B85;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.03em;
  pointer-events: none;
}

.sp-ba__label--before { left: 12px; }
.sp-ba__label--after { right: 12px; background: #102e63; }

.sp-ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  z-index: 2;
  width: 2px;
  transform: translateX(-50%);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(1, 59, 133, 0.35);
  pointer-events: none;
}

.sp-ba__handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #013B85 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath d='M16 14 L10 22 L16 30 M28 14 L34 22 L28 30' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 44px 44px no-repeat;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(16, 46, 99, 0.35);
}

@media (max-width: 700px) {
  .sp-ba-grid { grid-template-columns: 1fr; gap: 16px; padding: 8px; }
  .sp-ba-block__title { font-size: 24px; }
}
