/* Progressive Loading Enhancements */

/* Fade in post items on load */
.post-item-wrapper {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple items */
.post-item-wrapper:nth-child(1) { animation-delay: 0.05s; }
.post-item-wrapper:nth-child(2) { animation-delay: 0.1s; }
.post-item-wrapper:nth-child(3) { animation-delay: 0.15s; }
.post-item-wrapper:nth-child(4) { animation-delay: 0.2s; }
.post-item-wrapper:nth-child(5) { animation-delay: 0.25s; }
.post-item-wrapper:nth-child(6) { animation-delay: 0.3s; }
.post-item-wrapper:nth-child(7) { animation-delay: 0.35s; }
.post-item-wrapper:nth-child(8) { animation-delay: 0.4s; }

/* Smooth image loading for featured images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .post-item-wrapper,
    img[loading="lazy"] {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
