/* New Before After Slider CSS */
.ba {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Default to 16:9 for gallery */
    overflow: hidden;
    user-select: none;
    touch-action: none;
    border-radius: 12px;
    background: #f0f0f0;
}

/* Service pages use 1:1 ratio */
.service-slider .ba {
    aspect-ratio: 1 / 1 !important;
}

/* Gallery Section Header */
.ba-section-header {
    text-align: center;
    padding: 60px 20px 10px;
}

.ba-section-header .ba-subtitle {
    display: inline-block;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #24a3df;
    margin-bottom: 12px;
}

.ba-section-header .ba-title {
    font-family: "Cerebri Pro", sans-serif;
    font-size: 48px;
    font-weight: bold;
    color: #181b31;
    line-height: 1.2;
    margin: 0 0 16px;
}

.ba-section-header .ba-accent-line {
    display: inline-block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #24a3df, #5eb8d5);
    border-radius: 4px;
    margin-bottom: 8px;
}

.ba-section-header .ba-description {
    font-family: "Open Sans", sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .ba-section-header {
        padding: 30px 15px 5px;
    }

    .ba-section-header .ba-title {
        font-size: 28px;
    }

    .ba-section-header .ba-description {
        font-size: 15px;
    }
}

/* Gallery Grid */
.ba-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    padding: 20px 0 40px;
}

@media (max-width: 768px) {
    .ba-grid {
        grid-template-columns: 1fr !important;
        gap: 24px;
        padding: 20px 0;
    }

    .ba {
        aspect-ratio: 3 / 2;
        /* Balanced ratio for mobile */
    }

    .ba .label {
        font-size: 12px;
        padding: 4px 10px;
    }
}

.ba img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    pointer-events: none;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ba img.after,
.ba img.after-img {
    clip-path: inset(0 0 0 50%);
    transition: clip-path 0.05s linear;
}

.ba img.before,
.ba img.before-img {
    z-index: 1;
}

.ba img.after,
.ba img.after-img {
    z-index: 2;
}

.ba .divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    transform: translateX(-1px);
    pointer-events: none;
    z-index: 10;
}

.ba .handle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.20);
    display: grid;
    place-items: center;
    pointer-events: none;
    z-index: 11;
}

.ba .handle svg {
    width: 26px;
    height: 26px;
    opacity: 0.9;
    stroke: #30A7FF;
}

.ba .label {
    position: absolute;
    bottom: 18px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #fff;
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.40);
    backdrop-filter: blur(2px);
    z-index: 10;
    pointer-events: none;
}

.ba .label.before {
    left: 18px;
}

.ba .label.after {
    right: 18px;
}

.ba input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 20;
}

/* Force-neutralize Elementor's framing styles for service pages */
.elementor-element-ac385b8 .elementor-widget-container {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}