/* ===================================
   IMAGE COMPARISON SECTION
   Slider de comparação de imagens
   =================================== */

.image-comparison-section {
    background-color: #f8f7f5;
}

.comparison-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.comparison-slider {
    --divider-width: 3px;
    --divider-color: #007c8c;
    --default-handle-opacity: 1;
    border-radius: 24px;
    overflow: hidden;
}

/* Handle customizado */
.comparison-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 64px;
    height: 64px;
    background: #007c8c;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 124, 140, 0.4);
    color: white;
    cursor: ew-resize;
    transition: all 0.3s ease;
}

.comparison-handle:hover {
    background: #005f6b;
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 124, 140, 0.6);
}

.comparison-handle svg {
    width: 20px;
    height: 20px;
}

/* Labels de antes/depois */
.comparison-labels {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
    z-index: 10;
}

.comparison-labels span {
    background: rgba(0, 124, 140, 0.9);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.label-left {
    background: rgba(44, 44, 44, 0.9) !important;
}

.label-right {
    background: rgba(0, 124, 140, 0.9) !important;
}

/* Imagens responsivas */
.comparison-slider img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* Desktop: Container com proporção 2:1 (mesma das imagens 1000x500) */
@media (min-width: 769px) {
    .comparison-wrapper {
        aspect-ratio: 2 / 1 !important;
    }

    .comparison-slider {
        width: 100%;
        aspect-ratio: 2 / 1 !important;
        height: auto !important;
        background-color: #f8f7f5;
        display: block !important;
    }

    .comparison-slider img,
    img-comparison-slider [slot="first"] img,
    img-comparison-slider [slot="second"] img,
    img-comparison-slider [slot="first"],
    img-comparison-slider [slot="second"] {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: contain !important;
        display: block;
    }

    img-comparison-slider {
        width: 100% !important;
        aspect-ratio: 2 / 1 !important;
        height: auto !important;
        display: block !important;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .comparison-wrapper {
        border-radius: 16px;
    }

    .comparison-slider {
        border-radius: 16px;
    }

    .comparison-handle {
        width: 48px;
        height: 48px;
        gap: 4px;
    }

    .comparison-handle svg {
        width: 16px;
        height: 16px;
    }

    .comparison-labels {
        padding: 0 15px;
        top: 15px;
    }

    .comparison-labels span {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* Animation on load */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comparison-wrapper {
    animation: slideIn 0.6s ease-out;
}
