.testimonials {
    position: relative;
    padding-block: 100px;
    overflow: visible;
}

.testimonials__title-container,
.testimonials__slider .swiper-controls {
    position: relative;
    z-index: 2;
}

.testimonials__slider .swiper-controls {
    margin: 60px auto 0px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.testimonials .testimonials__title:not(.heading-with-star) {
    position: relative;
    text-align: center;
    text-transform: uppercase;
    z-index: 1;
}

.testimonials__title-container {
    position: relative;
}

.testimonials__title-container .testimonials__title-bg {
    position: absolute;
    top:-100px;
    left: 60%;
    transform: translateX(-60%);
    z-index: -1;
}

.testimonials .testimonials__title--split .testimonials__title-video-wrap {
    position: relative;
    top: 4px;
    left: 4px;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
}

.testimonials .testimonials__title--split .testimonials__title-video {
    width: 72px;
    height: 72px;
    border-radius: 100px;
}

.testimonials .testimonials__title--split .testimonials__title-part {
    display: inline;
    white-space: pre-line;
}

.testimonials .testimonials__title:not(.testimonials__title--split):not(.heading-with-star) {
    white-space: pre-line;
}

.testimonials__title-video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 238px;
    height: 238px;
    border: 1px dashed var(--blue-10);
    border-radius: 100%;
}

.testimonials__title-video-icon-inner {
    width: 160px;
    height: 160px;
    border: 1px solid var(--blue-10);
    border-radius: 100%;
}

.testimonials__title-video-icon-inner-icon {
    width: 102px;
    height: 102px;
    border: 1px dashed var(--blue-20);
    border-radius: 100%;
}

.testimonials__title-video-icon,
.testimonials__title-video-icon-inner,
.testimonials__title-video-icon-inner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonials .testimonials__description {
    margin-left: calc(50% + 10px);
}

.testimonials .testimonials__description:not(:first-child) {
    margin-top: 40px;
}

.testimonials .testimonials__slider {
    position: relative;
}

.testimonials .testimonials__slider:not(:first-child) {
    margin-top: 60px;
}

.testimonials .testimonials__items.swiper {
    overflow: hidden;
    z-index: 2;
}

.testimonials .testimonials__slider:not(.is-slider) .swiper-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.testimonials .testimonials__slider:not(.is-slider) .swiper-controls {
    display: none;
}

.testimonials .testimonials__slider:not(.is-slider) .testimonials__item {
    width: calc(33.333%);
}

.testimonials .testimonials__item {
    position: relative;
    display: flex;
    height: initial;
}

.testimonials .item-testimonial__inner {
    display: flex;
    flex-direction: column;
    padding: 60px 50px 10px;
    width: 100%;
    background-color: var(--grey);
}

.testimonials .item-testimonial__text {
    display: flex;
    width: 100%;
}

.testimonials .item-testimonial__text-inner {
    margin-top: auto;
}

.testimonials .item-testimonial__author {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 30px;
}

.testimonials .item-testimonial__author-image {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
}

.testimonials .item-testimonial__author-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--blue-dark);
    opacity: 0.5;
    border-radius: 50%;
    mix-blend-mode: screen;
    z-index: 1;
}

.testimonials .item-testimonial__author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(1);
}

.testimonials .item-testimonial__video-link {
    position: absolute;
    right: -4px;
    bottom: -6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    padding-left: 2px;
    color: var(--white);
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
}

.testimonials .item-testimonial__video-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--red);
    border-radius: 50%;
    transition: var(--transition);
    z-index: 0;
}

.testimonials .item-testimonial__video-link svg {
    width: 10px;
    height: 10px;
    z-index: 1;
}

.testimonials .item-testimonial__video-link:hover::before {
    transform: scale(0.96);
}

.testimonials .item-testimonial__video-link:focus::before {
    transform: scale(0.92);
}

.testimonials .item-testimonial__author-info {
    display: flex;
    flex-direction: column;
}

