/* AXIA — TESTIMONIALS PAGE
   Replacement v4
   ========================================================= */

:root {
    --axia-testimonials-max: 1640px;
    --axia-testimonials-gutter: clamp(18px, 2.2vw, 40px);

    --axia-purple: #482075;
    --axia-purple-mid: #8062ad;
    --axia-text: #29312f;
    --axia-body: #4b5350;

    --axia-card-height: 296px;
    --axia-card-radius: 20px;
}


/* =========================================================
   PAGE BREAKOUT
   ========================================================= */

body:has(.testimonial-outer) .wp-block-post-title {
    display: none !important;
}

body .wp-site-blocks .testimonial-outer,
body .wp-site-blocks .axia-testimonials-page {
    box-sizing: border-box;
    position: relative;

    width: 100vw !important;
    max-width: 100vw !important;

    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    padding: 0 !important;

    overflow-x: clip;
}

body:has(.testimonial-outer) .wp-block-post-content,
body:has(.testimonial-outer) .wp-block-post-content > *,
body .wp-site-blocks .testimonial-outer > *,
body .wp-site-blocks .axia-testimonials-page > * {
    max-width: none !important;
}


/* =========================================================
   SHARED WIDTH
   ========================================================= */

body .wp-site-blocks .testimonial-hero,
body .wp-site-blocks .axia-testimonials-hero,
body .wp-site-blocks .cards-outer,
body .wp-site-blocks .axia-testimonials-content,
body .wp-site-blocks .axia-testimonials-cta {
    box-sizing: border-box;

    width: min(
        var(--axia-testimonials-max),
        calc(100% - (var(--axia-testimonials-gutter) * 2))
    ) !important;

    max-width: var(--axia-testimonials-max) !important;

    margin-left: auto !important;
    margin-right: auto !important;
}


/* =========================================================
   HERO OUTER WRAPPER
   Keep the Gutenberg group structurally, but make it invisible.
   The Columns block becomes the ONE visible hero card.
   ========================================================= */

body .wp-site-blocks .testimonial-hero,
body .wp-site-blocks .axia-testimonials-hero {
    position: relative;

    margin-top: clamp(26px, 3vw, 44px) !important;
    margin-bottom: clamp(82px, 7vw, 118px) !important;

    padding: 0 !important;

    min-height: 0 !important;
    height: auto !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    overflow: visible !important;
}


/* =========================================================
   HERO CARD
   ========================================================= */

.testimonial-hero .hero-columns,
.axia-testimonials-hero__columns {
    box-sizing: border-box;

    position: relative;
    isolation: isolate;

    display: grid !important;

    grid-template-columns:
        minmax(0, 1.02fr)
        minmax(400px, .98fr);

    gap: clamp(54px, 6vw, 104px) !important;

    align-items: center !important;

    width: 100% !important;
    max-width: none !important;

    min-height: 0 !important;
    height: auto !important;

    margin: 0 !important;

    padding:
        clamp(42px, 4vw, 64px)
        clamp(48px, 5vw, 82px) !important;

    background:
        linear-gradient(
            112deg,
            rgba(244, 237, 250, .72) 0%,
            rgba(255, 255, 255, .96) 52%,
            rgba(244, 240, 232, .68) 100%
        ) !important;

    border:
        0 !important;

    border-radius:
        clamp(28px, 2.5vw, 38px) !important;

    box-shadow:
        inset 0 0 0 1px rgba(72, 32, 117, .035) !important;

    overflow: hidden;
}

.testimonial-hero .hero-columns::before,
.axia-testimonials-hero__columns::before {
    content: "";

    position: absolute;

    width: 520px;
    height: 520px;

    right: -150px;
    top: -250px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(125, 92, 171, .12),
            rgba(125, 92, 171, 0) 68%
        );

    pointer-events: none;
}

.testimonial-hero .hero-columns::after,
.axia-testimonials-hero__columns::after {
    content: "";

    position: absolute;

    left: 48%;
    bottom: 14%;

    width: clamp(24px, 2vw, 34px);
    height: clamp(24px, 2vw, 34px);

    background: #d0a252;

    -webkit-mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 L18.4 11.8 L28 16 L18.4 18.4 L16 28 L13.6 18.4 L4 16 L13.6 13.6 Z' fill='black'/%3E%3C/svg%3E")
        center / contain
        no-repeat;

    mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 L18.4 11.8 L28 16 L18.4 18.4 L16 28 L13.6 18.4 L4 16 L13.6 13.6 Z' fill='black'/%3E%3C/svg%3E")
        center / contain
        no-repeat;

    opacity: .88;

    transform: rotate(10deg);

    pointer-events: none;
}

