/* Main container */
.ba-wrapper {
    max-width: 1100px;
    width: 100%;
    margin: auto;
}

.ba-slider {
    width: 100%;
}

.ba-slide {
    display: flex !important;
    justify-content: center;
}

/* Main before/after container */
.slider-container {
    position: relative;
    width: 1100px;
    max-width: 100%;
    height: 740px;
    overflow: hidden;
    margin: 0 auto;
    border: 8px solid #2C3C91;
    border-radius: 22px;
    background: #000;
}

/* Before / After Image Wrappers */
.after-image,
.before-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.after-image {
    z-index: 1;
}

.before-image {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    /* JS updates this on load */
}

/* The actual Images */
.after-image img,
.before-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* DRAG HANDLE */
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 10px;
    height: 100%;
    background: #2C3C91;
    cursor: ew-resize;
    z-index: 5;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* DRAG HANDLE ICON */
.slider-handle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 65px;
    height: 350px;
    transform: translate(-50%, -50%);
    background-image: url("icon.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
}

/* BEFORE / AFTER LABELS */
.label-btn {
    position: absolute;
    bottom: 60px;
    padding: 15px 35px;
    background: linear-gradient(to bottom, #50A8E2, #2C3C91);
    color: white;
    font-size: 22px;
    font-weight: bold;
    border-radius: 40px;
    z-index: 10;
    white-space: nowrap;
    pointer-events: none;
}

.before-image .label-btn {
    left: 15%;
}

.after-image .label-btn {
    right: 15%;
}

/* NAVIGATION BUTTON WRAPPER */
.ba-controls {
    height: 54px;
    width: 106px;
    margin: auto;
    background-color: #2C3C91;
    margin-top: 50px;
    display: flex;
    border-radius: 13.31px;
    justify-content: center;
    gap: 2px;
    align-items: center;
}

/* NAVIGATION BUTTONS */
button.ba-nav {
    width: 50px;
    height: 50px;
    border-radius: 12.31px;
    border: none;
    background: #ffffff;
    color: #2C3C91;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    transition: background 0.25s, transform 0.15s;
}

/* BUTTON HOVER */
button.ba-nav:hover,
button.ba-nav:active,
button.ba-nav:focus {
    background: #2C3C91;
}

button.ba-nav:hover .left,
button.ba-nav:active .left,
button.ba-nav:focus .left {
    filter: brightness(0) invert(1);
}

button.ba-nav:hover .right,
button.ba-nav:active .right,
button.ba-nav:focus .right {
    filter: brightness(0) invert(1);
}

/* ICONS INSIDE BUTTONS (img tags) */
button.ba-nav img {
    width: 10px;
    height: 10px;
    transition: filter 0.3s ease;
}

/* HOVER → ICON TURNS WHITE */
button.ba-nav:hover img {
    filter: brightness(0) invert(1);
}

/* ACTIVE PRESS EFFECT */
button.ba-nav:active {
    transform: translateY(1px);
}

/* ================== RESPONSIVE ================== */
@media (max-width: 900px) {

    .slider-container {
        height: 480px;
    }

    .after-image,
    .before-image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .slider-handle {
        width: 6px;
    }

    .slider-handle::before {
        width: 38px;
    }

    .label-btn {
        bottom: 40px;
        font-size: 18px;
        padding: 10px 26px;
    }
}

@media (max-width: 600px) {

    .slider-container {
        height: 360px;
        border-width: 6px;
    }

    .after-image,
    .before-image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100% !important;
        object-fit: cover;
        object-position: center;
    }

    .slider-handle::before {
        width: 30px;
    }

    .label-btn {
        bottom: 30px;
        font-size: 16px;
        padding: 8px 20px;
    }

    .before-image .label-btn {
        left: 10%;
    }

    .after-image .label-btn {
        right: 11%;
    }
}