/* Image loading placeholders for foreground images (event cards, instructors, hero, gallery) */

.img-placeholder {
    position: relative;
    overflow: hidden;
}

/* Skeleton shimmer shown while image loads */
.img-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        var(--bg-tertiary, #1e2940) 25%,
        var(--border-primary, #2a364b) 50%,
        var(--bg-tertiary, #1e2940) 75%
    );
    background-size: 200% 100%;
    animation: img-placeholder-shimmer 1.5s ease-in-out infinite;
    z-index: 0;
}

@keyframes img-placeholder-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Image starts hidden, fades in when loaded */
.img-placeholder img {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Event fallback placeholder (default.png) uses transparency; fill with event-card surface color */
.img-placeholder img[src*='events/default.png'] {
    background: radial-gradient(
        70% 70% at 50% 50%,
        var(--border-primary, #2a364b) 0%,
        var(--bg-secondary, #121e36) 100%
    );
}

/* When loaded: show image, hide placeholder */
.img-placeholder.img-loaded img {
    opacity: 1;
}

/* Play button overlay always visible - don't hide during loading */
.img-placeholder .video-play-button img,
.img-placeholder .class-packages-video-btn img,
.img-placeholder .class-hero-play img,
.img-placeholder .social-hero-play img {
    opacity: 1 !important;
}

.img-placeholder.img-loaded::before {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
