/**
 * Restyles the [trustpilot_testimonials] shortcode (Storykeeper Trustpilot plugin)
 * to match the theme's "reviews" block look.
 *
 * The plugin prints its own <style> block in wp_footer, after this stylesheet,
 * so selectors here are prefixed with `body` to win the cascade without !important.
 */

body .tpt-reviews-wrapper {
    background-color: #f1eae1;
}

body .support-section {
    max-width: var(--container-width-wide);
    margin-inline: auto;
    padding: clamp(var(--space-5), 6vw, 5rem) clamp(var(--space-3), 4vw, 3.75rem) clamp(var(--space-5), 5vw, 3.5rem);
    text-align: center;
}

body .support-section__ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    max-width: 24rem;
    margin: 0 auto var(--space-4);
}

body .support-section__ornament-line {
    flex: 1;
    height: 1px;
    background-color: var(--color-orange-dark);
}

body .support-section__ornament-icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

body .support-section__ornament-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

body .support-section h2 {
    font-family: var(--font-family-heading);
    font-size: 64px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: normal;
    color: var(--color-text);
}

body .rating-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    font-family: var(--font-family-base);
    font-size: 0.9375rem;
    color: var(--color-text);
}

body .rating-line a {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: inherit;
    text-decoration: none;
}

body .rating-line strong {
    font-weight: 700;
    color: var(--color-text);
}

body .trustpilot-star {
    font-size: 1rem;
    color: #04b67a;
    margin-left: 0;
}

body .testimonial-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    max-width: var(--container-width-wide);
    margin-inline: auto;
    padding: 0 clamp(var(--space-3), 4vw, 3.75rem) clamp(var(--space-5), 6vw, 5rem);
}

body .testimonial-section .testimonial-card {
    width: auto;
    max-width: none;
    flex: initial;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: 0.75rem;
    background-color: #f9f3ea;
    box-shadow: none;
}

body .testimonial-section .stars {
    width: auto;
    max-width: none;
    margin-bottom: 0;
}

body .testimonial-section .stars img {
    width: 85px;
    height: auto;
    display: block;
}

body .testimonial-card__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

body .testimonial-card__divider-line {
    flex: 1;
    height: 1px;
    background-color: var(--color-orange-dark);
}

body .testimonial-card__divider-quote {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    width: 66px;
    height: 66px;
    padding-inline: var(--space-2);
}

body .testimonial-card__divider-quote svg {
    display: block;
    width: 100%;
    height: 100%;
}

body .testimonial-section h3 {
    font-family: var(--font-family-heading);
    font-size: 40px;
    font-weight: 400;
    line-height: 44px;
    letter-spacing: -2%;
    letter-spacing: normal;
    color: var(--color-grey-1);
    margin: 0;
}

body .testimonial-section p {
    min-height: 0;
    max-width: none;
    color: var(--color-grey-3);
    font-family: var(--font-family-base);
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
    margin: 0;
}

body .testimonial-section .author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: auto;
    padding-top: var(--space-2);
}

body .testimonial-section .avatar {
    width: 40px;
    height: 40px;
    margin-right: 0;
    flex-shrink: 0;
}

body .testimonial-section .avatar__initial {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fae0c0;
    color: var(--color-grey-1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-family: var(--font-family-heading);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: normal;
}

body .testimonial-section .author strong {
    font-family: var(--font-family-heading);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: normal;
    color: var(--color-grey-1);
}

body .testimonial-section .time {
    font-family: var(--font-family-base);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--color-grey-4);
}

@media (max-width: 899px) {

    body .support-section__ornament-icon {
        width: 32px;
        height: 32px;

    }

    body .support-section h2 {
        font-size: 40px;
        line-height: 36px;
    }

    body .rating-line {
        max-width:70%;
        font-size: 16px;
        line-height: 24px;
        margin-left: auto;
        margin-right: auto;
    }

    body .testimonial-section {
        display: flex;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scroll-padding-inline: clamp(var(--space-3), 4vw, 3.75rem);
        cursor: grab;
    }

    body .testimonial-section .testimonial-card {
        flex: 0 0 min(300px, 80vw);
        scroll-snap-align: start;
        padding: 24px 16px;
    }

    body .testimonial-card__divider-quote {
        height: 32px;
    }

    body .testimonial-section h3 {
        font-size: 28px;
        line-height: 26px;
    }

    body .testimonial-section p {
        font-size: 16px;
        line-height: 24px;
    }

    body .testimonial-section .author {
        flex-direction: row;
    }

    body .testimonial-section .avatar {
        width: 48px;
        height: 48px;
    }

    body .testimonial-section .avatar__initial {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    /* The plugin's JS may still turn this into a Slick carousel below 768px;
       keep dots/arrows on-brand rather than fighting the JS-driven layout. */
    body ul.slick-dots li button:before {
        color: var(--color-orange-dark);
        opacity: 0.4;
    }

    body ul.slick-dots li.slick-active button:before {
        opacity: 1;
    }
}
