* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    font-size: 16px;
    overflow: hidden;
}

header {
    position: fixed;
    width: 90vw;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 600px;
    gap: 100px;
    z-index: 2;

    & img {
        width: 250px;
    }

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

section {
    background-image: radial-gradient(#470964, #791fd3);
    height: 100vh;
    position: relative;

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

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

            & .car-img {
                position: absolute;
                top: 55%; 
                left: 0; 
                transform: translateY(-50%);
                width: 60%; 
                z-index: 1; 

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

                &::before {
                    content: '';
                    position: absolute;
                    background-color: #000;
                    width: 100%;
                    height: 100px;
                    top: 150%;
                    left: 50px;
                    border-radius: 50%; 
                    filter: blur(50px);
                }
            }

            & .content {
                position: absolute;
                right: 50px; 
                width: 50%; 
                height: 100%;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: end;
                gap: 15px; 
                z-index: 2; 

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

                & h2 {
                    font-size: 6em; 
                    line-height: 1em;
                    font-family: "League Gothic", sans-serif;
                    margin: 0;
                }

                & .description {
                    color: #d9d9d9;
                    font-size: 12px;
                    text-align: right;
                    max-width: 350px;
                }

                & .information {
                    border-radius: 30px;
                    height: 35px;
                    width: 120px;
                    text-transform: uppercase;
                    border: 2px solid #791fd3;
                    background-color: #beff1b;
                    color: #000;
                    cursor: pointer;
                    font-weight: bold;
                    font-family: "League Gothic", sans-serif;
                }
            }
        }

        &::before {
            content: '';
            position: absolute;
            height: 200px;
            width: 100%;
            top: 50%;
            border-top: 1px solid #fff;
        }
    }

    .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;
            border-radius: 50%;
            border: none;
            cursor: pointer;

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

            &:hover {
                background-color: #beff1b;
                transition: 0.5s;
            }
        }
    }

    .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;
            font-family: "League Gothic", sans-serif;
        }

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

            & li {
                width: 50px;
                height: 5px;
                background-color: #beff1b;
                border-radius: 5px;
                cursor: pointer;
            }

            & .active {
                background-color: #fff;
            }
        }
    }
}

section {
    & .list {
        --calculation: 1;
        & .item {
            transform: translateX(calc(100vw * var(--calculation)));
            transition: 0.5s;
            opacity: 0;

            & .car-img {
                & img {
                    transform: rotate(0);
                    transition: 0.5s;
                    transition-delay: 0.3s;
                }
            }

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

                & 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;
                }
            }
        }
    }
}

/* ========== RESPONSIVIDADE PARA CELULARES ========== */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    header {
        grid-template-columns: 1fr;
        gap: 5px;
        width: 95vw;
        top: 10px;
        padding: 0;
    }

    header img {
        width: 160px;
        margin: 0 auto;
    }

    header nav ul {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        font-size: 11px;
        text-align: center;
    }

    section {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 60px;
    }

    section .list {
        width: 95vw;
        height: auto;
        position: relative;
        margin-top: 20px;
    }

    section .list::before {
        display: none;
    }

    section .list .item {
        position: relative;
        inset: auto;
        transform: none;
        opacity: 1;
        display: none;
    }

    section .list .item.active {
        display: block;
        transform: none;
    }

    section .list .item .car-img {
        position: relative;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        margin-bottom: 30px;
    }

    section .list .item .car-img img {
        transform: rotate(0);
    }

    section .list .active .car-img img {
        transform: rotate(-5deg);
    }

    section .list .item .car-img::before {
        height: 50px;
        top: 120%;
        left: 0;
        filter: blur(25px);
    }

    section .list .item .content {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 90%;
        margin: 0 auto;
        gap: 15px;
    }

    section .list .item .content .car-information {
        font-size: 14px;
    }

    section .list .item .content h2 {
        font-size: 3.5em;
        line-height: 1em;
    }

    section .list .item .content .description {
        font-size: 13px;
        max-width: 100%;
        text-align: center;
    }

    section .arrows {
        position: relative;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 80vw;
        margin: 30px 0;
        padding: 0;
    }

    section .arrows button {
        width: 45px;
        height: 45px;
        background-color: #fff;
    }

    section .arrows button img {
        width: 25px;
    }

    section .indicators {
        position: relative;
        top: auto;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        align-items: center;
        gap: 15px;
        margin-top: 10px;
    }

    section .indicators .number {
        font-size: 2em;
    }

    section .indicators ul li {
        width: 25px;
        height: 4px;
    }
}

/* Ajustes para celulares menores (até 480px) */
@media (max-width: 480px) {
    header img {
        width: 140px;
    }

    header nav ul {
        font-size: 10px;
    }

    section .list .item .car-img {
        width: 90%;
    }

    section .list .item .content h2 {
        font-size: 3em;
    }

    section .arrows button {
        width: 40px;
        height: 40px;
    }

    section .arrows button img {
        width: 22px;
    }

    section .indicators .number {
        font-size: 1.8em;
    }

    section .indicators ul li {
        width: 20px;
    }
}