/**
 * Image Placeholder with Shimmer Effect
 * Valiant Theme
 */

.valiant-image-placeholder {
    position: relative;
    background-color: #f0f0f0;
    overflow: hidden;
    border-radius: 4px;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 200px;
}

.valiant-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: valiant-shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes valiant-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.valiant-image-loading {
    position: relative;
    overflow: hidden;
}

.valiant-image-loading img {
    filter: blur(5px);
    transition: filter 0.3s ease-in-out;
    opacity: 0;
    animation: valiant-fade-in 0.5s ease-in-out forwards;
}

.valiant-image-loaded img {
    filter: blur(0);
    opacity: 1;
}

@keyframes valiant-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive placeholder heights */
.valiant-image-placeholder.work-thumbnail {
    min-height: 300px;
}

.valiant-image-placeholder.archive-thumbnail {
    min-height: 250px;
}

.valiant-image-placeholder.hero-image {
    min-height: 400px;
}

@media (max-width: 768px) {
    .valiant-image-placeholder.work-thumbnail {
        min-height: 200px;
    }
    
    .valiant-image-placeholder.archive-thumbnail {
        min-height: 180px;
    }
    
    .valiant-image-placeholder.hero-image {
        min-height: 250px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .valiant-image-placeholder {
        background-color: #2a2a2a;
    }
    
    .valiant-image-placeholder::before {
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent
        );
    }
}
