/* Arabic RTL Styles */
body,
html {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* RTL Adjustments */
.header-container {
    direction: rtl;
}

.logo-text-group {
    margin-left: 0;
    margin-right: 175px;
    text-align: right;
}

.logo-circle {
    left: auto;
    right: 10px;
}

.main-nav a {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
}

/* Force Right Alignment for Text */
.presentation-content p,
.aggregation-content p,
.hero-text,
.strengths-list li,
.logistics-list li,
.intro-paragraph,
.card-details p,
.card-details li {
    text-align: right;
    text-align-last: right;
}

/* Specific adjustments for RTL layout */
.header-actions {
    margin-left: 0 !important;
    margin-right: auto;
}

.strengths-box h3 {
    text-align: right !important;
    display: block !important;
}

.strengths-list li {
    padding-left: 0;
    padding-right: 30px;
}

.strengths-list li::before {
    left: auto;
    right: 0;
}

.logistics-list {
    margin: 15px 25px 25px 0;
}

.logistics-list li {
    padding-left: 0;
    padding-right: 20px;
}

.logistics-list li::before {
    left: auto;
    right: 0;
}

/* Force Left Alignment for Modal Inputs in Arabic */
.quotation-modal input,
.contact-modal input,
.contact-modal select,
.contact-modal textarea,
.aggregation-form input,
.aggregation-form select,
.aggregation-form textarea,
.job-form input,
.job-form select,
.job-form textarea {
    text-align: left !important;
    direction: ltr !important;
}

/* Fix Popup Layout: Keep Form on Right (visually) to avoid covering background text */
/* Note: Aggregation/Job popups have language-specific backgrounds, so no need to reverse */
.contact-container {
    flex-direction: row-reverse !important;
}

/* For Aggregation and Job popups in Arabic: Keep form on LEFT side */
.aggregation-container {
    flex-direction: row !important;
}

.aggregation-right {
    justify-content: flex-start !important;
    padding: 30px 20px 30px 40px !important;
}

#jobModal .aggregation-right {
    justify-content: flex-start !important;
    padding: 20px 10px 20px 100px !important;
}

/* Center Navigation on Desktop for Arabic */
@media (min-width: 1281px) {
    .main-nav {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* RTL Layout for Quotation Popup */
.quotation-item {
    flex-direction: row-reverse !important;
    padding: 16px 20px !important;
    margin-bottom: 12px !important;
    border: 2px solid rgba(152, 202, 147, 0.4) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

.quotation-item:hover {
    border-color: rgba(152, 202, 147, 0.8) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

.q-item-image {
    margin-right: 0 !important;
    margin-left: 20px !important;
    width: 110px !important;
    height: 85px !important;
    border: 2px solid rgba(152, 202, 147, 0.3) !important;
}

.q-item-details {
    align-items: flex-end !important;
}

.q-item-details h3 {
    text-align: right !important;
    font-size: 1.25rem !important;
    margin-bottom: 12px !important;
    font-weight: 700 !important;
    color: #7C411B !important;
}

.q-item-controls {
    flex-direction: row-reverse !important;
    gap: 18px !important;
}

.q-input {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    width: 50px !important;
    text-align: center !important;
}

.q-btn-minus,
.q-btn-plus {
    width: 38px !important;
    height: 38px !important;
    font-size: 20px !important;
}

.q-btn-refresh {
    width: 38px !important;
    height: 38px !important;
}

.quotation-title {
    text-align: center !important;
    font-size: 1.8rem !important;
    margin-bottom: 25px !important;
}

.btn-complete {
    text-align: center !important;
    padding: 14px 40px !important;
    font-size: 1.2rem !important;
}

/* Hide English product labels */
.q-item-image::before {
    display: none !important;
}

/* Fix Certifications Carousel for RTL */
.certifications-section {
    direction: ltr !important;
}

.cert-track {
    animation-direction: reverse !important;
}

/* Fix Footer - Keep French/LTR layout for Arabic */
.modern-footer {
    direction: ltr !important;
}

.footer-top-content {
    direction: ltr !important;
}

.footer-contact-info {
    direction: ltr !important;
}

.footer-contact-info .contact-item {
    direction: ltr !important;
    flex-direction: row-reverse !important;
}

.footer-contact-info .contact-item span {
    direction: ltr !important;
    unicode-bidi: embed !important;
}

.footer-social-icons {
    direction: ltr !important;
    flex-direction: row-reverse !important;
}

.footer-addresses {
    direction: rtl !important;
    text-align: right !important;
}

.footer-logo-section {
    direction: rtl !important;
    text-align: right !important;
}

.footer-bottom-content {
    direction: ltr !important;
}