.testimonial-hero .hero-columns > .wp-block-column,
.axia-testimonials-hero__columns > .wp-block-column {
    position: relative;
    z-index: 2;

    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;

    min-height: 0 !important;
    height: auto !important;

    flex: none !important;
    flex-basis: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}


/* =========================================================
   HERO COPY
   ========================================================= */

.hero-text,
.axia-testimonials-hero__content {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-text::before,
.axia-testimonials-hero__content::before {
    content: "TESTIMONIALS";

    display: block;

    margin: 0 0 14px;

    color: #68459a;

    font-size: .74rem;
    font-weight: 700;
    line-height: 1.2;

    letter-spacing: .13em;
    text-transform: uppercase;
}

.hero-text h1,
.hero-text h2,
.axia-testimonials-hero__content h1,
.axia-testimonials-hero__content h2 {
    max-width: 680px;

    margin: 0 0 20px !important;

    color: #524074 !important;

    font-family:
        "Inter Tight",
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif !important;

    font-size:
        clamp(42px, 3.15vw, 52px) !important;

    font-weight:
        700 !important;

    line-height:
        1.07 !important;

    letter-spacing:
        -0.025em !important;

    text-wrap:
        balance;
}

.hero-text > p,
.axia-testimonials-hero__content > p {
    max-width: 600px;

    margin: 0 0 26px !important;

    color: #434a47;

    font-size:
        clamp(1rem, 1vw, 1.08rem);

    line-height:
        1.7;
}


/* =========================================================
   HERO BUTTON
   ========================================================= */

.hero-button,
.axia-home-hero__buttons {
    width: min(280px, 100%);
    margin: 0 !important;
}

.hero-button .wp-block-button,
.axia-home-hero__buttons .wp-block-button {
    width: 100%;
    margin: 0 !important;
}

.hero-button .wp-block-button__link,
.axia-home-hero__buttons .wp-block-button__link {
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 54px;

    padding: 0 23px !important;

    background: var(--axia-purple) !important;

    border:
        2px solid
        var(--axia-purple) !important;

    border-radius: 11px !important;

    color: #fff !important;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;

    text-decoration: none;

    transition:
        transform 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}

.hero-button .wp-block-button__link:hover,
.hero-button .wp-block-button__link:focus,
.axia-home-hero__buttons .wp-block-button__link:hover,
.axia-home-hero__buttons .wp-block-button__link:focus {
    transform: translateY(-2px);

    background: #fff !important;
    border-color: var(--axia-purple) !important;
    color: var(--axia-purple) !important;
}


/* =========================================================
   HERO IMAGE
   ========================================================= */

.hero-image,
.axia-testimonials-hero__media {
    position: relative;
    z-index: 2;

    width: min(100%, 640px);
    justify-self: end;
}

.hero-image::before,
.axia-testimonials-hero__media::before {
    content: "";

    position: absolute;

    inset: 10% -2% -9% 10%;

    background:
        linear-gradient(
            145deg,
            #eee7f4,
            #edf1e9
        );

    border-radius:
        43% 57% 48% 52% /
        55% 44% 56% 45%;

    transform: rotate(-3deg);

    z-index: -1;
}

.hero-image::after,
.axia-testimonials-hero__media::after {
    content: "";

    position: absolute;

    left: -28px;
    bottom: 18%;

    width: 28px;
    height: 28px;

    background: #c99443;

    -webkit-mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 L18.4 11.8 L28 16 L18.4 18.4 L16 28 L13.6 18.4 L4 16 L13.6 13.6 Z' fill='black'/%3E%3C/svg%3E")
        center / contain
        no-repeat;

    mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 L18.4 11.8 L28 16 L18.4 18.4 L16 28 L13.6 18.4 L4 16 L13.6 13.6 Z' fill='black'/%3E%3C/svg%3E")
        center / contain
        no-repeat;

    opacity: .85;
}

.hero-image .wp-block-image,
.axia-testimonials-hero__media .wp-block-image {
    width: 100%;
    margin: 0 !important;
}

.hero-image img,
.axia-testimonials-hero__image img,
.axia-testimonials-hero__media img {
    display: block;

    width: 100% !important;
    max-height: 390px;

    aspect-ratio: 16 / 10;

    object-fit: cover;
    object-position: center;

    border-radius:
        42% 58% 49% 51% /
        53% 45% 55% 47%;
}


/* =========================================================
   CARDS WRAPPER
   ========================================================= */

body .wp-site-blocks .cards-outer,
body .wp-site-blocks .axia-testimonials-content {
    display: block !important;

    margin: 0 auto !important;
    padding: 0 !important;

    gap: 0 !important;
    row-gap: 0 !important;
    column-gap: 0 !important;
}

.cards-outer > .wp-block-group,
.cards-outer > .wp-block-group-is-layout-grid,
.cards-outer > .is-layout-grid,
.cards-outer .wp-block-group-is-layout-grid,
.cards-outer .is-layout-grid,
.axia-testimonials-grid {
    width: 100% !important;
    max-width: none !important;
}


/* =========================================================
   GRID
   ========================================================= */

.cards-outer > .wp-block-group-is-layout-grid,
.cards-outer > .is-layout-grid,
.cards-outer .wp-block-group-is-layout-grid,
.axia-testimonials-grid {
    display: grid !important;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        ) !important;

    gap: clamp(16px, 1.6vw, 24px) !important;

    align-items: start !important;

    margin: 0 !important;
}


