/**
 * Image Support CSS
 * Styles for image loading, placeholders, and transitions
 */

/* Image loading states */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: linear-gradient(90deg, #1a1a2e 25%, #252540 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

img[data-src].loaded {
    opacity: 1;
    animation: none;
}

img.error {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* Shimmer animation for loading placeholder */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Lazy loading fade-in */
img.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

img.lazy-load.loaded {
    opacity: 1;
}

/* Image container styles */
.image-container {
    position: relative;
    overflow: hidden;
    background: #1a1a2e;
}

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

/* Page header images */
.page-header img,
header img,
.header-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

/* Background image overlay */
body.has-background-image::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.7);
    z-index: -1;
    pointer-events: none;
}

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

/* Image grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.image-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

/* Placeholder styles */
.image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}
