/* global definitions */
:root {
    --services-bg-color: #1D1D1B;
    --services-titel-color: #fcbf00;
    --services-text-color: #e0e0e0;
    --services-card-f-bg-color: #fcbf00;
    --services-card-f-bg-color-shine1: #ffc61a;
    --services-card-f-bg-color-shine2: #ffe699;
    --services-card-f-text-color: #000000;
    --services-card-b-bg-color: #000000;
    --services-card-b-text-color: #fcbf00;
}

.sec-services {
    display: flex;
    width: 100%;
    background-image: url(../images/pics/ind_bg.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    & h1 {
        color: var(--services-titel-color);
        text-shadow: #202020 3px 5px 2px;
    }

    & .ser-box {
        width: 100%;
        display: flex;
        flex-wrap: wrap;

        & a {
            text-decoration: none;

            & .ser-card {

                & .ser-card-inner {

                    & .ser-card-front {
                        display: flex;
                        /* background-color: var(--services-card-f-bg-color); */
                        background: rgb(252,191,0);
                        /* background: linear-gradient(43deg, rgba(252,191,0,1) 24%, rgba(255,198,26,1) 69%, rgba(255,230,153,1) 90%, rgba(255,249,230,1) 100%); */
                        & h2 {
                            color: var(--services-card-f-text-color);
                            text-align: center;
                        }
                    }

                    & .ser-card-back {
                        display: flex;
                        /* background-color: var(--services-card-b-bg-color); */
                        background-image: url(../images/textures/bg_ripple.jpg);
                        background-position: center;
                        background-repeat: no-repeat;
                        background-size: cover;

                        & p {
                            color: var(--services-card-b-text-color);
                            text-align: center;
                        }
                    }
                }
            }
        }
    }
}

/* Animations */
@keyframes card-fade-in {
    from {
        opacity: 0;
        transform: translateY(+100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (min-width: 1200px) {
    .sec-services {
        background-attachment: fixed;
        padding: 3rem 0;

        & h1 {
            padding: 2.5rem 0rem;
            font-size: 5rem;
        }

        & .ser-box {
            flex-direction: row;
            justify-content: space-around;
            gap: 3rem;
            opacity: 0.85;

            & a {
                & .ser-card {
                    width: 350px;
                    height: 120px;
                    perspective: 1000px;
                    background-color: transparent;

                    & .ser-card-inner {
                        position: relative;
                        width: 100%;
                        height: 100%;
                        box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;                            transform-style: preserve-3d;
                        transition: transform 500ms;
                        border-radius: 1.5rem;

                        & .ser-card-front {
                            position: absolute;
                            display: flex;
                            flex-direction: column;
                            justify-content: center;
                            align-items: center;
                            width: 100%;
                            height: 100%;
                            -webkit-backface-visibility: hidden;
                            backface-visibility: hidden;
                            border-radius: 1.5rem;

                            & h2 {
                                padding: 0 1.3rem;
                                font-size: 2.7rem;
                            }
                        }

                        & .ser-card-back {
                            flex-direction: column;
                            justify-content: center;
                            align-items: center;
                            width: 100%;
                            height: 100%;
                            -webkit-backface-visibility: hidden;
                            backface-visibility: hidden;
                            border-radius: 1.5rem;
                            transform: rotateY(180deg);

                            & p {
                                padding: 1.8rem;
                                font-size: 1.8rem;
                            }
                        }
                    }
                }

                & .ser-card:hover {
                    & .ser-card-inner {
                        transform: rotateY(180deg);
                    }
                }

            }

/*             a:nth-child(1), a:nth-child(4), a:nth-child(7) {
                border: 3px solid red;
                animation: card-from-left linear both;
                animation-timeline: view();
                animation-range: 50vh 90vh;
            }

            a:nth-child(3), a:nth-child(6), a:nth-child(9) {
                border: 3px solid blue;
            }

            a:nth-child(2), a:nth-child(5), a:nth-child(8), a:nth-child(10) {
                border: 3px solid green;
            } */
        }
    }

    .ser-card {
        animation: card-fade-in linear both;
        animation-timeline: scroll();
    }
}

@media screen and (min-width: 992px) and (max-width: 1200px) {
    .sec-services {
        background-attachment: fixed;
        padding: 3rem 0;

        & h1 {
            padding: 2.5rem 0rem;
            font-size: 5rem;
        }

        & .ser-box {
            flex-direction: row;
            justify-content: space-around;
            gap: 3rem;
            opacity: 0.85;

            & a {
                & .ser-card {
                    width: 350px;
                    height: 120px;
                    perspective: 1000px;
                    background-color: transparent;

                    & .ser-card-inner {
                        position: relative;
                        width: 100%;
                        height: 100%;
                        box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;                            transform-style: preserve-3d;
                        transition: transform 500ms;
                        border-radius: 1.5rem;

                        &  .ser-card-front {
                            position: absolute;
                            display: flex;
                            flex-direction: column;
                            justify-content: center;
                            align-items: center;
                            width: 100%;
                            height: 100%;
                            -webkit-backface-visibility: hidden;
                            backface-visibility: hidden;
                            border-radius: 1.5rem;

                            & h2 {
                                padding: 0 1.3rem;
                                font-size: 2.7rem;
                            }
                        }

                        & .ser-card-back {
                            flex-direction: column;
                            justify-content: center;
                            align-items: center;
                            width: 100%;
                            height: 100%;
                            -webkit-backface-visibility: hidden;
                            backface-visibility: hidden;
                            border-radius: 1.5rem;
                            transform: rotateY(180deg);

                            & p {
                                padding: 1.8rem;
                                font-size: 1.8rem;
                            }
                        }
                    }
                }

                & .ser-card:hover {
                    & .ser-card-inner {
                        transform: rotateY(180deg);
                    }
                }
            }
        }
    }
}

@media screen and (min-width: 768px) and (max-width: 992px) {
    .sec-services {
        padding: 3rem 0;

        & h1 {
            padding: 2.5rem 0rem;
            font-size: 5rem;
        }

        & .ser-box {
            flex-direction: column;
            flex-direction: row;
            justify-content: space-around;
            gap: 1rem;

            & a {
                & .ser-card {
                    width: 370px;
                    height: 180px;
                    padding: 0 2rem;
                    opacity: 0.9;

                    & .ser-card-inner {
                        position: relative;
                        width: 100%;
                        height: 100%;

                        & .ser-card-front {
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 100%;
                            height: 100px;
                            border-radius: 1.5rem;
                            justify-content: center;
                            align-items: flex-start;

                            & h2 {
                                padding: 1.2rem 1.3rem;
                                font-size: 2rem;
                            }
                        }

                        & .ser-card-back {
                            position: absolute;
                            left: 0;
                            bottom: 0;
                            width: 100%;
                            height: 130px;
                            border-radius: 1.5rem;
                            justify-content: center;
                            align-items: center;

                            & p {
                                padding: 1.8rem;
                                font-size: 1.8rem;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media screen and (min-width: 480px) and (max-width: 768px) {
    .sec-services {
        padding: 3rem 0;

        & h1 {
            padding: 2.5rem 0rem;
            font-size: 4rem;
        }

        & .ser-box {
            padding: 2.5rem 0;;
            flex-direction: column;
            gap: 1.5rem;

            & a {
                & .ser-card {
                    width: 100%;
                    height: 180px;
                    padding: 0 2rem;
                    opacity: 0.9;

                    & .ser-card-inner {
                        position: relative;
                        width: 100%;
                        height: 100%;

                        & .ser-card-front {
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 100%;
                            height: 100px;
                            border-radius: 1.5rem;
                            justify-content: center;
                            align-items: flex-start;

                            & h2 {
                                padding: 1.2rem 1.3rem;
                                font-size: 2rem;
                            }
                        }

                        & .ser-card-back {
                            position: absolute;
                            left: 0;
                            bottom: 0;
                            width: 100%;
                            height: 130px;
                            border-radius: 1.5rem;
                            justify-content: center;
                            align-items: center;

                            & p {
                                text-align: center;
                                padding: 1.8rem;
                                font-size: 1.8rem;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media screen and (max-width: 480px) {
    .sec-services {
        padding: 3rem 0;

        & h1 {
            padding: 2.5rem 0rem;
            font-size: 5rem;
        }

        & .ser-box {
            flex-direction: column;
            gap: 1.5rem;

            & a {
                & .ser-card {
                    width: 100%;
                    height: 180px;
                    padding: 0 2rem;
                    opacity: 0.9;

                    & .ser-card-inner {
                        position: relative;
                        width: 100%;
                        height: 100%;

                        & .ser-card-front {
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 100%;
                            height: 100px;
                            border-radius: 1.5rem;
                            justify-content: center;
                            align-items: flex-start;

                            & h2 {
                                padding: 1.2rem 1.3rem;
                                font-size: 2rem;
                            }
                        }

                        & .ser-card-back {
                            position: absolute;
                            left: 0;
                            bottom: 0;
                            width: 100%;
                            height: 130px;
                            border-radius: 1.5rem;
                            justify-content: center;
                            align-items: center;

                            & p {
                                padding: 1.8rem;
                                font-size: 1.8rem;
                            }
                        }
                    }
                }
            }
        }
    }
}