﻿/* =====================================================
   BEFORE AFTER SECTION
===================================================== */

.before-after-section {
    padding: 30px 0 35px;
}



/* =====================================================
   HEADER
===================================================== */

.before-after-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.before-after-subtitle {
    display: block;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.before-after-title {
    margin: 0;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
}



/* =====================================================
   NAVIGATION
===================================================== */

.before-after-navigation {
    display: flex;
    gap: 12px;
}

    .before-after-navigation button {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: 1px solid rgba(255,255,255,.15);
        background: transparent;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: .3s;
        cursor: pointer;
    }

        .before-after-navigation button:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
        }



/* =====================================================
   SLIDER
===================================================== */

.before-after-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.before-after-track {
    display: flex;
    gap: 14px;
    transition: transform .55s ease;
    will-change: transform;
}

.ba-card {
    flex: 0 0 calc((100% - 28px) / 3);
}



/* =====================================================
   CARD
===================================================== */

.ba-wrapper {
    position: relative;
    width: 100%;
    height: 165px;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

.ba-after {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-before {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

    .ba-before img {
        width: 200%;
        height: 100%;
        object-fit: cover;
    }



/* =====================================================
   IMAGE SLIDER
===================================================== */

.ba-slider {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ba-slider span {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #08111f;
        border: 2px solid var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        font-size: 17px;
    }



/* =====================================================
   TAGS
===================================================== */

.ba-tag {
    position: absolute;
    bottom: 12px;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.ba-tag-left {
    left: 12px;
    background: #101820;
    color: #fff;
}

.ba-tag-right {
    right: 12px;
    background: var(--primary-color);
    color: #001014;
}



/* =====================================================
   STATS BOX
===================================================== */

.before-after-stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
    width: 100%;
    margin-top: 18px;
    padding: 18px 26px;
    background: linear-gradient( 135deg, rgba(15,24,38,.96), rgba(10,18,32,.96) );
    border: 1px solid rgba(0,255,255,.18);
    border-radius: 18px;
    box-shadow: inset 0 0 22px rgba(0,255,255,.04), 0 14px 32px rgba(0,0,0,.30);
}



/* =====================================================
   STAT
===================================================== */

.ba-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

    .ba-stat div:last-child {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .ba-stat h3 {
        margin: 0;
        color: #fff;
        font-size: 26px;
        font-weight: 800;
        line-height: 1;
    }

    .ba-stat span {
        margin-top: 4px;
        color: #aeb8c8;
        font-size: 13px;
    }



/* =====================================================
   ICON
===================================================== */

.ba-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,255,255,.05);
    border: 1px solid rgba(0,255,255,.18);
    color: #28f2f6;
    font-size: 22px;
    transition: .35s;
}

.ba-stat:hover .ba-icon {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 0 28px rgba(0,255,255,.35);
}



/* =====================================================
   RESPONSIVE
===================================================== */

@media(max-width:992px) {

    .before-after-track {
        gap: 12px;
    }

    .ba-card {
        flex: 0 0 calc((100% - 12px)/2);
    }

    .before-after-stats {
        grid-template-columns: repeat(2,1fr);
    }
}

@media(max-width:576px) {

    .before-after-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .ba-card {
        flex: 0 0 100%;
    }

    .before-after-stats {
        grid-template-columns: 1fr;
    }
}
