
/* =================================
   BEFORE & AFTER REDESIGN
================================= */
.before-after-section {
    padding: 80px 0;
}

/* GRID */
.ba-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

/* CARD */
.ba-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease;
}

.ba-card:hover {
    transform: translateY(-8px);
}

/* IMAGE WRAP */
.ba-image-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* IMAGE */
.ba-image {
    position: relative;
    overflow: hidden;
}

.ba-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    transition: 0.4s ease;
}

.ba-card:hover .ba-image img {
    transform: scale(1.08);
}

/* OVERLAY */
.ba-image::after {
    content: "View Result";
    position: absolute;
    inset: 0;
    background: rgba(26, 44, 163, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    opacity: 0;
    transition: 0.3s ease;
    cursor: pointer;
}

.ba-image:hover::after {
    opacity: 1;
}

/* TAG */
.ba-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    z-index: 3;
    color: #fff;
}

/* BEFORE */
.before-tag {
    background: var(--header-bg);
}

/* AFTER */
.after-tag {
    background: var(--cta-color);
    color: #000;
}

/* SVG */
.ba-tag svg {
    flex-shrink: 0;
}

/* BADGE */
.service-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #fff;
    color: #000;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    z-index: 3;
}

/* ARROW */
.ba-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    color: #000;
    z-index: 5;
}

.info-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ba-arrow svg {
    width: 22px;
    height: 22px;
}

/* CONTENT */
.ba-content {
    padding: 30px;
    text-align:left;
}

.ba-content h3 {
    font-size: 24px;
    margin-bottom: 12px;
    text-align: center;
}

.ba-content p {
    color: #000;
    line-height: 1.7;
    font-size: 16px;
    max-width: 700px;
    margin: auto;
    text-align:center;
}

/* STATS */
.ba-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.ba-stats span {
    background: #f4f4f4;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
}
/*buttons*/
.why-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 15px !important;
    justify-content:center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    margin-bottom: 50px !important;
    margin-top: 20px !important;
}

/* =========================================
   RESPONSIVE BREAKPOINTS
========================================= */

/* LARGE TABLET (1024px and below) */
@media (max-width: 1024px) {
    .before-after-section {
        padding: 60px 0;
    }

    .ba-image img {
        height: 300px;
    }

    .ba-content {
        padding: 25px;
    }

    .ba-content h3 {
        font-size: 22px;
    }

    .ba-content p {
        font-size: 18px;
        line-height: 1.6;
    }

    .ba-stats span {
        padding: 6px 12px;
        font-size: 14px;
    }
}

/* TABLET (768px and below) */
@media (max-width: 768px) {
    .before-after-section {
        padding: 50px 0;
    }

    .ba-grid {
        gap: 20px;
    }

    .ba-image-wrap {
        grid-template-columns: 1fr;
    }

    .ba-image img {
        height: 260px;
    }

    .ba-arrow {
        display: none;
    }

    .ba-content {
        padding: 22px;
    }

    .ba-content h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .ba-content p {
        font-size: 18px;
        line-height: 1.6;
        text-align: left;
    }

    .ba-stats {
        gap: 10px;
        margin-top: 15px;
    }

    .ba-stats span {
        padding: 6px 12px;
        font-size: 14px;
    }

    .why-buttons {
        flex-direction: column !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        margin-bottom: 30px !important;
    }
    /* Adjust tags for mobile */
    .ba-tag {
        top: 10px;
        left: 10px;
        padding: 5px 12px;
        font-size: 13px;
    }

    .service-badge {
        bottom: 10px;
        right: 10px;
        padding: 4px 12px;
        font-size: 13px;
    }
}

