/* Mini Flush - Image Optimization CSS */
/* Responsive images and compression optimization */

/* Base image styles with optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimize-contrast;
    -ms-interpolation-mode: nearest-neighbor;
}

/* Responsive image containers */
.image-container {
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Hero section image optimization */
.hero-image {
    max-width: 380px;
    max-height: 380px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Feature images optimization */
.feature-image {
    max-width: 318px;
    max-height: 318px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-image:hover {
    transform: scale(1.05);
}

/* Logo optimization */
.logo {
    max-width: 50px;
    max-height: 50px;
    width: auto;
    height: auto;
}

/* Lazy loading placeholder */
.lazy-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive breakpoints for images */
@media (max-width: 768px) {
    .hero-image {
        max-width: 280px;
        max-height: 280px;
    }
    
    .feature-image {
        max-width: 250px;
        max-height: 250px;
    }
    
    .logo {
        max-width: 40px;
        max-height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-image {
        max-width: 200px;
        max-height: 200px;
    }
    
    .feature-image {
        max-width: 200px;
        max-height: 200px;
    }
    
    .logo {
        max-width: 35px;
        max-height: 35px;
    }
}

/* High DPI display optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image,
    .feature-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    .hero-image,
    .feature-image {
        max-width: 200px !important;
        max-height: 200px !important;
    }
}

/* Accessibility improvements */
img[alt] {
    border: 1px solid transparent;
}

img:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Performance optimization */
img {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
