.testimonial-portrait-wrap {
    position: relative;
    width: min-content;
    margin: 0 auto;
}

.testimonial-portrait-border {
    border: solid 8px var(--ee-blue);
    overflow: hidden;
    margin: 0 auto 14px;
    border-radius: 200px;
    width: 120px;
    height: 120px;
    box-shadow: 0 0 0 4px var(--bg-light-gray-2), 8px 8px 10px rgba(0, 0, 0, 0.05);
    transition: .3s;
}

.about-popup-content .testimonial-portrait-border {
    margin-top: 32px;
}

/* Fill the circular crop explicitly.

   This used to be `height: 105%; max-width: unset`, which worked only while the
   <img> carried no width/height attributes: width stayed auto and the natural
   square aspect was preserved. The responsive-image transform now writes real
   width/height onto every img, so the percentage height resolved against the
   104px content box while the width came from the attribute, and portraits
   rendered 224x109 inside a 120px circle -- stretched, off-centre, and spilling
   out of the ring. object-fit does the crop instead, which does not care what
   intrinsic dimensions the markup declares. */
.testimonial-portrait-border img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    max-width: unset;
}

.testimonial-portrait-wrap svg {
    position: absolute;
    fill: var(--ee-blue);
    bottom: 12.5%;
    right: 0;
    transition: .3s;
}

.testimonial:hover .testimonial-portrait-wrap svg,
.testimonial:focus .testimonial-portrait-wrap svg {
    fill: var(--ee-blue);
}

/* Every testimonial shows, always (2026-10-23): no "View All" button. Each
   card previews its quote in five lines (.quote p, below), and the cards in a
   row stretch to the tallest one, so the logos line up along the bottom. Columns: as many 280px cards as fit, then three 320px cards from
   1280px and four from 1920px (media queries at the end). */
.testimonials-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, 280px);
    justify-content: center;
    column-gap: 20px;
    margin: 0 auto;
    padding-bottom: 20px;
    background: var(--bg-light-gray);
}

/* The 96px top margin is room for the portrait, which rises 60px above the
   card. Flex lets the card fill the row's height. */
.testimonial-container {
    display: flex;
    margin-top: 96px;
}

.testimonial {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #FCFCFC;
    border-radius: 10px;
    box-shadow: 8px 8px 10px rgba(0, 0, 0, 0.05);
    border: solid 4px transparent;
    cursor: pointer;
    transition: .3s;
    padding: 0;
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-top: -60px;
    padding: 0 20px 20px;
}

.testimonial:focus {
    outline: none;
}

/* .testimonial:hover,
.testimonial:focus {
    border-color: var(--ee-blue);
} */

.testimonial-container:has(.testimonial:focus) {
    box-shadow: var(--focus-border);
}

.testimonial:hover .testimonial-portrait-border,
.testimonial:focus .testimonial-portrait-border {
    border-color: var(--ee-blue);
}

.testimonial_name {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 2rem;
    letter-spacing: 0.02em;
    color: var(--ee-black);
}

.testimonial_role_wrap {
    font-family: 'Lato', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.25rem;
    letter-spacing: 0.015em;
    color: #222;
    min-height: 40px;
}

.testimonial-quote-wrap {
    position: relative;
    margin: 10px 0 15px;
    text-align: start;
}

.testimonial-quote-wrap svg {
    display: block;
}

.testimonial hr {
    height: 1.5px;
    border-color: #DDDDDD;
    margin: 0;
}

.hr-top-testimonial {
    position: absolute;
    width: 77%;
    top: 42%;
    right: 0;
}

/* Left-aligned (2026-10-23): a centered paragraph makes every line start
   somewhere new. Name, role and logo stay centered, on every page. */
.quote {
    flex-grow: 1;
    text-align: start;
}

.quote p {
    font-family: 'Lato', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: var(--ee-blue) !important;
    letter-spacing: 0.015em;
    /* The card shows a preview, as it did on 2026-10-11 (Celso's design,
       restored 2026-10-26): five lines, then an ellipsis. Every quote is a
       passage of the interview in the card's dialog, so the rest is there. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    overflow: hidden;
}

.testimonial-company-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 7px;
}

/* The image transform wraps most logos in <picture>, so the cap goes on the
   img wherever it sits. The old `.testimonial-company-logo > img` matched only
   the two unwrapped logos, so tall ones (Costa, Incorta) drew at full size
   and spilled out of the bottom of the card. */
.testimonial-company-logo picture {
    display: contents;
}

.testimonial-company-logo img {
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 48px;
    object-fit: contain;
}

.our-work-articles {
    display: flex;
    justify-content: center;
    padding: 32px 0 64px;
}

@media screen and (min-width: 1280px) {
    .testimonials-wrap {
        grid-template-columns: repeat(3, 320px);
    }
    .testimonial-card {
        padding: 0 40px 40px;
    }
}

@media only screen and (min-width: 1920px) {
    .testimonials-wrap {
        grid-template-columns: repeat(4, 320px);
    }
}