/* MOBILE LARGE (680px and below) */
@media (max-width: 680px) {
    .before-after-section {
        padding: 40px 0;
    }

    .ba-grid {
        gap: 18px;
    }

    .ba-image img {
        height: 220px;
    }

    .ba-content {
        padding: 18px;
    }

    .ba-content h3 {
        font-size: 18px;
    }

    .ba-content p {
        font-size: 16px;
        line-height: 1.5;
    }

    .ba-stats {
        gap: 8px;
    }

    .ba-stats span {
        padding: 5px 10px;
        font-size: 12px;
    }

    .ba-tag {
        top: 8px;
        left: 8px;
        padding: 4px 10px;
        font-size: 13px;
        gap: 4px;
    }

    .ba-tag svg {
        width: 12px;
        height: 12px;
    }

    .service-badge {
        bottom: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 9px;
    }

    /* Overlay text size adjustment */
    .ba-image::after {
        font-size: 14px;
    }
}

/* MOBILE MEDIUM (480px and below) */
@media (max-width: 480px) {
    .before-after-section {
        padding: 35px 0;
    }

    .ba-grid {
        gap: 15px;
    }

    .ba-image img {
        height: 180px;
    }

    .ba-content {
        padding: 15px;
    }

    .ba-content h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .ba-content p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 0;
    }

    .ba-stats {
        gap: 6px;
        margin-top: 12px;
    }

    .ba-stats span {
        padding: 4px 8px;
        font-size: 11px;
    }

    .ba-tag {
        top: 6px;
        left: 6px;
        padding: 3px 8px;
        font-size: 11px;
    }

    .ba-tag svg {
        width: 10px;
        height: 10px;
    }

    .service-badge {
        bottom: 6px;
        right: 6px;
        padding: 3px 8px;
        font-size: 10px;
    }

    .ba-image::after {
        font-size: 12px;
    }
}

/* MOBILE SMALL (375px and below) */
@media (max-width: 375px) {
    .before-after-section {
        padding: 30px 0;
    }

    .ba-image img {
        height: 150px;
    }

    .ba-content {
        padding: 12px;
    }

    .ba-content h3 {
        font-size: 15px;
    }

    .ba-content p {
        font-size: 13px;
        line-height: 1.4;
    }

    .ba-stats span {
        padding: 3px 7px;
        font-size: 10px;
    }

    .ba-tag {
        padding: 2px 6px;
        font-size: 10px;
    }

    .service-badge {
        padding: 2px 6px;
        font-size: 10px;
    }
}

/* EXTRA SMALL (320px and below) */
@media (max-width: 320px) {
    .before-after-section {
        padding: 25px 0;
    }

    .ba-image img {
        height: 130px;
    }

    .ba-content {
        padding: 10px;
    }

    .ba-content h3 {
        font-size: 14px;
    }

    .ba-content p {
        font-size: 12px;
        line-height: 1.4;
    }

    .ba-stats span {
        padding: 2px 6px;
        font-size: 10px;
    }
}

/* HOVER EFFECTS FOR DESKTOP ONLY */
@media (hover: hover) {
    .ba-card:hover {
        transform: translateY(-8px);
    }

    .ba-card:hover .ba-image img {
        transform: scale(1.08);
    }
}

/* TOUCH DEVICES - REMOVE HOVER EFFECTS */
@media (hover: none) {
    .ba-card:hover {
        transform: none;
    }

    .ba-card:hover .ba-image img {
        transform: none;
    }

    .ba-image::after {
        display: none;
    }
}
/* AUTOMATED MOBILE OVERRIDES FOR GRIDS */
@media (max-width: 767px) {
    .ba-grid {
        grid-template-columns: 1fr !important;
    }
    .ba-image-wrap {
        grid-template-columns: 1fr !important;
    }
}

/* AUTOMATED MOBILE OVERRIDES FOR GRIDS V2 */
@media (max-width: 767px) {
    .ba-grid {
        grid-template-columns: 1fr !important;
    }
    .ba-image-wrap {
        grid-template-columns: 1fr !important;
    }
}

    .ba-arrow {
        flex-wrap: wrap !important;
    }
    .ba-stats {
        flex-wrap: wrap !important;
    }
    .why-buttons {
        flex-wrap: wrap !important;
    }
}
