/* Before After Carousel Styles */
.before-after-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.before-after-grid {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
    width: auto;
    will-change: transform;
    cursor: grab;
    user-select: none;
}

.before-after-grid:active {
    cursor: grabbing;
}

.before-after-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    padding: 15px;
    flex: 0 0 calc(33.333% - 14px);
    min-width: calc(33.333% - 14px);
    box-sizing: border-box;
}

.after-label {
    position: absolute;
    top: 25px;
    right: 25px;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.before-after-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    display: block;
}

.before-after-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.before-after-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.before-after-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.before-after-dot:hover {
    background: var(--primary-color);
    opacity: 0.8;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .before-after-section-top {
        padding: 60px 15px !important;
    }

    .before-after-carousel-wrapper {
        overflow: hidden;
        position: relative;
        width: 100%;
    }

    .before-after-grid {
        display: flex;
        transition: transform 0.5s ease-in-out;
        gap: 0;
        width: 100%;
        will-change: transform;
    }

    .before-after-item {
        min-width: 100%;
        flex: 0 0 100%;
        margin-right: 0;
        padding: 15px;
        box-sizing: border-box;
    }

    .after-label {
        top: 25px;
        right: 25px;
        font-size: 11px;
        padding: 4px 10px;
    }

    .before-after-item img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .before-after-dots {
        display: flex;
    }
}

