/* =========================================
   PREMIUM APP-STYLE TESTIMONIALS
   "Confían en nosotros" - Clean, Modern, Trustworthy
   ========================================= */

.testimonials-section {
    padding: 5px 0 40px;
    background: #ffffff;
    /* Clean white background */
    position: relative;
}

/* --- HEADER --- */
.testimonials-header {
    padding: 0 24px;
    margin-top: 5px;
    /* Micro top margin */
    margin-bottom: 25px;
    /* Refined */
    text-align: left;
    /* App style alignment */
}

.testimonials-header h3 {
    font-family: var(--font-heading, sans-serif);
    font-size: 1.75rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.testimonials-header p {
    font-size: 1rem;
    color: #6B7280;
    font-weight: 400;
}

/* --- GRID / CAROUSEL --- */
.reviews-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 24px 40px;
    /* Bottom padding for shadows */
    scrollbar-width: none;
    margin: 0;
}

.reviews-grid::-webkit-scrollbar {
    display: none;
}

/* --- CARD DESIGN --- */
.review-card {
    min-width: 300px;
    max-width: 300px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 24px;
    scroll-snap-align: start;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 12px 24px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 1;
    /* Reset previous opacity logic if needed, or keep for JS to manage */
}

/* Active state for JS scroll spy (optional highlight) */
.review-card.active-card {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: #D1D5DB;
}

/* --- STARS --- */
.review-stars {
    color: #FBBF24;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    gap: 2px;
}

/* --- TEXT --- */
.review-text {
    font-size: 0.92rem;
    /* Slightly refined */
    line-height: 1.5;
    color: #4B5563;
    margin-bottom: 24px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Strict 3-line truncation as requested */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- AUTHOR ROW --- */
.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #F3F4F6;
    margin-top: auto;
}

/* Avatar Styles */
.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #FFF;
    font-size: 1rem;
    flex-shrink: 0;
}

.bg-blue {
    background: #3B82F6;
}

.bg-green {
    background: #10B981;
}

.bg-purple {
    background: #8B5CF6;
}

.bg-orange {
    background: #F59E0B;
}

.bg-red {
    background: #EF4444;
}

/* Info */
.author-info {
    display: flex;
    flex-direction: column;
}

.author-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.author-info span {
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* --- DOTS --- */
.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
    /* Compact */
}

.t-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E5E7EB;
    /* Low contrast neutral */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.t-dot.active {
    width: 18px;
    /* Subtle pill stretch */
    background: #9CA3AF;
    /* Muted active state */
    border-radius: 10px;
}

/* --- MOTION: PROGRESSIVE ENTRANCE --- */
.testimonials-section.reveal-visible .testimonials-header h3 {
    animation: fadeInUpPremium 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.testimonials-section.reveal-visible .testimonials-header p {
    animation: fadeInUpPremium 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
}

.testimonials-section.reveal-visible .reviews-grid .review-card:first-child {
    animation: fadeInUpPremium 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

.testimonials-section.reveal-visible .testimonial-dots {
    animation: fadeInPremium 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
}

/* --- TRUST BADGE (Empresa Asegurada) --- */
.trust-badge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 0 24px 30px;
    opacity: 0;
    transform: translateY(10px);
}

.testimonials-section.reveal-visible .trust-badge-container {
    animation: fadeInUpPremium 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.5s;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    padding: 24px;
    border-radius: 20px;
    /* Matching review-card */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 12px 24px rgba(0, 0, 0, 0.04);
    width: 100%;
}

.badge-icon {
    width: 44px;
    height: 44px;
    background: #F3F4F6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.badge-text-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.badge-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 2px;
    line-height: 1.2;
}

.badge-subtitle {
    font-size: 0.9rem;
    color: #6B7280;
    margin: 0;
    line-height: 1.4;
}

/* --- DESKTOP --- */
@media (min-width: 768px) {
    .testimonials-header {
        text-align: center;
        max-width: 600px;
        margin: 0 auto 50px;
    }

    .reviews-grid {
        justify-content: center;
        padding-bottom: 60px;
    }

    .review-card {
        min-width: 350px;
        max-width: 350px;
    }

    .trust-badge {
        max-width: 500px;
    }
}