/**
 * Lazy Loading Styles
 */

/* Base lazy load styles */
img.lazy-loading,
img[data-src] {
    opacity: 0.6;
    filter: blur(5px);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

img.lazy-loaded {
    opacity: 1;
    filter: blur(0);
}

img.lazy-error {
    opacity: 0.3;
    filter: grayscale(100%);
}

/* Skeleton loader animation */
img.lazy-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(232, 180, 184, 0.1) 0%,
        rgba(232, 180, 184, 0.3) 50%,
        rgba(232, 180, 184, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

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

/* Fade in effect */
img.fade-in {
    animation: fadeIn 0.3s ease-in forwards;
}

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

/* Placeholder background */
img.lazy-placeholder {
    background: linear-gradient(
        135deg,
        rgba(232, 180, 184, 0.1) 0%,
        rgba(255, 209, 220, 0.1) 100%
    );
    min-height: 200px;
}

/* Container for aspect ratio preservation */
.lazy-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.lazy-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery specific styles */
.gallery-item img[data-src],
.gallery-item img.lazy-loading {
    transform: scale(1.05);
}

.gallery-item img.lazy-loaded {
    transform: scale(1);
}
