@use "sass:color";
@use "sass:math";
@use "../abstracts/mixins";
@use "../abstracts/variables";

.page-template-tpl-services{
    background-color: #212020;
    color: variables.$cLight;
    font-family: "PP Mori";
    
    .logoContainer,
    .menuToggle,
    .footer{
        display: none;
    }

    .main{
        padding-left: 5vw;
        padding-right: 5vw;
        min-height: 100vh;
        min-height: calc(var(--vh, 1vh) * 100);
        opacity: 1 !important;

        @include mixins.respondToPx(900){
            padding-left: 0;
            padding-right: 0;
            min-height: auto;
        }
    }

    .services{
        &_header{
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 24vh;
            padding-bottom: 4vh;
            padding-left: 5vw;
            padding-right: 5vw;
            color: #FFF;
            display: flex;
            align-items: flex-end;
            z-index: 10;
            backdrop-filter: blur(10px);

            @include mixins.respondToPx(900){
                position: relative;
                top: 0; left: 0; right: 0;
                height: 22vh;
                height: calc(var(--vh, 1vh) * 22);
                padding-bottom: 3vh;
                padding-bottom: calc(var(--vh, 1vh) * 3);
                padding-left: 5vw;
                padding-right: 5vw;
                backdrop-filter: blur(5px);
            }

            &::after{
                content: "";
                position: absolute;
                left: 5vw; bottom: 0; right: 5vw;
                height: 2px;
                background: #FFF;
                
                @include mixins.respondToPx(900){
                    display: none;
                }
            }

            &_title{
                text-transform: uppercase;
                font-size: 7vh;
                line-height: 0.85;
                margin-right: 12vw;
                mix-blend-mode: difference;

                @include mixins.respondTo('sm'){
                    margin-right: 10vw;
                }
            }

            &_content{
                width: 22vw;
                margin-right: 5vw;
                @include mixins.fontSize(16,28);

                @include mixins.respondTo('sm'){
                    width: 26vw;
                }

                @include mixins.respondToPx(900){
                    display: none;
                }
            }

            &_link{
                display: inline-block;
                // height: 54px;
                background: variables.$cLight;
                padding: 10px 30px;
                border-radius: 30px;
                margin-left: auto;
                
                @include mixins.respondToPx(900){
                    display: none;
                }
            }
        }

        &_list{
            width: 35vw;
            margin-left: auto;
            padding-top: 30vh;
            padding-bottom: 10vh;

            @include mixins.respondTo('sm'){
                width: 40vw;
            }

            @include mixins.respondToPx(900){
                display: none;
            }

            &_item{
                position: relative;
                padding: 25px 0;
                display: flex;
                align-items: center;

                @include mixins.respondTo('sm'){
                    padding: 20px 0;
                }

                & + .services_list_item{
                    &::before{
                        content: "";
                        position: absolute;
                        left: 0; top: 0; right: 0;
                        height: 2px;
                        background: #FFF;
                    }
                }

                &_link{
                    position: absolute;
                    top: 0; left: 0; right: 0; bottom: 0;
                    cursor: pointer;
                    z-index: 2;
                }

                &_num{
                    position: absolute;
                    top: 50%; right: calc(100% + 20px);
                    transform: translate(-20px, -50%);
                    @include mixins.fontSize(60,60);
                    text-align: right;
                    opacity: 0;
                    transition: opacity 0.2s linear, transform 0.6s variables.$ExpoEaseOut;
                    
                    @include mixins.respondTo('sm'){
                        @include mixins.fontSize(40,40);
                    }
                }

                &_title{
                    flex: 1;
                    padding-left: 25px;
                    opacity: 0.5;
                    transition: opacity 0.2s linear;

                    @include mixins.respondTo('sm'){
                        padding-left: 20px;
                    }

                    h2{
                        @include mixins.fontSize(26,28);
                    }
                    h3{
                        @include mixins.fontSize(20,28);
                        font-style: italic;
                    }
                }

                &_action{
                    margin-left: 20px;
                    transform: translateX(20px);
                    visibility: hidden;
                    opacity: 0;
                    transition: visibility 0s linear 0.2s,opacity 0.2s linear, transform 0.6s variables.$ExpoEaseOut;
                }

                &_button{
                    height: 60px;
                    text-transform: uppercase;
                    @include mixins.fontSize(16);
                    font-weight: 700;
                    border-radius: 30px;
                    padding: 0 20px;
                    transition: opacity 0.2s linear;
                    animation: pulse 6s infinite;

                    @include mixins.respondTo('sm'){
                        height: 45px;
                    }

                    &:hover{
                        opacity: 0.6;
                    }
                }

                &--active{
                    .services_list_item_num{
                        opacity: 1;
                        transform: translate(0, -50%);
                    }
                    .services_list_item_title{
                        opacity: 1;
                    }
                    .services_list_item_action{
                        visibility: visible;
                        opacity: 1;
                        transition-delay: 0s;
                        transform: translateX(0);
                    }
                    .services_list_item_link{
                        display: none;
                    }
                }

                &:hover{
                    .services_list_item_title{
                        opacity: 1;
                    }
                }
            }
        }

        &_carousel{
            position: relative;
            height: 78vh;
            height: calc(var(--vh, 1vh) * 78);
            padding-left: 5vw;
            padding-right: 5vw;
            display: none;
            backdrop-filter: blur(5px);

            @include mixins.respondToPx(900){
                display: block;
            }

            .swiper-pagination{
                position: absolute;
                bottom: 4vh;
                bottom: calc(var(--vh, 1vh) * 4);
                left: 5vw;
                width: auto;
                z-index: 5;
                mix-blend-mode: difference;

                &-bullet{
                    margin: 0 5px !important;
                    width: 12px;
                    height: 12px;
                    border: 1px solid #FFFFFF;
                    background-color: transparent;

                    &-active{
                        background-color: #FFF;
                    }
                }
            }

            .swiper-nav{
                position: absolute;
                bottom: 3vh;
                bottom: calc(var(--vh, 1vh) * 3);
                right: 15vw;
                z-index: 5;
            }

            .swiper-button-prev, .swiper-button-next{
                position: relative;
                display: inline-block;
                vertical-align: middle;
                margin: 0 10px;
                left: auto;
                right: auto;

                &::after{
                    display: none;
                }
            }

            &_item{
                position: relative;

                &_media{
                    position: relative;
                    width: 100%;
                    height: 55vh;
                    height: calc(var(--vh, 1vh) * 55);
                    background: color.adjust(#000, $alpha: -0.8);
                    border-radius: 20px;
                    overflow: hidden;

                    img{
                        position: absolute;
                        top: 0; left: 0;
                        width: 100%; height: 100%;
                        object-fit: cover;
                    }
                }

                &_num{
                    position: absolute;
                    left: 20px; bottom: 20px;
                    font-size: 55px;
                    line-height: 1;
                    mix-blend-mode: difference;

                    @include mixins.respondTo('xs'){
                        font-size: 40px;
                    }
                }

                &_button{
                    position: absolute;
                    right: 20px; bottom: 20px;
                    font-size: 40px;
                    line-height: 40px;
                    mix-blend-mode: difference;
                    color: #000;
                    background-color: #FFF;
                    width: 60px;
                    height: 60px;
                    font-size: 18px;
                    border-radius: 60px;
                    animation: pulse 6s infinite;

                    @include mixins.respondTo('xs'){
                        width: 50px;
                        height: 50px;
                        font-size: 18px;
                    }
                }

                &_title{
                    padding-top: 3vh;
                    padding-top: calc(var(--vh, 1vh) * 3);

                    h2, h3{
                        @include mixins.fontSize(50,50);

                        @include mixins.respondTo('xs'){
                            @include mixins.fontSize(30,30);
                        }
                    }
                }
            }
        }

        &_backgrounds{
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            z-index: 0;
            
            @include mixins.respondToPx(900){
                display: none;
            }

            .services_background{
                position: absolute;
                top: 0; left: 0; right: 0; bottom: 0;
                opacity: 0;
                transition: opacity 0.25s linear;

                &--active{
                    opacity: 1;
                }

                svg{
                    position: absolute;
                    top: 50%; left: 50%;
                    transform: translate(-50%,-50%);
                    fill: currentColor;
                    // top: 0; left: 0;
                    // width: 100%; height: 100%;
                    // object-fit: cover;

                    &.service--2{
                        fill: none;
                        stroke: currentColor;
                    }
                }
            }
        }

        &_backgroundsMobile{
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 100vh;
            height: calc(var(--vh, 1vh) * 100);
            z-index: 0;
            display: none;

            @include mixins.respondToPx(900){
                display: block;
            }
            
            &::after{
                content: "";
                position: absolute;
                top: 0; left: 0; right: 0; bottom: 0;
                background: #000;
                opacity: 0.6;
            }

            &_item{
                position: absolute;
                top: 0; left: 0; right: 0; bottom: 0;
                opacity: 0;
                transition: opacity 0.25s linear;

                img{
                    position: absolute;
                    top: 0; left: 0;
                    width: 100%; height: 100%;
                    object-fit: cover;
                }

                &--active{
                    opacity: 1;
                }
            }
        }

        &_medias{
            position: absolute;
            top: 24vh; left: 5vw; bottom: 16vh;
            width: 49vw;
            height: 60vh;
            // background-color: pink;
            // outline: 10px solid yellow;

            @include mixins.respondTo('sm'){
                width: 42vw;
                left: 3vw;
                height: 55vh;
            }

            @include mixins.respondToPx(900){
                display: none;
            }

            &_inner{
                position: absolute;
                top: 0; left: 0; right: 0; bottom: 0;
                transition: transform 0.8s variables.$ExpoEaseOut;
            }
        }

        &_media{
            position: relative;
            width: 100%;
            height: 60vh;
            // background-color: lightgreen;
            // outline: 1px solid red;
            display: flex;
            align-items: center;
            opacity: 0.5;
            transition: opacity 0.4s linear, transform 0.8s variables.$ExpoEaseOut;

            @include mixins.respondTo('sm'){
                height: 55vh;
            }

            &--active{
                opacity: 1;

                .services_media_render{
                    lite-youtube + img{
                        opacity: 0;
                    }
                }
            }

            &_render{
                width: 90%;
                max-height: 90%;
                margin: auto;
                overflow: hidden;
                border-radius: 30px;
                position: relative;

                &::before{
                    content: "";
                    padding-top: math.percentage(math.div(9, 16));
                    display: block;
                }

                img{
                    position: absolute;
                    z-index: 2;
                    top: 0; left: 0;
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    border-radius: 30px;
                    transition: opacity 0.4s linear;
                }
            }
        }

        &_form{
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            z-index: 15;
            background-color: #FFF;
            color: #000;
            display: flex;
            transform: translateY(101%);
            transition: transform 0.8s variables.$ExpoEaseOut;

            @include mixins.respondToPx(900){
                display: none;
                position: relative;
                top: auto; left: auto; right: auto; bottom: auto;
                transform: none;
            }

            &--active{
                transform: translateY(0);

                @include mixins.respondToPx(900){
                    display: block;
                }
            }

            &_close{
                position: absolute;
                top: 5vw; right: 5vw;
                z-index: 5;
                width: 80px;
                height: 80px;
                transition: transform 0.8s variables.$ExpoEaseOut;
                border-radius: 80px;

                @include mixins.respondTo('sm'){
                    width: 50px;
                    height: 50px;
                    border-radius: 50px;
                }

                @include mixins.respondToPx(900){
                    width: 30px;
                    height: 30px;
                }
                
                &:hover{
                    transform: rotate(180deg);
                }

                &::before,&::after{
                    content: "";
                    position: absolute;
                    top: 50%; left: 0;
                    margin-top: -1px;
                    width: 80px;
                    height: 2px;
                    background-color: #FFF;

                    @include mixins.respondTo('sm'){
                        width: 50px;
                    }

                    @include mixins.respondToPx(900){
                        width: 30px;
                        background-color: #000;
                    }
                }

                &::before{
                    transform: rotate(-45deg);
                }

                &::after{
                    transform: rotate(45deg);
                }
            }

            &_arrow{
                position: absolute;
                top: 8vh; left: 50%;
                transform: translateX(-40%);
                mix-blend-mode: difference;
            }

            &_left, &_right{
                width: 50%;
                height: 100%;
                display: flex;
                align-items: center;

                @include mixins.respondToPx(900){
                    display: block;
                    width: 100%;
                    height: auto;
                }
            }

            &_left{
                h2{
                    @include mixins.fontSize(62,62);

                    @include mixins.respondTo('sm'){
                        @include mixins.fontSize(44,44);
                    }
                }
                h3{
                    @include mixins.fontSize(42,62);
                    font-style: italic;

                    @include mixins.respondTo('sm'){
                        @include mixins.fontSize(30,36);
                    }
                }
            }

            &_right{
                color: #FFF;

                h2{
                    @include mixins.fontSize(50,50);
                    text-transform: uppercase;
                    margin-bottom: 3vh;

                    @include mixins.respondTo('sm'){
                        @include mixins.fontSize(44,44);
                    }
                }

                .services_form_inner{
                    padding-left: 10vw;
                    padding-right: 10vw;

                    @include mixins.respondTo('sm'){
                        padding-left: 5vw;
                        padding-right: 5vw;
                    }
                }
            }

            &_inner{
                padding: 5vw;
                max-height: 100%;
                overflow: auto;
                width: 100%;
                position: relative;

                @include mixins.respondToPx(900){
                    padding: 15vh 5vw;
                }
            }

            &_intro{
                margin-top: 3vh;
                @include mixins.fontSize(30,36);
                font-weight: 700;

                @include mixins.respondTo('sm'){
                    @include mixins.fontSize(24,32);
                }
            }

            &_content{
                margin-top: 3vh;
            }

            &_link{
                margin-top: 3vh;
                display: inline-block;
                text-transform: uppercase;
                @include mixins.fontSize(16,20);
                font-weight: 700;
                border-radius: 30px;
                padding: 20px 30px 18px 30px;
                text-decoration: none;
                transition: opacity 0.2s linear;

                &, &:visited{
                    color: #FFF;
                }

                &:hover{
                    opacity: 0.7;
                }
            }

            .wpcf7{
                label{
                    display: block;
                    margin-bottom: 20px;
                    @include mixins.fontSize(12);
                    text-transform: uppercase;
                    font-weight: 700;
                    cursor: pointer;
                }
                
                .wpcf7-form-control-wrap{
                    display: block;
                }
                .wpcf7-form-control{
                    padding: 5px 0;
                    color: #FFF;
                    border-bottom: 1px solid #FFF;
                    @include mixins.fontSize(16);
                    width: 100%;
                }

                .wpcf7-not-valid-tip{
                    color: #FFF;
                    font-weight: 700;
                    margin-top: 5px;
                }

                .wpcf7-submit{
                    width: auto;
                    display: inline-block;
                    text-transform: uppercase;
                    @include mixins.fontSize(16,20);
                    font-weight: 700;
                    border-radius: 30px;
                    padding: 20px 30px 18px 30px;
                    margin-top: 20px;
                    text-decoration: none;
                    background-color: #FFF;
                    border: 0;
                    transition: opacity 0.2s linear;

                    &[disabled]{
                        opacity: 0.7;
                    }

                    &:hover{
                        opacity: 0.7;
                    }
                }

                .wpcf7-spinner{
                    display: block;
                    margin: 10px 10px;
                }

                .wpcf7-response-output{
                    background-color: #FFF;
                    border-radius: 15px;
                    margin: 0;
                    padding: 20px 30px;
                    @include mixins.fontSize(18,28);
                    border: 0;
                    text-align: center;
                }

                .wpcf7-acceptance{
                    border: 0;

                    .wpcf7-list-item{
                        margin-left: 0;

                        label{
                            position: relative;
                            text-transform: none;
                            @include mixins.fontSize(14,22);
                            margin-bottom: 5px;
                            padding-left: 27px;

                            input{
                                position: absolute;
                                margin-top: 3px;
                                opacity: 0;
                                visibility: hidden;

                                &:checked{
                                    & + span::before{
                                        background: #FFF;
                                    }
                                    & + span::after{
                                        opacity: 1;
                                    }
                                }
                            }

                            span{
                                &::before{
                                    content: "";
                                    position: absolute;
                                    top: 1px; left: 0;
                                    width: 18px;
                                    height: 18px;
                                    border-radius: 18px;
                                    border: 2px solid #FFF;

                                    @include mixins.respondTo('xs'){
                                        top: -2px;
                                    }
                                }

                                &::after{
                                    position: absolute;
                                    top: 6px; left: 5px;
                                    width: 8px;
                                    height: 8px;
                                    border-radius: 8px;
                                    background-color: black;
                                    opacity: 0;

                                    @include mixins.respondTo('xs'){
                                        top: 3px;
                                    }
                                }
                            }
                        }
                    }
                }

                .form-infos{
                    @include mixins.fontSize(14,22);
                    margin-top: 0;
                    padding-left: 27px;
                    font-weight: 700;

                    a, a:visited{
                        text-decoration: underline;

                        &:hover{
                            text-decoration: none;
                        }
                    }
                }
            }
        }
    }
}


@keyframes pulse {
    0%   { transform: scale(1); }
    65%  { transform: scale(1); }
    70%  { transform: scale(0.9); }
    75%  { transform: scale(1); }
    80%  { transform: scale(0.9); }
    85%  { transform: scale(1); }
    100% { transform: scale(1); }
}