/* Video Testimonials Elementor Widget Styles */

.vte-wrapper {
    width: 100%;
    position: relative;
    padding: 20px 0;
    overflow: hidden; /* Prevent horizontal scroll */
}

.vte-swiper {
    width: 100%;
    padding-bottom: 50px;
    overflow: hidden; /* Hide overflow to prevent horizontal scroll */
}

.vte-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
    transform: translate3d(0, 0, 0); /* Force hardware acceleration */
}

/* Desktop: Ensure proper sizing for slides */
@media (min-width: 768px) {
    .vte-swiper {
        overflow: hidden; /* Hide overflow to prevent showing all slides */
        padding-left: 0;
        padding-right: 0;
    }
    
    .vte-swiper .swiper-slide {
        /* Let Swiper calculate width, but ensure minimum */
        min-width: 0;
        padding: 0 !important;
        /* Swiper will add margin-right via spaceBetween */
    }
    
    /* Ensure cards don't overlap - Swiper handles spacing via spaceBetween */
    .vte-swiper .swiper-wrapper {
        margin-left: 0;
        margin-right: 0;
        padding: 0;
    }
}

.vte-swiper .swiper-slide {
    height: auto;
    display: flex;
    flex-shrink: 0;
    box-sizing: border-box;
    /* Let Swiper calculate width (do NOT override with !important) */
    width: auto;
}

.homeTestimonials__card {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(26, 95, 95, 0.15); /* Dark teal shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    height: 100%;
    margin: 0 !important; /* Ensure no margin that could interfere with Swiper spacing */
    box-sizing: border-box;
}

/* Desktop: Larger cards with better sizing */
@media (min-width: 768px) {
    .homeTestimonials__card {
        /* Cards will be sized by Swiper based on 4.5 slides per view */
        min-width: 320px;
    }
    
    /* Larger cards on bigger screens */
    @media (min-width: 1200px) {
        .homeTestimonials__card {
            min-width: 360px;
        }
    }
}

.homeTestimonials__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(26, 95, 95, 0.3); /* Dark teal shadow */
    border: 2px solid #a8e63f; /* Lime green border on hover */
}

.homeTestimonials__card--video {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* 3:4 Aspect Ratio - more compact, better UX */
    background: #1a5f5f; /* Dark teal background */
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    cursor: pointer;
    max-height: 500px; /* Maximum height for better UX */
}

/* Desktop: Adjust aspect ratio and size */
@media (min-width: 768px) {
    .homeTestimonials__card--video {
        padding-top: 120%; /* Slightly wider on desktop */
        max-height: 450px;
    }
}

/* Mobile: More compact */
@media (max-width: 767px) {
    .homeTestimonials__card--video {
        padding-top: 140%; /* Slightly taller on mobile */
        max-height: 400px;
    }
}

.homeTestimonials__card--video .thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
    overflow: hidden;
}

.homeTestimonials__card--video .thumbnail::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    /* Bottom -> top: 60% black to 0% */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 60%);
}

.homeTestimonials__card--video .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.homeTestimonials__card--video .videoWrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.homeTestimonials__card--video.playing .videoWrapper {
    opacity: 1;
    z-index: 3;
}

.homeTestimonials__card--video.playing .thumbnail {
    opacity: 0;
    pointer-events: none;
}

.homeTestimonials__card--video .testimonial-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.homeTestimonials__card--video .youtube-video {
    width: 100%;
    height: 100%;
    border: none;
}

.homeTestimonials__card--logo {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 4;
    pointer-events: none;
    flex-wrap: wrap;
    gap: 10px;
}

.homeTestimonials__card--logo .btnWrapper {
    background: rgba(26, 95, 95, 0.9); /* Dark teal */
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: background 0.3s ease, transform 0.2s ease;
    padding: 0;
    position: relative;
}

.homeTestimonials__card--logo .btnWrapper:hover {
    background: rgba(26, 95, 95, 1); /* Dark teal solid */
    transform: scale(1.1);
}

.homeTestimonials__card--logo .btnWrapper img {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    filter: brightness(0) invert(1); /* Make icons white */
}

.homeTestimonials__card--logo .btnWrapper .playIcon {
    opacity: 1;
    display: block;
}

.homeTestimonials__card--logo .btnWrapper .pauseIcon {
    opacity: 0;
    display: none;
}

.homeTestimonials__card.playing .btnWrapper .playIcon {
    opacity: 0;
    display: none;
}

.homeTestimonials__card.playing .btnWrapper .pauseIcon {
    opacity: 1;
    display: block;
}

.homeTestimonials__card--logo .company-logo {
    max-width: 150px;
    max-height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.homeTestimonials__card--titleWrapper {
    padding: 20px;
    background: #fff;
    border-radius: 0 0 20px 20px;
}

.homeTestimonials__card--titleWrapper .title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

/* Swiper Navigation */
.vte-swiper .swiper-button-next,
.vte-swiper .swiper-button-prev {
    color: #1a5f5f; /* Dark teal */
    background: rgba(168, 230, 63, 0.9); /* Lime green */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.vte-swiper .swiper-button-next:hover,
.vte-swiper .swiper-button-prev:hover {
    background: rgba(168, 230, 63, 1); /* Lime green solid */
    transform: scale(1.1);
}

.vte-swiper .swiper-button-next::after,
.vte-swiper .swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
}

/* Swiper Pagination */
.vte-swiper .swiper-pagination {
    bottom: 0;
}

.vte-swiper .swiper-pagination-bullet {
    background: #1a5f5f; /* Dark teal */
    opacity: 0.3;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.vte-swiper .swiper-pagination-bullet-active {
    background: #a8e63f; /* Lime green */
    opacity: 1;
    width: 30px;
    border-radius: 5px;
}

/* Mobile: keep desktop sizing/layout, but show exactly 1 card (Swiper handles the slide) */
@media (max-width: 767px) {
    /* Ensure Swiper can enforce single-slide width */
    .vte-swiper .swiper-slide {
        width: 100% !important;
        max-width: 100%;
    }

    /* Match desktop wrapper/card spacing */
    .vte-wrapper {
        padding: 20px 0;
    }

    .homeTestimonials__card {
        border-radius: 20px;
    }

    .homeTestimonials__card--video {
        /* Match desktop feel (avoid portrait overrides making it too tall) */
        padding-top: 120%;
        max-height: 450px;
        border-radius: 20px 20px 0 0;
    }

    .homeTestimonials__card--logo {
        bottom: 80px;
        left: 20px;
        right: 20px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .homeTestimonials__card--logo .btnWrapper {
        width: 50px;
        height: 50px;
        order: 0;
        align-self: auto;
    }

    .homeTestimonials__card--logo .btnWrapper img {
        width: 24px;
        height: 24px;
    }

    .homeTestimonials__card--logo .company-logo {
        max-width: 150px;
        max-height: 52px;
        order: 0;
    }

    .homeTestimonials__card--titleWrapper {
        padding: 20px;
    }

    .homeTestimonials__card--titleWrapper .title {
        font-size: 18px;
    }
}

/* Tablet Optimization */
@media (min-width: 769px) and (max-width: 1024px) {
    .homeTestimonials__card--logo {
        bottom: 70px;
    }
}

/* Note: orientation-based overrides removed to keep 1:1 layout with desktop on mobile. */

