/* ==========================================================================
   Termalovers · «Testimonios que inspiran»
   Medido sobre export/5 Termalovers.pdf a 1366px (sección y 2660..3140)

   ⚠️ ESPECIFICIDAD — no quitar el prefijo `.tl-testi` de los selectores.
   El kit de Elementor trae reglas (0,1,1) que le ganan a una sola clase.
   ========================================================================== */

.tl-testi {
    background: #FFFFFF;
    padding: 70px 0 80px;
    overflow: hidden;
}

.tl-testi *,
.tl-testi *::before,
.tl-testi *::after {
    box-sizing: border-box;
}

.tl-testi .tl-testi__container {
    width: min(1246px, 100%);
    margin: 0 auto;
}

@media (max-width: 1285px) {
    .tl-testi .tl-testi__container {
        width: calc(100% - 40px);
    }
}

/* Píldora con fondo lima claro */
.tl-testi .tl-testi__eyebrow {
    display: table;
    margin: 0 auto 18px;
    padding: 6px 18px;
    border-radius: 999px;
    background: #EBF2D8;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #032929;
}

.tl-testi .tl-testi__title {
    margin: 0 0 42px;
    font-family: Montserrat, sans-serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    color: #032929;
}

.tl-testi .tl-testi__resalte {
    color: #8DB522;
}

/* --- Carrusel ---
   La pista desborda el container a propósito: las tarjetas de los lados asoman
   recortadas, como en el diseño. De ahí el `overflow:hidden` de la sección. */
.tl-testi .tl-testi__carrusel {
    position: relative;
}

.tl-testi .tl-testi__ventana {
    overflow: hidden;
    padding: 4px 0 12px;   /* aire para que la sombra de las tarjetas no se corte */
}

.tl-testi .tl-testi__pista {
    display: flex;
    gap: 21px;
    margin: 0;
    /* Centra las 3 tarjetas visibles (3×400 + 2×21 = 1242); lo que sobre a los lados es lo
       que hace que la siguiente asome recortada, como en el diseño. */
    padding: 0 max(20px, calc((100% - 1242px) / 2));
    list-style: none;
    transition: transform 0.45s ease;
}

.tl-testi .tl-testi__item {
    flex: 0 0 400px;
    margin: 0;
    display: flex;
}

.tl-testi .tl-testi__card {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 30px 32px 26px;
    border-radius: 16px;
    background: #F7F3EC;
}

/* --- Estrellas --- */
.tl-testi .tl-testi__estrellas {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.tl-testi .tl-testi__estrella {
    width: 14px;
    height: 14px;
    display: block;
    color: #8DB522;
}

.tl-testi .tl-testi__estrella--off {
    color: #D6DCC6;
}

/* --- Cita --- */
.tl-testi .tl-testi__cita {
    flex: 1;
    margin: 0 0 22px;
    padding: 0;
    border: none;
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.68;
    color: #3A5555;
}

/* --- Autor ---
   `font-style: normal` a propósito: el `reset.css` del tema trae
   `figcaption { font-size:16px; font-style:italic; color:#333 }` y, al no declararlo aquí,
   el nombre y el usuario salían en cursiva (solo la cita debe ir así). Visto en el sitio real
   el 2026-08-02 — el fixture no lo detectaba porque no cargaba esa regla. */
.tl-testi .tl-testi__autor {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid #E6DFD4;
    font-style: normal;
    font-size: 14px;
    color: #032929;
}

.tl-testi .tl-testi__avatar {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.tl-testi .tl-testi__avatar--inicial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #446C7C;
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: #FFFFFF;
}

.tl-testi .tl-testi__datos {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tl-testi .tl-testi__nombre {
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    line-height: 1.2;
    color: #032929;
}

.tl-testi .tl-testi__meta {
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.2;
    color: #8FA3A8;
}

/* --- Flechas: centradas verticalmente sobre la fila --- */
.tl-testi .tl-testi__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    border-radius: 50%;
    background: rgba(3, 41, 41, 0.55);
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.tl-testi .tl-testi__arrow--prev { left: 20px; }
.tl-testi .tl-testi__arrow--next { right: 20px; }

.tl-testi .tl-testi__arrow svg {
    width: 100%;
    height: 100%;
    display: block;
}

.tl-testi .tl-testi__arrow:hover {
    background: #032929;
}

.tl-testi .tl-testi__arrow:focus-visible {
    outline: 3px solid #8DB522;
    outline-offset: 3px;
}

.tl-testi .tl-testi__arrow[disabled] {
    opacity: 0.35;
    cursor: default;
}

/* --- Tablet --- */
@media (max-width: 1024px) {
    .tl-testi {
        padding: 48px 0 56px;
    }

    .tl-testi .tl-testi__title {
        font-size: 30px;
        margin-bottom: 30px;
    }

    .tl-testi .tl-testi__item {
        flex-basis: 340px;
    }

    /* Las flechas bajan y se centran: superpuestas tapaban la cita, que en tablet ya no
       tiene margen libre a los lados. Medido a 768px — la flecha izquierda se comía una
       línea entera del testimonio. */
    .tl-testi .tl-testi__carrusel {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .tl-testi .tl-testi__ventana {
        flex: 0 0 100%;
        order: 1;
    }

    .tl-testi .tl-testi__arrow {
        position: static;
        transform: none;
        order: 2;
    }
}

/* --- Móvil --- */
@media (max-width: 600px) {
    .tl-testi {
        padding: 36px 0 44px;
    }

    /* 11px es el mínimo que se lee cómodo en un móvil; con 10px + mayúsculas + tracking
       la píldora costaba de leer. */
    .tl-testi .tl-testi__eyebrow {
        font-size: 11px;
        letter-spacing: 1.2px;
    }

    .tl-testi .tl-testi__title {
        font-size: 25px;
        margin-bottom: 24px;
    }

    .tl-testi .tl-testi__item {
        flex-basis: calc(100% - 40px);
    }

    .tl-testi .tl-testi__card {
        padding: 24px 22px 20px;
    }

    .tl-testi .tl-testi__cita {
        font-size: 14px;
    }
}
