/* 
  slideshow.css
  Styles for the full-screen chaotic slideshow 
*/

#slideshow-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* contain its own absolute children */
}

.loader-text {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: 1;
    transition: opacity 1s ease;
    z-index: 100;
    pointer-events: none;
    text-transform: uppercase;
}

/* Base style for all slideshow images */
.slideshow-image {
    position: absolute;
    /* Images will start invisible and scaled down/up */
    opacity: 0;
    transform: scale(0.1) rotate(0deg);
    /* Smooth, premium easing for the entrance */
    transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);

    /* Elegant styling */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border: 4px solid #fff;
    border-radius: 8px;
    /* Slight rounding for a premium feel */
    object-fit: cover;

    /* Ensure images don't block interactions below them initially */
    z-index: 1;
    will-change: transform;
}

/* Subtle hover interaction to make it feel "alive" */
.slideshow-image.active:hover {
    z-index: 9999 !important;
    /* Bring to very front */
    box-shadow: 0 25px 60px rgba(255, 255, 255, 0.4);
    transition: box-shadow 0.3s ease, z-index 0.3s ease;
    cursor: pointer;
}

/* ========================================= */
/* Final Impact Animation Styles             */
/* ========================================= */

.slam-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(5);
    opacity: 0;
    z-index: 20000;
    /* Ensure it is above everything always */
    pointer-events: none;
    /* Adding a white stroke around the PNG using drop-shadow, keeping the black shadow */
    filter: drop-shadow(3px 3px 0 #fff) drop-shadow(-3px -3px 0 #fff) drop-shadow(3px -3px 0 #fff) drop-shadow(-3px 3px 0 #fff) drop-shadow(0 30px 40px rgba(0, 0, 0, 0.9));
    width: 80vw;
    max-width: 1000px;
}

.slam-image.animate-slam {
    animation: slam 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slam {
    0% {
        transform: translate(-50%, -50%) scale(5);
        opacity: 0;
    }

    1% {
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Shake effect for other images */
.shake {
    animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
    0% {
        transform: scale(1) translate(0, 0) rotate(var(--rot));
    }

    10% {
        transform: scale(1) translate(-20px, -20px) rotate(calc(var(--rot) - 5deg));
    }

    20% {
        transform: scale(1) translate(20px, 20px) rotate(calc(var(--rot) + 5deg));
    }

    30% {
        transform: scale(1) translate(-15px, 10px) rotate(calc(var(--rot) - 3deg));
    }

    40% {
        transform: scale(1) translate(15px, -10px) rotate(calc(var(--rot) + 3deg));
    }

    50% {
        transform: scale(1) translate(-10px, 10px) rotate(calc(var(--rot) - 2deg));
    }

    60% {
        transform: scale(1) translate(10px, -10px) rotate(calc(var(--rot) + 2deg));
    }

    70% {
        transform: scale(1) translate(-5px, 5px) rotate(var(--rot));
    }

    80% {
        transform: scale(1) translate(5px, -5px) rotate(var(--rot));
    }

    100% {
        transform: scale(1) translate(0, 0) rotate(var(--rot));
    }
}

/* Dust Particles */
.dust-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.4) 0%, rgba(200, 200, 200, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 19999;
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
}

.dust-particle.animate-dust {
    animation: flyDust 1s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes flyDust {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(4);
        opacity: 0;
    }
}

/* ========================================= */
/* Mobile Responsive                         */
/* ========================================= */
@media (max-width: 768px) {
    .loader-text {
        font-size: 1.2rem;
    }

    .slam-image {
        width: 95vw;
    }
}