
/* Scroll Sync Plugin CSS */

html, body {
	overflow-x: visible ! important;
}

.scroll-sync-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    isolation: isolate;
    transform: translateZ(0);
}

.scroll-sync-content {
    display: grid;
    grid-template-columns: 10% 40% 45%;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
    box-sizing: border-box;
    position: relative;
}

/* Títulos - STICKY forzado */
.scroll-sync-titles {
    position: -webkit-sticky;
    position: sticky;
    top: 25vh;
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 999;
    transform: translateZ(0);
    isolation: isolate;
    will-change: auto;
    backface-visibility: hidden;
}

.scroll-sync-title {
    opacity: 0.3;
    transition: opacity 0.3s cubic-bezier(0.71, 0.19, 0.68, 0.94);
    margin: 3px 0;
    position: relative;
}

.scroll-sync-title.active {
    opacity: 1;
}

.scroll-sync-title span {
	display: flex;
    align-items: center;
	line-height: 1.2;
    font-weight: 300;
	font-size:12pt;
}


.scroll-sync-title span:after {
	display: inline-block;
    content: "";
    width: 0;
    height: 3px;
    background-color: #CCC;
    margin-left: 5px;
    transition: width 0.5s;
}

.scroll-sync-title.active span:after {
    width: 15px;
}

/* Imágenes - STICKY forzado */
.scroll-sync-images {
    position: -webkit-sticky;
    position: sticky;
    top: 25vh;
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 998;
    transform: translateZ(0);
    isolation: isolate;
    will-change: auto;
    backface-visibility: hidden;
}

.scroll-sync-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 80%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s cubic-bezier(0.71, 0.19, 0.68, 0.94);
    z-index: 1;
    will-change: opacity;
}

.scroll-sync-image.active {
    opacity: 1;
    z-index: 5;
}

.scroll-sync-image img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateZ(0);
}

/* Descripciones */
.scroll-sync-descriptions {
    position: relative;
    z-index: 1;
}

.scroll-sync-description {
    padding: 30vh 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.scroll-sync-description .description-content {
    width: 100%;
}

.scroll-sync-description p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 1rem;
}

.scroll-sync-description h4 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.scroll-sync-description ul,
.scroll-sync-description ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.scroll-sync-description li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Forzar STICKY - Override para elementos problemáticos */
.scroll-sync-titles,
.scroll-sync-images {
    position: sticky !important;
    transform: translateZ(0) !important;
    filter: none !important;
    perspective: none !important;
}

/* Fix para page builders */
.elementor-section .scroll-sync-titles,
.elementor-section .scroll-sync-images,
.vc_row .scroll-sync-titles,
.vc_row .scroll-sync-images,
.et_pb_row .scroll-sync-titles,
.et_pb_row .scroll-sync-images {
    position: sticky !important;
    isolation: isolate !important;
    transform: translateZ(0) !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .scroll-sync-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .scroll-sync-titles,
    .scroll-sync-images {
        position: relative !important;
        height: auto;
        top: 0;
        transform: none !important;
    }
    
    .scroll-sync-titles { order: 1; }
    .scroll-sync-images { order: 2; min-height: 50vh; }
    .scroll-sync-descriptions { order: 3; }
    
    .scroll-sync-image {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        opacity: 1;
        margin-bottom: 1rem;
    }
    
    .scroll-sync-description {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .scroll-sync-title {
        opacity: 1;
        margin-bottom: 1rem;
    }
    
    .scroll-sync-title h3 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .scroll-sync-title h3 {
        font-size: 1.5rem;
    }
    
    .scroll-sync-description p {
        font-size: 1rem;
    }
}
        