/*
==========================================================================
    SECCIÓN 5: TESTIMONIALES - DISEÑO UNIFICADO Y CORREGIDO
==========================================================================
*/

/* --- 1. CONTENEDOR GENERAL (Sin cambios) --- */
#testimonials {
    background: #f5f5f5;
    padding: 120px 0;
    color: #1D1E22;
    overflow: hidden; 
}

#testimonials h2 {
    color: #1D1E22;
    text-align: center;
    margin: 0 auto 20px auto;
    font-weight: 600;
}

#testimonials .content-wrapper > div[style] {
    text-align: center;
    margin-bottom: 70px !important;
    font-size: 1rem !important;
    color: #555555;
}

/* --- 2. ESTRUCTURA DEL CARRUSEL (Ajustes para consistencia) --- */
.testimonial-swiper {
    width: 100%;
    max-width: 1400px; 
    margin: 0 auto;
    position: relative;
    height: 75%;
}

.testimonial-swiper .swiper-slide {
    width: 320px; /* Ancho unificado para todas las tarjetas */
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.5;
    transform: scale(0.85);
    height: auto; /* Permite que la altura se ajuste al contenido */
    display: flex; /* Clave para que la tarjeta interna se estire */
    align-items: stretch; /* Estira la tarjeta para que ocupe toda la altura del slide */
}

.testimonial-swiper .swiper-slide-active {
    opacity: 1;
    transform: scale(0.9);
}

/*
--- 3. ESTILO DE TARJETA UNIFICADO (LA MEJORA PRINCIPAL) ---
*/
.testimonial-video-card,
.testimonial-text-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-sizing: border-box;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* --- 3.1 TARJETA DE VIDEO (Ajustes menores) --- */
.testimonial-video-card {
    cursor: pointer;
    padding: 12px;
    justify-content: space-between; /* Mantenemos space-between aquí porque funciona bien para la estructura video + texto corto */
}

.video-placeholder {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.video-placeholder img,
.video-placeholder iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    display: block;
    border: none;
    object-fit: cover;
}

.testimonial-video-card p {
    font-style: italic;
    margin-top: 15px; /* Espacio reducido */
    font-size: 0.9rem;
    color: #333333;
    padding: 0 10px 10px 10px;
}

.testimonial-text-card {
    padding: 40px 30px;
    justify-content: center; /* <<< CORRECCIÓN CLAVE: Agrupa los elementos en el centro vertical */
    gap: 15px; /* <<< CORRECCIÓN CLAVE: Añade un espacio uniforme entre elementos */
    height: 100%;
    min-height: 380px;
}

.testimonial-text-card .stars {
    font-size: 1.1rem;
    color: #FFC107;
    margin: 0; /* Reseteamos márgenes para que 'gap' controle el espacio */
}

.testimonial-text-card blockquote {
    font-style: italic;
    font-size: 0.95rem;
    color: #333333;
    line-height: 1.5;
    border: none;
    padding: 0;
    margin: 0; /* Reseteamos márgenes */
}

.testimonial-text-card cite {
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1D1E22;
    display: block;
    margin: 0; /* Reseteamos márgenes */
}

/*
--- 4. ETIQUETA DE FUENTE (FACEBOOK) REDISEÑADA ---
*/
.testimonial-source {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #555;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    margin: 0; /* Reseteamos márgenes */
}

.facebook-icon {
    width: 16px;
    height: 16px;
    color: #1877F2; /* Color oficial de Facebook */
}


/* --- 5. BOTÓN DE PLAY Y NAVEGACIÓN (Sin cambios) --- */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 20px;
    border-color: transparent transparent transparent white;
}

.swiper-slide-active .testimonial-video-card:hover .play-button {
    background-color: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.testimonial-swiper .swiper-button-next,
.testimonial-swiper .swiper-button-prev {
    color: #ff0000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}



.testimonial-swiper .swiper-button-next::after,
.testimonial-swiper .swiper-button-prev::after {
    font-size: 20px;
    font-weight: 900;
}

.testimonial-swiper .swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0 !important;
    color: #aaaaaa !important;
    box-shadow: none;
}

@media (max-width: 768px) {
    #testimonials h2 {
        width: 90%;
    }
}