// Display flex
@mixin flex() {
    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;
}

// Align center
@mixin align() {
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-line-pack: center;
    align-content: center;
}

// Order
@mixin order( $args ) {
    -ms-flex-order: $args;
    -webkit-order: $args;
    order: $args;
}

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

/*------------------------------------------------------------------
Call To Action
-------------------------------------------------------------------*/
.oew-cta {
    position: relative;
    @include flex();
    @include transition(.5s);
    overflow: hidden;

    .oew-cta-bg,
    .oew-cta-bg-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        @include transition(all .4s);
    }

    .oew-cta-bg-wrapper {
        z-index: 1;
        overflow: hidden;
    }

    .oew-cta-bg {
        -webkit-background-size: cover;
        background-size: cover;
        background-position: 50%;
        z-index: 1;
    }

    .oew-cta-bg-overlay {
        background: rgba(0,0,0,.5);
        z-index: 2;
    }

    .oew-cta-inner {
        @include flex();
        @include flex-wrap( wrap );
        @include align();
        padding: 30px;
        width: 100%;
        z-index: 1;
        overflow: hidden;
    }

    .oew-cta-content {
        width: 100%;

        &:not(:last-child) {
            margin-bottom: 15px;
        }
    }

    .oew-icon {
        display: inline-block;
        font-size: 50px;
        line-height: 1;
        text-align: center;
    }

    .oew-cta-title {
        width: 100%;
        font-size: 24px;
        margin-bottom: 10px;
    }

    .oew-cta-btn,
    .oew-cta-icon {
        a {
            padding: 14px 30px;
            font-size: 13px;
        }

        .oew-cta-s-btn {
            margin-left: 5px;
        }

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

.oew-cta-style-inside .oew-cta {
    .oew-cta-bg-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        @include transition(all .4s);
    }

    .oew-icon,
    .oew-cta-title,
    .oew-cta-description {
        color: #fff;
    }
}

.oew-cta-style-outside .oew-cta {
    @include flex-wrap(wrap);

    .oew-cta-bg-wrapper {
        position: relative;
        min-height: 200px;
        width: 100%;
    }

    .oew-cta-inner {
        background-color: #f5f5f5;
    }
}

.oew-cta--image-above .oew-cta {
    @include flex-wrap(wrap);
}

.oew-cta--image-left,
.oew-cta--image-right {
    .oew-cta {
        @include flex-wrap(nowrap);

        .oew-cta-bg-wrapper {
            width: auto;
            min-width: 50%;
        }
    }

    .oew-cta-inner {
        -webkit-box-flex: 1;
        -ms-flex-positive: 1;
        flex-grow: 1;
    }
}

.oew-cta--image-above .oew-cta {
    @include flex-wrap(wrap);
}

.oew-cta--image-left .oew-cta {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
}

.oew-cta--image-right .oew-cta {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: reverse;
    -ms-flex-direction: row-reverse;
    flex-direction: row-reverse;
}

.oew-cta-valign-top .oew-cta .oew-cta-inner {
    -ms-flex-line-pack: start;
    align-content: flex-start;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
}

.oew-cta-valign-bottom .oew-cta .oew-cta-inner {
    -ms-flex-line-pack: end;
    align-content: flex-end;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
}

