
@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 {
            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%;
    }
    .full-link-lightbox {
        position:absolute;
        display: block;
        width: 100%;
        height: 100%;
        top:0;
        padding-bottom: 10px;
    }

    &.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;

            .video-wrapper {
                height: 100%;
                width: 100%;
                position: relative;
            }

            .video-icon {
                font-size: 25px;
            }
        }
        
        #main-image {
            height: 100%;
            position: relative;
            cursor: pointer;
            
            img, video {
                object-fit: cover;
                height: 100%;
                width: 100%;
            }

            .video-wrapper {
                height: 100%;
                width: 100%;
                position: relative;
            }
            .hidden {
                display: none;
            }
        }

        .pane-media {
            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;
            }
        }
    }

    .video-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #ffffff;
        z-index: 5;
        border-radius: 100px;
        cursor:pointer;
        width: max-content;

        .fa-play {
            transform: translateX(4%);
        }

        .fa-circle {
            position: relative;
            width: max-content;
        }
        &:hover {
            /* transform: translate(-50%, -50%) scale(1.2); */
        }

        &.center {
            top: calc(50% + var(--vertical-offset));
            left: calc(50% + var(--horizontal-offset));
        }

        &.top-right { 
            top: var(--vertical-offset);
            right: calc((-1) * var(--horizontal-offset));
            left: unset;
            transform: none;
        }
        &.top-left { 
            top: var(--vertical-offset);
            left: var(--horizontal-offset);
            transform: none;
        }
        &.bottom-left { 
            bottom: calc((-1) * var(--vertical-offset));
            left: var(--horizontal-offset);
            top: unset;
            transform: none;
        }
        &.bottom-right { 
            bottom: calc((-1) * var(--vertical-offset));
            right: calc((-1) * var(--horizontal-offset));
            left: unset;
            top: unset;
            transform: none;
        }
    }

}

#glightbox-body{
    .gslide-description {
        background: transparent !important; 
        text-align: center;
    }
    
    .gslide-title {
        color: #fff !important;
        font-weight: bold !important;
        font-size: 18px;
        margin-bottom: 5px;            
    }
    button {
        border-width: 0px;
    }
    .glightbox-button-hidden {
        visibility: hidden;
    }

    .gdesc-inner {
        display: flex;
        justify-content: center;
    }

    @media (min-width: 769px) {
        .gslide-image img {
            padding-top: 30px;
        }
    }

    /* Prevent Styles overwriting Glightbox Styles */
    .gbtn {
            padding: 0;
    }
    button {
            padding: 0;
            color:white;
            background: 0;
    }
    input {
            background: 0;
    }

}