/*
  Services CSS
*/

/* Grid */
.service-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-gap: 100px;
}

/* List */
.service-list {
    counter-reset: index;

    .service {
        position: relative;

        &:not(:first-child) {
            margin-top: 40px;
        }

        /* Service Title */
        .title {
            font-size: clamp(28px, 3.5vw, 46px);
            font-weight: 700;
            color: var( --dark );
            opacity: 0.6;
            line-height: 1.2;
            cursor: pointer;
            position: relative;
            padding-left: 50px;
            display: inline-flex;
            min-height: 1.2em;
            transition: all .25s;
        }

        /* Service Number */
        &:before {
            content: counter(index, decimal-leading-zero);
            counter-increment: index;
            position: absolute;
            opacity: 0.6;
            top: 0;
            left: 0;
            font-size: 14px;
            line-height: 1;
            font-weight: 400;
            transition: all .25s;
        }

        /* Service Active */
        &.active {
            .title, &:before  {
                opacity: 1;
            }
        }

        /* Service Content for Responsive */
        .content {
            opacity: 0;
            pointer-events: none;
            position: absolute;
            max-height: 0;
            transition: .3s;
            overflow: hidden;
        }
    }
}

/* Preview */
.service-preview {
    position: relative;

    /* Preview Content */
    .content {
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
        pointer-events: none;
        position: absolute;
        left: 0;
        top: 0;

        /* Preview Inner */
        .inner {
            font-size: clamp(17px, 2.5vw, 23px);
            line-height: 1.6em;
            margin-bottom: 40px;

            &:before {
                content: "";
                display: block;
                position: relative;
                top: 0;
                left: 0;
                width: 0;
                height: 1px;
                background-color: var( --dark );
                margin-bottom: 35px;
                transition: width .6s cubic-bezier(.215,.61,.355,1) .25s;
            }
        }

        /* Preview Active */
        &.active {
            opacity: 1;
            transform: translateX(0);
            pointer-events: auto;
            position: relative;

            .inner {
                &:before {
                    width: 100%;
                }
            }
        }
    }
}


/* ---------- DESKTOP 1001-1400 ---------- */
@media only screen and (min-width: 1001px) and (max-width: 1400px){
    .service-grid {
        grid-gap: 70px;
    }

    .service-list {
        & .service {
            .title {
                /*font-size: 40px;*/
                padding-left: 30px;
            }
        }
    }
}

/* ---------- 1000 And Below ---------- */
@media only screen and (max-width: 1000px){
    .service-grid {
        grid-template-columns: 1fr;
        grid-gap: 50px;
    }

    /* Responsive Content */
    .service-list {
        .service {
            &.active {
                .content {
                    pointer-events: auto;
                    position: relative;
                    max-height: none;
                    margin-top: 20px;
                    margin-bottom: 60px;
                }
            }

            .content {
                opacity: 1;
                pointer-events: auto;
                position: relative;
            }

            .title {
                /*font-size: 40px;*/
                padding-left: 0;
            }

            &:before {
                top: -23px;
                font-size: 11px;
            }

        }
    }

    .service-preview {
        display: none;
    }
}

/* ---------- MOBILE 500 And Below ---------- */
@media only screen and (max-width: 500px){
    .service-list {
        & .service {
            .title {
                /*font-size: 30px;*/
            }
        }
    }
}