.slider {
    height: 300px;
    margin: auto;
    position: relative;
    width: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;

    mask-image: linear-gradient(
        to right,
        transparent,
        #fff 10% 90%,
        transparent
    );
}

.slide-track {
    display: flex;
    width: calc(370px * 12);
    animation: scroll 30s linear infinite;
    -webkit-animation: scroll 30s linear infinite;
}

.slide-track:hover {
    animation-play-state: paused;
}

.slide-track:hover {
    animation-play-state: paused !important;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-370px * 6));
        -webkit-transform: translateX(calc(-370px * 6));
        -moz-transform: translateX(calc(-370px * 6));
        -ms-transform: translateX(calc(-370px * 6));
        -o-transform: translateX(calc(-370px * 6));
    }
}

.slide {
    height: 250px;
    width: 370px;
    display: flex;
    align-items: center;
    padding: 15px;
    perspective: 100px;
}

.review {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.5s;
}

.review:hover {
    transform: translateZ(10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    -webkit-transform: translateZ(10px);
    -moz-transform: translateZ(10px);
    -ms-transform: translateZ(10px);
    -o-transform: translateZ(10px);
}

.review-message-wrapper {
    border-top-right-radius: 8px;
    overflow: hidden;
    flex-grow: 1;
    display: flex;
}

.review-message {
    padding: 1rem;
    font-size: 16px;
    line-height: 1.5;
    overflow-y: auto;
    flex-grow: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-right-radius: 8px;
}

.review-footer {
    padding: 10px 16px;
    border-top: 2px solid #d6d6d6;
}

.review-username {
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 4px;
}

.review-rating {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #4b5563;
}

.stars {
    display: flex;
    align-items: center;
    margin-left: 8px;
    gap: 4px;
    color: #f59e0b;
    font-size: 18px;
}

@media (max-width: 768px) {
    .slider {
        height: 200px;
    }

    .slide {
        width: 250px;
        height: 180px;
    }

    .slide-track {
        width: calc(250px * 12);
        animation: scroll-mobile 30s liear infinite;
        -webkit-animation: scroll-mobile 30s liear infinite;
    }

    @keyframes scroll-mobile {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-250px * 6));
        }
    }
}
