/* 
 * New Testimonials Carousel Styles
 * Simplified and more reliable implementation
 * Compatible with Google Reviews API
 */

/* Main Container */
.testimonials-container {
    position: relative;
    width: 100%;
    max-width: 100%; /* Take full available width */
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}

/* Testimonials Track/Slider */
.testimonials-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    gap: 0;  /* Remove gap, we'll handle spacing in JS */
    justify-content: space-between; /* Ensure items are distributed evenly */
}

/* Individual Testimonial Card */
.testimonial-item {
    flex-grow: 0;
    flex-shrink: 0;
    min-width: 280px;
    padding: 1.5rem;
    margin: 0 10px; /* Add horizontal margin for spacing between cards */
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box !important;
    transition: all 0.3s ease;
    overflow: hidden;
    word-wrap: break-word;
}

/* User Info Section */
.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    width: 100%;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex-grow: 1;
}

.user-name {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 600;
}

.user-location {
    display: block;
    font-size: 0.875rem;
    color: #666;
}

.review-meta {
    display: flex;
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

/* Testimonial Content */
.testimonial-content {
    width: 100%;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.review-text {
    overflow: hidden;
    width: 100%;
    word-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}

.review-text p {
    margin: 0;
    line-height: 1.5;
}

/* Star Rating */
.review-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 1rem;
}

.star-rating {
    display: flex;
    align-items: center;
}

.star {
    color: #e0e0e0;
    font-size: 1rem;
}

.star.filled {
    color: #ffd700;
}

.rating-number {
    margin-left: 5px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
}

/* Read More Button */
.read-more-btn {
    background: none;
    border: none;
    color: #0066cc;
    padding: 0;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 0.5rem;
    text-decoration: underline;
}

.read-more-btn.hidden {
    display: none;
}

/* Navigation Controls */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    padding: 0;
    gap: 20px;
}

.carousel-btn {
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

/* Dots Navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #ffd700;
    transform: scale(1.2);
}

/* Responsive Breakpoints */
@media screen and (min-width: 768px) {
    .testimonials-container {
        padding: 0 20px;
    }
    
    .testimonials-track {
        gap: 20px;
    }
    
    .testimonial-item {
        flex: 0 0 calc(50% - 10px);
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        box-sizing: border-box !important;
    }
}

@media screen and (min-width: 1200px) {
    .testimonials-container {
        padding: 0 40px;
    }
    
    .testimonials-track {
        gap: 20px;
    }
    
    .testimonial-item {
        flex: 0 0 calc(33.333% - 14px);
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        box-sizing: border-box !important;
    }
}
