/**
 * Visual Comparison Section - PREMIUM #5 HIGH-END ULTIMATE
 * Light background with ultra-premium dark cards
 * FIXED: Mobile labels now stay on opposite ends
 * UPDATED: CTA section now has BLUE BACKGROUND
 * 
 * @package PriceWise Pro
 */

/* ==================== COMPARISON VISUAL SECTION BASE ==================== */

.comparison-visual {
    padding: 100px 40px;
    background: 
        linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(250, 250, 250, 0.9) 100%),
        radial-gradient(circle at 20% 80%, rgba(0, 102, 255, 0.03), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 255, 0.03), transparent 50%);
    position: relative;
    overflow: hidden;
}

.comparison-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.4), transparent);
}

.comparison-visual::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.4), transparent);
}

.comparison-visual-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ==================== VISUAL COMPARISON HEADER ==================== */

.comparison-visual-header {
    text-align: center;
    margin-bottom: 60px;
}

.comparison-visual-label {
    display: inline-block;
    padding: 10px 26px;
    background: rgba(0, 102, 255, 0.1);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    color: #0066FF;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 102, 255, 0.2);
}

.comparison-visual-title {
    font-size: 52px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 25px;
    color: #0a0a0a;
    letter-spacing: -0.02em;
}

.comparison-visual-title .gradient-text {
    background: linear-gradient(135deg, #0066FF 0%, #00A3FF 50%, #0066FF 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: premiumGradientShift 4s ease infinite;
    display: inline-block;
}

@keyframes premiumGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.comparison-visual-description {
    font-size: 20px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ==================== COMPARISON VIEWER ==================== */

.comparison-viewer {
    max-width: 1200px;
    margin: 0 auto 60px;
    position: relative;
}

/* ==================== LABELS ABOVE SLIDER - CLEAN VERSION ==================== */

.comparison-labels-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 0 20px;
}

.comparison-label-item {
    flex: 0 0 auto;
}

.before-label-top {
    margin-right: auto;
}

.after-label-top {
    margin-left: auto;
}

.label-tag {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.before-label-top .label-tag {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.after-label-top .label-tag {
    background: linear-gradient(135deg, #0066FF, #0052CC);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

.label-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ==================== SLIDER MODE WITH IMAGES ==================== */

.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(0, 102, 255, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04),
        0 12px 32px rgba(0, 0, 0, 0.06),
        0 24px 64px rgba(0, 102, 255, 0.08);
    cursor: ew-resize;
    user-select: none;
    background: #000;
    contain: layout style paint;
    isolation: isolate;
}

.slider-container::before {
    content: '';
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle at 50% 0%, rgba(0, 102, 255, 0.06), transparent 70%);
    z-index: -1;
    border-radius: 50px;
}

.comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.1s ease-out;
}

.comparison-image img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    vertical-align: middle;
    border: none;
    outline: none;
    transition: transform 0.15s ease-out, filter 0.15s ease-out;
}

.before-image {
    z-index: 1;
}

.after-image {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
    will-change: clip-path;
}

/* Color overlay effects during drag */
.slider-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        rgba(0, 102, 255, 0.15) 0%,
        transparent 30%,
        transparent 70%,
        rgba(0, 102, 255, 0.25) 100%
    );
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.slider-container.dragging::after {
    opacity: 1;
}

/* Slider Handle with Enhanced Animations */
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    max-width: 100%;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    transition: filter 0.2s ease;
}

.slider-container.dragging .slider-handle {
    filter: drop-shadow(0 0 40px rgba(0, 102, 255, 0.8));
}

.handle-line {
    flex: 1;
    width: 4px;
    background: #0066FF;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    max-height: 100%;
    transition: all 0.2s ease;
}

.slider-container.dragging .handle-line {
    background: #0066FF;
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.8);
    width: 6px;
}

