.testimonial-content {
    border-radius: 20px;
    background-color: var(--wp--preset--color--background-1);
    padding: var(--wp--preset--spacing--50);
    min-height: 450px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: var(--wp--preset--spacing--40);
    text-decoration: none;
}

@media(max-width: 780px) {
    .testimonial-content {
        min-height: 380px;
    }
}

.testimonial-content .content-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 4;
}

.testimonial-content .content-inner svg {
    min-width: 56px;
    width: 100%;
    max-width: 56px;
    aspect-ratio: 1;
    height: 100%;
}

.testimonial-content.has-image::before {
    content: '';
    border-radius: var(--radius--large, 20px);
    background: linear-gradient(167deg, rgba(161, 207, 101, 0.00) 65.97%, rgba(161, 207, 101, 0.40) 102.25%), linear-gradient(214deg, rgba(17, 15, 14, 0.00) 27.72%, #110F0E 86.58%), transparent;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.testimonial-content p {
    margin: 0;
}

.testimonial-content.has-image p {
    color: #fff;
    z-index: 9;
    position: relative;
}

/* Video popup (on body for full-page overlay) */
.custom-testimonial-block-content-popup,
.custom-testimonial-block-content .testimonial-video-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.custom-testimonial-block-content-popup[hidden],
.custom-testimonial-block-content .testimonial-video-popup[hidden] {
    display: none !important;
}

.custom-testimonial-block-content-popup .testimonial-video-popup-overlay,
.custom-testimonial-block-content .testimonial-video-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}

.custom-testimonial-block-content-popup .testimonial-video-popup-inner,
.custom-testimonial-block-content .testimonial-video-popup-inner {
    position: relative;
    width: 100%;
    max-width: 1360px;
    max-height: 90vh;
    z-index: 1;
}

.custom-testimonial-block-content-popup .testimonial-video-popup-close,
.custom-testimonial-block-content .testimonial-video-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border: 0;
    background: #fff;
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-testimonial-block-content-popup .testimonial-video-popup-content,
.custom-testimonial-block-content .testimonial-video-popup-content {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.custom-testimonial-block-content-popup .testimonial-video-popup-content iframe,
.custom-testimonial-block-content .testimonial-video-popup-content iframe {
    width: 100%;
    height: 100%;
    vertical-align: top;
}

.custom-testimonial-block-content-popup .testimonial-video-popup-content > div[style*="padding:56.25%"],
.custom-testimonial-block-content .testimonial-video-popup-content > div[style*="padding:56.25%"] {
    width: 100%;
    max-width: 100%;
}

.custom-testimonial-block-content-popup .testimonial-video-popup-content > div[style*="padding:56.25%"] iframe,
.custom-testimonial-block-content .testimonial-video-popup-content > div[style*="padding:56.25%"] iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.custom-testimonial-block-content-popup .testimonial-video-popup-content figure,
.custom-testimonial-block-content .testimonial-video-popup-content figure {
    margin: 0;
    width: 100%;
    max-height: 90vh;
    display: flex;
    justify-content: center;
}

.custom-testimonial-block-content-popup .testimonial-video-popup-content video,
.custom-testimonial-block-content .testimonial-video-popup-content video {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}