/* =========================================================
   TESTIMONIAL CARD
   ========================================================= */

.testimonial-card,
.axia-testimonial-card {
    box-sizing: border-box;

    position: relative;

    display: flex !important;
    flex-direction: column;

    width: 100% !important;
    min-width: 0;

    height: var(--axia-card-height);
    min-height: var(--axia-card-height);
    max-height: var(--axia-card-height);

    margin: 0 !important;

    padding:
        25px
        27px
        22px !important;

    border:
        1px solid
        rgba(75, 54, 98, .09);

    border-radius:
        var(--axia-card-radius);

    box-shadow:
        0 7px 24px
        rgba(37, 28, 44, .025);

    overflow: hidden;

    transition:
        transform 200ms ease,
        box-shadow 200ms ease,
        border-color 200ms ease;
}

.testimonial-card.is-expanded,
.axia-testimonial-card.is-expanded,
.testimonial-card.is-measuring-expanded,
.axia-testimonial-card.is-measuring-expanded {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: visible !important;
}

/* Soft green — left column */
.testimonial-card:nth-child(3n + 1),
.axia-testimonial-card:nth-child(3n + 1) {
    background:
        linear-gradient(
            145deg,
            #f1f5ef,
            #f7faf5
        );
}

/* Cream — centre column */
.testimonial-card:nth-child(3n + 2),
.axia-testimonial-card:nth-child(3n + 2) {
    background:
        linear-gradient(
            145deg,
            #f8f4ed,
            #fbf9f5
        );
}

/* Soft purple — right column */
.testimonial-card:nth-child(3n),
.axia-testimonial-card:nth-child(3n) {
    background:
        linear-gradient(
            145deg,
            #f4edfa,
            #f8f3fb
        );
}


/* =========================================================
   CARD DECORATION
   ========================================================= */

.testimonial-card::after,
.axia-testimonial-card::after {
    content: "";

    position: absolute;

    right: 18px;
    bottom: 14px;

    width: 22px;
    height: 22px;

    background: #b28cdf;

    -webkit-mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 L18.4 11.8 L28 16 L18.4 18.4 L16 28 L13.6 18.4 L4 16 L13.6 13.6 Z' fill='black'/%3E%3C/svg%3E")
        center / contain
        no-repeat;

    mask:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 2 L18.4 11.8 L28 16 L18.4 18.4 L16 28 L13.6 18.4 L4 16 L13.6 13.6 Z' fill='black'/%3E%3C/svg%3E")
        center / contain
        no-repeat;

    opacity: .82;

    transform: rotate(10deg);

    pointer-events: none;
}

.testimonial-card:nth-child(3n + 2)::after,
.axia-testimonial-card:nth-child(3n + 2)::after {
    background: #c99443;
}

/* Keep the alternate hand-drawn heart treatment on every third card. */
.testimonial-card:nth-child(3n)::after,
.axia-testimonial-card:nth-child(3n)::after {
    content: "♡";

    width: auto;
    height: auto;

    background: none;

    -webkit-mask: none;
    mask: none;

    color: #8560b4;

    font-size: 27px;
    line-height: 1;
}


