.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;
}

.testimonial-portrait-border img {
    height: 105%;
    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(--highlight-blue);
}

.testimonials-wrap {
    display: grid;
    justify-content: center;
    display: -webkit-grid;
    -webkit-justify-content: center;
    margin: 0 auto;
    padding-bottom: 20px;
    background: var(--bg-light-gray);
}

.testimonials-wrap.hide,
#testimonial-expand.hide {
    display: none;
}

.testimonial-container:has(.fourth-el) {
    display: none;
}

.testimonial-container:not(:has(.hide, .fourth-el)) {
    margin-top: 96px;
}

.testimonial {
    position: relative;
    width: 280px;
    height: 464px;
    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 {
    position: absolute;
    height: calc(100% + 60px);
    padding: 0 20px 20px;
    top: -60px;
    display: flex;
    flex-direction: column;
}

.testimonial:focus {
    outline: none;
}

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

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

.testimonial:hover .testimonial-portrait-border,
.testimonial:focus .testimonial-portrait-border {
    border-color: var(--highlight-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: 'Nunito Sans';
    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;
}

.quote {
    flex-grow: 1;
}

.quote p {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: var(--ee-blue) !important;
    letter-spacing: 0.015em;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* for fading effect */
    /* position: relative; */
    /* height: 7.6em; */
}

/* for fading effect */
/* .quote p:after {
    content: "";
    text-align: right;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 70%;
    height: 1.2em;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1) 50%);
} */

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

.testimonial-company-logo>img {
    height: fit-content;
    max-width: 80%;
    max-height: 80%;
    margin: auto;
}

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

#testimonial-expand {
    margin: 0;
}

@media screen and (min-width: 1280px) {
    .testimonials-wrap {
        grid-template-columns: auto auto auto;
        gap: 20px;
    }
    .testimonial {
        width: 320px !important;
        height: 498px !important;
    }
    .testimonial.middle-colunm {
        margin-top: 0;
    }
    .testimonial.end-colunm {
        margin-left: auto;
    }
    .testimonial-card {
        padding: 0 40px 40px;
    }
}

@media only screen and (min-width: 1920px) {
    .testimonials-wrap {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 20px;
        max-width: fit-content;
    }
    .testimonial {
        width: 320px !important;
        height: 498px !important;
    }

    .testimonial-container:has(.fourth-el) {
        display: block !important;
        margin-top: 96px;
    }
}