/*
* Quote Carousel Block
* Desktop: the current quote card centred, neighbours peeking in, dots underneath (positions set by
* quote-carousel-block.js). Phones / no script: a row of cards to swipe. Builds on home-blocks-shared.css.
*/

.bhh-quotes {
    padding: 104px 0 96px;
    overflow: hidden;
    background: var(--bhh-lavender);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}
.bhh-quotes__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.bhh-quotes__carousel {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* Without the script (and on phones): a swipeable row */
.bhh-quotes__track {
    width: 100%;
    display: flex;
    gap: 32px;
    padding: 8px max(20px, calc(50% - 340px)) 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.bhh-quotes__track::-webkit-scrollbar {
    display: none;
}
.bhh-quotes__track:focus-visible {
    outline: 2px solid var(--bhh-purple);
    outline-offset: -2px;
}
.bhh-quotes__card {
    flex: 0 0 680px;
    min-height: 356px;
    padding: 36px 56px 40px;
    border-radius: 20px;
    background: #FFFFFF;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
    scroll-snap-align: center;
}
/*
 * Every card is as tall as the tallest (the script sets the height in the carousel; the swipe row
 * stretches them): the photo stays at the top, logo + name at the bottom, and the quote is centred
 * in between, so all cards line up whatever the quote's length.
 */
.bhh-quotes .bhh-quotes__quote {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop carousel: cards stacked in one spot, moved sideways by the script */
.bhh-quotes.is-carousel .bhh-quotes__track {
    position: relative;
    height: 372px;
    padding: 8px 0 0;
    overflow: visible;
    display: block;
}
.bhh-quotes.is-carousel .bhh-quotes__card {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 680px;
    margin-left: -340px;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bhh-quotes.is-carousel .bhh-quotes__card:not(.is-current) {
    cursor: pointer;
}

.bhh-quotes__avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    /* portraits: keep the head in the circle (faces sit in the upper part of a headshot) */
    object-position: 50% 15%;
    background: #C9F3E4;
    font-size: 18px;
    font-weight: 600;
    color: #1E6B55;
}
.bhh-quotes .bhh-quotes__quote {
    margin: 0;
    padding: 0;
    border: 0;
    font-family: var(--bhh-font-head);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #161616;
}
.bhh-quotes__caption {
    flex-shrink: 0;
}
/* Logo row is always 32px tall, so names and roles sit at the same height on every card */
.bhh-quotes__wordmark {
    font-family: var(--bhh-font-head);
    font-size: 26px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: -0.02em;
    color: #4A4A55;
}
.bhh-quotes__logo {
    flex-shrink: 0;
    max-width: 160px;
    width: auto;
    height: 32px;
    object-fit: contain;
    /* logos in their own colours (as uploaded) */
}
.bhh-quotes__logo.is-square {
    height: 56px;
}
.bhh-quotes__caption {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    line-height: 1.4;
}
.bhh-quotes__caption b {
    font-weight: 600;
    color: var(--bhh-ink);
}
.bhh-quotes__caption span {
    color: #5F6B92;
}

.bhh-quotes__dots {
    display: none;
    justify-content: center;
    gap: 10px;
}
.bhh-quotes.is-carousel .bhh-quotes__dots {
    display: flex;
}
.bhh-quotes .bhh-quotes__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #B9BFD6;
    cursor: pointer;
    transition: background-color 0.22s;
}
.bhh-quotes .bhh-quotes__dot.is-active {
    background: var(--bhh-purple);
}
.bhh-quotes .bhh-quotes__dot:focus-visible {
    outline: 2px solid var(--bhh-purple) !important;
    outline-offset: 3px;
}

/* Mobile design: off-white, cards 300 wide */
@media (max-width: 767px) {
    .bhh-quotes {
        padding: 56px 0;
        gap: 18px;
        border-top: 1px solid var(--bhh-line);
        background: #F8F9FB;
        align-items: stretch;
    }
    .bhh-quotes__head {
        align-items: flex-start;
        gap: 18px;
        text-align: left;
    }
    .bhh-quotes__track {
        gap: 14px;
        padding: 4px 20px 12px;
        scroll-padding-left: 20px;
    }
    .bhh-quotes__card {
        flex: 0 0 300px;
        min-height: 0;
        padding: 24px;
        gap: 16px;
        scroll-snap-align: start;
    }
    .bhh-quotes .bhh-quotes__quote {
        font-size: 18px;
    }
    .bhh-quotes__wordmark {
        font-size: 20px;
        line-height: 24px;
    }
    /* mobile design: smaller logo row, and the quote right under the photo (the extra height of shorter
       quotes goes below them, not around them) */
    .bhh-quotes__logo {
        height: 24px;
    }
    .bhh-quotes__logo.is-square {
        height: 44px;
    }
    .bhh-quotes .bhh-quotes__quote {
        align-items: flex-start;
    }
}
