/* ESTILOS MEJORADOS Y ANIMADOS */
.testimonios-section {
    font-family: 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    overflow: hidden;
    /* Importante para que no salga barra de scroll */
}

.testimonios-header {
    text-align: center;
    margin-bottom: 50px;
}

.testimonios-header h2 {
    color: #23407a;
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.testimonios-header p {
    color: #5a71a0;
    /* Un tono más suave para el párrafo */
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- ANIMACIÓN DE DESPLAZAMIENTO --- */

.testimonios-container {
    display: flex;
    gap: 30px;
    width: max-content;
    /* Permite que el contenedor sea tan ancho como sus hijos */
    animation: scroll-left 40s linear infinite;
    /* Animación automática */
}

/* Pausar animación al pasar el mouse para que puedan leer */
.testimonios-container:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Nota: Para que el infinito sea perfecto, debes duplicar tus tarjetas en el HTML */
}

/* --- TARJETA ESTILIZADA --- */
.testimonio-card {
    background: #ffffff;
    /* Cambiado a blanco para que resalte el texto azul */
    border-radius: 20px;
    /* Bordes más modernos y redondeados */
    box-shadow: 0 10px 30px rgba(35, 64, 122, 0.1);
    /* Sombra más sutil y azulada */
    overflow: hidden;
    width: 300px;
    flex-shrink: 0;
    /* Evita que las tarjetas se aplasten */
    border: 1px solid #f0f4f8;
    transition: all 0.3s ease;
}

.testimonio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(35, 64, 122, 0.2);
}

.testimonio-imagen {
    width: 100%;
    height: 250px;
    object-fit: cover;
    /* Asegura que las fotos no se deformen */
    display: block;
}

.testimonio-contenido {
    padding: 20px;
    text-align: center;
    background: #23407a;
    /* El azul lo dejamos abajo para el nombre */
}

.testimonio-info h4 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

.testimonio-info p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Ajustes para Móviles */
@media (max-width: 768px) {
    .testimonios-header h2 {
        font-size: 1.8rem;
    }

    .testimonios-container {
        animation-duration: 20s;
        /* Más rápido en móvil por ser menos espacio */
    }
}