/* ============================================================
   Testimonios Evolution – tarjetas tipo postal
   ============================================================ */

/* El widget ocupa todo el ancho aunque el contenedor centre a sus hijos */
.elementor-widget-asw_testimonials,
.e-con > .elementor-widget-asw_testimonials,
.e-con > .e-con-inner > .elementor-widget-asw_testimonials {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}
.ast-wrapper {
    --ast-offset: 14rem;
    --ast-overlap: -3rem;
    --ast-rot: 3deg;
    --ast-frame-accent: var(--e-global-color-c6207b2, #8B2E2E);
    --ast-frame-primary: var(--e-global-color-primary, #1F4D3A);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.ast-wrapper *,
.ast-wrapper *::before,
.ast-wrapper *::after { box-sizing: border-box; }

/* ── Escenario ───────────────────────────────────────────── */
.ast-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 700px;
    padding: 2rem 0;
}

/* ── Tarjeta ─────────────────────────────────────────────── */
.ast-card {
    position: relative;
    display: none;                 /* JS muestra las de la página actual */
    flex-direction: row;
    gap: 20px;
    width: 500px;
    max-width: 100%;
    padding: 35px 30px;
    border-radius: 50px;
    background-color: #EEE9DA;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

/* Sin JS: mostrar las 2 primeras */
.ast-wrapper:not(.ast-init) .ast-card:nth-child(-n+2) { display: flex; }

.ast-card.is-visible {
    display: flex;
    animation: ast-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.ast-card.is-visible.ast-pos-2 { animation-delay: 0.08s; }

/* 2 por slide: primera arriba-izquierda, segunda abajo-derecha */
.ast-per-2 .ast-card.ast-pos-1 {
    transform: translateX(calc(var(--ast-offset) * -1)) rotate(calc(var(--ast-rot) * -1));
    z-index: 2;
}

.ast-per-2 .ast-card.ast-pos-2 {
    transform: translateX(var(--ast-offset)) rotate(var(--ast-rot));
    margin-top: var(--ast-overlap);
    z-index: 1;
}

/* 1 por slide: rotación alterna */
.ast-per-1 .ast-card.ast-card--odd  { transform: rotate(calc(var(--ast-rot) * 0.66)); }
.ast-per-1 .ast-card.ast-card--even { transform: rotate(calc(var(--ast-rot) * -1)); }

@keyframes ast-in {
    from { opacity: 0; translate: 0 18px; }
    to   { opacity: 1; translate: 0 0; }
}

/* ── Foto con marco ──────────────────────────────────────── */
.ast-photo {
    flex: 0 0 40%;
    width: 40%;
    display: flex;
    align-items: center;
}

.ast-frame {
    width: 100%;
    padding: 12px;
    background: var(--ast-frame-accent);
    transform: rotate(2deg);
}

.ast-frame--accent  { background: var(--ast-frame-accent); }
.ast-frame--primary { background: var(--ast-frame-primary); }
.ast-card--even .ast-frame { transform: rotate(-2deg); }

.ast-wrapper .ast-frame img {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: 220px;
    object-fit: cover;
    object-position: center;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.ast-photo-empty {
    display: block;
    width: 100%;
    height: 220px;
    background: rgba(0, 0, 0, 0.08);
}

/* ── Cuerpo ──────────────────────────────────────────────── */
.ast-body {
    position: relative;
    flex: 1 1 60%;
    width: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-left: 10px;
    padding-top: 26px;            /* deja espacio al logo */
    border-left: 1px solid #9A99996E;
    text-align: center;
}

.ast-wrapper .ast-logo {
    position: absolute;
    top: -10px;
    right: 0;
    width: 40px !important;
    height: auto;
    z-index: 2;
}

.ast-wrapper .ast-lines {
    position: absolute;
    top: 52px;
    right: 0;
    width: 89% !important;
    max-width: none !important;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.ast-wrapper .ast-quote {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 222px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    quotes: none;
    font-family: 'Reenie Beanie', cursive;
    font-size: 32px;
    line-height: 31px;
    font-weight: 400;
    text-transform: uppercase;
    color: #2B2B2B;
}

.ast-wrapper .ast-quote::before,
.ast-wrapper .ast-quote::after { content: none; }

.ast-wrapper .ast-quote p {
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    overflow-wrap: break-word;
}

/* Achicado automático de textos largos (relativo al tamaño elegido) */
.ast-wrapper .ast-quote--medium p { font-size: 0.85em; line-height: 0.98; }
.ast-wrapper .ast-quote--long   p { font-size: 0.74em; line-height: 1.02; }
.ast-wrapper .ast-quote--xlong  p { font-size: 0.6em;  line-height: 1.08; }

.ast-stars {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 2px;
    margin: 10px 0 4px;
    color: #F2B544;
    line-height: 0;
}

.ast-stars svg {
    width: 20px;
    height: 20px;
    display: block;
}

.ast-wrapper .ast-name {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: 'Reenie Beanie', cursive;
    font-size: 32px;
    line-height: 33px;
    color: #2B2B2B;
}

/* ── Flechas ─────────────────────────────────────────────
   Selectores reforzados para ganarle a los estilos de <button>
   del tema (ej. Hello Elementor pinta los botones de rosa). */
.ast-wrapper button.ast-arrow,
.ast-wrapper button.ast-arrow:hover,
.ast-wrapper button.ast-arrow:focus,
.ast-wrapper button.ast-arrow:active {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 54px;
    height: 54px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ast-arrow-bg, var(--e-global-color-primary, #1F4D3A));
    color: var(--ast-arrow-color, var(--e-global-color-text, #ffffff));
    font-size: 0;
    line-height: 0;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    outline: none;
    transform: translateY(-50%);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.ast-wrapper button.ast-arrow:hover { transform: translateY(-50%) scale(1.06); filter: brightness(1.12); }
.ast-wrapper button.ast-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ast-wrapper button.ast-arrow svg { width: 45%; height: 45%; display: block; pointer-events: none; }
.ast-wrapper button.ast-arrow-prev { left: var(--ast-arrow-inset, 0px); right: auto; }
.ast-wrapper button.ast-arrow-next { right: var(--ast-arrow-inset, 0px); left: auto; }
.ast-wrapper.ast-single-page .ast-arrow,
.ast-wrapper.ast-single-page .ast-dots { display: none !important; }

/* ── Puntos ──────────────────────────────────────────────── */
.ast-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.ast-wrapper button.ast-dot,
.ast-wrapper button.ast-dot:hover,
.ast-wrapper button.ast-dot:focus,
.ast-wrapper button.ast-dot:active {
    width: var(--ast-dot-size, 15px);
    height: var(--ast-dot-size, 15px);
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ast-dot-color, var(--e-global-color-text, #ffffff));
    font-size: 0;
    line-height: 0;
    opacity: 0.45;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ast-wrapper button.ast-dot:hover { opacity: 0.8; }
.ast-wrapper button.ast-dot.is-active { opacity: 1; background: var(--ast-dot-active, #ffffff); transform: scale(1.1); }
.ast-wrapper button.ast-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ── Tablet ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ast-card { width: 350px; padding: 20px; border-radius: 30px; }
    .ast-wrapper .ast-frame img,
    .ast-photo-empty { height: 170px; }
    .ast-wrapper .ast-quote { font-size: 22px; line-height: 25px; }
}

/* ── Móvil: tarjeta en columna ───────────────────────────── */
@media (max-width: 767px) {
    .ast-stage { min-height: 455px; padding: 1rem 0; }

    .ast-card {
        flex-direction: column;
        gap: 0;
        width: 85%;
        padding: 30px 20px 20px;
        border-radius: 30px;
    }

    .ast-photo,
    .ast-body { flex: 0 0 auto; width: 100%; }

    .ast-wrapper .ast-frame img,
    .ast-photo-empty { height: 192px; }

    .ast-body {
        border-left: 0;
        padding: 20px 0 0;
    }

    .ast-wrapper .ast-logo { top: -19px; }
    .ast-wrapper .ast-lines { top: 10px; right: 50%; transform: translateX(50%); }

    .ast-wrapper .ast-quote { max-width: 100%; font-size: 18px; line-height: 24px; }
    .ast-stars svg { width: 14px; height: 14px; }
    .ast-wrapper .ast-name { font-size: 26px; }

    /* Flechas abajo, a los lados de los puntos */
    .ast-dots { min-height: 40px; align-items: center; margin-top: 12px; }
    .ast-wrapper button.ast-arrow,
    .ast-wrapper button.ast-arrow:hover,
    .ast-wrapper button.ast-arrow:focus,
    .ast-wrapper button.ast-arrow:active {
        width: 40px;
        height: 40px;
        top: auto;
        bottom: 0;
        transform: none;
    }
    .ast-wrapper button.ast-arrow:hover { transform: scale(1.06); }
    .ast-wrapper button.ast-arrow-prev { left: 7.5%; }
    .ast-wrapper button.ast-arrow-next { right: 7.5%; }
}

@media (prefers-reduced-motion: reduce) {
    .ast-card.is-visible { animation: none; }
}
