/* Image optimization styles */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy.loaded {
    opacity: 1;
}

/* Responsive image containers */
.img-container {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
}

.img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Aspect ratios */
.ratio-16-9 {
    padding-bottom: 56.25%; /* 16:9 */
}

.ratio-4-3 {
    padding-bottom: 75%; /* 4:3 */
}

.ratio-1-1 {
    padding-bottom: 100%; /* 1:1 */
}

/* Image hover effects */
.img-hover {
    transition: transform 0.3s ease-in-out;
}

.img-hover:hover {
    transform: scale(1.05);
}

/* Responsive breakpoints for images */
@media (max-width: 768px) {
    .img-container.mobile-full {
        height: auto;
        padding-bottom: 0;
    }
    
    .img-container.mobile-full img {
        position: relative;
    }
}

/* Loading placeholder */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 0%, #f8f8f8 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}