.handy-gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 2rem;
    width: 100%;
    margin: 0;
    position: relative;
    max-height: 70vh;

    --primary-color: #234c6a;
}

.handy-gallery [x-cloak] {
    display: none;
}

.handy-gallery [data-main-image] {
    overflow: hidden;
    border-radius: 2.5rem 2.5rem 0 2.5rem;
    position: relative;
    max-height: 70vh;
    width: fit-content;
    margin-inline: auto;
    order: 1;

    &:hover {
        img {
            scale: 1.015;
        }
    }

    .zoom-icon {
        position: absolute;
        bottom: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 1);
        border-radius: 1.2rem 0 0 0;
        padding: 0.7rem 0 0 0.7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 2;
        border: none;
        transform-origin: right bottom;
        transition: scale 0.2s ease;

        &:active {
            scale: 0.95;
        }

        &:hover+img {
            transition: scale 2s ease;
            scale: 1.1;
        }

        &::after,
        &::before {
            content: '';
            position: absolute;
            bottom: 0;
            right: 100%;
            width: 50%;
            height: 50%;
            border-radius: 0 0 0.7rem 0;
            box-shadow: 5px 5px 0 #fff;
            background-color: rgba(255, 255, 255, 0);
        }

        &::before {
            bottom: 100%;
            right: 0;
        }

        svg {
            background-color: var(--primary-color);
            color: #fff;
            padding: 0.7rem;
            border-radius: 0.7rem;
        }
    }
}

.handy-gallery [data-main-image] img {
    height: 100%;
    width: auto;
    display: block;
    transition: scale 0.2s ease;

}

.handy-gallery .embla {
    order: 0;
    max-height: 100%;
    margin-top: -2rem;
}
.handy-gallery ul {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 1rem;
    list-style: none;
    overflow-x: auto;
    width: 100%;
    max-height: 100%;
    padding: 1rem;
    padding-top: 2rem;
    margin: 0;
    -webkit-mask-image: linear-gradient(to top, transparent 0%, black 20px);
    mask-image: linear-gradient(to bottom, transparent 0%, black 20px, black calc(100% - 20px), transparent 100%);
    scrollbar-width: none;
    /* Firefox */
}

.handy-gallery ul::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.handy-gallery ul li {
    flex: 0 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.5s ease;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);


    &.active {
        box-shadow: 0 0 0 3px var(--primary-color);
    }
}

.handy-gallery ul li:hover img {
    transform: scale(1.05);
}

.handy-gallery ul li img {
    width: 100%;
    max-height: 10rem;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

/* Pagination Numbers */
.handy-gallery .embla-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
}

.handy-gallery .pagination-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

/* Mobile Styles */
@media (max-width: 478px) {
    .handy-gallery {
        max-width: 100%;
    }

    .handy-gallery .embla {
        overflow: hidden;
        margin-top: 0;
    }

    .handy-gallery ul {
        flex-direction: row;
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
        padding: 0;
    }

    .handy-gallery ul li {
        flex: 0 0 100%;
        border-radius: 0;

        &.active {
            translate: 0;
            box-shadow: none;
        }
    }

    .handy-gallery ul li:hover {
        transform: none;
    }

    .handy-gallery ul li img {
        max-height: none;
        aspect-ratio: 1 / 1;
    }

    .handy-gallery ul li:last-child {
        margin-right: 0;
    }

    .handy-gallery .embla-pagination {
        display: flex;
        position: absolute;
        bottom: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 1);
        padding: 0.5rem 0.5rem 0 0.5rem;
        font-family: sans-serif;
        font-weight: 900;
        border-radius: 0.5rem 0 0 0;
        z-index: 1;

        &::after,
        &::before {
            content: '';
            position: absolute;
            bottom: 0;
            right: 100%;
            width: 50%;
            height: 50%;
            border-radius: 0 0 0.7rem 0;
            box-shadow: 5px 5px 0 #fff;
            background-color: rgba(255, 255, 255, 0);
        }

        &::before {
            bottom: 100%;
            right: 0;
        }


        span {
            font-size: 1.5rem;
            background-color: var(--primary-color);
            color: #fff;
            padding: 0.25rem 1rem;
            border-radius: 0.5rem;
        }
    }
}



.fslightbox-toolbar {
    >button:first-child {
        display: none;
    }
}


@keyframes zoom {
    0% {
        transform: scaleY(1);
        filter: blur(0px) brightness(1);
    }

    50% {
        transform: scaleY(1.1);
        filter: blur(4px) brightness(1.01);
    }

    100% {
        transform: scaleY(1);
        filter: blur(0px) brightness(1);
    }
}