/* Lazy Loading Styles */

/* Images that haven't loaded yet - subtle fade in effect */
img[loading="lazy"]:not([src]) {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

/* Images that have loaded or have src */
img.lazy-loaded,
img[loading="lazy"][src],
img[loading="eager"] {
    opacity: 1 !important;
}

/* Placeholder for images while loading */
img[data-src]:not([src]) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    min-height: 200px;
}

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

/* Ensure images don't cause layout shift */
img {
    max-width: 100%;
    height: auto;
}

/* Critical images load immediately without fade */
img[data-critical="true"],
.hero img,
header img {
    opacity: 1 !important;
}
