.modulo-testimonios {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background-color: #fdf6d6;
    padding: 60px 0;
    overflow-x: hidden;
    /* Evita el scroll horizontal */
    position: relative;
}

.testimonios-header {
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.testimonial-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.indicator {
    background: #f8e5b4;
    /* Color de ultimas noticias nav */
    color: #a2825c;
    /* Color de ultimas noticias nav */
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}

.indicator:hover,
.indicator.active {
    background: #3185cb;
    /* Color active de ultimas noticias nav */
    color: #fff;
    transform: scale(1.1);
}

.testimonial-slider-wrapper {
    position: relative;
    width: 100%;
    min-height: 250px;
    display: flex;
    align-items: center;
}

.testimonial-nav-container {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    /* Por encima de las tarjetas y degradados */
}

.testimonial-nav-container:first-child {
    left: 0;
    /* Ajustado al borde para evitar scroll */
}

.testimonial-nav-container:last-child {
    right: 0;
    /* Ajustado al borde para evitar scroll */
}

.testimonial-nav-btn {
    background: #3185CB;
    color: #fff;
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    border-radius: 14px;
    cursor: pointer;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.82);
    appearance: none;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(43, 117, 178, 0.28);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.testimonial-nav-btn i {
    display: block;
    width: 14px;
    height: 14px;
    box-sizing: border-box;
    border: solid currentColor;
    border-width: 0 4px 4px 0;
}

.testimonial-nav-btn.prev i {
    transform: translateX(2px) rotate(135deg);
}

.testimonial-nav-btn.next i {
    transform: translateX(-2px) rotate(-45deg);
}

.testimonial-nav-btn:hover {
    background: #FF633C;
    border-color: #fff;
    box-shadow: 0 10px 22px rgba(224, 87, 53, 0.3);
    transform: translateY(-2px);
}

.testimonial-nav-btn:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 4px 10px rgba(224, 87, 53, 0.24);
}

.testimonial-nav-btn:focus-visible {
    outline: 3px solid rgba(49, 133, 203, 0.38);
    outline-offset: 4px;
}

.testimonial-slider-container {
    width: 100%;
    position: relative;
    min-height: 250px;
    display: flex;
    justify-content: center;
    overflow: visible;
    /* Permitir que se vean pasar por debajo de botones */
}

/* Eliminamos los degradados laterales para que sea transparente */
.testimonial-slider-wrapper::before,
.testimonial-slider-wrapper::after {
    display: none;
}

/* Animaciones de rebote al llegar a los límites */
@keyframes bounceLimitLeft {

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

    50% {
        transform: translateX(-50%) translateX(-80px);
    }
}

@keyframes bounceLimitRight {

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

    50% {
        transform: translateX(-50%) translateX(80px);
    }
}

.bounce-limit-left {
    animation: bounceLimitLeft 0.4s ease-in-out;
}

.bounce-limit-right {
    animation: bounceLimitRight 0.4s ease-in-out;
}



