/* Application Slider RTL Fixes */

/* Slider section RTL */
.application-slider {
    direction: rtl !important;
}

.application-slider .container {
    direction: rtl !important;
}

/* Section title and description */
.application-slider .title h2 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    direction: rtl !important;
    text-align: right !important;
}

.application-slider .title p {
    font-family: 'Cairo', sans-serif !important;
    direction: rtl !important;
    text-align: right !important;
}

/* Swiper slider RTL */
.swiper.app-slider {
    direction: rtl !important;
}

.swiper-slide {
    direction: rtl !important;
    text-align: right !important;
}

.swiper-slide h3 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    direction: rtl !important;
    text-align: right !important;
}

.swiper-slide p {
    font-family: 'Cairo', sans-serif !important;
    direction: rtl !important;
    text-align: right !important;
    line-height: 1.7 !important;
}

/* Fix swiper navigation for RTL */
.swiper-button-next,
.swiper-button-prev {
    color: #333 !important;
    font-family: inherit !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-family: inherit !important;
    font-weight: 900 !important;
    content: '' !important; /* Remove default arrows since we use custom icons */
}

/* Specific tabler icons in navigation - ensure they display */
.swiper-button-next i.ti,
.swiper-button-prev i.ti {
    font-family: 'tabler-icons' !important;
    font-size: 1.2rem !important;
    display: inline-block !important;
}

/* RTL specific positioning - swap arrow positions */
.app-slider .swiper-button-next {
    left: 10px !important;
    right: auto !important;
}

.app-slider .swiper-button-prev {
    right: 10px !important;
    left: auto !important;
}

/* Fix arrow transforms for RTL */
.app-slider .avtar.swiper-button-next {
    transform: translatex(-150%) !important;
}

.app-slider .avtar.swiper-button-prev {
    transform: translatex(150%) !important;
}

/* Ensure images display correctly */
.swiper-slide img {
    max-width: 100% !important;
    height: auto !important;
    margin-bottom: 1rem !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force image display in slider */
.app-slider .swiper-slide img,
.app-slider .swiper-slide .slider-icon {
    width: auto !important;
    max-width: 280px !important;
    min-width: 180px !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto 1rem auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent !important;
    border: none !important;
    transform: scale(1.3) !important;
}

/* Ensure images are not replaced by text */
.app-slider .swiper-slide img:before,
.app-slider .swiper-slide img:after {
    display: none !important;
    content: none !important;
}

/* Icons in slider titles */
.swiper-slide h3 i {
    font-family: 'tabler-icons' !important;
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

/* Center the slider content */
.application-slider .text-center {
    text-align: center !important;
}

.application-slider .justify-content-center {
    justify-content: center !important;
}

/* Proper alignment for image and text */
.app-slider .swiper-slide {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 20px !important;
}

.app-slider .swiper-slide h3 {
    margin-top: 20px !important;
    margin-bottom: 15px !important;
}

.app-slider .swiper-slide p {
    margin-top: 0 !important;
    max-width: 300px !important;
    text-align: center !important;
}

/* Testimonials RTL styling */
.testaments-cards .card .testimonial-quote {
    text-align: right !important;
    direction: rtl !important;
    font-family: 'Cairo', sans-serif !important;
}

.testaments-cards .card .testimonial-name {
    text-align: right !important;
    direction: rtl !important;
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
}

.testaments-cards .card .testimonial-quote::before {
    right: -5px !important;
    left: auto !important;
}

.testaments-cards .card .testimonial-avatar {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

.testaments-cards .card .author-info {
    justify-content: flex-start !important;
    text-align: right !important;
}

/* Enhanced professional look */
.testaments-cards .card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid #e3e6f0 !important;
}

.testaments-cards .card:hover {
    border-color: #007bff !important;
}

/* Choose US Section RTL styling */
.choose-section {
    direction: rtl !important;
}

.choose-section .container {
    direction: rtl !important;
}

.choose-section h2 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    direction: rtl !important;
    text-align: right !important;
}

.choose-section .d-flex {
    flex-direction: row !important;
}

/* Updated for new layout: image first, title second, animated text last */
.choose-section .flex-shrink-0 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

.choose-section .flex-grow-1 {
    margin-left: 0 !important;
    margin-right: 1rem !important;
}

.choose-section .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

/* Choose slider RTL */
.swiper.choose-slider {
    direction: rtl !important;
}

.choose-slider .swiper-slide {
    direction: rtl !important;
    text-align: right !important;
}

.choose-slider .swiper-slide h2 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    direction: rtl !important;
    text-align: right !important;
    color: white !important;
}

/* Hand image positioning for RTL */
.choose-section .hand-img {
    transform: scaleX(-1) !important;
}

/* Section 4 (Offer/Innovation) RTL styling */
.row.g-4.text-center {
    direction: rtl !important;
}

.row.g-4.text-center .col-md-6.col-xl-4 {
    direction: rtl !important;
    text-align: center !important;
}

.row.g-4.text-center h3 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    direction: rtl !important;
    text-align: center !important;
}

.row.g-4.text-center p {
    font-family: 'Cairo', sans-serif !important;
    direction: rtl !important;
    text-align: center !important;
    line-height: 1.7 !important;
}

/* Section title for Section 4 */
.title .col-md-9.col-lg-6.text-center h2 {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    direction: rtl !important;
    text-align: center !important;
}

.title .col-md-9.col-lg-6.text-center p {
    font-family: 'Cairo', sans-serif !important;
    direction: rtl !important;
    text-align: center !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .application-slider .col-11 {
        padding: 0 1rem !important;
    }
    
    .swiper-slide h3 {
        font-size: 1.25rem !important;
    }
    
    .swiper-slide p {
        font-size: 0.95rem !important;
    }
    
    .testaments-cards {
        grid-template-columns: 1fr !important;
    }
    
    .testaments-cards .card {
        min-height: 250px !important;
    }
    
    .choose-section .d-flex {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .choose-section .flex-grow-1 {
        margin: 1rem 0 0 0 !important;
    }
}