/* RTL Specific Styles for Arabic Version */

/* Arabic Font Configuration */
body[dir="rtl"] {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.8;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 700;
    line-height: 1.4;
}

.display-4, .display-5 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 900;
}

/* Navigation RTL Adjustments */
.navbar-brand {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 600;
    padding: 0.75rem 1rem !important;
}

/* RTL Icon Adjustments */
.navbar-brand .fas {
    margin-left: 0.5rem;
    margin-right: 0;
}

.service-content .fas {
    margin-left: 0.5rem;
    margin-right: 0;
}

.contact-item .fas {
    margin-left: 0;
    margin-right: 0;
}

/* RTL Button Adjustments */
.btn .fas {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Hero Section RTL */
.hero-section h1 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 900;
    text-align: right;
}

.hero-section p {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 400;
    text-align: right;
    line-height: 1.8;
}

/* Feature Cards RTL */
.feature-card h4 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 700;
    text-align: center;
}

.feature-card p {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    text-align: center;
    line-height: 1.7;
}

/* Service Cards RTL */
.service-card {
    text-align: right;
}

.service-card h4 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 700;
    text-align: right;
}

.service-card p {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    text-align: right;
    line-height: 1.7;
}

.service-card ul {
    text-align: right;
    list-style: none;
    padding-right: 0;
}

.service-card ul li {
    text-align: right;
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

/* Quality Section RTL */
.certification-badge h5 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 700;
}

.certification-badge p {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

.stat-card h3 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 900;
}

.stat-card p {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

/* Testimonials RTL */
.testimonial-card p {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    text-align: right;
    line-height: 1.8;
    font-style: italic;
}

.testimonial-author h6 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 700;
    text-align: right;
}

.testimonial-author p {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    text-align: right;
}

/* Contact Info RTL */
.contact-item h6 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 700;
    text-align: right;
}

.contact-item p {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    text-align: right;
}

/* Section Headers RTL */
.text-center h2 {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 900;
}

.text-center .lead {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.8;
}

/* Footer RTL */
footer p {
    font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
    text-align: right;
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
        text-align: center;
    }
    
    .hero-section p {
        text-align: center;
    }
    
    .feature-card,
    .service-card,
    .testimonial-card {
        text-align: center;
    }
}

/* Arabic Number Styling */
.stat-card h3,
.testimonial-content .stars {
    direction: ltr;
    text-align: center;
}

/* Bootstrap RTL Overrides */
.me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* Text Direction for Mixed Content */
.contact-item p {
    direction: rtl;
    unicode-bidi: bidi-override;
}

/* Enhanced Arabic Typography */
body[dir="rtl"] {
    letter-spacing: 0.02em;
}

h1, h2, h3 {
    letter-spacing: 0.01em;
}

/* Icon Spacing for RTL */
.fas, .fab {
    margin-left: 0.25rem;
    margin-right: 0;
}

/* RTL List Styling */
.list-unstyled li {
    text-align: right;
    padding-right: 1.5rem;
}

/* Button Icon RTL */
.btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Social Links RTL */
.social-links {
    direction: ltr;
}

/* Map Container RTL */
.map-embed {
    direction: ltr;
}

/* RTL readability + mixed-script alignment */
[dir="rtl"] .contact-item p,
[dir="rtl"] .contact-item a,
[dir="rtl"] .website-info {
    unicode-bidi: plaintext;
}

[dir="rtl"] .stat-card h3,
[dir="rtl"] .case-metric h4,
[dir="rtl"] .testimonial-content .stars {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: center;
}

[dir="rtl"] .contact-item .me-3,
[dir="rtl"] .btn .me-2,
[dir="rtl"] .navbar-brand .me-2 {
    margin-left: .75rem !important;
    margin-right: 0 !important;
}


/* Premium footer RTL alignment */
[dir="rtl"] .footer-action { border-left: 0; border-right: 1px solid rgba(255,255,255,.1); padding-left: 0; padding-right: 1.65rem; }
[dir="rtl"] .footer-logo { flex-direction: row-reverse; }
[dir="rtl"] .footer-cta { flex-direction: row-reverse; }
@media (max-width: 991.98px) {
    [dir="rtl"] .footer-action { border-right: 0; padding-right: 0; }
}
