/**
 * Vertical Scroll Gallery - Styles
 * Loop infinit perfecte sense salts
 */

.vsg-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 600px;
}

.vsg-track {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.vsg-track-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-shrink: 0;
}

.vsg-image-wrapper {
    width: 100%;
    padding: 15px 10px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.vsg-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.vsg-image:hover {
    transform: scale(1.02);
}

/* Placeholder per l'editor */
.vsg-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 2px dashed #ccc;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

/* Animació - Cap amunt */
.vsg-container[data-direction="up"] .vsg-track {
    animation: scrollUp var(--vsg-duration, 30s) linear infinite;
}

.vsg-container[data-direction="up"][data-pause-hover="true"]:hover .vsg-track {
    animation-play-state: paused;
}

/* Animació - Cap avall */
.vsg-container[data-direction="down"] .vsg-track {
    animation: scrollDown var(--vsg-duration, 30s) linear infinite;
}

.vsg-container[data-direction="down"][data-pause-hover="true"]:hover .vsg-track {
    animation-play-state: paused;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

@keyframes scrollDown {
    0% {
        transform: translateY(-50%);
    }
    100% {
        transform: translateY(0);
    }
}

/* Assegura que no hi hagi flash durant el loop */
.vsg-track {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

/* Suavitza les vores superior i inferior (opcional - descomenta si vols degradat) */
/*
.vsg-container::before,
.vsg-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 50px;
    z-index: 10;
    pointer-events: none;
}

.vsg-container::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.vsg-container::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}
*/
