/* ============================================
   Taif Tec - RTL Support
   Arabic right-to-left layout overrides
   ============================================ */

html[dir="rtl"], .rtl-body {
    font-family: 'Tajawal', 'Roboto', sans-serif;
    direction: rtl;
    text-align: right;
}

/* Navigation */
html[dir="rtl"] .top-nav { direction: rtl; }
html[dir="rtl"] .off-canvas__page { left: auto; right: 210px; padding-left: 0; padding-right: 160px; }
html[dir="rtl"] .side-bar { padding-left: 20px; padding-right: 20px; }
html[dir="rtl"] .off-canvas__page ul .counter { left: auto; right: -100px; }
html[dir="rtl"] .off-canvas__page ul li a { padding: 20px 30px 20px 0; }
html[dir="rtl"] .off-canvas__page:before { left: auto; right: 160px; }
html[dir="rtl"] #myLinks { direction: ltr; }
html[dir="rtl"] #myLinks .side-bar { direction: rtl; float: right; }
html[dir="rtl"] #myLinks .off-canvas__page { direction: rtl; left: 0; right: 210px; padding-left: 0; padding-right: 160px; }

/* Margins/Paddings flip */
html[dir="rtl"] .mr-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
html[dir="rtl"] .mr-2 { margin-right: 0 !important; margin-left: 0.5rem !important; }
html[dir="rtl"] .mr-3 { margin-right: 0 !important; margin-left: 1rem !important; }
html[dir="rtl"] .ml-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
html[dir="rtl"] .ml-2 { margin-left: 0 !important; margin-right: 0.5rem !important; }
html[dir="rtl"] .ml-5 { margin-left: 0 !important; margin-right: 3rem !important; }
html[dir="rtl"] .pr-3 { padding-right: 0 !important; padding-left: 1rem !important; }
html[dir="rtl"] .pl-3 { padding-left: 0 !important; padding-right: 1rem !important; }
html[dir="rtl"] .text-md-end { text-align: start !important; }

/* Product cards */
html[dir="rtl"] .product-card::before { left: auto; right: 50%; transform: translateX(50%); }

/* Off-canvas smaller screens — tablet */
@media (max-width: 991px) {
    html[dir="rtl"] .off-canvas__page { right: 0; left: 0; padding-right: 110px; padding-left: 0; }
    html[dir="rtl"] .off-canvas__page ul .counter { right: -77px; left: auto; }
    html[dir="rtl"] .off-canvas__page:before { right: 110px; left: auto; }
}

/* Mobile (≤767px): handled entirely in custom-enhancements.css to avoid conflict */

/* Language switcher in RTL */
html[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: 0; }

/* Breadcrumbs */
html[dir="rtl"] .breadcrumb-menu { direction: rtl; }

/* Forms */
html[dir="rtl"] .contact-form input,
html[dir="rtl"] .contact-form textarea {
    text-align: right;
    direction: rtl;
}

/* Footer */
html[dir="rtl"] .footer-social-link { margin-right: 0; margin-left: 8px; }
html[dir="rtl"] .contact-info-box { text-align: right; direction: rtl; }

/* Admin Panel RTL - not needed for front end */

/* Animations flip */
html[dir="rtl"] [data-aos="fade-right"] { transform: translateX(30px); }
html[dir="rtl"] [data-aos="fade-left"] { transform: translateX(-30px); }

/* Feature cards */
html[dir="rtl"] .feature-card { flex-direction: row-reverse; }
html[dir="rtl"] .feature-icon { text-align: right; }

/* WhatsApp & Dark Mode toggle */
html[dir="rtl"] .whatsapp-fab { right: auto; left: 30px; }
html[dir="rtl"] .dark-mode-toggle { right: auto; left: 30px; }

html[dir="rtl"] section{
	text-align:right;
}
html[dir="rtl"] .bottom-arrow-sec7{
	float:left;
}

@media (max-width: 767px) {
    html[dir="rtl"] .whatsapp-fab { left: 20px; right: auto; }
    html[dir="rtl"] .dark-mode-toggle { left: 20px; right: auto; }
}

/* Social links */
html[dir="rtl"] .social-icon-link { margin-right: 0; margin-left: 8px; }

/* ---- Owl Carousel RTL fixes ---- */
html[dir="rtl"] .owl-carousel { direction: rtl; }
html[dir="rtl"] .owl-carousel .owl-stage { direction: rtl; }
html[dir="rtl"] .owl-carousel.owl-rtl .owl-item { float: right; }

/* Partner logos in RTL - centre align */
html[dir="rtl"] #owl-carousel-partnerlogo .item,
html[dir="rtl"] #owl-carousel-partnerlogo1 .item {
    display: flex;
    align-items: center;
    justify-content: center;
    direction: ltr; /* logos should not be mirrored */
}

/* Client carousels in RTL */
html[dir="rtl"] #owl-carousel-clientlogo-1 .item,
html[dir="rtl"] #owl-carousel-clientlogo-2 .item,
html[dir="rtl"] #owl-carousel-clientlogo-resp .item {
    display: flex;
    align-items: center;
    justify-content: center;
}