/* =========================================================
   CARD HOVER
   ========================================================= */

@media (hover: hover) and (pointer: fine) {
    .testimonial-card:hover,
    .axia-testimonial-card:hover {
        transform: translateY(-3px);

        border-color:
            rgba(94, 63, 132, .15);

        box-shadow:
            0 13px 30px
            rgba(37, 28, 44, .06);
    }
}


/* =========================================================
   CARD HEADING
   ========================================================= */

.testimonial-card h3,
.axia-testimonial-card h3 {
    box-sizing: border-box;

    width: 100%;
    max-width: 97%;

    /*
     * Reserve two lines across every card so body copy starts
     * at the same height within each row.
     */
    min-height: calc(1.12em * 2);

    margin: 0 0 14px !important;

    color: #252a35;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(1.25rem, 1.28vw, 1.5rem);

    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.022em;
}

/* Larger, more editorial quote marks. */
.testimonial-card h3::before,
.axia-testimonial-card h3::before {
    content: "“";

    display: inline;

    margin-right: .04em;

    color: #482075;

    font-size: 1.55em;
    font-weight: 400;
    line-height: 0;

    vertical-align: -.13em;
}

.testimonial-card h3::after,
.axia-testimonial-card h3::after {
    content: "”";

    display: inline;

    margin-left: .03em;

    color: #482075;

    font-size: 1.55em;
    font-weight: 400;
    line-height: 0;

    vertical-align: -.13em;
}

/*
 * Only actual overflow cards get .has-more.
 * Those long titles are clamped while collapsed.
 */
.testimonial-card.has-more:not(.is-expanded) h3,
.axia-testimonial-card.has-more:not(.is-expanded) h3 {
    display: -webkit-box;

    max-height: calc(1.12em * 2);

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;
}

.testimonial-card.is-expanded h3,
.axia-testimonial-card.is-expanded h3,
.testimonial-card.is-measuring-expanded h3,
.axia-testimonial-card.is-measuring-expanded h3 {
    min-height: 0;
    max-height: none;

    display: block;

    overflow: visible;
}


/* =========================================================
   CARD BODY
   ========================================================= */

.testimonial-card p,
.axia-testimonial-card p {
    margin: 0 0 11px !important;

    color: var(--axia-body);

    font-size:
        clamp(.88rem, .78vw, .95rem);

    line-height: 1.55;

    text-align: left !important;
}

/* Attribution */
.testimonial-card > p:last-child,
.axia-testimonial-card > p:last-child {
    margin:
        auto
        36px
        0
        0 !important;

    padding-top: 8px;

    color: #303735;

    font-size: .78rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1.35;
}


/* =========================================================
   TESTIMONIAL COPY WRAPPER
   ========================================================= */

.axia-testimonial-copy {
    position: relative;

    min-height: 0;

    margin: 0;

    overflow: visible;
}

/* Only truly overflowing cards are clamped. */
.testimonial-card.has-more:not(.is-expanded)
.axia-testimonial-copy,
.axia-testimonial-card.has-more:not(.is-expanded)
.axia-testimonial-copy {
    max-height: 5.05em;
    overflow: hidden;
}

.testimonial-card.has-more.is-expanded
.axia-testimonial-copy,
.axia-testimonial-card.has-more.is-expanded
.axia-testimonial-copy,
.testimonial-card.is-measuring-expanded
.axia-testimonial-copy,
.axia-testimonial-card.is-measuring-expanded
.axia-testimonial-copy {
    max-height: none !important;
    overflow: visible !important;
}

.axia-testimonial-copy > p:last-child {
    margin-bottom: 0 !important;
}

/* Fade only genuinely truncated copy.
   Use an alpha mask instead of a coloured overlay so the fade
   always matches the card background at every breakpoint. */
.testimonial-card.has-more:not(.is-expanded)
.axia-testimonial-copy,
.axia-testimonial-card.has-more:not(.is-expanded)
.axia-testimonial-copy {
    -webkit-mask-image:
        linear-gradient(
            to bottom,
            #000 0%,
            #000 68%,
            transparent 100%
        );

    mask-image:
        linear-gradient(
            to bottom,
            #000 0%,
            #000 68%,
            transparent 100%
        );

    -webkit-mask-size:
        100% 100%;

    mask-size:
        100% 100%;
}

