/**
 * Custom Testimonial Slider - Styles
 * Version: 1.0.0
 */

/* Main Wrapper */
.testimonial-slider-wrapper {
    position: relative;
}


.testimonial-slider-wrapper.hide-overflow .swiper {
    overflow: hidden;
}

/* Header Container */
.testimonial-header {
    display: flex;
    align-items: center;
}

/* Navigation Position - Top Left */
.testimonial-header.nav-top-left {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.testimonial-header.nav-top-left .testimonial-section-title {
    margin-left: auto;
}

/* Navigation Position - Top Center */
.testimonial-header.nav-top-center {
    flex-direction: column;
    align-items: center;
}

.testimonial-header.nav-top-center .testimonial-navigation {
    margin-top: 20px;
}

/* Navigation Position - Top Right */
.testimonial-header.nav-top-right {
    justify-content: space-between;
}

/* Navigation Position - Bottom Left */
.testimonial-header.nav-bottom-left {
    flex-direction: column-reverse;
    align-items: flex-start;
}

.testimonial-header.nav-bottom-left .testimonial-navigation {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Navigation Position - Bottom Center */
.testimonial-header.nav-bottom-center {
    flex-direction: column-reverse;
    align-items: center;
}

.testimonial-header.nav-bottom-center .testimonial-navigation {
    margin-top: 20px;
    margin-bottom: 0;
}

/* Navigation Position - Bottom Right */
.testimonial-header.nav-bottom-right {
    flex-direction: column-reverse;
    align-items: flex-end;
}
.testimonial-section-title {
    margin: 0;
}
.testimonial-header.nav-bottom-right .testimonial-navigation {
    margin-top: 0;
    margin-bottom: 20px;
}

.testimonial-header.nav-bottom-right .testimonial-section-title {
    width: 100%;
}

/* Navigation Buttons Container */
.testimonial-navigation {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Navigation Buttons */
.swiper-button-prev,
.swiper-button-next {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #E5E5E5;
    margin: 0;
}
.swiper-button-next {
    background-color: #2d2b39!important;
    color: #fff!important;
}
.swiper-button-prev:after,
.swiper-button-next:after {
    display: none;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    transform: scale(1.05);
}

.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Testimonial Card */
.testimonial-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* Active/Visible slide highlight */
.swiper-slide-active .testimonial-card {
    /* Active slide styling can be customized */
}

/* Quote Icon */
.quote-icon {
    line-height: 1;
    display: flex;
    align-items: center;
}

.quote-icon svg {
    width: 1em;
    height: 1em;
    display: block;
}

/* Testimonial Content */
.testimonial-content {
    flex-grow: 1;
    line-height: 1.6;
    margin: 0;
}

/* Reviewer Info Container */
.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Reviewer Image */
.reviewer-image {
    border-radius: 50%!important;
    object-fit: cover;
    flex-shrink: 0;
}

.reviewer-placeholder {
    background-color: #F5F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Reviewer Name */
.reviewer-name {
    margin: 0;
    font-weight: 600;
}

/* Swiper Slide */
.swiper-slide {
    height: auto;
    transition: opacity 0.3s ease;
}

/* Smooth loop transitions */
.swiper-wrapper {
    transition-timing-function: ease-in-out;
}

.swiper-slide-duplicate {
    opacity: 1;
}

/* Prevent flash during loop transition */
.testimonial-slider-wrapper .swiper {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .testimonial-header {
        align-items: flex-start;
    }

    .testimonial-header.nav-top-right .testimonial-navigation,
    .testimonial-header.nav-top-left .testimonial-navigation {
        margin-top: 20px;
    }

    .testimonial-header.nav-bottom-right .testimonial-navigation,
    .testimonial-header.nav-bottom-left .testimonial-navigation {
        margin-bottom: 20px;
        margin-top: 0;
    }

    .testimonial-navigation {
        width: 100%;
        justify-content: center;
    }
}

/* Elementor Editor Specific */
.elementor-widget-custom_testimonial_slider .elementor-widget-container {
    overflow: visible;
}

/* RTL Support */
.rtl .testimonial-header.nav-top-left {
    flex-direction: row;
}

.rtl .testimonial-header.nav-top-left .testimonial-section-title {
    margin-left: 0;
    margin-right: auto;
}

.rtl .reviewer-info {
    flex-direction: row-reverse;
}

/* Accessibility */
.swiper-button-prev:focus,
.swiper-button-next:focus {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

.swiper-button-prev:focus-visible,
.swiper-button-next:focus-visible {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .testimonial-navigation {
        display: none;
    }
    
    .swiper-wrapper {
        display: flex;
        flex-wrap: wrap;
    }
    
    .swiper-slide {
        width: 100% !important;
        page-break-inside: avoid;
    }
}