/* Testimonials — YMCA 2026 Option B (node 203:859)
   Full-bleed purple band, centered eyebrow + white heading, then white quote cards
   (cyan quote glyph, purple-dk quote, purple-md attribution). */

.bmg-testimonials {
    position: relative;
    overflow: hidden;
}

/* Official brand chevron-trio texture over the purple band (decorative).
   One trio anchored to each edge — the ::after mirrored via scaleX(-1) — so the
   layered chevrons converge toward the center, matching the comp (node 203:859). */
.bmg-testimonials::before,
.bmg-testimonials::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8; /* lowered asset (.15/.05) → ~.12 effective front chevron */
    background-image: url("../../images/chevron-triangle-pattern.svg");
    background-repeat: no-repeat;
    background-size: auto 100%;
    /* Fade every edge (top/bottom + both sides) so the arm tips dissolve toward the
       corners instead of leaving a crisp cut-off triangle. Two gradients intersected;
       symmetric so it survives the ::after scaleX(-1) mirror. */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%), linear-gradient(to right, transparent 0%, #000 24%, #000 76%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%), linear-gradient(to right, transparent 0%, #000 24%, #000 76%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

/* a full-height chevron cluster anchored to each edge, the ::after mirrored */
.bmg-testimonials::before {
    left: 0;
    background-position: left center;
}

.bmg-testimonials::after {
    right: 0;
    /* left+flip lands the arm-ends on the band's right edge (where the mask fades
       them); right+flip left an interior hard edge and a bare gap to the corner. */
    background-position: left center;
    transform: scaleX(-1);
}

.bmg-testimonials > * {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.bmg-testimonials__head > * {
    margin: 0;
}

/* card grid: three across */
/* horizontal scroll track: 3 cards visible, arrows/dots (carousels.js) reveal the rest */
.bmg-testimonials__grid {
    align-items: stretch;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

/* Exact fallback for markup inserted before spacing moved into block attrs. */
.bmg-testimonials__grid:not(.bmg-testimonials__grid--native) {
    margin-top: 40px !important;
}

.bmg-testimonials__grid::-webkit-scrollbar {
    display: none;
}

.bmg-testimonial-card {
    box-sizing: border-box;
    flex: 0 0 calc((100% - 52px) / 3);
    width: calc((100% - 52px) / 3);
    padding: 37px 39px 38px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
}

:where(.bmg-testimonial-card) {
    min-height: 293px;
}

/* cyan quote glyph (decorative, CSS background — no inline markup) */
.bmg-testimonial-card::before {
    content: "";
    display: block;
    width: 56px;
    height: 40px;
    margin-bottom: 13px;
    flex: none;
    background-color: var(--primary-lt); /* cyan */
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 814.5 563.7"><path fill="black" d="M225.4,230.7c14.9,0,29.7,2.3,43.7,7.1,66.2,22.7,112.7,70.9,112.7,156.5s-80.9,169.3-182.5,169.3S0,469.5,0,332.2C0,133.9,127.3,12.6,364.5,0c9.4-.5,17.3,7,17.3,16.4v45.7c0,8.1-6,15-14,16.3-109,16.6-178.7,52.3-197,132.2-2.4,10.3,5.5,20,16.1,20h38.5ZM658,230.7c14.9,0,29.7,2.3,43.7,7.1,66.2,22.7,112.7,70.9,112.7,156.6s-80.9,169.3-182.5,169.3-199.3-94.1-199.3-231.4C432.6,133.9,560,12.6,797.1,0c9.4-.5,17.3,7,17.3,16.4v45.7c0,8.1-6,15-14,16.3-109,16.6-178.7,52.3-197,132.2-2.4,10.3,5.5,20,16.1,20h38.5Z"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 814.5 563.7"><path fill="black" d="M225.4,230.7c14.9,0,29.7,2.3,43.7,7.1,66.2,22.7,112.7,70.9,112.7,156.5s-80.9,169.3-182.5,169.3S0,469.5,0,332.2C0,133.9,127.3,12.6,364.5,0c9.4-.5,17.3,7,17.3,16.4v45.7c0,8.1-6,15-14,16.3-109,16.6-178.7,52.3-197,132.2-2.4,10.3,5.5,20,16.1,20h38.5ZM658,230.7c14.9,0,29.7,2.3,43.7,7.1,66.2,22.7,112.7,70.9,112.7,156.6s-80.9,169.3-182.5,169.3-199.3-94.1-199.3-231.4C432.6,133.9,560,12.6,797.1,0c9.4-.5,17.3,7,17.3,16.4v45.7c0,8.1-6,15-14,16.3-109,16.6-178.7,52.3-197,132.2-2.4,10.3,5.5,20,16.1,20h38.5Z"/></svg>');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* comp: quote + attribution are both Cachet Pro Bold 22.5/24, -0.04em */
.bmg-testimonial-card__quote {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 22.5px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: -0.04em;
}

.bmg-testimonial-card__name {
    font-family: var(--font-heading);
    font-size: 22.5px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: -0.04em;
}

.bmg-testimonial-card:not(.bmg-testimonial-card--native) .bmg-testimonial-card__name {
    margin: 14px 0 0 !important;
}

/* carousel controls: lavender circle arrows + dots, set below the cards */
.bmg-testimonials__controls {
    align-items: center;
    gap: 18px;
}

.bmg-testimonials__controls:not(.bmg-testimonials__controls--native) {
    margin-top: 28px !important;
}

.bmg-testimonials__arrow {
    box-sizing: border-box;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        opacity 0.2s ease;
}

.bmg-testimonials__arrow:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.bmg-testimonials__arrow.is-disabled {
    opacity: 0.35;
    cursor: default;
}

.bmg-testimonials__dot {
    cursor: pointer;
}

/* rounded play-style triangles — same glyph as the video play button
   (look-inside.css), white; prev is the same path mirrored in-SVG */
.bmg-testimonials__arrow::before {
    content: "";
    display: block;
    width: 15px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.bmg-testimonials__arrow--prev::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 46 51"><path fill="%23ffffff" transform="matrix(-1 0 0 1 44 0)" d="M0 5.1C0 1.2 4.2-1.2 7.6.8l33.4 19.4c3.3 1.9 3.3 6.7 0 8.6L7.6 48.2C4.2 50.2 0 47.8 0 43.9V5.1z"/></svg>');
    margin-right: 2px;
}

.bmg-testimonials__arrow--next::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 46 51"><path fill="%23ffffff" d="M0 5.1C0 1.2 4.2-1.2 7.6.8l33.4 19.4c3.3 1.9 3.3 6.7 0 8.6L7.6 48.2C4.2 50.2 0 47.8 0 43.9V5.1z"/></svg>');
    margin-left: 2px;
}

.bmg-testimonials__dots {
    align-items: center;
}

.bmg-testimonials__dot {
    width: 10px;
    height: 10px;
    flex: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
}

.bmg-testimonials__dot.is-active {
    background-color: #fff;
}

/*tablet/mobile (out of 2026 desktop scope — keep usable)*/
@media (max-width: 992px) {
    .bmg-testimonial-card {
        flex-basis: calc((100% - 24px) / 2);
        width: calc((100% - 24px) / 2);
    }

    .bmg-testimonials::before,
    .bmg-testimonials::after {
        display: none;
    }
}

@media (max-width: 680px) {
    .bmg-testimonial-card {
        flex-basis: 100%;
        width: 100%;
    }
}

/* Legacy eyebrow fallback; new markup carries the H5 preset itself. */
.bmg-testimonials .bmg-eyebrow:not(.has-h-5-size-font-size) {
    font-size: 22.5px;
    line-height: 1.24;
}
