/* Image Optimization CSS */

/* Lazy loading placeholder */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

img.loaded {
    opacity: 1;
}

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

/* Image optimization styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive images */
.img-responsive {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Logo optimization */
.logo-white, .logo-color {
    width: auto;
    max-width: 270px;
    height: auto;
    object-fit: contain;
}

/* Demo list images optimization */
.demo-list {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Preloader optimization */
.preloader-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* Image hover effects */
.img-hover-zoom {
    transition: transform 0.3s ease-in-out;
}

.img-hover-zoom:hover {
    transform: scale(1.05);
}

/* Image loading states */
.img-loading {
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-loading::before {
    content: "Loading...";
    color: #6c757d;
    font-size: 14px;
}

/* Critical images - load immediately */
.critical-img {
    opacity: 1 !important;
    transition: none !important;
}

/* Optimize large images */
.hero-img, .banner-img {
    object-fit: cover;
    width: 100%;
    height: auto;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .demo-list {
        width: 24px !important;
        height: 24px !important;
    }
    
    .logo-white, .logo-color {
        max-width: 200px;
    }
}