/*
 * Video Testimonials Carousel
 * Loaded only on the Testimonials page template.
 *
 * Design tokens are chosen to match the site's existing home-testimonials
 * treatment (see custom/templates/page-home.scss):
 *   Primary green:   #36b424 ($baseThirdly)
 *   Secondary text:  #22231F ($almostBlack)
 *   Card background: #f7f7f7
 *   Title font:      "Big Shoulders"
 *   Body font:       "Inter"
 */

.video-testimonials {
    padding: 48px 0 32px;
}

.video-testimonials-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.video-testimonials-header {
    text-align: center;
    margin-bottom: 32px;
}

.video-testimonials-eyebrow {
    display: inline-block;
    font-family: "Big Shoulders", "Big Shoulders Fallback", sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #36b424;
    padding: 6px 20px;
    border: 2px solid #36b424;
    border-radius: 999px;
    margin-bottom: 16px;
}

.video-testimonials-title {
    font-family: "Big Shoulders", "Big Shoulders Fallback", sans-serif;
    font-size: 56px;
    font-style: italic;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.5px;
    color: #22231F;
    margin: 0;
}

.video-testimonials-title span {
    color: #36b424;
}

.video-testimonials-carousel {
    position: relative;
    overflow: hidden;
    padding: 8px;
}

.video-testimonials-carousel .swiper-wrapper {
    align-items: stretch;
}

.video-testimonials-carousel .swiper-slide {
    height: auto;
}

.video-testimonial-card {
    background: #f7f7f7;
    border: 1px solid #36b424;
    border-radius: 15px 0 31px 0;
    padding: 12px 12px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 8px 0 rgba(34, 60, 80, 0.08);
}

.video-testimonial-thumb {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    background: #000;
    border: 0;
    border-radius: 12px 0 24px 0;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    line-height: 0;
}

.video-testimonial-thumb:focus-visible {
    outline: 3px solid #36b424;
    outline-offset: 3px;
}

.video-testimonial-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

.video-testimonial-thumb:hover img,
.video-testimonial-thumb:focus-visible img {
    transform: scale(1.03);
    opacity: 0.92;
}

.video-testimonial-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35));
    transition: transform 0.25s ease;
}

.video-testimonial-thumb:hover .video-testimonial-play,
.video-testimonial-thumb:focus-visible .video-testimonial-play {
    transform: translate(-50%, -50%) scale(1.08);
}

.video-testimonial-play svg {
    width: 100%;
    height: 100%;
    display: block;
}

.video-testimonial-caption {
    padding: 16px 8px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-testimonial-name {
    font-family: "Big Shoulders", "Big Shoulders Fallback", sans-serif;
    font-size: 24px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.2px;
    color: #22231F;
}

.video-testimonial-role {
    font-family: "Inter", sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #4872d1;
    letter-spacing: 0.2px;
}

/* Active-video iframe replaces the thumb when clicked */
.video-testimonial-card.is-playing .video-testimonial-thumb {
    display: none;
}

.video-testimonial-iframe-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px 0 24px 0;
    overflow: hidden;
    background: #000;
}

.video-testimonial-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Controls (arrows + pagination) */
.video-testimonials-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
}

.video-testimonials-controls .swiper-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #36b424;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.video-testimonials-controls .swiper-nav:hover,
.video-testimonials-controls .swiper-nav:focus-visible {
    background: #244692;
    transform: translateY(-1px);
    outline: none;
}

.video-testimonials-controls .swiper-nav:focus-visible {
    outline: 3px solid #4872d1;
    outline-offset: 2px;
}

.video-testimonials-controls .swiper-nav svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.video-testimonials-controls .swiper-nav.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.video-swiper-pagination.swiper-pagination {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
}

.video-swiper-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #d0d0d0;
    opacity: 1;
    transition: background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    border: 0;
    padding: 0;
    margin: 0 !important;
}

.video-swiper-pagination .swiper-pagination-bullet:hover {
    background: #4872d1;
}

.video-swiper-pagination .swiper-pagination-bullet-active {
    background: #36b424;
    transform: scale(1.15);
}

/* Tablet */
@media (max-width: 900px) {
    .video-testimonials {
        padding: 32px 0 24px;
    }

    .video-testimonials-title {
        font-size: 42px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .video-testimonials {
        padding: 24px 0 16px;
    }

    .video-testimonials-header {
        margin-bottom: 20px;
    }

    .video-testimonials-eyebrow {
        font-size: 13px;
        letter-spacing: 1.6px;
        padding: 5px 14px;
    }

    .video-testimonials-title {
        font-size: 32px;
        line-height: 1.1;
    }

    .video-testimonial-card {
        padding: 10px 10px 16px;
    }

    .video-testimonial-play {
        width: 60px;
        height: 60px;
    }

    .video-testimonial-name {
        font-size: 20px;
    }

    .video-testimonial-role {
        font-size: 13px;
    }

    .video-testimonials-controls {
        gap: 16px;
        margin-top: 20px;
    }

    .video-testimonials-controls .swiper-nav {
        width: 40px;
        height: 40px;
    }

    .video-testimonials-controls .swiper-nav svg {
        width: 18px;
        height: 18px;
    }
}