.handle-circle {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: -2px 0;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-container.dragging .handle-circle {
    transform: scale(1.2);
    background: linear-gradient(135deg, #ffffff 0%, #CCE5FF 100%);
    box-shadow: 0 0 40px rgba(0, 102, 255, 0.8), 
                0 4px 30px rgba(0, 0, 0, 0.4);
}

/* Pulse animation on handle */
.handle-circle::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid rgba(0, 102, 255, 0.5);
    opacity: 0;
    animation: handlePulse 2s ease-in-out infinite;
}

@keyframes handlePulse {
    0%, 100% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.slider-container.dragging .handle-circle::after {
    animation: none;
    opacity: 0;
}

.handle-arrows {
    width: 30px;
    height: 30px;
    color: #0066FF;
    transition: all 0.2s ease;
}

.slider-container.dragging .handle-arrows {
    color: #0052CC;
    transform: scale(1.1);
}

/* Slider Instructions */
.slider-instructions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.slider-container.dragging ~ .slider-instructions {
    opacity: 0.3;
}

.drag-icon {
    width: 24px;
    height: 24px;
    color: #0066FF;
    animation: dragHint 2s ease-in-out infinite;
}

@keyframes dragHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.slider-container.dragging ~ .slider-instructions .drag-icon {
    animation: none;
}

/* ==================== COMPARISON STATS - PREMIUM HIGH-END ==================== */

.comparison-visual-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.comparison-stat-card {
    background: linear-gradient(145deg, #001429 0%, #0a1929 50%, #001429 100%);
    padding: 45px 32px;
    border-radius: 26px;
    border: 2px solid rgba(0, 102, 255, 0.3);
    text-align: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 16px rgba(0, 20, 41, 0.2),
        0 8px 32px rgba(0, 20, 41, 0.15),
        0 0 0 1px rgba(0, 102, 255, 0.1);
}

.comparison-stat-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 26px;
    padding: 3px;
    background: linear-gradient(135deg, #0066FF, #00A3FF, #0066FF);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.6s ease;
    animation: premiumBorderFlow 3s ease infinite;
}

@keyframes premiumBorderFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.comparison-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.comparison-stat-card:hover::before {
    opacity: 1;
}

.comparison-stat-card:hover::after {
    opacity: 1;
}

.comparison-stat-card:hover {
    transform: translateY(-15px) scale(1.03);
    border-color: rgba(0, 102, 255, 0.6);
    box-shadow: 
        0 8px 24px rgba(0, 102, 255, 0.3),
        0 16px 48px rgba(0, 102, 255, 0.2),
        0 24px 72px rgba(0, 20, 41, 0.25),
        0 0 60px rgba(0, 102, 255, 0.15);
}

.comparison-stat-icon {
    font-size: 42px;
    margin-bottom: 20px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 102, 255, 0.3));
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.comparison-stat-card:hover .comparison-stat-icon {
    transform: scale(1.25) translateY(-5px) rotateY(15deg);
    filter: drop-shadow(0 8px 20px rgba(0, 102, 255, 0.5));
}

.comparison-stat-number {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #CCE5FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.comparison-stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* ==================== COMPARISON VISUAL CTA - BLUE BACKGROUND ==================== */

.comparison-visual-cta {
    text-align: center;
    padding: 50px 40px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 102, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.comparison-visual-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.comparison-visual-cta::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.comparison-visual-cta h3 {
    font-size: 36px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.comparison-visual-cta p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.btn-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 20px 50px;
    font-size: 18px;
    background: #ffffff;
    color: #0066FF;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    position: relative;
    z-index: 1;
}

.btn-large:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    background: #f0f0f0;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
    .comparison-visual-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .comparison-visual {
        padding: 80px 20px;
    }

    .comparison-visual-title {
        font-size: 36px;
    }

    .comparison-visual-description {
        font-size: 16px;
    }
    
    /* FIXED: Keep labels on opposite ends on mobile */
    .comparison-labels-top {
        margin-bottom: 20px;
        padding: 0 10px;
    }
    
    .label-tag {
        font-size: 9px;
        padding: 6px 16px;
    }

    .comparison-visual-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .comparison-stat-card {
        padding: 35px 25px;
    }

    .comparison-visual-cta {
        padding: 40px 30px;
    }
    
    .comparison-visual-cta h3 {
        font-size: 28px;
    }
    
    .comparison-visual-cta p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .comparison-visual-title {
        font-size: 28px;
    }

    .handle-circle {
        width: 50px;
        height: 50px;
    }

    .handle-arrows {
        width: 24px;
        height: 24px;
    }

    .comparison-stat-icon {
        font-size: 36px;
    }

    .comparison-stat-number {
        font-size: 30px;
    }
    
    .comparison-visual-cta {
        padding: 35px 25px;
    }
    
    .comparison-visual-cta h3 {
        font-size: 24px;
    }
    
    .btn-large {
        padding: 16px 40px;
        font-size: 16px;
    }
}