.before-after-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.section-title-center {
    text-align: center;
    color: #284139;
    font-size: 2.5rem;
    margin-bottom: 60px;
    font-weight: 700;
}

.before-after-grid {
    display: grid;
    /*grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));*/
    gap: 40px;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.image-comparison {
    position: relative;
    height: 800px;
    overflow: hidden;
    margin: 4px;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.before-image {
    z-index: 2;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.after-image {
    z-index: 1;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    z-index: 3;
    cursor: ew-resize;
    transform: translateX(-50%);
    
}

.slider-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    
    background: white;
    border: 4px solid #284139;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.project-info {
    padding: 25px;
    text-align: center;
}

.project-info h3 {
    color: #284139;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .before-after-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .image-comparison {
        height: 250px;
    }
    
    .section-title-center {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .slider-handle::after {
        width: 35px;
        height: 35px;
    }
}

/* Touch support for mobile */
@media (hover: none) {
    .slider-handle::after {
        width: 45px;
        height: 45px;
    }
}