/* Expanded copy should never retain the fade mask. */
.testimonial-card.is-expanded
.axia-testimonial-copy,
.axia-testimonial-card.is-expanded
.axia-testimonial-copy,
.testimonial-card.is-measuring-expanded
.axia-testimonial-copy,
.axia-testimonial-card.is-measuring-expanded
.axia-testimonial-copy {
    -webkit-mask-image:
        none !important;

    mask-image:
        none !important;
}


/* =========================================================
   READ MORE
   ========================================================= */

.axia-testimonial-toggle {
    appearance: none;

    display: inline-flex;
    align-items: center;

    align-self: flex-start;

    gap: 5px;

    margin:
        8px
        0
        7px;

    padding: 0;

    background: transparent;
    border: 0;

    color: var(--axia-purple);

    font: inherit;

    font-size: .79rem;
    font-weight: 700;
    line-height: 1.3;

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;

    cursor: pointer;
}

.axia-testimonial-toggle::after {
    content: "↓";

    display: inline-block;

    transition: transform 180ms ease;
}

.testimonial-card.is-expanded
.axia-testimonial-toggle::after,
.axia-testimonial-card.is-expanded
.axia-testimonial-toggle::after {
    transform: rotate(180deg);
}

.axia-testimonial-toggle:hover,
.axia-testimonial-toggle:focus-visible {
    color: #6f49a1;
}


/* =========================================================
   LOAD MORE SECTION
   Equal spacing above and below the button.
   ========================================================= */

.cards-outer > .axia-testimonials-more,
.axia-testimonials-content > .axia-testimonials-more,
.axia-testimonials-more {
    box-sizing: border-box;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    max-width: none !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    margin-block: 0 !important;

    padding: 60px 0 !important;

    gap: 0 !important;
}

