
@keyframes fadeIn { 
    from { opacity: 0; }
    to { opacity: 1; }
}

.elementor-widget-aronda_basic_gallery:has(.masonry) {
  width:100%;
}

.gallery {
    .gallery-content {
        &.masonry {
            column-count: auto;
            column-gap: 1em;

            .gallery-img {
                display: block;
                object-fit: cover;
                width: 100%;
                height: auto;
                &::before {
                    content: "";
                    display: block;
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background-color: rgba(98, 220, 50, 0.5);
                }
            }

            figure {
                margin: 0;
                break-inside: avoid;
                width: 100%;
            }
            
            .masonry-item.invisible {
                visibility: hidden;
            }
        }

        &.grid {
            --grid-columns: auto-fill;
            display: grid; 
            justify-items: center;
            margin: 0;
            padding: 0;

            figure {
                font-size: 1.2rem;
                height: 0;
                padding-bottom: 100%;
                width: 100%;
                text-align: center;
                background-color: white;
                color: #d9d9d9;
                
                .gallery-img {
                    width: 100%;
                    aspect-ratio: 1 / 1;
                    object-fit: cover;
                    transition: opacity 0.25s ease-in-out;
                }
            }
        }

        figure {
            position: relative;
            display: block;
            max-width: 800px;
            animation: fadeIn 0.8s ease-in-out;
            will-change: opacity;

            img {
                filter:brightness( calc( var( --brightness ) / 100 ));
            }

            &.hidden {
                display: none;
            }

            .overlay {
                position: absolute;
                height: 100%;
                width: 100%;
                z-index: 1;
            }
        }

    }
    .gallery-navigation {
        display: flex;
        flex-wrap: wrap;
        gap: 50px;
        justify-content: center;
        margin-top: 35px; 

        div {
            &.hide {
                display: none;
            }
            text-align:center;
        }
        .load-less {
            display: none;
        }

        .navigation-button {
            background-color: var(--e-global-color-secondary);
            color: white;
        }
    }

    .caption-mouseover {
        position: absolute;
        height: 100%;
        width: 100%;
        z-index: 2;
    }
    .full-link {
        display: block;
        width: 100%;
        height: 100%;
    }

    &.flavius {
        display: flex;
        height: 400px;

        .growbox {
            position: absolute;
            min-width: max-content;
            min-height: max-content;
            z-index: 2;
        }
        
        .positionbox{
            position: absolute;
        }

        &.right {
            direction: rtl;
            .positionbox {
                right: calc(var(--slide-pane-width) / 2);
                left:0;
            }
            .growbox {
                transform: translateX(50%);
            }
        }

        &.left {
            .growbox {
                transform: translateX(-50%);
            }
        }

        &.left, &.right {
            .growbox {
                bottom: 0;
            }
            .positionbox{
                left: calc(var(--slide-pane-width) / 2);
            }

            .positionbox.prev{
                top: -20px;
                .growbox {
                    bottom: 0;
                }
            }
            .positionbox.next{
                top: calc(100% + 20px);
                .growbox {
                    top: 0;
                }
            }

            .swiper-slide:not(:last-child) {
                padding-bottom: 10px;
            }
        }

        &.bottom {
            flex-flow: column-reverse;
            #main-image {
                height: auto;
            }
            #slide-pane {
                width: 100%;
            }

            .positionbox {
                top: calc(100% - (var(--slide-pane-height) / 2));
            }

            .positionbox.prev{
                left: -20px;
                .growbox {
                    right: 0;
                }
            }
            .positionbox.next{
                right: calc(100% + 20px);
                .growbox {
                    left: 0;
                }
            }
            .growbox {
                transform: translateY(-50%);
            }

        }
        #slide-pane {
            width: 20%;
            height: 100%;
            position: static;
            visibility: hidden;
            overflow: hidden;
        }
        
        #main-image {
            height: 100%;
            img {
                object-fit: cover;
                height: 100%;
                width: 100%;
            }
        }

        .pane-image {
            object-fit: cover;
            height: 100%;
            width: 100%;
            cursor: pointer;
        }

        #slide-pane .swiper-button-prev {
            width: max-content;
            
        }

        #slide-pane .swiper-button-next {
            width: max-content;
        }

        .swiper-button-disabled {
            visibility: hidden;
        }

        .arrow {
            caret-color: transparent;
            width: max-content;
            height: max-content;
            margin-bottom: auto;
            margin-top:auto;
            position: relative;
            right:0;
            left:0;
            display: flex;
            &::after {
                content: "";
            }

            &:hover.hover-effect {
                transform:scale(1.15);
                transition: ease-in-out 0.2s;
            }

            @media (max-width: 767px) {
                visibility: hidden;
            }
        }
    }
}