.oew-animated-content {
    --translate: 0, 0;

    &:hover .oew-animated-grow {
        -webkit-transform: scale(1.1);
        -ms-transform: scale(1.1);
        transform: scale(1.1);
    }

    &:hover .oew-animated-shrink {
        -webkit-transform: scale(0.85);
        -ms-transform: scale(0.85);
        transform: scale(0.85);
    }

    &:hover .oew-animated-shrink-contained {
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }

    &:hover .oew-animated-enter-zoom-out,
    &:hover .oew-animated-enter-zoom-in,
    &:hover .oew-animated-fade-in {
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
        opacity: 1;
    }

    &:hover .oew-animated-exit-zoom-out,
    &:hover .oew-animated-exit-zoom-in,
    &:hover .oew-animated-fade-out {
        opacity: 0;
    }

    &:hover .oew-animated-exit-zoom-out {
        -webkit-transform: scale(0.2);
        -ms-transform: scale(0.2);
        transform: scale(0.2);
    }

    &:hover .oew-animated-exit-zoom-in {
        -webkit-transform: scale(2);
        -ms-transform: scale(2);
        transform: scale(2);
    }

    &:hover .oew-animated-enter-from-right,
    &:hover .oew-animated-enter-from-left,
    &:hover .oew-animated-enter-from-top,
    &:hover .oew-animated-enter-from-bottom {
        opacity: 1;
        -webkit-transform: translateY(0) translateX(0);
        -ms-transform: translateY(0) translateX(0);
        transform: translateY(0) translateX(0);
    }

    &:hover .oew-animated-exit-to-right {
        -webkit-transform: translateX(1000px);
        -ms-transform: translateX(1000px);
        transform: translateX(1000px);
    }

    &:hover .oew-animated-exit-to-left {
        -webkit-transform: translateX(-1000px);
        -ms-transform: translateX(-1000px);
        transform: translateX(-1000px);
    }

    &:hover .oew-animated-exit-to-top {
        -webkit-transform: translateY(-600px);
        -ms-transform: translateY(-600px);
        transform: translateY(-600px);
    }

    &:hover .oew-animated-exit-to-bottom {
        -webkit-transform: translateY(600px);
        -ms-transform: translateY(600px);
        transform: translateY(600px);
    }

    &:hover .oew-animated-exit-to-right,
    &:hover .oew-animated-exit-to-left,
    &:hover .oew-animated-exit-to-top,
    &:hover .oew-animated-exit-to-bottom {
        opacity: 0;
    }

    &:hover .oew-animated-move-right {
        -webkit-transform: translateX(30px);
        -ms-transform: translateX(30px);
        transform: translateX(30px);
    }

    &:hover .oew-animated-move-left {
        -webkit-transform: translateX(-30px);
        -ms-transform: translateX(-30px);
        transform: translateX(-30px);
    }

    &:hover .oew-animated-move-up {
        -webkit-transform: translateY(-30px);
        -ms-transform: translateY(-30px);
        transform: translateY(-30px);
    }

    &:hover .oew-animated-move-down {
        -webkit-transform: translateY(30px);
        -ms-transform: translateY(30px);
        transform: translateY(30px);
    }

    &:hover .oew-animated-move-contained-right {
        --translate: 8%, 0;
    }

    &:hover .oew-animated-move-contained-left {
        --translate: -8%, 0;
    }

    &:hover .oew-animated-move-contained-top {
        --translate: 0, -8%;
    }

    &:hover .oew-animated-move-contained-bottom {
        --translate: 0, 8%;
    }

    *[class^="oew-animated-item"] {
        will-change: transform, opacity;
    }

    .oew-animated-shrink-contained {
        -webkit-transform: scale(1.17);
        -ms-transform: scale(1.17);
        transform: scale(1.17);
    }

    .oew-animated-enter-zoom-in {
        -webkit-transform: scale(0.2);
        -ms-transform: scale(0.2);
        transform: scale(0.2);
    }

    .oew-animated-enter-zoom-out {
        -webkit-transform: scale(2);
        -ms-transform: scale(2);
        transform: scale(2);
    }

    .oew-animated-enter-zoom-out,
    .oew-animated-enter-zoom-in,
    .oew-animated-fade-in {
        opacity: 0;
    }

    .oew-animated-exit-zoom-out,
    .oew-animated-exit-zoom-in,
    .oew-animated-fade-out {
        opacity: 1;
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }

    .oew-animated-enter-from-right {
        -webkit-transform: translateX(1000px);
        -ms-transform: translateX(1000px);
        transform: translateX(1000px);
    }

    .oew-animated-enter-from-left {
        -webkit-transform: translateX(-1000px);
        -ms-transform: translateX(-1000px);
        transform: translateX(-1000px);
    }

    .oew-animated-enter-from-top {
        -webkit-transform: translateY(-600px);
        -ms-transform: translateY(-600px);
        transform: translateY(-600px);
    }

    .oew-animated-enter-from-bottom {
        -webkit-transform: translateY(500px);
        -ms-transform: translateY(500px);
        transform: translateY(500px);
    }

    .oew-animated-enter-from-right,
    .oew-animated-enter-from-left,
    .oew-animated-enter-from-top,
    .oew-animated-enter-from-bottom {
        opacity: 0;
    }

    .oew-animated-exit-to-right,
    .oew-animated-exit-to-left,
    .oew-animated-exit-to-top,
    .oew-animated-exit-to-bottom {
        opacity: 1;
        -webkit-transform: translateY(0) translateX(0);
        -ms-transform: translateY(0) translateX(0);
        transform: translateY(0) translateX(0);
    }

    .oew-animated-move-contained-right,
    .oew-animated-move-contained-left,
    .oew-animated-move-contained-top,
    .oew-animated-move-contained-bottom {
        -webkit-transform: scale(1.2) translate(var(--translate));
        -ms-transform: scale(1.2) translate(var(--translate));
        transform: scale(1.2) translate(var(--translate));
    }
}

