/* Стили для canvas анимации секвенции */

.products-video-section {
    position: relative;
    height: 400vh; /* Высота для скролла */
    background-color: transparent;
}

.canvas-wrapper,
.canvas-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #000;
    z-index: 1;
}

#sequence-canvas,
#hero-lightpass {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Индикатор загрузки */
.sequence-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
    width: 300px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid white;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background-color: white;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Оптимизация для мобильных */
@media (max-width: 768px) {
    .products-video-section {
        height: 300vh; /* Меньше для мобильных */
    }
    
    #sequence-canvas,
    #hero-lightpass {
        object-fit: contain; /* Лучше для мобильных */
    }
}

/* Оптимизация производительности */
.canvas-wrapper canvas {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}