/* ===================================
   Testimonials Section - Enhanced Version with RTL Support
   =================================== */

/* الـ Owl Carousel - إعدادات أساسية */
#testimonial-carousel {
    position: relative;
    width: 100%;
    display: block;
    opacity: 1;
}

/* الكاردات - أساسي */
#testimonial-carousel .owl-item {
    opacity: 1;
    display: block;
}

#testimonial-carousel .item {
    margin-bottom: 30px;
    width: 100%;
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Owl carousel wrapper */
#testimonial-carousel .owl-stage-outer {
    overflow: hidden;
    position: relative;
}

#testimonial-carousel .owl-stage {
    display: flex;
    transition: all 0.6s ease;
}

/* في حالة owl-carousel مش شغال - نعرض الكاردات كلها */
#testimonial-carousel:not(.owl-loaded) .item {
    display: block;
    width: 100%;
    margin-bottom: 30px;
}

/* الكارد نفسه - الخلفية البيضاء */
#testimonial-carousel .item .bg-white {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 20px;
}

/* Quote Icon */
#testimonial-carousel .item .icofont-quote-left {
    position: absolute;
    color: #2C5F8D;
    opacity: 0.3;
    font-size: 32px;
    top: 40px;
}

/* RTL Support for Quote Icon */
html[dir="rtl"] #testimonial-carousel .item .icofont-quote-left {
    right: 40px;
    left: auto;
}

html[dir="ltr"] #testimonial-carousel .item .icofont-quote-left {
    left: 40px;
    right: auto;
}

/* النص داخل الكارد */
#testimonial-carousel .item p {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

html[dir="rtl"] #testimonial-carousel .item .ps-5 {
    padding-right: 3rem;
    padding-left: 0;
}

html[dir="ltr"] #testimonial-carousel .item .ps-5 {
    padding-left: 3rem;
    padding-right: 0;
}

/* النجوم */
#testimonial-carousel .de-rating-ext {
    display: flex;
    align-items: center;
}

#testimonial-carousel .de-rating-ext .d-stars {
    display: flex;
    gap: 2px;
}

#testimonial-carousel .de-rating-ext .d-stars i {
    color: #FFD700;
    font-size: 14px;
}

#testimonial-carousel .testimonial-rating {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

html[dir="rtl"] #testimonial-carousel .testimonial-rating {
    margin-right: 0.5rem;
    margin-left: 0;
}

html[dir="ltr"] #testimonial-carousel .testimonial-rating {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* صورة واسم العميل */
#testimonial-carousel .d-flex {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

#testimonial-carousel .d-flex img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

html[dir="rtl"] #testimonial-carousel .d-flex img {
    margin-left: 15px;
    margin-right: 0;
}

html[dir="ltr"] #testimonial-carousel .d-flex img {
    margin-right: 15px;
    margin-left: 0;
}

#testimonial-carousel .text-dark {
    color: #333;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
}

#testimonial-carousel small {
    color: #888;
    font-size: 13px;
}

/* زرار Navigation */
.de-custom-nav {
    display: flex;
    gap: 10px;
}

html[dir="ltr"] .de-custom-nav {
    justify-content: flex-end;
}

html[dir="rtl"] .de-custom-nav {
    justify-content: flex-start;
}

.de-custom-nav .d-prev,
.de-custom-nav .d-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.de-custom-nav .d-prev::before,
.de-custom-nav .d-next::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    display: block;
}

/* LTR Arrows */
html[dir="ltr"] .de-custom-nav .d-prev::before {
    transform: rotate(-135deg);
    margin-left: 3px;
}

html[dir="ltr"] .de-custom-nav .d-next::before {
    transform: rotate(45deg);
    margin-right: 3px;
}

/* RTL Arrows */
html[dir="rtl"] .de-custom-nav .d-prev::before {
    transform: rotate(45deg);
    margin-right: 3px;
}

html[dir="rtl"] .de-custom-nav .d-next::before {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.de-custom-nav .d-prev:hover,
.de-custom-nav .d-next:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Owl Carousel RTL Support */
html[dir="rtl"] #testimonial-carousel.owl-carousel .owl-stage {
    direction: rtl;
}

html[dir="rtl"] #testimonial-carousel.owl-carousel .owl-item {
    direction: rtl;
    float: right;
}

/* Owl Carousel Classes - لو شغال */
.owl-carousel.owl-loaded {
    display: block;
    opacity: 1;
}

.owl-carousel.owl-loaded .item {
    opacity: 1;
    display: block;
}

.owl-carousel .owl-stage {
    display: flex;
}

.owl-carousel .owl-item {
    opacity: 1;
}

/* Owl Dots RTL */
html[dir="rtl"] .owl-carousel .owl-dots {
    direction: rtl;
}

/* للموبايل */
@media (max-width: 768px) {
    #testimonial-carousel .item .bg-white {
        padding: 30px;
    }
    
    #testimonial-carousel .item p {
        font-size: 14px;
    }
    
    .de-custom-nav {
        justify-content: center;
        margin-top: 20px;
    }
}

@media (max-width: 575px) {
    #testimonial-carousel .item .bg-white {
        padding: 20px;
    }
    
    #testimonial-carousel .item .icofont-quote-left {
        font-size: 24px;
        top: 20px;
    }
    
    html[dir="ltr"] #testimonial-carousel .item .icofont-quote-left {
        left: 20px;
    }
    
    html[dir="rtl"] #testimonial-carousel .item .icofont-quote-left {
        right: 20px;
    }
    
    html[dir="rtl"] #testimonial-carousel .item .ps-5 {
        padding-right: 2rem;
    }
    
    html[dir="ltr"] #testimonial-carousel .item .ps-5 {
        padding-left: 2rem;
    }
}
