/* ============================================================
   Harishya Infratech LLP - Before / After Comparison Slider
   File: css/before-after.css
   ============================================================ */

.comparison-section {
    position: relative;
    padding: 80px 0;
}

.comparison-wrapper {
    position: relative;
    width: 100%;
    max-width: 980px;
    margin: 36px auto 0;
    height: 480px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 35px rgba(56, 189, 248, 0.15);
    border: 1px solid var(--border);
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    background: #000;
}

@media (max-width: 768px) {
    .comparison-wrapper {
        height: 320px;
        border-radius: 14px;
    }
}

.comparison-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.comparison-after-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    border-right: 2px solid #00e5ff;
    box-shadow: 4px 0 25px rgba(0, 229, 255, 0.5);
    transition: none;
}

.comparison-after-box .comparison-img {
    width: 980px;
    max-width: none;
}

@media (max-width: 980px) {
    .comparison-after-box .comparison-img {
        width: 100vw;
    }
}

.comparison-badge {
    position: absolute;
    top: 20px;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    z-index: 5;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
}

.comparison-badge-before {
    right: 20px;
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.comparison-badge-after {
    left: 20px;
    background: rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

.comparison-slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00e5ff 0%, #0284c7 100%);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.8), 0 4px 15px rgba(0,0,0,0.5);
    border: 3px solid #ffffff;
    cursor: ew-resize;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #07101d;
    font-size: 1.1rem;
    font-weight: 800;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.comparison-slider-handle:hover,
.comparison-slider-handle:active {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 35px rgba(0, 229, 255, 1), 0 6px 20px rgba(0,0,0,0.6);
}

.comparison-slider-handle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.comparison-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 980px;
    margin: 28px auto 0;
}

.comparison-stat-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.comparison-stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.comparison-stat-title {
    font-size: 0.82rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.comparison-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}
