/**
 * Lazy Loading Styles - Energy Future Insights
 * Estilos para sistema de carregamento progressivo
 */

/* Estado inicial da imagem lazy */
img[data-src] {
    background-color: #e5e7eb;
    background-size: cover;
    background-position: center;
}

/* Loading state - shimmer effect */
.lazy-loading {
    position: relative;
    overflow: hidden;
}

.lazy-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Loaded state */
.lazy-loaded {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Error state */
.lazy-error {
    opacity: 0.6;
    filter: grayscale(1);
}

/* Prevenção de layout shift */
img[data-src] {
    min-height: 200px;
    object-fit: cover;
}

/* Mobile optimization */
@media (max-width: 768px) {
    img[data-src] {
        min-height: 150px;
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lazy-loaded {
    animation: fadeIn 0.3s ease-in-out;
}

/* Blur placeholder (opcional) */
img[data-src].blur-up {
    filter: blur(10px);
    transition: filter 0.3s ease-in-out;
}

img[data-src].blur-up.lazy-loaded {
    filter: blur(0);
}
















