/* Testimonials Section */
.testimonials {
    padding: 4rem 0;
    background-color: var(--primary-dark);
    color: var(--white);
}

.testimonials__title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.testimonials__slider {
    position: relative;
    max-width: 900px;
    height: 450px;
    margin: 0 auto;
    perspective: 1200px; /* Create 3D space */
}

.testimonials__slides {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d; /* Enable 3D transformations */
    transition: transform 0.8s ease;
}

.testimonial-card {
    position: absolute;
    width: 80%;
    height: 370px; /* Fixed height for all cards */
    left: 10%;
    top: 0;
    background-color: var(--white);
    color: var(--primary-dark);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backface-visibility: hidden;
    transition: all 0.8s ease;
    opacity: 0.7;
    transform: scale(0.85);
    overflow-y: auto; /* Allow scrolling for content that's too long */
}

.testimonial-card.active {
    opacity: 1;
    z-index: 3;
    transform: translateX(0) scale(1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.testimonial-card.prev {
    opacity: 0.6;
    z-index: 1;
    transform: translateX(-65%) scale(0.85) translateZ(-150px);
}

.testimonial-card.next {
    opacity: 0.6;
    z-index: 1;
    transform: translateX(65%) scale(0.85) translateZ(-150px);
}

.testimonial-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.testimonial-card__name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.testimonial-card__stars {
    color: #FFD700; /* Gold color for stars */
    font-size: 1.25rem;
}

.testimonial-card__text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.testimonial-card__text strong {
    font-weight: 700;
}

.testimonials__dots {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    gap: 0.5rem;
    position: relative;
    z-index: 5;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--white);
    transform: scale(1.2);
}

/* Responsive styles */
@media (max-width: 768px) {
    .testimonials__slider {
        height: 450px;
        perspective: none;
    }
    
    .testimonials__slides {
        transform-style: flat;
    }
    
    .testimonial-card {
        width: 90%;
        left: 5%;
        height: 380px;
        /* For mobile, use a flat design instead of 3D */
        transform: none;
        opacity: 0;
        transition: opacity 0.5s ease;
    }
    
    .testimonial-card.active {
        opacity: 1;
        transform: none;
    }
    
    .testimonial-card.prev,
    .testimonial-card.next {
        display: none; /* Hide the non-active cards on mobile */
    }
    
    .testimonial-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}