/* Performance Optimization CSS */
/* Reduz render blocking e melhora LCP */

/* Prevenir layout shift durante carregamento */
.lazy-load-container {
    min-height: 200px;
    background: linear-gradient(90deg, #1a1a2e 25%, #2d2d4a 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Otimização para imagens lazy loaded */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Prevenir CLS em containers de imagem */
.image-container {
    aspect-ratio: 1;
    overflow: hidden;
    background: #1a1a2e;
}

/* Performance para animações */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduzir impacto de reflows */
.no-reflow {
    contain: layout style paint;
}

/* Otimizar font loading */
.font-loading {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Prevenir layout shift em cards */
.card-stable {
    min-height: 400px;
    contain: layout;
}

/* Performance para scroll */
.smooth-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Reduzir repaints */
.isolation-layer {
    isolation: isolate;
    will-change: auto;
}

/* Otimização para mobile */
@media (max-width: 768px) {
    .lazy-load-container {
        min-height: 150px;
    }
    
    .card-stable {
        min-height: 350px;
    }
}

/* Prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .lazy-image {
        transition: none;
    }
    
    .loading-shimmer {
        animation: none;
    }
}
