/* ==========================================================================
   Testimonials — About Us > Colonic Review

   Legacy Joomla markup, one entry per block:
     .row > .col-lg-3 > .fst_comment_left (name + date)
           > .col-lg-9 > .fst_comment_comment (quote)
   separated by <hr>. The Bootstrap grid classes carry no styles, so they are
   flattened here.

   Layout: a central timeline. The spine runs down the middle of the page and
   the cards alternate left / right of it, each joined to the spine by a short
   connector with a green node — a staggered "chess board" rhythm.
   Entries are authored newest-first (2022 → 2010) in body.html.
   ========================================================================== */

.testimonial-list {
    --ig-spine-gap: 40px;   /* distance from card edge to the spine */
    --ig-node: 12px;        /* diameter of the node on the spine */

    position: relative;
    margin: 0;
    padding: 8px 0 4px;
    /* Contain the floated cards. */
    overflow: hidden;
}

/* Google rating summary — real aggregate pulled from Google's search JSON. */
.review-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0 0 24px;
    padding: 14px 18px;
    border: 1px solid var(--border, #dbdbdb);
    border-left: 3px solid var(--green, #639846);
    border-radius: var(--radius, 3px);
    background: var(--surface, #ffffff);
    font-size: 14px;
    color: var(--text, #252525);
}

.review-summary .review-stars {
    color: #f4b400;
    font-size: 16px;
    letter-spacing: 2px;
    line-height: 1;
}

.review-summary .review-score strong {
    font-size: 17px;
    color: var(--text, #252525);
}

.review-summary .review-count {
    color: var(--muted, #888888);
}

.review-summary .review-count strong {
    color: var(--text, #252525);
}

.review-summary .review-link {
    margin-left: auto;
    padding-bottom: 1px;
    border-bottom: 1px solid rgba(99, 152, 70, 0.4);
    color: var(--green, #639846);
    text-decoration: none;
}

.review-summary .review-link:hover {
    color: var(--green-dark, #4f7a36);
}

@media (max-width: 600px) {
    .review-summary .review-link {
        margin-left: 0;
    }
}

/* The spine itself. */
.testimonial-list::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: var(--border, #dbdbdb);
}

/* This page has no sidebar, and .content-row:not(.has-sidebar) .entry caps the
   article at 880px. The timeline needs the full container so the spine sits
   in the true centre. */
.content-row:not(.has-sidebar) .entry:has(.testimonial-list) {
    max-width: none;
}

/* Card spacing replaces the legacy <hr> separators. */
.testimonial-list > hr {
    display: none;
}

/* The grid columns are only wrappers in this markup. */
.testimonial-list .col-lg-3,
.testimonial-list .col-lg-9,
.testimonial-list .col-3,
.testimonial-list .col-9 {
    width: 100%;
    max-width: none;
    padding: 0;
}

/* ---------------------------------------------------------------- cards --- */

.testimonial-list .row {
    /* Vertical centre of the dot, measured from the card's top edge. */
    --ig-dot-top: 28px;

    position: relative;
    width: calc(50% - var(--ig-spine-gap));
    margin: 0 0 22px;
    padding: 18px 22px 20px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #dbdbdb);
    border-radius: var(--radius, 3px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 200ms ease, transform 200ms ease;
}

.testimonial-list .row:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

/* Each side packs independently. A new left card clears only the previous LEFT
   card, so a tall card on the right never pushes it down. Left and right occupy
   opposite halves, so they can never overlap.

   Side-by-side cards share a top edge, which would put both dots on the same
   point of the spine. The right-hand dot is therefore dropped by 1.5x the dot
   diameter, guaranteeing the minimum spacing. */
.testimonial-list .row:nth-of-type(odd) {
    float: left;
    clear: left;
    border-right: 3px solid var(--green, #639846);
}

.testimonial-list .row:nth-of-type(even) {
    float: right;
    clear: right;
    /* 1.75x rather than the 1.5x minimum: at 1.5x the 18px footprints would sit
       exactly tangent, so this leaves a 3px gap between the rings. */
    --ig-dot-top: calc(28px + (var(--ig-node) * 1.75));
    border-left: 3px solid var(--green, #639846);
}

/* Connector from the card to the spine, meeting it at the dot. */
.testimonial-list .row::after {
    content: "";
    position: absolute;
    top: calc(var(--ig-dot-top) - 1px);
    width: var(--ig-spine-gap);
    height: 2px;
    background: var(--border, #dbdbdb);
}

.testimonial-list .row:nth-of-type(odd)::after {
    right: calc(-1 * var(--ig-spine-gap));
}

.testimonial-list .row:nth-of-type(even)::after {
    left: calc(-1 * var(--ig-spine-gap));
}

/* Node sitting on the spine. */
.testimonial-list .row::before {
    content: "";
    position: absolute;
    top: calc(var(--ig-dot-top) - (var(--ig-node) / 2));
    width: var(--ig-node);
    height: var(--ig-node);
    border-radius: 50%;
    background: var(--green, #639846);
    /* Ring kept to 3px total so the visual footprint is 18px (1.5x the dot),
       matching the minimum spacing enforced above. */
    box-shadow: 0 0 0 2px var(--surface, #ffffff), 0 0 0 3px var(--border, #dbdbdb);
    z-index: 1;
}

.testimonial-list .row:nth-of-type(odd)::before {
    right: calc(-1 * var(--ig-spine-gap) - (var(--ig-node) / 2));
}

.testimonial-list .row:nth-of-type(even)::before {
    left: calc(-1 * var(--ig-spine-gap) - (var(--ig-node) / 2));
}

/* --------------------------------------------------------------- header --- */

.testimonial-list .fst_comment_left {
    margin: 0 0 12px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--border-soft, #f3f3f3);
}

.testimonial-list .fst_comment_created {
    display: block;
    margin: 0 0 3px;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted, #888888);
    text-transform: uppercase;
}

.testimonial-list .fst_comment_name {
    font-family: var(--font-heading, Arial, Helvetica, sans-serif);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--green, #639846);
    text-transform: uppercase;
}

/* ---------------------------------------------------------------- quote --- */

.testimonial-list .fst_comment_comment {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text, #252525);
}

/* Paragraphs inside a quote, whether written as <p> or as a bare <div>. Both
   follow a text node, so they need their own top margin. */
.testimonial-list .fst_comment_comment > p,
.testimonial-list .fst_comment_comment > div {
    margin: 12px 0 0;
}

/* -------------------------------------------------------------- layouts --- */

/* Below this width the page has stacked, so the two-column timeline would leave
   cards too narrow. Collapse to a single rail down the left. */
@media (max-width: 900px) {
    .testimonial-list {
        --ig-spine-gap: 30px;
    }

    .testimonial-list::before {
        left: 10px;
    }

    .testimonial-list .row,
    .testimonial-list .row:nth-of-type(odd),
    .testimonial-list .row:nth-of-type(even) {
        float: none;
        clear: none;
        /* Single rail: cards stack, so every dot can sit at the same offset. */
        --ig-dot-top: 26px;
        width: auto;
        margin-left: calc(var(--ig-spine-gap) + 14px);
        margin-right: 0;
        border-left: 3px solid var(--green, #639846);
        border-right: 1px solid var(--border, #dbdbdb);
    }

    .testimonial-list .row::after {
        left: calc(-1 * var(--ig-spine-gap) - 4px);
        right: auto;
        width: calc(var(--ig-spine-gap) + 4px);
    }

    .testimonial-list .row::before,
    .testimonial-list .row:nth-of-type(odd)::before,
    .testimonial-list .row:nth-of-type(even)::before {
        left: calc(-1 * var(--ig-spine-gap) - (var(--ig-node) / 2) - 4px);
        right: auto;
    }
}

@media (max-width: 767px) {
    .testimonial-list .row {
        padding: 15px 17px 17px;
        margin-bottom: 22px;
    }

    .testimonial-list .fst_comment_comment {
        font-size: 14px;
    }
}
