/* ==========================================================================
   Testimonial Carousel Styles - Polished & Refined
   ========================================================================== */

   :root {
    --card-bg: #FFFFFF;
    --text-color: #3D4A62;
    --heading-color: #1a294d;
    --author-color: #1a294d;
    --dot-color: #C9D3E0;
    --dot-active-color: #4A60E2;
    --section-bg: #f8f9fa;
}

.testimonials-section {
    background-color: var(--section-bg);
    padding: 80px 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    position: relative;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.testimonials-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 50px;
}

.testimonial-carousel {
    position: relative;
    padding: 0 50px; /* Space for the navigation arrows */
}

/* New container to hide overflow */
.carousel-track-container {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 2%; /* Modern way to create gutters */
    padding: 10px 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.testimonial-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
    box-sizing: border-box;
    flex-shrink: 0; /* Prevent cards from shrinking */
    width: 32%; /* Shows 3 cards on desktop, adjust as needed */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0.5; /* Non-active cards are slightly faded */
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.testimonial-card.is-active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 15px 50px rgba(74, 96, 226, 0.2);
}

.card-content {
    position: relative;
}

.quote-icon {
    position: absolute;
    top: -20px;
    left: -15px;
    font-size: 100px;
    color: #F0F4FF;
    line-height: 1;
    z-index: 1;
}

.stars {
    color: #FFC107;
    font-size: 20px;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0 0 30px 0;
    position: relative;
    z-index: 2;
    min-height: 150px; /* Set a min-height to align authors */
}

.author-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #E9EFFF;
    padding-top: 20px;
}

.author-details {
    display: flex;
    align-items: center;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.author-name {
    font-weight: bold;
    color: var(--author-color);
}

.author-title {
    font-size: 14px;
    color: var(--text-color);
}

.company-logo {
    max-height: 40px;
    max-width: 100px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.testimonial-card:hover .company-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* Prev/Next Buttons */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    color: var(--author-color);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.carousel-button:hover {
    background-color: var(--dot-active-color);
    color: white;
    border-color: var(--dot-active-color);
}

.carousel-button.prev {
    left: 0;
}

.carousel-button.next {
    right: 0;
}

/* Dots Navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding: 10px 0;
}

.carousel-dot {
    border: none;
    padding: 0;
    background-color: var(--dot-color);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.carousel-dot.is-active {
    background-color: var(--dot-active-color);
    transform: scale(1.3);
}


/* Responsive adjustments */
@media (max-width: 1024px) {
    .testimonial-card {
        width: 49%; /* Shows 2 cards on tablets */
    }
    .testimonial-text {
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    .testimonial-carousel {
        padding: 0 40px; /* Reduce padding for smaller screens */
    }
    .testimonial-card {
        width: 100%; /* Shows 1 card on mobile */
        opacity: 1; /* All cards are fully visible on mobile */
        transform: scale(1);
    }
    .testimonial-text {
        min-height: auto; /* Reset min-height for single card view */
    }
    .testimonials-title {
        font-size: 28px;
    }
    .testimonials-section {
        padding: 60px 0;
    }
    .carousel-button.prev {
        left: -10px;
    }
    .carousel-button.next {
        right: -10px;
    }
}