/* ==========================================================================
   ppc-testi-image.css — PPC Landing Page: Testimonial + Image
   Figma: "Testimonials" [9] — 7765:43811, bg:#ffffff
   padding-inline: 60px → inner 1320px
   Left (538px): quote + author + pagination (gap 28px)
   Right (662×441px): 3:2 image
   ========================================================================== */

.ppc-testi-image {
    --ppc-testi-duration: 0.45s;
    --ppc-testi-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ppc-testi-offset: 24px;
    background-color: #ffffff;
    padding-block: 60px;
    padding-inline: var(--gutter, 60px);
    overflow-x: clip;
    border-top: 1px solid #1C1C1C80;
}

/* ── Inner: grid — stage (row 1), nav under left column (row 2) ─────────── */
.ppc-testi-image__inner {
    max-width: var(--max-width);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    width: 100%;
}

/* Stage holds stacked slides for crossfade / slide transition */
.ppc-testi-image__stage {
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    min-height: clamp(280px, 34vw, 441px);
    width: 100%;
    overflow: hidden;
}

.ppc-testi-image__slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 538fr) minmax(0, 662fr);
    gap: clamp(16px, 2vw, 120px);
    align-items: center;
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(var(--ppc-testi-offset));
    transition:
        opacity var(--ppc-testi-duration) var(--ppc-testi-ease),
        transform var(--ppc-testi-duration) var(--ppc-testi-ease),
        visibility var(--ppc-testi-duration) var(--ppc-testi-ease);
    z-index: 0;
}

.ppc-testi-image__slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    z-index: 2;
}

.ppc-testi-image__slide.is-leaving {
    opacity: 0;
    z-index: 1;
}

/* Next: incoming from right, outgoing to left */
.ppc-testi-image--dir-next .ppc-testi-image__slide.is-entering {
    transform: translateX(var(--ppc-testi-offset));
}

.ppc-testi-image--dir-next .ppc-testi-image__slide.is-leaving {
    transform: translateX(calc(var(--ppc-testi-offset) * -1));
}

/* Prev: incoming from left, outgoing to right */
.ppc-testi-image--dir-prev .ppc-testi-image__slide.is-entering {
    transform: translateX(calc(var(--ppc-testi-offset) * -1));
}

.ppc-testi-image--dir-prev .ppc-testi-image__slide.is-leaving {
    transform: translateX(var(--ppc-testi-offset));
}

@media (prefers-reduced-motion: reduce) {
    .ppc-testi-image__slide {
        transition: opacity 0.2s ease, visibility 0.2s ease;
        transform: none !important;
    }
}

/* ── Left column — proportional (Figma 538px at max-width) ─────────────── */
.ppc-testi-image__content {
    min-width: 0;
    width: auto;
    max-width: 538px;
}

.ppc-testi-image__text {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Quote — Freight Neo Book 24px, lh 115%, #1c1c1c */
.ppc-testi-image__quote {
    font-family: var(--font-heading, 'Freight Neo Pro', serif);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0;
    color: #1c1c1c;
    margin: 0;
    padding: 0;
    border: none;
}

.ppc-testi-image__quote p {
    margin: 0;
}

.ppc-testi-image__quote p + p {
    margin-top: 1em;
}

/* Author wrap */
.ppc-testi-image__author-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Author name — Geist Medium 16px, lh 139%, #1c1c1c */
.ppc-testi-image__author {
    font-family: var(--font-body, 'Geist', sans-serif);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.39;
    letter-spacing: 0;
    color: #1c1c1c;
    font-style: normal;
}

/* Role — Geist Light 16px per Figma 7765:43817 */
.ppc-testi-image__role {
    font-family: var(--font-body, 'Geist', sans-serif);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.39;
    color: #1c1c1c;
}

/* ── Pagination — pill arrows, gap 6px ─────────────────────────────────── */
.ppc-testi-image__nav {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 20px;
}

.ppc-testi-image .arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid var(--color-dark, #1c1c1c);
    border-radius: 1000px;
    background-color: transparent;
    color: var(--color-dark, #1c1c1c);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.ppc-testi-image .arrow-btn:hover {
    background-color: var(--color-dark, #1c1c1c);
    color: var(--color-white, #ffffff);
}

.ppc-testi-image .arrow-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.ppc-testi-image .arrow-btn svg {
    display: block;
    flex-shrink: 0;
}

/* ── Right image — 662×441px (3:2), scales with grid column ─────────────── */
.ppc-testi-image__figure {
    min-width: 0;
    width: 100%;
    max-width: 662px;
    height: auto;
    aspect-ratio: 662 / 441;
    margin: 0;
    overflow: hidden;
    justify-self: end;
}

.ppc-testi-image__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ── Tablet / mobile — Figma 7778:37783: text → nav → image ─────────────── */
@media (max-width: 900px) {
    .ppc-testi-image {
        padding-block: 80px;
        padding-inline: 16px;
    }

    .ppc-testi-image__inner {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "testi-content"
            "testi-nav"
            "testi-image";
        gap: 40px;
        justify-content: stretch;
        align-items: start;
    }

    .ppc-testi-image__stage {
        display: contents;
        min-height: 0;
    }

    .ppc-testi-image__slide {
        position: static;
        inset: auto;
        display: none;
        gap: 0;
    }

    .ppc-testi-image__slide.is-active {
        display: contents;
    }

    .ppc-testi-image__content {
        grid-area: testi-content;
        width: 100%;
        flex: none;
    }

    .ppc-testi-image__nav {
        grid-area: testi-nav;
        grid-column: auto;
        grid-row: auto;
        margin-top: 0;
        display: flex;
        position: relative;
        z-index: 2;
    }

    .ppc-testi-image__figure {
        grid-area: testi-image;
        width: 100%;
        max-width: none;
        height: auto;
        aspect-ratio: 662 / 441;
        justify-self: stretch;
    }
}

/* ── Mobile (max 639px) ──────────────────────────────────────────────────── */
@media (max-width: 639px) {
    .ppc-testi-image__quote {
        font-size: 20px;
        line-height: 1.15;
    }
}
