.content-img-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    padding: 16px;
}

.content-img img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    background:
        linear-gradient(
            110deg,
            var(--gullys-main-blue) 30%,
            rgba(255,255,255,.25) 45%,
            var(--gullys-main-blue) 60%
        );
    background-size: 300% 300%;
    animation: img_loader 1.6s ease-in-out infinite;
    cursor: pointer;
    transition:
        transform .5s cubic-bezier(.2,.8,.2,1),
        box-shadow .5s cubic-bezier(.2,.8,.2,1),
        filter .5s cubic-bezier(.2,.8,.2,1);
    box-shadow:
        0 10px 30px rgba(0,0,0,.25);
}

@keyframes img_loader {
    0%{
        background-position: 0% 50%;
    }
    100%{
        background-position: 100% 50%;
    }
}

.content-img img:hover {
    transform: scale(1.03);
    box-shadow:
        0 18px 60px rgba(0,0,0,.35);
    filter: saturate(1.05) contrast(1.05);
}

.content-img-active {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    border-bottom: 1px var(--gullys-main-orange) solid;
}

.content-img-active-content {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.content-img img {
    aspect-ratio: 16/10;
}

.content-img-active-content img {
    position: absolute;
    left: var(--x, 50%);
    width: var(--w, 240px);
    object-fit: cover;
    transform: translate(-50%, 120%) scale(var(--s, 1));
    will-change: transform;
    animation: float_up var(--dur, 9s) linear infinite;
    animation-delay: var(--delay, 0s);
}

.content-img-active-title {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 3;
    padding: 12px 14px;
}

.img-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.img-preview-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
}

@keyframes float_up {
    0%{
        transform: translate(-50%, 120%) scale(var(--s, 1));
    }
    50%{
        transform: translate(calc(-50% + var(--wx, 0px)), 0%) scale(var(--s, 1));
    }
    100%{
        transform: translate(calc(-50% + var(--wx2, 0px)), -140%) scale(var(--s, 1));
    }
}

@media (prefers-reduced-motion: reduce){
    .content-img-active-content img{
        animation: none;
        transform: translate(-50%, 0%) scale(var(--s, 1));
    }
}

@media (max-width: 900px) {
    .content-img-preview {
        gap: 12px;
        padding: 12px;
    }
}