.testimonial-card-v2 {
    background: #FEE6B4;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    /* Siempre flex para animar */
    gap: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border: 1px dashed #E05735;
    max-width: 900px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateX(100%);
    transition: transform var(--testimonial-transition-duration, 450ms) cubic-bezier(0.22, 0.61, 0.36, 1), opacity var(--testimonial-transition-duration, 450ms) ease;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

.testimonial-card-v2.active {
    opacity: 1;
    transform: translateX(-50%) translateX(0);
    z-index: 5;
    pointer-events: auto;
}

.testimonial-card-v2.exit-left {
    opacity: 0;
    transform: translateX(-50%) translateX(-110%);
}

.testimonial-card-v2.enter-right {
    opacity: 0;
    transform: translateX(-50%) translateX(110%);
}

/* Responsive */
@media (max-width: 1200px) {
    .testimonial-nav-container:first-child {
        left: 10px;
    }

    .testimonial-nav-container:last-child {
        right: 10px;
    }
}

@media (max-width: 768px) {
    .testimonial-slider-wrapper {
        flex-direction: row;
        /* Volvemos a row para que las flechas puedan flotar verticalmente */
        min-height: 400px;
    }

    .testimonial-nav-container {
        position: absolute;
        top: 42%;
        /* Subidos un poco para alejarlos del texto en móvil */
        transform: translateY(-50%);
        margin: 0;
        z-index: 50;
    }

    .testimonial-nav-container:first-child {
        left: -18px;
        /* Movido al extremo para que se vea como medio círculo y no tape el texto */
        order: 1;
    }

    .testimonial-nav-container:last-child {
        right: -18px;
        /* Movido al extremo para que se vea como medio círculo y no tape el texto */
        order: 3;
    }

    .testimonial-slider-container {
        order: 2;
        width: 100%;
        min-height: 380px;
    }

    .testimonial-nav-btn {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: #3185CB;
        box-shadow: 0 6px 14px rgba(43, 117, 178, 0.25);
        /* Más ligero en movil */
    }
    .testimonial-nav-btn i {
        width: 12px;
        height: 12px;
        border-width: 0 3px 3px 0;
    }
}

.testimonial-img-v2 {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.testimonial-img-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-text-v2 {
    flex: 1;
    font-size: 20px;
    color: #A2825C;
    font-style: italic;
    line-height: 1.5;
    position: relative;
    text-align: left;
}

.testimonial-text-v2 strong {
    display: block;
    text-align: right;
    margin-top: 15px;
    font-size: 22px;
    font-style: normal;
    font-weight: bold;
    color: #FF633C;
}

.quote-mark {
    color: #3185cb;
    font-size: 40px;
    font-family: serif;
    line-height: 0;
    vertical-align: middle;
}

/* --- RESPONSIVE TESTIMONIOS --- */
@media (max-width: 900px) {
    .testimonial-card-v2 {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 40px 20px;
        width: 95%;
        max-width: 500px;
    }

    .testimonial-text-v2 {
        text-align: center;
        font-size: 18px;
    }

    .testimonial-text-v2 strong {
        text-align: center;
        width: 100%;
        margin-top: 15px;
    }

    .testimonios-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .modulo-testimonios .l-page-width {
        width: 100%;
        max-width: none;
        padding-left: 5px;
        padding-right: 5px;
        box-sizing: border-box;
    }

    .testimonial-indicators,
    .testimonial-nav-container {
        display: none;
    }

    .testimonial-slider-container {
        overflow: hidden;
        touch-action: pan-y;
        cursor: grab;
        min-height: 450px;
        height: 450px;
    }

    .testimonial-slider-container.is-dragging {
        cursor: grabbing;
    }

    .testimonial-slider-container.is-dragging .testimonial-card-v2 {
        transition: none;
    }

    .testimonios-header .section-title {
        width: 100%;
        padding: 0 13px;
        box-sizing: border-box;
        text-align: center;
    }

    .testimonial-card-v2 {
        padding: 30px 20px;
        width: calc(84% - 10px);
        height: 450px;
        box-sizing: border-box;
        margin-bottom: 0;
        overflow: hidden;
    }

    .testimonial-card-v2.mobile-current,
    .testimonial-card-v2.mobile-previous,
    .testimonial-card-v2.mobile-next {
        opacity: 1;
        pointer-events: auto;
    }

    .testimonial-card-v2.mobile-current {
        opacity: 1;
        transform: translateX(-50%) translateX(0);
        z-index: 5;
    }

    .testimonial-card-v2.mobile-previous {
        transform: translateX(-50%) translateX(calc(-100% - 10px));
        z-index: 4;
    }

    .testimonial-card-v2.mobile-next {
        transform: translateX(-50%) translateX(calc(100% + 10px));
        z-index: 4;
    }

    /* La tarjeta que entra acompaña al gesto por encima de la saliente. */
    .testimonial-card-v2.mobile-drag-incoming {
        opacity: 1;
        z-index: 6;
    }

    .testimonial-card-v2.mobile-hidden {
        transform: translateX(-50%) translateX(130%);
        opacity: 0;
        pointer-events: none;
    }

    .testimonial-text-v2 {
        font-size: 16px;
    }

    .section-title {
        font-size: 32px !important;
    }
}
