/*------------------------------------*\

    Testimonials / case studies

    Supports the Trustindex Google review widget and manually managed
    testimonial, case study or stat entries side by side. Trustindex colors
    are overridden below so the widget matches the manual entry cards.

\*------------------------------------*/

.testimonials {
    background: var(--fx-cream);
    position: relative;
}


/*------------------------------------*\
    Google reviews (third-party widget)
\*------------------------------------*/

.testimonials__google {
    background: var(--fx-white);
    border: 0.0625rem solid var(--fx-border-soft);
    border-radius: var(--fx-radius-lg);
    box-shadow: var(--fx-shadow-sm);
    padding: clamp(1rem, 2.5vw, 1.75rem);
}

.testimonials__google + .testimonials__manual {
    margin-top: 2.5rem;
}

.testimonials__manual-title {
    margin-bottom: 1.75rem;
    text-align: center;
}

section.testimonials .testimonials__google .ti-widget .ti-widget-container,
section.testimonials .testimonials__google .ti-widget .ti-widget-container * {
    font-family: var(--fx-font-body) !important;
}

section.testimonials .testimonials__google .ti-widget .ti-widget-container {
    margin: 0;
}

section.testimonials .testimonials__google .ti-widget .ti-name,
section.testimonials .testimonials__google .ti-widget .ti-footer .ti-name,
section.testimonials .testimonials__google .ti-widget .ti-ten-rating-score,
section.testimonials .testimonials__google .ti-widget .ti-rating-text,
section.testimonials .testimonials__google .ti-widget .ti-rating-text span,
section.testimonials .testimonials__google .ti-widget .ti-rating-text strong {
    color: var(--fx-dark-green) !important;
}

section.testimonials .testimonials__google .ti-widget .ti-review-content,
section.testimonials .testimonials__google .ti-widget .ti-review-text,
section.testimonials .testimonials__google .ti-widget .ti-ai-summary-item,
section.testimonials .testimonials__google .ti-widget .ti-footer-filter-text,
section.testimonials .testimonials__google .ti-widget .ti-verified-by-row,
section.testimonials .testimonials__google .ti-widget .ti-widget-container {
    color: var(--fx-muted) !important;
}

section.testimonials .testimonials__google .ti-widget .ti-date {
    color: var(--fx-muted) !important;
    opacity: 0.85;
}

section.testimonials .testimonials__google .ti-widget .ti-read-more span {
    color: var(--fx-green) !important;
    opacity: 0.75;
}

section.testimonials .testimonials__google .ti-widget .ti-read-more span:hover {
    color: var(--fx-green-hover) !important;
    opacity: 1;
}

section.testimonials .testimonials__google .ti-widget.ti-custom-stars .ti-star:not(.e):not(.h) {
    background: var(--fx-gold) !important;
}

