document.addEventListener("DOMContentLoaded", function () {
const slider = document.querySelector(".slider");
const afterImage = document.querySelector(".after-image");
const sliderBar = document.querySelector(".slider-bar");
slider.addEventListener("input", function () {
let sliderValue = slider.value;
afterImage.style.clipPath = `inset(0 ${100 - sliderValue}% 0 0)`;
sliderBar.style.left = `${sliderValue}%`;
});
});