.before-image {
    width: 100%;
}

.after-image {
    width: 100%;
}

.hover-text {
    z-index: 1001;
    position: absolute;
    bottom: 10px;
    color: white;
    font-size: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.before-text {
    left: 20%;
}

@media screen and (max-width:870px) {
    .before-text {
        left: 5%;
    }
}

.after-text {
    right: 20%;
}

@media screen and (max-width:870px) {
    .after-text {
        right: 5%;
    }
}

.no-hover-text .hover-text {
    opacity: 0 !important;
    visibility: hidden !important;
    transition-delay: 0s !important;
}

.comparison-container:hover .hover-text {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s, 0s;
}

.comparison-container {
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;

}
.image-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: 100vh; 
}

.before-image {
    max-width: 1200px;
    max-height: 100vh;
}

.after-image {
    max-width: 1200px;
    max-height: 100vh;
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left;
}

.before-image {
    position: absolute;
    inset: 0;
    width: var(--position);
}


.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    opacity: 0;
    width: 100%;
    height: 100%;
}

.slider:focus-visible~.slider-button {
    outline: 5px solid #fff;
    outline-offset: 3px;
}

.slider-line {
    position: absolute;
    inset: 0;
    width: .1rem;
    height: 100%;
    z-index: 10;
    background-color: #fff;
    left: var(--position);
    transform: translateX(-50%);
    pointer-events: none;
}

.slider-button {
    position: absolute;
    background-color: #fff;
    color: white;
    padding: .5rem;
    border-radius: 100vw;
    display: grid;
    place-items: center;
    top: 50%;
    left: var(--position);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 100;
    box-shadow: 1px 1px 1px hsl(0, 50%, 2%, .5);
}


.texto-before {
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 80%;
    text-align: center;
}

.texto-before h1 {
    color: #f0f0f0;
    font-size: 45px;
    line-height: 1.5;
    margin: 0;
}