section.testimonials .testimonials__google .ti-widget.ti-custom-stars .ti-star.h {
    background: linear-gradient(90deg, var(--fx-gold) 50%, #cccccc 50%) !important;
}

section.testimonials .testimonials__google .ti-widget .ti-review-item > .ti-inner,
section.testimonials .testimonials__google .ti-widget .ti-ai-summary-item > .ti-inner {
    background-color: var(--fx-white) !important;
    border-color: var(--fx-border-soft) !important;
    border-radius: var(--fx-radius) !important;
    box-shadow: var(--fx-shadow-sm);
}

section.testimonials .testimonials__google .ti-widget .ti-load-more-reviews-container .ti-load-more-reviews-button {
    background: var(--fx-green) !important;
    border-color: var(--fx-green) !important;
    border-radius: var(--fx-radius-pill) !important;
    color: var(--fx-white) !important;
    font-weight: 600;
}

section.testimonials .testimonials__google .ti-widget .ti-load-more-reviews-container .ti-load-more-reviews-button:hover {
    background-color: var(--fx-green-hover) !important;
    border-color: var(--fx-green-hover) !important;
}

section.testimonials .testimonials__google .ti-widget .ti-controls .ti-next,
section.testimonials .testimonials__google .ti-widget .ti-controls .ti-prev {
    background-color: var(--fx-white) !important;
    border: 0.0625rem solid var(--fx-border) !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    height: 1.875rem !important;
    opacity: 1 !important;
    outline: none !important;
    transition: background-color var(--fx-transition), border-color var(--fx-transition);
    width: 1.875rem !important;
}

section.testimonials .testimonials__google .ti-widget .ti-controls .ti-next:before,
section.testimonials .testimonials__google .ti-widget .ti-controls .ti-prev:before {
    border-color: var(--fx-green) !important;
    height: 0.5rem !important;
    transition: border-color var(--fx-transition);
    width: 0.5rem !important;
}

section.testimonials .testimonials__google .ti-widget .ti-controls .ti-next:hover,
section.testimonials .testimonials__google .ti-widget .ti-controls .ti-next:focus,
section.testimonials .testimonials__google .ti-widget .ti-controls .ti-prev:hover,
section.testimonials .testimonials__google .ti-widget .ti-controls .ti-prev:focus {
    background-color: var(--fx-green) !important;
    border-color: var(--fx-green) !important;
    box-shadow: var(--fx-shadow-sm) !important;
    cursor: pointer;
    outline: none !important;
}

section.testimonials .testimonials__google .ti-widget .ti-controls .ti-next:hover:before,
section.testimonials .testimonials__google .ti-widget .ti-controls .ti-next:focus:before,
section.testimonials .testimonials__google .ti-widget .ti-controls .ti-prev:hover:before,
section.testimonials .testimonials__google .ti-widget .ti-controls .ti-prev:focus:before {
    border-color: var(--fx-white) !important;
}


/*------------------------------------*\
    Manual entries
\*------------------------------------*/

.testimonials-slider {
    margin-inline: -0.75rem;
}

.testimonial-slide {
    height: auto;
    padding: 0 0.75rem;
}

.testimonial {
    background: var(--fx-white);
    border: 0.0625rem solid var(--fx-border-soft);
    border-radius: var(--fx-radius);
    box-shadow: var(--fx-shadow-sm);
    color: var(--fx-text);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding: 1.875rem;
    position: relative;
}

/* Oversized quote glyph, only on entries that render a star rating
   (testimonials) — a stat or case study card should not be quoted. */
.testimonial:has(.review-stars)::before {
    color: rgba(61, 111, 66, 0.12);
    content: "\201D";
    font-family: var(--fx-font-display);
    font-size: 7rem;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    right: 1rem;
    /* Clear of the entry-type chip on the line above */
    top: 3rem;
}

.testimonial > div {
    /* Grows to fill the card, so the optional author/meta footer lines up
       at a consistent baseline across a row of cards with uneven content
       lengths, instead of trailing right behind its own text. */
    flex: 1;
    position: relative;
}

/* Entry type chip */
.testimonial__type {
    background: var(--fx-cream);
    border-radius: var(--fx-radius-pill);
    color: var(--fx-green);
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.2;
    margin-bottom: 1.125rem;
    padding: 0.375rem 0.75rem;
    text-transform: uppercase;
}

.review-stars {
    color: var(--fx-gold);
    font-size: 1.125rem;
    letter-spacing: 0.1875rem;
    margin-bottom: 0.5rem;
}

.testimonial h2,
.testimonial h3,
.testimonial h4 {
    color: var(--fx-heading-green);
    font-family: var(--fx-font-display);
    font-size: 1.4375rem;
    line-height: 1.3;
    margin-block: 0 0.625rem;
}

.testimonial__content {
    flex: 1;
}

.testimonial__content p {
    color: var(--fx-muted);
}

.testimonial__content > :first-child {
    margin-top: 0;
}

.testimonial__content > :last-child {
    margin-bottom: 0;
}

.testimonial__info {
    border-top: 0.0625rem solid var(--fx-border);
    margin-top: 1.25rem;
    padding-top: 1rem;
    position: relative;
}

.testimonial__author {
    color: var(--fx-dark-green);
    font-weight: 600;
    margin: 0;
}

.testimonial__meta {
    color: var(--fx-muted);
    font-size: 0.875rem;
    margin: 0;
}


/*------------------------------------*\
    Slider
\*------------------------------------*/

.testimonials-slider .slick-track {
    display: flex;
}

.testimonials-slider .slick-list {
    /* Room for the card shadow inside slick's overflow clip */
    padding-block: 0.5rem;
}

.testimonials-slider .slick-slide {
    height: auto;
}

.testimonials-slider .slick-slide > div,
.testimonials-slider .slick-slide .testimonial-slide {
    height: 100%;
}

.testimonials-slider + .fx-slider-nav {
    margin-top: 1.25rem;
}