.cards-outer > .is-layout-grid + .axia-testimonials-more,
.cards-outer > .wp-block-group-is-layout-grid + .axia-testimonials-more,
.axia-testimonials-grid + .axia-testimonials-more {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

.axia-testimonials-more .wp-block-button {
    display: flex !important;
    align-items: center;
    justify-content: center;

    margin: 0 !important;
    padding: 0 !important;
}

.axia-testimonials-more .wp-block-button__link {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 50px;

    padding: 0 27px !important;

    background:
        #164f3e !important;

    border:
        1.5px solid
        #164f3e !important;

    border-radius:
        999px !important;

    color:
        #fff !important;

    font-size: .85rem;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}

.axia-testimonials-more
.wp-block-button__link::after {
    content: "↓";
    margin-left: 8px;
}

.axia-testimonials-more
.wp-block-button__link:hover,
.axia-testimonials-more
.wp-block-button__link:focus {
    transform: translateY(-2px);

    background:
        #103c31 !important;

    border-color:
        #103c31 !important;

    color:
        #fff !important;
}

.axia-testimonials-more[hidden] {
    display: none !important;
}


/* =========================================================
   LOAD MORE STATES
   ========================================================= */

.testimonial-card.is-load-hidden,
.axia-testimonial-card.is-load-hidden {
    display: none !important;
}

.testimonial-card.is-load-revealed,
.axia-testimonial-card.is-load-revealed {
    animation:
        axia-testimonial-reveal
        460ms
        cubic-bezier(.2,.75,.3,1)
        both;
}

@keyframes axia-testimonial-reveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   OPTIONAL BOTTOM CTA
   ========================================================= */

body .wp-site-blocks .axia-testimonials-cta {
    position: relative;

    margin-top: 0 !important;
    margin-bottom: clamp(80px, 9vw, 125px) !important;

    padding:
        clamp(38px, 5vw, 68px)
        clamp(36px, 5vw, 72px) !important;

    background:
        linear-gradient(
            115deg,
            #f3ecfa 0%,
            #f8f3fb 55%,
            #f2eee5 100%
        );

    border-radius:
        clamp(28px, 3vw, 40px);

    overflow: hidden;
}

.axia-testimonials-cta__columns {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(320px, .9fr);

    gap: clamp(40px, 6vw, 85px) !important;

    align-items: center !important;

    margin: 0 !important;
}

.axia-testimonials-cta__columns > .wp-block-column {
    width: auto !important;
    min-width: 0 !important;

    margin: 0 !important;
}

.axia-testimonials-cta__content h2 {
    max-width: 650px;

    margin: 0 0 18px !important;

    color: var(--axia-text);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(2.7rem, 4vw, 4.5rem);

    font-weight: 400;
    line-height: .98;
    letter-spacing: -.045em;
}

.axia-testimonials-cta__content > p {
    max-width: 620px;

    margin: 0 0 26px !important;

    line-height: 1.7;
}

.axia-testimonials-cta__media
.wp-block-image {
    margin: 0 !important;
}

.axia-testimonials-cta__image img,
.axia-testimonials-cta__media img {
    display: block;

    width: 100% !important;

    aspect-ratio: 4 / 3;

    object-fit: cover;
    object-position: center;

    border-radius:
        42% 58% 48% 52% /
        54% 45% 55% 46%;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {
    :root {
        --axia-testimonials-gutter: 22px;
        --axia-card-height: 302px;
    }

    .testimonial-hero .hero-columns,
    .axia-testimonials-hero__columns {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(300px, .88fr);

        gap: 40px !important;

        padding:
            40px
            42px !important;
    }

    .cards-outer > .wp-block-group-is-layout-grid,
    .cards-outer > .is-layout-grid,
    .cards-outer .wp-block-group-is-layout-grid,
    .axia-testimonials-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            ) !important;
    }

    .axia-testimonials-cta__columns {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(280px, .8fr);
    }

    /* Tablet: retain green-left / purple-right column treatment. */
    .testimonial-card:nth-child(odd),
    .axia-testimonial-card:nth-child(odd) {
        background:
            linear-gradient(
                145deg,
                #f1f5ef,
                #f7faf5
            );
    }

    .testimonial-card:nth-child(even),
    .axia-testimonial-card:nth-child(even) {
        background:
            linear-gradient(
                145deg,
                #f4edfa,
                #f8f3fb
            );
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 781px) {
    :root {
        --axia-testimonials-gutter: 14px;
        --axia-card-height: 290px;
    }

    body .wp-site-blocks .testimonial-hero,
    body .wp-site-blocks .axia-testimonials-hero {
        margin-top: 20px !important;
        margin-bottom: 52px !important;
    }

    .testimonial-hero .hero-columns,
    .axia-testimonials-hero__columns {
        grid-template-columns: 1fr;

        gap: 32px !important;

        padding:
            30px
            23px !important;

        border-radius:
            26px !important;
    }

    .hero-text h1,
    .hero-text h2,
    .axia-testimonials-hero__content h1,
    .axia-testimonials-hero__content h2 {
        font-size:
            clamp(34px, 9.4vw, 43px) !important;

        line-height:
            1.08 !important;

        letter-spacing:
            -0.03em !important;
    }

    .hero-button,
    .axia-home-hero__buttons {
        width: 100%;
    }

    .testimonial-hero .hero-columns::after,
    .axia-testimonials-hero__columns::after {
        display: none;
    }

    .hero-image img,
    .axia-testimonials-hero__image img,
    .axia-testimonials-hero__media img {
        max-height: none;
    }

    .cards-outer > .wp-block-group-is-layout-grid,
    .cards-outer > .is-layout-grid,
    .cards-outer .wp-block-group-is-layout-grid,
    .axia-testimonials-grid {
        grid-template-columns:
            1fr !important;

        gap: 14px !important;
    }

    .testimonial-card,
    .axia-testimonial-card {
        padding:
            24px
            22px
            21px !important;

        border-radius: 18px;
    }

    .testimonial-card:nth-child(odd),
    .axia-testimonial-card:nth-child(odd) {
        background:
            linear-gradient(
                145deg,
                #f1f5ef,
                #f7faf5
            );
    }

    .testimonial-card:nth-child(even),
    .axia-testimonial-card:nth-child(even) {
        background:
            linear-gradient(
                145deg,
                #f4edfa,
                #f8f3fb
            );
    }


    .testimonial-card h3,
    .axia-testimonial-card h3 {
        font-size:
            clamp(1.28rem, 5.5vw, 1.55rem);
    }

    .testimonial-card p,
    .axia-testimonial-card p {
        font-size: .93rem;
    }

    .axia-testimonials-more {
        height: auto !important;
        min-height: 0 !important;

        padding: 44px 0 !important;
    }

    .axia-testimonials-more
    .wp-block-button,
    .axia-testimonials-more
    .wp-block-button__link {
        width: 100%;
    }

    body .wp-site-blocks
    .axia-testimonials-cta {
        padding:
            34px
            25px !important;

        border-radius: 27px;
    }

    .axia-testimonials-cta__columns {
        grid-template-columns: 1fr;

        gap: 34px !important;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 460px) {
    :root {
        --axia-testimonials-gutter: 10px;
        --axia-card-height: 300px;
    }

    .testimonial-card,
    .axia-testimonial-card {
        padding:
            23px
            20px
            20px !important;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .testimonial-card,
    .axia-testimonial-card,
    .axia-testimonial-toggle,
    .hero-button .wp-block-button__link,
    .axia-home-hero__buttons .wp-block-button__link,
    .axia-testimonials-more
    .wp-block-button__link {
        transition: none !important;
    }

    .testimonial-card:hover,
    .axia-testimonial-card:hover,
    .hero-button
    .wp-block-button__link:hover,
    .axia-home-hero__buttons
    .wp-block-button__link:hover,
    .axia-testimonials-more
    .wp-block-button__link:hover {
        transform: none !important;
    }

    .testimonial-card.is-load-revealed,
    .axia-testimonial-card.is-load-revealed {
        animation: none !important;
    }
}

/* =========================================================
   FINAL-STATE FOOTER SPACING
   When all testimonials are revealed and the Load More
   control is hidden, restore breathing room before footer.
   ========================================================= */

body .wp-site-blocks
.cards-outer:has(.axia-testimonials-more[hidden]),
body .wp-site-blocks
.axia-testimonials-content:has(.axia-testimonials-more[hidden]) {
    margin-bottom:
        clamp(64px, 6vw, 96px) !important;
}

@media (max-width: 781px) {
    body .wp-site-blocks
    .cards-outer:has(.axia-testimonials-more[hidden]),
    body .wp-site-blocks
    .axia-testimonials-content:has(.axia-testimonials-more[hidden]) {
        margin-bottom:
            56px !important;
    }
}



/* =========================================================
   V10 — FINAL OVERRIDES
   Stronger selectors to beat theme / Gutenberg button styles
   and reliable final spacing when Load More disappears.
   ========================================================= */

/* Desktop column colours: green left, cream centre, purple right. */
@media (min-width: 1051px) {
    body:has(.testimonial-outer)
    .testimonial-card:nth-child(3n + 1),
    body:has(.testimonial-outer)
    .axia-testimonial-card:nth-child(3n + 1) {
        background:
            linear-gradient(
                145deg,
                #f1f5ef,
                #f7faf5
            ) !important;
    }

    body:has(.testimonial-outer)
    .testimonial-card:nth-child(3n + 2),
    body:has(.testimonial-outer)
    .axia-testimonial-card:nth-child(3n + 2) {
        background:
            linear-gradient(
                145deg,
                #f8f4ed,
                #fbf9f5
            ) !important;
    }

    body:has(.testimonial-outer)
    .testimonial-card:nth-child(3n),
    body:has(.testimonial-outer)
    .axia-testimonial-card:nth-child(3n) {
        background:
            linear-gradient(
                145deg,
                #f4edfa,
                #f8f3fb
            ) !important;
    }
}

/* Homepage green Load More button. */
body:has(.testimonial-outer)
.axia-testimonials-more
.wp-block-button
.wp-block-button__link,
body:has(.testimonial-outer)
.axia-testimonials-more
.wp-block-button__link,
body:has(.testimonial-outer)
.axia-testimonials-more
.wp-element-button {
    background:
        #164f3e !important;

    border-color:
        #164f3e !important;

    color:
        #fff !important;
}

body:has(.testimonial-outer)
.axia-testimonials-more
.wp-block-button
.wp-block-button__link:hover,
body:has(.testimonial-outer)
.axia-testimonials-more
.wp-block-button
.wp-block-button__link:focus,
body:has(.testimonial-outer)
.axia-testimonials-more
.wp-block-button__link:hover,
body:has(.testimonial-outer)
.axia-testimonials-more
.wp-block-button__link:focus,
body:has(.testimonial-outer)
.axia-testimonials-more
.wp-element-button:hover,
body:has(.testimonial-outer)
.axia-testimonials-more
.wp-element-button:focus {
    background:
        #103c31 !important;

    border-color:
        #103c31 !important;

    color:
        #fff !important;
}

/*
 * Reliable final gap:
 * JS adds .is-testimonials-complete when the final batch is shown.
 * Padding is used rather than margin so the footer cannot collapse
 * against the final row.
 */
body .wp-site-blocks
.cards-outer.is-testimonials-complete,
body .wp-site-blocks
.axia-testimonials-content.is-testimonials-complete {
    padding-bottom:
        clamp(72px, 6vw, 104px) !important;
}

/* CSS fallback for browsers supporting :has(). */
body .wp-site-blocks
.cards-outer:has(.axia-testimonials-more[hidden]),
body .wp-site-blocks
.axia-testimonials-content:has(.axia-testimonials-more[hidden]) {
    padding-bottom:
        clamp(72px, 6vw, 104px) !important;
}

@media (max-width: 781px) {
    body .wp-site-blocks
    .cards-outer.is-testimonials-complete,
    body .wp-site-blocks
    .axia-testimonials-content.is-testimonials-complete,
    body .wp-site-blocks
    .cards-outer:has(.axia-testimonials-more[hidden]),
    body .wp-site-blocks
    .axia-testimonials-content:has(.axia-testimonials-more[hidden]) {
        padding-bottom:
            56px !important;
    }
}


/* =========================================================
   V11 — RESPONSIVE FADE SAFETY
   Never paint a coloured strip over truncated testimonial copy.
   The alpha mask above handles fading at every card colour.
   ========================================================= */

.testimonial-card.has-more
.axia-testimonial-copy::after,
.axia-testimonial-card.has-more
.axia-testimonial-copy::after {
    content: none !important;
    display: none !important;
    background: none !important;
}


/* =========================================================
   V12 — TESTIMONIAL TEXT ALIGNMENT SAFETY
   Prevent individual Gutenberg alignment settings from
   centring card content at narrower breakpoints.
   ========================================================= */

.testimonial-card h3,
.axia-testimonial-card h3,
.testimonial-card p,
.axia-testimonial-card p,
.axia-testimonial-copy,
.axia-testimonial-copy p {
    text-align: left !important;
}


/* =========================================================
   V14 — ASSESSMENT H1 + TESTIMONIAL COPY ALIGNMENT
   ========================================================= */

/* Match the assessment/service hero H1 exactly. */
body:has(.testimonial-outer)
.hero-text h1,
body:has(.testimonial-outer)
.axia-testimonials-hero__content h1 {
    color:
        #524074 !important;

    font-family:
        "Inter Tight",
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif !important;

    font-size:
        clamp(42px, 3.15vw, 52px) !important;

    font-weight:
        700 !important;

    line-height:
        1.07 !important;

    letter-spacing:
        -0.025em !important;
}

/*
 * Some imported Gutenberg testimonial paragraphs have their own
 * centring/max-width settings. Reset both alignment and block width,
 * not just text-align, so every testimonial starts on the left.
 */
body:has(.testimonial-outer)
.testimonial-card
.axia-testimonial-copy,
body:has(.testimonial-outer)
.axia-testimonial-card
.axia-testimonial-copy {
    box-sizing:
        border-box;

    width:
        100% !important;

    max-width:
        none !important;

    margin-left:
        0 !important;

    margin-right:
        0 !important;

    align-self:
        stretch !important;

    text-align:
        left !important;
}

body:has(.testimonial-outer)
.testimonial-card
.axia-testimonial-copy > p,
body:has(.testimonial-outer)
.axia-testimonial-card
.axia-testimonial-copy > p,
body:has(.testimonial-outer)
.testimonial-card > p,
body:has(.testimonial-outer)
.axia-testimonial-card > p {
    box-sizing:
        border-box;

    width:
        100% !important;

    max-width:
        none !important;

    margin-left:
        0 !important;

    margin-right:
        0 !important;

    text-align:
        left !important;
}

@media (max-width: 1050px) {
    body:has(.testimonial-outer)
    .hero-text h1,
    body:has(.testimonial-outer)
    .axia-testimonials-hero__content h1 {
        font-size:
            clamp(40px, 6.5vw, 50px) !important;

        line-height:
            1.06 !important;
    }
}

@media (max-width: 781px) {
    body:has(.testimonial-outer)
    .hero-text h1,
    body:has(.testimonial-outer)
    .axia-testimonials-hero__content h1 {
        font-size:
            clamp(34px, 9.4vw, 43px) !important;

        line-height:
            1.08 !important;

        letter-spacing:
            -0.03em !important;
    }
}
