/**
 * RTL (Right-to-Left) CSS for Arabic Language Support
 * This file contains styles to properly display Arabic text in RTL format
 */

/* Set the direction for HTML and body when in RTL mode */
html[dir="rtl"],
body[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'DM Sans', sans-serif;
}

/* Set Arabic font for all text elements */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] p,
html[dir="rtl"] a,
html[dir="rtl"] span,
html[dir="rtl"] li,
html[dir="rtl"] input,
html[dir="rtl"] button,
html[dir="rtl"] label,
html[dir="rtl"] textarea {
    font-family: 'Cairo', 'DM Sans', sans-serif;
}

/* Navigation menu adjustments */
html[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

html[dir="rtl"] .dropdown-menu {
    text-align: right;
}

html[dir="rtl"] .navbar-nav .nav-link {
    padding-right: 0;
    padding-left: 1rem;
}

/* Adjust margins and paddings for RTL */
html[dir="rtl"] .ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] .mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

html[dir="rtl"] .text-left {
    text-align: right !important;
}

html[dir="rtl"] .text-right {
    text-align: left !important;
}

/* Adjust float for RTL */
html[dir="rtl"] .float-left {
    float: right !important;
}

html[dir="rtl"] .float-right {
    float: left !important;
}

/* Adjust grid layout for RTL */
@media (min-width: 576px) {
    html[dir="rtl"] .offset-sm-1 {
        margin-left: 0;
        margin-right: 8.333333%;
    }
    html[dir="rtl"] .offset-sm-2 {
        margin-left: 0;
        margin-right: 16.666667%;
    }
}

/* Fix list styles for RTL */
html[dir="rtl"] ul, 
html[dir="rtl"] ol {
    padding-right: 1.5rem;
    padding-left: 0;
}

/* Fix form elements for RTL */
html[dir="rtl"] .form-group label {
    text-align: right;
}

html[dir="rtl"] .form-check-input {
    margin-right: 0;
    margin-left: 0.3rem;
}

/* Fix icons for RTL */
html[dir="rtl"] .fa, 
html[dir="rtl"] .fas {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Breadcrumbs RTL fix */
html[dir="rtl"] .breadcrumbs .separator {
    transform: rotate(180deg);
}

/* Hero sections text alignment for RTL */
html[dir="rtl"] .hero-content, 
html[dir="rtl"] .services-hero-content,
html[dir="rtl"] .products-hero-content,
html[dir="rtl"] .press-release-hero-content {
    text-align: right;
}

/* Card alignments for RTL */
html[dir="rtl"] .service-card,
html[dir="rtl"] .service-card-modern,
html[dir="rtl"] .product-card {
    text-align: right;
}

/* Contact form RTL adjustments */
html[dir="rtl"] .contact-form-block {
    text-align: right;
}

/* Footer RTL adjustments */
html[dir="rtl"] .footer-links,
html[dir="rtl"] .footer-social {
    text-align: right;
}

html[dir="rtl"] .footer-links-group {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-about {
    text-align: right;
}

html[dir="rtl"] .footer-socials a {
    margin-right: 0;
    margin-left: 15px;
}

html[dir="rtl"] .footer-branding-logos img {
    margin-right: 0;
    margin-left: 10px;
}

html[dir="rtl"] .footer-links ul li {
    padding-right: 0;
    padding-left: 0;
}

html[dir="rtl"] .footer-links ul li:before {
    content: '\f053'; /* FontAwesome chevron-left instead of right */
    margin-right: 0;
    margin-left: 8px;
}

html[dir="rtl"] .google-rating-link {
    flex-direction: row-reverse;
}

html[dir="rtl"] .google-rating-stars {
    margin-right: 0;
    margin-left: 5px;
}

/* Press releases RTL adjustments */
html[dir="rtl"] .press-release-content {
    text-align: right;
}

/* Fix button icons in RTL */
html[dir="rtl"] .btn i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Phone numbers and emails in RTL should still display LTR */
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"] {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}
