@import url('https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400..700;1,400..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
}

body {
    background-color: black;
    color: white;
    font-size: 16px;
    overflow: hidden;
    font-family: "Cabin", sans-serif;
}

header {

    width: 60vw;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 600px;
    gap: 80px;
    z-index: 2;

    & img {
        width: 250px;
        cursor: pointer;
    }

    & nav {
        & ul {
            display: grid;
            grid-template-columns: repeat(3, 200px);
        }
    }
}

section {
    background-image: radial-gradient(rgb(67, 65, 71), rgb(3, 59, 85));
    height: 100vh;
    position: relative;

    & .list {
        width: 70vw;
        height: 100%;
        margin: auto;
        position: relative;

            & .item {
                position: absolute;
                inset: 0;

                & .car-img {
                    position: absolute;
                    top: 50%;
                    transform: translateY(-50%);
                    width: 70%;

                    & img {
                        width: 100%;
                        transform: rotate(-30deg);
                    }
                }

                & .content {
                    position: absolute;
                    right: 100px;
                    width: 70%;
                    height: 100%;
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    align-items: end;
                    gap: 20px;

                    & .car-information {
                        font-weight: bold;
                    }

                    & h2 {
                        font-size: 8em;
                        line-height: 1em;
                    }

                    & .description {
                        color: rgb(194, 191, 191);
                        font-size: 14px;
                        text-align: right;
                        max-width: 400px;
                    }

                    & .information {
                        border-radius: 30px;
                        height: 35px;
                        width: 120px;
                        text-transform: uppercase;
                        border: 2px solid rgb(51, 50, 50);
                        background-color: greenyellow;
                        cursor: pointer;
                        font-weight: bold;
                    }
                }
            }
            &::before {
                content: '';
                position: absolute;
                height: 200px;
                width: 100%;
                top: 50%;
                border-top: 1px solid white;
            }
        }

    .arrows {
        width: 70vw;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -25px);
        display: flex;
        justify-content: space-between;


        & button:nth-child(1){
            & img {
                transform: scale(-1);
            }
        }

        & button {
            top: 60%;
            width: 50px;
            height: 50px;
            left: 50%;
            border-radius: 50px;
            border: none;
            cursor: pointer;

            & img {
                width: 30px;
                margin-top: 4px;
                cursor: pointer;
            }

            &:hover {
                background-color: rgb(177, 253, 62);
            }
        }
    }

    .indicators {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translateX(-50%);
        height: 200px;
        width: 90vw;
        display: flex;
        flex-direction: column;
        justify-content: end;
        gap: 15px;

        & .number {
            font-size: 5em;
        }

        & ul {
            display: flex;
            gap: 10px;

            & li {
                width: 50px;
                height: 5px;
                background-color: greenyellow;
                border-radius: 5px;
                transition: 0.5s;
            }

            & .active {
                background-color: white;
            }
        }
    }
}



section {

    & .list{

        & .item {
            transform: translateX(100vw);
            transition: 0.5s;
            transition-delay: 0.3s;
            opacity: 0;

            & .car-img {        
                & img {
                    transform: rotate(0);
                }
            }

            & .content {
                & .car-information, h2, .description, .information {
                    transform: translateX(200px);
                    transition: 0.7s;
                    transition-delay: 0.3s;
                    opacity: 1;
                }

                & h2 {
                    transition-delay: 0.5s;
                }
                
                & .description {
                    transition-delay: 0.7s;
                }

                & .information {
                    transition-delay: 0.9s;
                }
            }
        }

        & .active {
            transform: translateX(0);
            transition: 0.5s;
            opacity: 1;

            & .car-img {        
                & img {
                    transform: rotate(-20deg);
                }
            }

            & .content {
                & .car-information, h2, .description, .information {
                    transform: translateX(0);
                    opacity: 1;
                } 
            }  
        }
    }
}