.testimonials .item-testimonial__author-position {
    color: var(--blue-light);
}

.testimonials .item-testimonial__author-logo {
    display: flex;
    margin-top: 10px;
}

.testimonials .item-testimonial__author-logo img {
    width: auto;
    max-height: 48px;
}

.testimonials .item-testimonial__case-link {
    margin-top: 10px;
    padding-top: 10px;
    text-align: center;
    border-top: 1px solid var(--grey-border-40);
}

/* testimonial large */

.testimonials .item-testimonial-large .item-testimonial__inner {
    padding: 60px 80px 60px 40px;
    display: grid;
    grid-template-columns: 387px 1fr;
    align-items: center;
    gap: 135px;
}

.item-testimonial__author-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 88px;
}

.testimonials .item-testimonial-large .item-testimonial__author {
    margin: 0px;
    padding: 20px 0px 0px;
    border-top: 1px solid var(--grey-border);
}

.testimonials .item-testimonial-large .item-testimonial__author-logo {
    margin-top: 0px;
}

.testimonials .item-testimonial-large .item-testimonial__author-logo-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.testimonials .item-testimonial-large .item-testimonial__author,
.testimonials .item-testimonial-large .item-testimonial__author-logo {
    justify-content: center;
}

.testimonials .item-testimonial-large .item-testimonial__author-logo-image img {
    max-width: 220px;
    width: 100%;
    height: auto;
    max-height: 48px;
    object-fit: contain;
}

.testimonials .item-testimonial-large .item-testimonial__text-container {
    position: relative;
}

.testimonials .item-testimonial-large .item-testimonial__text-container::before {
    content: "";
    position: absolute;
    top: 40px;
    left: -60px;
    width: 20px;
    height: 20px;
    display: block;
    background: url('/wp-content/plugins/inst-elementor/widgets/testimonials/images/testimonial-quote.svg') no-repeat center / contain;
}

