/* Before & After Slider CSS */
.fs-before-after-slider {
    position: relative;
    padding: 24px 0;
    clear: both;
    margin-top: 48px;
    margin-bottom: 48px;
    z-index: 2;
    width: 100%;
}

.fs-ba-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.fs-ba-header h2 {
    margin-bottom: 0;
}

.fs-ba-title {
    text-align: left;
    margin: 0;
    padding: 0;
    font-size: 28px;
    line-height: 1;
}

.fs-ba-controls {
    position: static;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
    z-index: 20;
    transform: translateY(-3px);
}

.fs-ba-controls button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: 0 6px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.fs-ba-viewport {
    overflow: hidden;
    min-height: 260px;
    width: 100%;
}

.fs-ba-slides {
    display: flex;
    gap: 18px;
    transition: transform 300ms ease;
    align-items: flex-start;
    flex-wrap: nowrap;
    width: 100%;
    will-change: transform;
}

.fs-ba-slide {
    position: relative;
    flex: 0 0 33.333%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
    background: #f7f7f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background-clip: padding-box;
}

/* 1:1 aspect-ratio box via the classic padding-top trick.
   Safari has long-standing bugs resolving `aspect-ratio` on flex
   children combined with `align-items`, so we avoid that property
   here rather than relying on it. */
.fs-ba-slide::after {
    content: "";
    display: block;
    padding-top: 100%;
}

.fs-ba-after {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.fs-ba-before {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    -webkit-clip-path: inset(0 50% 0 0);
    clip-path: inset(0 50% 0 0);
    will-change: clip-path;
}

.fs-ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.fs-ba-handle-btn {
    pointer-events: all;
    background: transparent;
    border: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.fs-ba-handle-line {
    display: block;
    width: 4px;
    height: 80%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

/* responsive: 3 across desktop, 1 across mobile */
@media (max-width:699px) {
    .fs-ba-slide {
        flex: 0 0 100%;
    }

    .fs-ba-controls {
        top: 10px;
    }
}