.oew-bg-transform .oew-cta-bg {
    will-change: transform;
}

.oew-bg-transform-zoom-in:hover .oew-cta-bg {
    -webkit-transform: scale(1.2);
    -ms-transform: scale(1.2);
    transform: scale(1.2);
}

.oew-bg-transform-zoom-out {
    .oew-cta-bg {
        -webkit-transform: scale(1.2);
        -ms-transform: scale(1.2);
        transform: scale(1.2);
    }

    &:hover .oew-cta-bg {
        -webkit-transform: scale(1);
        -ms-transform: scale(1);
        transform: scale(1);
    }
}

.oew-bg-transform-move-left {
    .oew-cta-bg {
        -webkit-transform: scale(1.2) translateX(8%);
        -ms-transform: scale(1.2) translateX(8%);
        transform: scale(1.2) translateX(8%);
    }

    &:hover .oew-cta-bg {
        -webkit-transform: scale(1.2) translateX(-8%);
        -ms-transform: scale(1.2) translateX(-8%);
        transform: scale(1.2) translateX(-8%);
    }
}

.oew-bg-transform-move-right {
    .oew-cta-bg {
        -webkit-transform: scale(1.2) translateX(-8%);
        -ms-transform: scale(1.2) translateX(-8%);
        transform: scale(1.2) translateX(-8%);
    }

    &:hover .oew-cta-bg {
        -webkit-transform: scale(1.2) translateX(8%);
        -ms-transform: scale(1.2) translateX(8%);
        transform: scale(1.2) translateX(8%);
    }
}

.oew-bg-transform-move-up {
    .oew-cta-bg {
        -webkit-transform: scale(1.2) translateY(8%);
        -ms-transform: scale(1.2) translateY(8%);
        transform: scale(1.2) translateY(8%);
    }

    &:hover .oew-cta-bg {
        -webkit-transform: scale(1.2) translateY(-8%);
        -ms-transform: scale(1.2) translateY(-8%);
        transform: scale(1.2) translateY(-8%);
    }
}

.oew-bg-transform-move-down {
    .oew-cta-bg {
        -webkit-transform: scale(1.2) translateY(-8%);
        -ms-transform: scale(1.2) translateY(-8%);
        transform: scale(1.2) translateY(-8%);
    }

    &:hover .oew-cta-bg {
        -webkit-transform: scale(1.2) translateY(8%);
        -ms-transform: scale(1.2) translateY(8%);
        transform: scale(1.2) translateY(8%);
    }
}

/*------------------------------------------------------------------
RTL
-------------------------------------------------------------------*/
body.rtl .oew-cta .oew-cta-btn .oew-cta-s-btn {
    margin-right: 5px;
    margin-left: 0;
}

/*------------------------------------------------------------------
Responsive
-------------------------------------------------------------------*/
@media (max-width: 1024px) {
    .oew-cta--tablet-image-above .oew-cta {
        @include flex-wrap(wrap);

        .oew-cta-bg-wrapper {
            width: 100%;
            min-width: 100%;
        }
    }

    .oew-cta--tablet-image-left .oew-cta {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
    }

    .oew-cta--tablet-image-right .oew-cta {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: reverse;
        -ms-flex-direction: row-reverse;
        flex-direction: row-reverse;
    }
}

@media (max-width: 767px) {
    .oew-cta--mobile-image-above .oew-cta {
        @include flex-wrap(wrap);

        .oew-cta-bg-wrapper {
            width: 100%;
            min-width: 100%;
        }
    }

    .oew-cta--mobile-image-left .oew-cta {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
    }

    .oew-cta--mobile-image-right .oew-cta {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: reverse;
        -ms-flex-direction: row-reverse;
        flex-direction: row-reverse;
    }
}