.testimonials .item-testimonial-large .item-testimonial__text-inner {
    margin: 0px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.testimonials .item-testimonial-large .item-testimonial__text-inner .item-testimonial__text-rating,
.item-testimonial__text-rating-mob {
    display: block;
    width: 120px;
    height: 16px;
    max-width: 120px;
    max-height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.item-testimonial__text-rating-mob {
    display: none;
}

.testimonials .item-testimonial-large .item-testimonial__text-container .item-testimonial__text-actions {
    margin: 40px 0px 0px;
    padding: 10px 0px 0px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    border-top: 1px solid var(--grey-border);
}

.item-testimonial__video.button {
    justify-content: flex-start;
}

.item-testimonial__case-study.button {
    grid-column: 2;
    justify-content: flex-end;
}

@media (max-width: 1199px) and (min-width: 1024px) {
    .testimonials .item-testimonial__inner {
        padding: 50px 30px 10px;
    }
    /* testimonial large */
    .testimonials .item-testimonial-large .item-testimonial__inner {
        padding: 40px;
        grid-template-columns: 300px 1fr;
        gap: 60px;
    }
    .testimonials .item-testimonial-large .item-testimonial__text-container::before {
        left: -40px;
    }
}

@media (max-width: 1023px) {
    .testimonials {
        overflow: visible;
    }

    .testimonials .testimonials__title:not(.heading-with-star) {
        margin-left: 0;
    }

    .testimonials .testimonials__description {
        margin-left: 0;
    }
    .testimonials .testimonials__items.swiper {
        margin-inline: calc((100% - 100vw) / 2) !important;
        padding-inline: calc((100vw - 100%) / 2) !important;
    }
    .testimonials .testimonials__slider:not(.is-slider) .testimonials__item {
        width: 440px;
    }
    /* Testimonial large */
    .testimonials .item-testimonial-large .item-testimonial__inner {
        padding: 40px;
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        align-items: stretch;
        gap: 20px;
        height: 100%;
    }
    .testimonials .testimonials__slider .swiper-wrapper {
        align-items: stretch;
    }
    .testimonials .item-testimonial-large.testimonials__item {
        height: auto;
    }
    .item-testimonial__author-container {
        gap: 40px;
        align-items: flex-start;
        width: 100%;
        flex-shrink: 0;
    }
    .testimonials .item-testimonial-large .item-testimonial__author {
        padding: 0px;
        border: 0px;
        justify-content: flex-start;
    }
    .testimonials .item-testimonial-large .item-testimonial__author-logo {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 14px;
        min-height: 48px;
    }
    .testimonials .item-testimonial-large .item-testimonial__author-logo-image {
        flex: 1 1 auto;
        justify-content: flex-start;
        min-width: 0;
        min-height: 48px;
    }
    .testimonials .item-testimonial-large .item-testimonial__author-logo-image img {
        max-width: 120px;
        max-height: 48px;
    }
    .testimonials .item-testimonial-large .item-testimonial__text-container {
        position: initial;
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
    }
    .testimonials .item-testimonial-large .item-testimonial__text {
        flex: 1 1 auto;
    }
    .testimonials .item-testimonial-large .item-testimonial__text-inner .item-testimonial__text-rating,
    .testimonials .item-testimonial-large .item-testimonial__text-container::before {
        display: none;
    }
    .item-testimonial__text-rating-mob {
        display: block;
        width: 120px;
        height: 16px;
        margin-left: auto;
    }
    .testimonials .item-testimonial-large .item-testimonial__text-inner {
        gap: 0px;
    }
    .testimonials .item-testimonial-large .item-testimonial__text-container .item-testimonial__text-actions {
        margin: 20px 0px 0px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 20px;
        /* Reserve space for up to 2 stacked links */
        min-height: calc(2 * 1.2em + 20px + 10px);
        flex-shrink: 0;
    }
}

@media (max-width: 767px) {
    .testimonials {
        padding-block: 50px;
    }
    .testimonials__title-container .testimonials__title-bg {
        left: 35%;
        height: 300px;
        transform: none;
    }
    .testimonials .testimonials__title--split .testimonials__title-video-wrap {
        top: 6px;
        left: 2px;
    }
    .testimonials .testimonials__title--split .testimonials__title-video {
        width: 45px;
        height: 45px;
    }
    .testimonials__title-video-icon {
        width: 196px;
        height: 196px;
    }

    .testimonials__title-video-icon-inner {
        width: 132px;
        height: 132px;
    }

    .testimonials__title-video-icon-inner-icon {
        width: 84px;
        height: 84px;
    }

    .testimonials .testimonials__description:not(:first-child) {
        margin-top: 30px;
    }

    .testimonials .testimonials__description br {
        display: none;
    }
    
    .testimonials .testimonials__slider:not(.is-slider) .testimonials__item {
        width: 100%;
    }

    .testimonials .testimonials__slider:not(:first-child) {
        margin-top: 50px;
    }

    .testimonials .item-testimonial__inner {
        padding: 20px 20px 10px;
    }
    /* Testimonial large */
    .testimonials .item-testimonial-large .item-testimonial__inner {
        padding: 20px;
        align-items: flex-start;
    }
    .item-testimonial__author-container {
        gap: 40px;
    }
    .testimonials .item-testimonial-large .item-testimonial__author-logo-image img {
        max-width: 109px;
    }
    .testimonials .item-testimonial-large .item-testimonial__text-container .item-testimonial__text-actions {
        gap: 10px;
        min-height: calc(2 * 1.2em + 10px + 10px);
    }
    .testimonials .item-testimonial-large .item-testimonial__text-container .item-testimonial__text-actions .button.button-link {
        gap: 10px;
    }
    .testimonials__slider .swiper-controls {
        margin: 50px auto 0px;
    }
}

@media (max-width: 375px) {
    .testimonials .item-testimonial-large .item-testimonial__inner {
        padding: 30px 14px 14px;
    }
    .testimonials .item-testimonial-large .item-testimonial__author-logo-image img {
        max-width: 98px;
    }
}