// Display Flex
@mixin display() {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

// Flex Wrap
@mixin flex-wrap( $args ) {
    -ms-flex-wrap: $args;
    -webkit-flex-wrap: $args;
    flex-wrap: $args;
}

// Flex Direction
@mixin flex-direction( $args ) {
    -webkit-flex-direction: $args;
    flex-direction: $args;
}

// Align Items
@mixin align-items( $args ) {
    -webkit-align-items: $args;
    align-items: $args;
}

// Justify Content
@mixin justify-content( $args ) {
    -webkit-justify-content: $args;
    justify-content: $args;
}

// Transition
@mixin transition( $args ) {
    -webkit-transition: $args;
    -moz-transition: $args;
    -ms-transition: $args;
    -o-transition: $args;
    transition: $args;
}

// Transform
@mixin transform( $args ) {
    -webkit-transform: $args;
    -moz-transform: $args;
    -ms-transform: $args;
    -o-transform: $args;
    transform: $args;
}

/*------------------------------------------------------------------
IMAGE GALLERY
-------------------------------------------------------------------*/
.oew-image-gallery {
    @include display();
    @include flex-wrap( wrap );
    overflow: hidden;

    .oew-gallery-overlay {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        @include display();
        @include flex-direction( column );
        background-color: rgba(0, 0, 0, 0.4);
        color: #fff;
        padding: 30px;
        text-align: center;

        i, svg {
            width: 1em;
            height: 1em;
            position: relative;
        }
    }

    .oew-gallery-item {
        position: relative;
        width: calc( 100% / 4 );
        margin: 0;
        text-align: center;
        overflow: hidden;
    }

    .oew-gallery-item-inner {
        position: relative;
        overflow: hidden;
    }

    a.oew-gallery-item-inner {
        display: block;
    }

    .oew-gallery-item-caption {
        margin: 0;
        margin-top: 15px;
        font-weight: 600;
        text-transform: uppercase;
    }

    .oew-gallery-thumbnail {
        overflow: hidden;

        img {
            width: 100%;
            object-fit: cover;
            vertical-align: top;
        }
    }

    .oew-gallery-transition-fade,
    [class*='oew-gallery-transition-slide'] {
        @include transition( .3s ease-out );
    }

    .oew-gallery-transition-fade {
        opacity: 0;
    }

    .oew-gallery-item-inner:hover .oew-gallery-transition-fade {
        opacity: 1;
    }

    [class*='oew-gallery-transition-slide'] {
        opacity: 0;
    }

    .oew-gallery-transition-slide-top {
        @include transform( translateY(-100%) );
    }

    .oew-gallery-transition-slide-bottom {
        @include transform( translateY(100%) );
    }

    .oew-gallery-transition-slide-left {
        @include transform( translateX(-100%) );
    }

    .oew-gallery-transition-slide-right {
        @include transform( translateX(100%) );
    }

    .oew-gallery-transition-slide-top-medium {
        @include transform( translateY(-50px) );
    }

    .oew-gallery-transition-slide-bottom-medium {
        @include transform( translateY(50px) );
    }

    .oew-gallery-transition-slide-left-medium {
        @include transform( translateX(-50px) );
    }

    .oew-gallery-transition-slide-right-medium {
        @include transform( translateX(50px) );
    }

    .oew-gallery-item-inner:hover [class*='oew-gallery-transition-slide'] {
        opacity: 1;
        @include transform( translateX(0) translateY(0) );
    }
}

/*------------------------------------------------------------------
Responsive
-------------------------------------------------------------------*/
@media only screen and (max-width: 767px) {
    .elementor-widget-oew-image-gallery .elementor-widget-container {
        overflow: hidden;
    }
}