/* ==========================================
   TESTIMONIALS SECTION
   Legacy Protection Services
   White section background with light grey cards
========================================== */

.testimonials-section {
    padding: clamp(48px, 6vw, 80px) 0;
    background: #ffffff;  /* White section background */
}

/* Reusing section-intro styles from services section */
/* The .section-intro, .section-label, .section-title, .section-text 
   are already defined - no need to duplicate */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 3rem 0 2rem 0;
}

.testimonial-card {
    background: #F8F9FA;  /* Light grey cards that stand out from white background */
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: rgba(214, 154, 59, 0.2);
    background: #ffffff;  /* Turns white on hover for nice effect */
}

.quote-icon {
    color: var(--color-primary);
    font-size: 1.6rem;
    opacity: 0.35;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.testimonial-text {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
    font-style: italic;
    flex: 1;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 1rem;
    margin-top: auto;
}

.client-avatar {
    width: 44px;
    height: 44px;
    background: rgba(214, 154, 59, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary-dark);
    flex-shrink: 0;
}

.client-details {
    flex: 1;
}

.client-name {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
    color: var(--color-black);
}

.client-title {
    font-size: 0.7rem;
    color: var(--color-text-light);
    line-height: 1.4;
}

.rating {
    display: flex;
    gap: 0.2rem;
    margin-top: 0.25rem;
}

.rating i {
    font-size: 0.65rem;
    color: var(--color-primary);
}

/* Rating Summary - Bottom Section (Grey Box) */
.rating-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1.25rem;
    background: #F0F2F5;  /* Slightly darker grey than cards */
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.rating-score {
    text-align: center;
}

.rating-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
}

.rating-stars {
    margin: 0.4rem 0;
}

.rating-stars i {
    font-size: 0.8rem;
    color: var(--color-primary);
}

.rating-count {
    font-size: 0.7rem;
    color: var(--color-text-light);
}

.rating-quote p {
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-style: italic;
    margin: 0;
    max-width: 350px;
    text-align: center;
}

/* ========== ENHANCED RESPONSIVENESS ========== */

/* Tablet landscape & smaller desktops */
@media (max-width: 1100px) {
    .testimonials-grid {
        gap: 1.25rem;
    }
    
    .testimonial-card {
        padding: 1rem;
    }
    
    .testimonial-text {
        font-size: 0.8rem;
    }
    
    .client-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
    
    .client-name {
        font-size: 0.8rem;
    }
    
    .client-title {
        font-size: 0.65rem;
    }
    
    .rating-number {
        font-size: 1.8rem;
    }
}

/* Tablet portrait */
@media (max-width: 991px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .rating-summary {
        flex-direction: row;
        gap: 1.5rem;
    }
}

/* Mobile landscape */
@media (max-width: 640px) {
    .testimonials-grid {
        gap: 1rem;
    }
    
    .testimonial-card {
        padding: 0.875rem;
    }
    
    .testimonial-text {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .quote-icon {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }
    
    .client-info {
        gap: 0.6rem;
        padding-top: 0.75rem;
    }
    
    .client-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    .rating-summary {
        padding: 1rem;
        gap: 1rem;
    }
    
    .rating-number {
        font-size: 1.6rem;
    }
    
    .rating-stars i {
        font-size: 0.7rem;
    }
    
    .rating-quote p {
        font-size: 0.7rem;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .rating-summary {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .rating-quote p {
        max-width: 100%;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .testimonials-grid {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .rating-summary {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Touch device optimization */
@media (hover: none) {
    .testimonial-card:hover {
        transform: none;
        box-shadow: none;
        background: #F8F9FA;  /* Keeps original grey on touch devices */
        border-color: rgba(0, 0, 0, 0.04);
    }
}