
.bx-wrapper:has(.rw-testimonial-carousel),
.bx-wrapper:has(.rw-video-carousel) {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.bx-wrapper:has(.rw-testimonial-carousel) .bx-controls-direction :is(a, button),
.bx-wrapper:has(.rw-video-carousel) .bx-controls-direction :is(a, button) {
    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    width: var(--video-arrow-size);
    height: var(--video-arrow-size);
    background: none;

    text-indent: 0;
    font-size: 0;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--brand-dark);
    transition: var(--transition-base);

    z-index: 1;
}

.bx-wrapper:has(.rw-testimonial-carousel) .bx-controls-direction :is(a, button)::before,
.bx-wrapper:has(.rw-video-carousel) .bx-controls-direction :is(a, button)::before {
    font-family: "Font Awesome 7 Free", "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    font-size: 0.875rem;
    line-height: 1;
}

.bx-wrapper:has(.rw-testimonial-carousel) .bx-prev::before,
.bx-wrapper:has(.rw-video-carousel) .bx-prev::before { content: "\f053"; }

.bx-wrapper:has(.rw-testimonial-carousel) .bx-next::before,
.bx-wrapper:has(.rw-video-carousel) .bx-next::before { content: "\f054"; }

.bx-wrapper:has(.rw-testimonial-carousel) .bx-controls-direction :is(a, button):hover,
.bx-wrapper:has(.rw-video-carousel) .bx-controls-direction :is(a, button):hover,
.bx-wrapper:has(.rw-testimonial-carousel) .bx-controls-direction :is(a, button):focus-visible,
.bx-wrapper:has(.rw-video-carousel) .bx-controls-direction :is(a, button):focus-visible {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.bx-wrapper:has(.rw-video-carousel) .bx-controls-direction :is(a, button) {
    top: auto;
    bottom: calc((var(--video-arrow-size) + var(--video-arrow-gap)) * -1);
    margin-top: 0;
}

.bx-wrapper:has(.rw-video-carousel) .bx-controls-direction .bx-prev {
    left: auto;
    right: calc(var(--video-arrow-size) + 12px);
}

.bx-wrapper:has(.rw-video-carousel) .bx-controls-direction .bx-next { right: 0; }

.bx-wrapper:has(.rw-video-carousel) .bx-controls-direction :is(a, button).disabled {
    opacity: 1;
    cursor: pointer;
}

.rw-video-card {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--video-card-bg);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--rw-small-radius);
}

.rw-video-card:hover,
.rw-video-card:focus-visible { color: var(--white); text-decoration: none; }

.rw-video-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.rw-video-card__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rw-video-card::before,
.rw-video-card::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
}

.rw-video-card::before {
    width: var(--video-play-size);
    height: var(--video-play-size);
    margin: calc(var(--video-play-size) / -2) 0 0 calc(var(--video-play-size) / -2);
    border-radius: 50%;
    background-color: var(--white);
    transition: transform var(--header-transition);
    opacity: 0.7;
}

.rw-video-card::after {
    margin: -9px 0 0 -5px;
    border-left: 16px solid var(--black);
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
}

.rw-video-card:hover::before,
.rw-video-card:focus-visible::before { transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
    .rw-video-card::before { transition: none; }
}

.rw-video-card__title {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 1;
    padding: var(--video-title-padding);

    padding-top: calc(var(--video-title-padding) * 2);
    background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.55));
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rw-video-popup .mfp-close {
    top: -44px;
    right: -44px;
    width: 44px;
    padding-right: 0;
    text-align: center;
    color: var(--white);
    opacity: 0.85;
}

.rw-video-popup .mfp-close:hover,
.rw-video-popup .mfp-close:focus-visible { opacity: 1; }

.rw-video-grid {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
    .rw-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .rw-video-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
