@import '../../common';

.rs-service-flex {
    // Style One
    &.style1 {
        position: relative;
        overflow: hidden;
        > img {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            transform: scale(1.1);
            transition: all 0.6s ease-in-out;
            opacity: 0;
            visibility: hidden;
            &.active {
                opacity: 1;
                visibility: visible;
                transform: scale(1);
            }
        }
        .row {
            position: relative;
            z-index: 1;
            margin: 0;
            .grid-item {
                padding: 0;
                .service-inner {
                    border-right: 1px solid rgba(255,255,255,0.2);
                    min-height: 600px;
                    display: flex;
                    flex-direction: column;
                    position: relative;
                    justify-content: flex-end;
                    padding: 30px;
                    transition: $transition;
                    background: transparent;
                    .icon-wrap{
                        position: absolute;
                        left: 40px;
                        top: 40px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        svg {
                            width: 40px;
                            height: 40px;
                            path {
                                fill: $whiteColor;
                                transition: $transition;
                            }
                        }
                        i{
                            font-size: 40px;
                            color: $whiteColor;
                            gap: 0;
                        }
                    }
                    .number{
                        position: absolute;
                        right: 35px;
                        top: 45px;
                        span{
                            font-size: 30px;
                            line-height: 30px;
                            font-weight: 600;
                            color: $whiteColor;
                            font-family: $titleFont;
                        }
                    }
                    .title {
                        margin-bottom: 15px;
                        a {
                            color: #fff;
                            &:hover {
                                color: $primaryColor;
                            }
                        }
                    }
                    .desc {
                        color: #fff;
                        height: 0;
                        transform: scaleY(0);
                        transition: $transition;
                    }
                    .btn-part {
                        margin-top: 15px;
                        .service-btn {
                            display: flex;
                            align-items: center;
                            justify-content: flex-start;
                            gap: 10px;
                            color: #fff;
                            i {
                                font-size: 18px;
                                color: #fff;
                            }
                            svg {
                                width: 18px;
                                height: 18px;
                                path {
                                    fill: #fff;
                                }
                            }
                        }
                    }
                }
                &.active {
                    .service-inner {
                        background: rgba(20, 74, 127, 0.4);
                        .desc {
                            height: 78px;
                            transform: scaleY(1);
                        }
                    }
                }
                &:last-child {
                    .service-inner {
                        border-right-width: 0;
                    }
                }
            }
        }
        &::after{
            position: absolute;
            content: '';
            left: 0;
            top: 0;
            height: 100%;
            width: 100%;
            background: rgba(44, 44, 60, 0.7);
        }
    }
    // Style Two
    &.style2 {
        .wrapper-part {
            display: flex;
            gap: 70px;
            align-items: center;
            > div  {
                flex: 0 0 auto;
                max-width: 100%;
            }
            .left-part {
                width: 45%;
            }
            .thumbnail-part-wrapper {
                width: 55%;
            }
        }
        .grid-item {
            .service-inner {
                .title {
                    margin: 0;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    transition: $transition;
                    color: rgba(255,255,255,0.5);
                    padding-top: 28px;
                    padding-bottom: 28px;
                    border-style: solid;
                    border-color: rgba(255,255,255,0.25);
                    border-width: 0;
                    border-top-width: 1px;
                    i {
                        transition: $transition;
                        color: #fff;
                        font-size: 23px;
                    }
                    svg {
                        width: 23px;
                        height: 23px;
                        path {
                            fill: #fff;
                            transition: $transition;
                        }
                    }
                }
            }
            &:last-child {
                .title {
                    border-bottom-width: 1px;
                }
            }
            &.active {
                .service-inner {
                    background: $titleColor;
                    .title {
                        color: $primaryColor;
                        padding-left: 24px;
                        padding-right: 24px;
                        font-weight: 600;
                        i {
                            color: $primaryColor;
                        }
                        svg {
                            path {
                                fill: $primaryColor;
                            }
                        }
                    }
                }
            }
        }
        .thumbnail-part-wrapper {
            position: relative;
            height: 700px;
            overflow: hidden;
            .thumbnail-part {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                transform: scale(1.1);
                transition: all 0.6s ease-in-out;
                opacity: 0;
                visibility: hidden;
                background-size: cover !important;
                background-position: center !important;
                background-color: $hovercolor;
                .content-wrapper {
                    position: absolute;
                    transition: transform 0.1s;
                    left: 40px;
                    bottom: 40px;
                    padding: 30px;
                    max-width: 295px;
                    background: radial-gradient(151.64% 120.36% at 47.19% -0.63%, rgba(37, 65, 76, 0.4) 0%, rgba(37, 65, 76, 0) 100%);
                    border: 1px solid rgba(255, 255, 255, 0.3);
                    backdrop-filter: blur(21px);
                    overflow: hidden;
                    z-index: 1;
                    .number {
                        color: #fff;
                    }
                    .icon-wrap {
                        margin-bottom: 20px;
                        i {
                            color: #fff;
                            font-size: 34px;
                        }
                        svg {
                            width: 34px;
                            height: 34px;
                            path {
                                fill: #fff;
                            }
                        }
                    }
                    .title {
                        margin-bottom: 10px;
                        a {
                            color: #fff;
                            &:hover {
                                color: $primaryColor;
                            }
                        }
                    }
                    .desc {
                        color: #fff;
                        margin-bottom: 10px;
                    }
                    .btn-part {
                        a {
                            color: #ffff;
                            transition: $transition;
                            gap: 7px;
                            display: inline-flex;
                            align-items: center;
                            svg {
                                width: 12px;
                                height: 12px;
                                path {
                                    fill: #fff;
                                    transition: $transition;
                                }
                            }
                            i {
                                font-size: 12px;
                                color: #fff;
                                transition: $transition;
                            }
                            &:hover {
                                color: $primaryColor;
                                i {
                                    color: $primaryColor;
                                }
                                svg {
                                    path {
                                        fill: $primaryColor;
                                    }
                                }
                            }
                        }
                    }
                    &:after {
                        position: absolute;
                        content: "";
                        border-width: 40px;
                        border-right-width: 0;
                        border-style: solid;
                        border-color: transparent;
                        border-left-color: $primaryColor;
                        top: -16px;
                        right: 4px;
                        transform: rotate(-45deg);
                    }
                }
                &:after {
                    position: absolute;
                    content: '';
                    left: 0;
                    right: 0;
                    top: 0;
                    bottom: 0;
                    background: rgba(0,0,0,0);
                    pointer-events: none;
                }
                &.active {
                    opacity: 1;
                    visibility: visible;
                    transform: scale(1);
                }
            }
        }
    }
}
