/* RTL Support for ATPCC - Arabic Layout */

body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

/* Text alignment */
.text-left { text-align: right !important; }
.text-right { text-align: left !important; }
.text-end { text-align: start !important; }
.text-start { text-align: end !important; }
.text-md-end { text-align: start !important; }
.text-lg-end { text-align: start !important; }
.text-lg-center { text-align: center !important; }

/* Floats */
.f-right { float: left !important; }
.f-left { float: right !important; }
.float-end { float: left !important; }
.float-start { float: right !important; }

/* Margins */
.me-1, .me-2, .me-3, .me-4, .me-5 { margin-right: 0 !important; }
.me-1 { margin-left: 0.25rem !important; }
.me-2 { margin-left: 0.5rem !important; }
.me-3 { margin-left: 1rem !important; }
.me-4 { margin-left: 1.5rem !important; }
.me-5 { margin-left: 3rem !important; }

.ms-1, .ms-2, .ms-3, .ms-4, .ms-5 { margin-left: 0 !important; }
.ms-1 { margin-right: 0.25rem !important; }
.ms-2 { margin-right: 0.5rem !important; }
.ms-3 { margin-right: 1rem !important; }
.ms-4 { margin-right: 1.5rem !important; }
.ms-5 { margin-right: 3rem !important; }

/* Paddings */
.pe-0 { padding-left: 0 !important; padding-right: unset !important; }
.ps-0 { padding-right: 0 !important; padding-left: unset !important; }
.ps-1 { padding-right: 0.25rem !important; padding-left: unset !important; }
.ps-2 { padding-right: 0.5rem !important; padding-left: unset !important; }

/* Header */
.header-info a { margin-right: 0; margin-left: 34px; display: inline-flex; flex-direction: row-reverse; align-items: center; gap: 5px; }
.header-info a:last-child { margin-left: 0; }
.header-info a i { margin-right: 0; margin-left: 0; }
.header-right { float: left; }
.header-icon { float: left; }
.header-icon a { margin-right: 0; margin-left: 10px; }
.header-icon a:last-child { margin-left: 0; }
.header-lang { float: left; margin-left: 0; margin-right: 60px; }
.lang-icon > a { margin-left: 0; margin-right: 6px; }
.lang-icon i { left: auto; right: 2px; }
.header-lang-list { right: 0; left: auto; }
.header-button { margin-left: 0; margin-right: 40px; }

/* Navigation */
.main-menu nav > ul > li { margin-left: 0; margin-right: 28px; }
.main-menu nav > ul > li:first-child { margin-right: 0; }
.main-menu ul li { display: inline-block; }
.sub-menu { text-align: right !important; left: auto; right: 0; }
.sub-menu.text-left { text-align: right !important; }

/* Slider */
.slider-content { text-align: right; }
.slider-content h1 { letter-spacing: 0; }
.slider-content p { margin-right: 0; margin-left: 232px; }
.slider-video { text-align: start !important; }
.text-link { margin-left: 0; margin-right: 48px; }

/* Slider arrows - keep default positions, slick rtl:true handles behavior */

/* Section titles */
.section-title { text-align: right; }
.section-title.text-center { text-align: center !important; }
.sub-t-left { text-align: right; padding-left: 0; padding-right: 20px; }

/* Border decorations - mirror positions for RTL */
.border-left-1 { left: auto; right: -15px; }
.border-right-1 { right: auto; left: -15px; }
.b-sm-left-1 { left: auto; right: 0; }
.b-sm-left-2 { left: auto; right: 5px; }

/* Services */
.services-button i { margin-right: 5px; margin-left: 0; transform: scaleX(-1); }

/* Team */
.team-text { text-align: center; }
.team-icon a { margin-right: 0; margin-left: 15px; }
.team-icon a:last-child { margin-left: 0; }

/* Blog */
.blog-meta a, .blog-meta span { margin-left: 15px; margin-right: 0; }

/* Testimonial */
.testimonial-area { padding-top: 80px; }
.testimonial-wrapper::before { right: auto; left: 163px; }
.testimonial-text { text-align: right; }
.testimonial-text p { margin-right: 0; margin-left: 124px; }
.testimonial-img { margin-left: 0; margin-right: -28px; }
.testimonial-active .owl-nav div { left: auto; right: 0; }
.testimonial-active .owl-nav div.owl-prev { left: auto; right: 60px; }

/* Footer */
.footer-wrapper { text-align: right; }
.footer-title::before { left: auto; right: 0; }
.footer-title::after { left: auto; right: 25px; }
.fotter-menu li a { text-align: right; }
.contact-link li { display: flex; direction: rtl; }
.contact-address-icon { margin-left: 15px; margin-right: 0; }
.footer-news li { display: flex; direction: rtl; }
.footer-news-img { margin-left: 15px; margin-right: 0; }

/* Buttons - flip arrows */
.btn-text i,
.blog-button i,
.services-button i {
    transform: scaleX(-1);
    display: inline-block;
}

/* CTA */
.cta-button { text-align: start !important; }

/* Breadcrumb */
.breadcrumb-menu li::before {
    left: auto;
    right: -7px;
}

/* Service detail */
.services-sidebar .fotter-menu li a i {
    margin-right: 0;
    margin-left: 8px;
}
.service-description ul,
.service-description ol {
    padding-left: 0;
    padding-right: 20px;
}

/* Owl Carousel - keep LTR (no native RTL support) */
.owl-carousel {
    direction: ltr;
}
.owl-carousel .item,
.owl-carousel .owl-item {
    direction: rtl;
    text-align: right;
}

/* Slick - let it handle RTL natively via rtl:true JS option */
.slick-slide {
    text-align: right;
}

/* Swiper - keep LTR wrapper */
.swiper-container {
    direction: ltr;
}
.swiper-slide {
    direction: rtl;
    text-align: right;
}

/* Offcanvas - slide from left in RTL */
.offcanvas__area {
    right: auto;
    left: 0;
    transform: translateX(calc(-100% - 80px));
}
.offcanvas__area.info-open {
    transform: translateX(0);
}

/* Form elements */
input, textarea, select {
    text-align: right;
}

/* Counter */
.counter-wrapper { text-align: center; }

/* Newsletter */
.newsletter-form { direction: ltr; }
.newsletter-form input { direction: rtl; text-align: right; }

/* About */
.about-text { text-align: right; }
.about-content { text-align: right; }

/* Contact */
.contact-bg { direction: rtl; }
.form-box { text-align: right; }

/* Offset adjustments */
.offset-lg-2 { margin-right: 16.666667%; margin-left: 0; }
.offset-xl-2 { margin-right: 16.666667%; margin-left: 0; }
.offset-lg-3 { margin-right: 25%; margin-left: 0; }
.offset-xl-3 { margin-right: 25%; margin-left: 0; }

/* Fix topbar: hide phone & email on medium screens (match English responsive.css behavior) */
@media (min-width: 768px) and (max-width: 991px) {
    .header-ph { display: none !important; }
    .header-en { display: none !important; }
}

/* Slider responsive - mirror margin-right to margin-left */
@media (min-width: 992px) and (max-width: 1200px) {
    .slider-content p { margin-left: 0; }
}
@media (min-width: 768px) and (max-width: 991px) {
    .slider-content p { margin-left: 20px; margin-right: 0; }
}
@media (max-width: 767px) {
    .slider-content p { margin-left: 0; }
}

/* Dropdown */
.dropdown-menu { text-align: right; }
.dropdown-menu-end { right: auto !important; left: 0 !important; }
