/* testimonials.css - Con transiciones suaves y efectos visuales */

.testimonials-section {
    background: #f9fcff;
    padding: 120px 20px 100px;
}

.testimonials-container {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.testimonials-title {
    font-size: clamp(2.0rem, 5.0vw, 3.5rem);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.2s;
}

.testimonials-subtitle {
    font-size: 1.18rem;
    line-height: 1.78;
    color: #475569;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.4s;
    text-align: center;
}

.testimonials-track {
    position: relative;
    overflow: hidden;
    margin: 0 -20px; /* para que las tarjetas lleguen al borde */
    padding: 0 20px;
}

.testimonials-cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 32px;
    padding: 20px 0;
    scrollbar-width: none; /* oculta scrollbar en Firefox */
}

.testimonials-cards::-webkit-scrollbar {
    display: none; /* oculta scrollbar en Chrome/Safari */
}

.testimonial-card {
    flex: 0 0 340px;
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(97, 156, 186, 0.10);
    border: 1px solid rgba(97, 156, 186, 0.12);
    scroll-snap-align: start;
    text-align: left;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.7;
    transform: scale(0.92) translateY(20px);

    display: grid;
    grid-template-rows: auto auto auto 1fr;
    grid-template-columns: 1fr;
    grid-template-areas: "logo" "stars" "company" "text";
    justify-content: center;

}

.testimonial-card:hover,
.testimonial-card:focus-within {
    transform: scale(1.03) translateY(-8px);
    box-shadow: 0 20px 60px rgba(97, 156, 186, 0.22);
    opacity: 1;
    z-index: 2;
}

.testimonial-img {
    grid-area: logo;
    width: 120px;
    height: 80px;
    border-radius: 5px;
    object-fit: contain;
    border: 0px solid var(--primary-color);
    transition: transform 0.5s ease;
    justify-self: center;
}

.testimonial-card:hover .testimonial-img {
    transform: scale(1.1);
}

.testimonial-rating {
    grid-area: stars;
    color: #f59e0b;
    font-size: 1.8rem;
    letter-spacing: 3px;
    transition: color 0.4s ease;
    justify-self: center;
    padding-top: 10px;
}

.testimonial-card:hover .testimonial-rating {
    color: #d97706; /* dorado más intenso al hover */
}

.testimonial-text {
    grid-area: text;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    color: #475569;
    font-style: italic;
    flex-grow: 1;
    opacity: 1;
    transform: translateY(15px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.testimonial-card.visible .testimonial-text {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-company {
    grid-area: company;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    padding-top: 10px;
}

/* Flechas */
.testimonial-prev, .testimonial-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    font-size: 1.4rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.testimonial-prev:hover, .testimonial-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.testimonial-prev { left: 10px; }
.testimonial-next { right: 10px; }

/* Animación de entrada inicial */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .testimonials-section { padding: 100px 20px 80px; }
}

@media (max-width: 576px) {
    .testimonials-section { padding: 80px 16px 60px; }
    .testimonial-card { flex: 0 0 90%; padding: 24px; }
}