/* ===================================
   RTL (Right-to-Left) Styles
   Arabic language support
   =================================== */

/* Base RTL adjustments */
[dir="rtl"] {
    /* Font family for Arabic */
    font-family: 'IBM Plex Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Hero arrow icon flip */
[dir="rtl"] .hero-cta .btn-primary svg {
    transform: scaleX(-1);
}

/* Feature list arrows */
[dir="rtl"] .feature-list li::before {
    content: '←';
}

/* Stat divider spacing */
[dir="rtl"] .hero-stats {
    direction: rtl;
}

/* Pricing grid - maintain order in RTL */
[dir="rtl"] .pricing-grid {
    direction: rtl;
}

/* Footer links alignment */
[dir="rtl"] .footer-content {
    direction: rtl;
}

/* Badge dot position */
[dir="rtl"] .badge {
    flex-direction: row-reverse;
}

/* Button icon positioning */
[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

/* Nav content order */
[dir="rtl"] .nav-content {
    direction: rtl;
}

/* Ensure proper text alignment */
[dir="rtl"] .section-header,
[dir="rtl"] .hero-content,
[dir="rtl"] .cta-content {
    text-align: center;
}

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

[dir="rtl"] .pricing-card {
    text-align: right;
}

[dir="rtl"] .pricing-features li {
    flex-direction: row-reverse;
}

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

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

/* Logo text order */
[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

/* Toggle switch position in RTL */
[dir="rtl"] .toggle-slider {
    right: 0.25rem;
    left: auto;
    transition: transform var(--transition-base);
}

[dir="rtl"] .toggle-switch.active .toggle-slider {
    transform: translateX(-1.5rem);
}

/* Save badge positioning */
[dir="rtl"] .save-badge {
    margin-right: 0.5rem;
    margin-left: 0;
}

/* Popular badge centering (stays centered) */
[dir="rtl"] .popular-badge {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

/* Channel logos */
[dir="rtl"] .channels-logos {
    direction: rtl;
}

/* Features grid */
[dir="rtl"] .features-grid {
    direction: rtl;
}

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

/* Social links */
[dir="rtl"] .social-links {
    flex-direction: row-reverse;
}

/* Hero stats stay centered */
[dir="rtl"] .stat {
    text-align: center;
}

/* Mobile menu button */
[dir="rtl"] .mobile-menu-btn {
    margin-right: auto;
    margin-left: 0;
}

/* Nav links order */
[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

/* CTA buttons */
[dir="rtl"] .cta-buttons {
    flex-direction: row-reverse;
}

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

/* Language switch link styling */
[dir="rtl"] .lang-switch {
    padding-right: 1rem;
    border-right: 1px solid var(--gray-300);
    margin-right: 1rem;
    padding-left: 0;
    border-left: none;
    margin-left: 0;
}

[dir="ltr"] .lang-switch {
    padding-left: 1rem;
    border-left: 1px solid var(--gray-300);
    margin-left: 1rem;
}

/* Gradient direction for RTL */
[dir="rtl"] .hero-bg::before {
    right: auto;
    left: -20%;
}

/* Feature card featured span */
[dir="rtl"] .feature-card.featured {
    background: linear-gradient(-135deg, var(--primary-50) 0%, white 60%);
}

/* Ensure checkmarks stay on the right in RTL feature lists */
[dir="rtl"] .pricing-features svg {
    order: 1;
}

[dir="rtl"] .pricing-features li span,
[dir="rtl"] .pricing-features li {
    order: 0;
}