/* ============================================
   AI CRM Engine - Arabic RTL Stylesheet
   Right-to-Left Language Support
   ============================================ */

/* RTL Base */
html[dir="rtl"] {
    direction: rtl;
}

/* Arabic Font */
body {
    font-family: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Flip flexbox directions */
html[dir="rtl"] .navbar,
html[dir="rtl"] .nav-menu,
html[dir="rtl"] .nav-actions,
html[dir="rtl"] .hero-cta,
html[dir="rtl"] .hero-stats,
html[dir="rtl"] .trust-regions,
html[dir="rtl"] .cta-buttons,
html[dir="rtl"] .footer-social,
html[dir="rtl"] .info-item,
html[dir="rtl"] .solution-cta {
    flex-direction: row-reverse;
}

/* Keep grid layouts but adjust alignment */
html[dir="rtl"] .hero .container {
    direction: rtl;
}

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

html[dir="rtl"] .hero-subtitle {
    margin-left: auto;
    margin-right: 0;
}

/* Navigation */
html[dir="rtl"] .nav-link::after {
    left: auto;
    right: 0;
}

html[dir="rtl"] .lang-switch {
    font-family: 'Inter', sans-serif;
}

/* Section headers */
html[dir="rtl"] .section-header {
    text-align: center;
}

/* Cards and items */
html[dir="rtl"] .benefit-card,
html[dir="rtl"] .solution-card,
html[dir="rtl"] .feature-item,
html[dir="rtl"] .faq-item {
    text-align: right;
}

/* Lists with icons */
html[dir="rtl"] .solution-features li,
html[dir="rtl"] .feature-list li,
html[dir="rtl"] .pricing-includes li,
html[dir="rtl"] .why-contact li,
html[dir="rtl"] .trial-includes li {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .solution-features li i,
html[dir="rtl"] .feature-list li i,
html[dir="rtl"] .pricing-includes li i {
    margin-left: 0.75rem;
    margin-right: 0;
}

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

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group select,
html[dir="rtl"] .form-group textarea {
    text-align: right;
}

html[dir="rtl"] .checkbox-label {
    flex-direction: row-reverse;
}

html[dir="rtl"] .checkbox-label input {
    margin-left: 0.75rem;
    margin-right: 0;
}

/* Contact info */
html[dir="rtl"] .info-item {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .info-item div {
    text-align: right;
}

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

html[dir="rtl"] .footer-contact p {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

html[dir="rtl"] .footer-contact i {
    margin-left: 0.75rem;
    margin-right: 0;
}

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

/* WhatsApp float - move to left side for RTL */
html[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 2rem;
}

@media (max-width: 768px) {
    html[dir="rtl"] .whatsapp-float {
        left: 1.5rem;
    }
}

/* Buttons with icons */
html[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn i {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Hero badge */
html[dir="rtl"] .hero-badge {
    flex-direction: row-reverse;
}

/* Stats */
html[dir="rtl"] .stat {
    text-align: center;
}

/* Trust bar */
html[dir="rtl"] .trust-bar .container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .trust-regions span {
    flex-direction: row-reverse;
}

/* Pricing card */
html[dir="rtl"] .pricing-content {
    direction: rtl;
}

html[dir="rtl"] .pricing-info {
    border-right: none;
    border-left: 1px solid var(--gray-100);
    text-align: right;
}

html[dir="rtl"] .pricing-cta {
    text-align: center;
}

@media (max-width: 1024px) {
    html[dir="rtl"] .pricing-info {
        border-left: none;
        border-bottom: 1px solid var(--gray-100);
    }
}

/* Feature blocks (HRM/BC pages) */
html[dir="rtl"] .feature-block {
    direction: rtl;
}

html[dir="rtl"] .feature-block.reverse {
    direction: ltr;
}

html[dir="rtl"] .feature-block.reverse > * {
    direction: rtl;
}

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

html[dir="rtl"] .feature-icon {
    margin-left: auto;
    margin-right: 0;
}

@media (max-width: 1024px) {
    html[dir="rtl"] .feature-block,
    html[dir="rtl"] .feature-block.reverse {
        direction: rtl;
    }

    html[dir="rtl"] .feature-content {
        text-align: center;
    }

    html[dir="rtl"] .feature-icon {
        margin: 0 auto 1.5rem;
    }

    html[dir="rtl"] .feature-list {
        text-align: right;
        margin: 0 auto;
    }
}

/* Pain points / Who for cards */
html[dir="rtl"] .pain-card,
html[dir="rtl"] .who-card {
    text-align: center;
}

/* FAQ */
html[dir="rtl"] .faq-item h4 {
    flex-direction: row-reverse;
}

html[dir="rtl"] .faq-item p {
    padding-left: 0;
    padding-right: 1.75rem;
}

/* Mini features */
html[dir="rtl"] .mini-feature {
    text-align: center;
}

/* Trial includes */
html[dir="rtl"] .trial-includes li {
    padding-left: 0;
    padding-right: 1.25rem;
}

html[dir="rtl"] .trial-includes li::before {
    left: auto;
    right: 0;
}

/* Dashboard preview in hero */
html[dir="rtl"] .preview-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .preview-content {
    flex-direction: row-reverse;
}

/* Mobile menu */
@media (max-width: 768px) {
    html[dir="rtl"] .nav-menu {
        flex-direction: column;
        align-items: stretch;
        text-align: right;
    }

    html[dir="rtl"] .hero-cta {
        flex-direction: column;
    }

    html[dir="rtl"] .cta-buttons {
        flex-direction: column;
    }
}

/* Form row */
html[dir="rtl"] .form-row {
    direction: rtl;
}

/* Gradient orbs - flip positions */
html[dir="rtl"] .orb-1 {
    right: auto;
    left: -100px;
}

html[dir="rtl"] .orb-2 {
    left: auto;
    right: -50px;
}
