/* Scrolling Reviews Box Styles */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-box {
    background-color: #fff;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1.2rem;
    color: var(--dark-purple);
    margin-bottom: 0;
}

/* Scrolling Reviews Box */
.reviews-box {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.reviews-scroll {
    position: absolute;
    width: 100%;
}

.review-item {
    padding: 1rem 0;
    text-align: center;
}

.review-text {
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
}

.review-author {
    font-weight: 600;
    color: var(--primary-purple);
    font-size: 0.9rem;
}

.review-rating {
    color: gold;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.review-icon {
    font-size: 1.5rem;
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Animation for scrolling up */
@keyframes scrollReviewsUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* Animation for scrolling down */
@keyframes scrollReviewsDown {
    0% {
        transform: translateY(-50%);
    }
    100% {
        transform: translateY(0);
    }
}

.reviews-up .reviews-scroll {
    animation: scrollReviewsUp 30s linear infinite;
    animation-delay: 1s;
    /* Create a copy of each review to make continuous scrolling work */
    height: 200%;
}

.reviews-up .reviews-scroll::after {
    content: "";
    display: block;
    height: 50%;
}

.reviews-down .reviews-scroll {
    animation: scrollReviewsDown 30s linear infinite;
    animation-delay: 1s;
    /* Create a copy of each review to make continuous scrolling work */
    height: 200%;
}

.reviews-down .reviews-scroll::after {
    content: "";
    display: block;
    height: 50%;
}

/* Pause animation on hover */
.reviews-box:hover .reviews-scroll {
    animation-play-state: paused;
}

/* Reviews grid for testimonials section */
.reviews-grid {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.reviews-grid .reviews-box {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    height: 350px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .reviews-grid .reviews-box {
        height: 400px;
    }
}
