/* ============================================
   DIGITAL ROXY — RTL STYLES (Arabic & Hebrew)
   ============================================ */

/* --- Font families --- */
html[lang="ar"] body,
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] h4, html[lang="ar"] h5, html[lang="ar"] h6,
html[lang="ar"] p, html[lang="ar"] a, html[lang="ar"] span,
html[lang="ar"] li, html[lang="ar"] td, html[lang="ar"] th,
html[lang="ar"] input, html[lang="ar"] textarea, html[lang="ar"] button,
html[lang="ar"] label, html[lang="ar"] select, html[lang="ar"] div {
    font-family: 'Cairo', 'Inter', sans-serif !important;
}

html[lang="he"] body,
html[lang="he"] h1, html[lang="he"] h2, html[lang="he"] h3,
html[lang="he"] h4, html[lang="he"] h5, html[lang="he"] h6,
html[lang="he"] p, html[lang="he"] a, html[lang="he"] span,
html[lang="he"] li, html[lang="he"] td, html[lang="he"] th,
html[lang="he"] input, html[lang="he"] textarea, html[lang="he"] button,
html[lang="he"] label, html[lang="he"] select, html[lang="he"] div {
    font-family: 'Heebo', 'Inter', sans-serif !important;
}

/* --- Base direction --- */
html[dir="rtl"] body { text-align: right; }

/* --- Keep numbers, emails, phone, URLs LTR --- */
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] .dr-footer-address,
html[dir="rtl"] .dr-plan-price,
html[dir="rtl"] .dr-sl-plan-price,
html[dir="rtl"] .dr-stat-value,
html[dir="rtl"] .dr-counter {
    direction: ltr;
    unicode-bidi: isolate;
}

/* =============================================
   GLOBAL HEADER (header.php)
   ============================================= */
html[dir="rtl"] .dr-global-header .dr-header-inner { flex-direction: row-reverse; }
html[dir="rtl"] .dr-global-header .dr-nav { flex-direction: row-reverse; }
html[dir="rtl"] .dr-global-header .dr-nav a { margin-left: 0; margin-right: 0; }
html[dir="rtl"] .dr-global-header .dr-header-actions { flex-direction: row-reverse; }

/* Mega menu — RTL dropdown */
html[dir="rtl"] .dr-mega-menu { left: auto; right: 0; text-align: right; }
html[dir="rtl"] .dr-mega-item { text-align: right; flex-direction: row-reverse; }
html[dir="rtl"] .dr-mega-item .dr-mega-icon { margin-right: 0; margin-left: 14px; }
html[dir="rtl"] .dr-mega-text { text-align: right; }
html[dir="rtl"] .dr-nav-dropdown-trigger svg { margin-left: 0; margin-right: 3px; }

/* Services dropdown trigger — flip chevron */
html[dir="rtl"] .dr-nav-dropdown { position: relative; }
html[dir="rtl"] .dr-nav-dropdown .dr-mega-menu {
    right: 50%;
    transform: translateX(50%);
    left: auto;
}

/* Mobile nav */
html[dir="rtl"] .dr-global-mobile-nav { text-align: right; }
html[dir="rtl"] .dr-global-mobile-nav a { text-align: right; }
html[dir="rtl"] .dr-global-mobile-nav-close { left: 20px; right: auto; }
html[dir="rtl"] .dr-mobile-menu { right: auto; left: 0; text-align: right; }

/* =============================================
   GLOBAL FOOTER (footer.php)
   ============================================= */
html[dir="rtl"] .dr-global-footer-grid { direction: rtl; }
html[dir="rtl"] .dr-global-footer-col { text-align: right; }
html[dir="rtl"] .dr-global-footer-col ul { padding-right: 0; }
html[dir="rtl"] .dr-global-footer-bottom { flex-direction: row-reverse; }
html[dir="rtl"] .dr-global-footer-legal { flex-direction: row-reverse; }

/* =============================================
   HOMEPAGE (page-home.php)
   ============================================= */
html[dir="rtl"] .dr-page { direction: rtl; text-align: right; }

/* Header */
html[dir="rtl"] .dr-header-inner { flex-direction: row-reverse; }
html[dir="rtl"] .dr-nav { flex-direction: row-reverse; }
html[dir="rtl"] .dr-header-actions { flex-direction: row-reverse; }

/* Hero */
html[dir="rtl"] .dr-hero-content { text-align: right; }
html[dir="rtl"] .dr-trust-avatars { flex-direction: row-reverse; }
html[dir="rtl"] .dr-cta-buttons { flex-direction: row-reverse; }

/* Stats bar */
html[dir="rtl"] .dr-stats-bar { flex-direction: row-reverse; }

/* Steps */
html[dir="rtl"] .dr-step { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .dr-step-number { margin-right: 0; margin-left: 20px; }

/* Agents grid */
html[dir="rtl"] .dr-agents-grid { direction: rtl; }

/* Feature tabs */
html[dir="rtl"] .dr-feature-tabs { flex-direction: row-reverse; }
html[dir="rtl"] .dr-tab-content { text-align: right; }
html[dir="rtl"] .dr-tab-features li { flex-direction: row-reverse; }
html[dir="rtl"] .dr-tab-features li svg { margin-right: 0; margin-left: 8px; }

/* Comparison table */
html[dir="rtl"] .dr-compare-table { direction: rtl; }
html[dir="rtl"] .dr-compare-table th,
html[dir="rtl"] .dr-compare-table td { text-align: right; }

/* Pricing */
html[dir="rtl"] .dr-pricing-grid { direction: rtl; }
html[dir="rtl"] .dr-plan-features li { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .dr-plan-features li svg { margin-right: 0; margin-left: 8px; }

/* FAQ */
html[dir="rtl"] .dr-faq-item { text-align: right; }
html[dir="rtl"] .dr-faq-toggle { flex-direction: row-reverse; }
html[dir="rtl"] .dr-faq-toggle span:last-child { margin-left: 0; margin-right: auto; }

/* Footer */
html[dir="rtl"] .dr-footer-grid { direction: rtl; }
html[dir="rtl"] .dr-footer-col { text-align: right; }
html[dir="rtl"] .dr-footer-bottom { flex-direction: row-reverse; }
html[dir="rtl"] .dr-footer-legal { flex-direction: row-reverse; }

/* Testimonials */
html[dir="rtl"] .dr-testimonial { text-align: right; }
html[dir="rtl"] .dr-testimonial-author { flex-direction: row-reverse; }

/* =============================================
   SERVICE LANDING PAGES
   ============================================= */
html[dir="rtl"] .dr-sl-hero { text-align: right; }
html[dir="rtl"] .dr-sl-hero-badges { flex-direction: row-reverse; }
html[dir="rtl"] .dr-sl-breadcrumb { direction: ltr; unicode-bidi: isolate; }

/* Process steps */
html[dir="rtl"] .dr-sl-step { direction: rtl; text-align: right; }
html[dir="rtl"] .dr-sl-step-content { text-align: right; }
html[dir="rtl"] .dr-sl-step-features li { flex-direction: row-reverse; }
html[dir="rtl"] .dr-sl-step-features li svg { margin-right: 0; margin-left: 10px; }

/* Why us cards */
html[dir="rtl"] .dr-sl-why-grid { direction: rtl; }
html[dir="rtl"] .dr-sl-why-card { text-align: right; }

/* Pricing */
html[dir="rtl"] .dr-sl-pricing-grid { direction: rtl; }
html[dir="rtl"] .dr-sl-plan-features li { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .dr-sl-plan-features li svg { margin-right: 0; margin-left: 10px; }

/* FAQ */
html[dir="rtl"] .dr-sl-faq-item { text-align: right; }
html[dir="rtl"] .dr-sl-faq-toggle { flex-direction: row-reverse; }

/* =============================================
   PRICING PAGE
   ============================================= */
html[dir="rtl"] .dr-pricing-plans { direction: rtl; }
html[dir="rtl"] .dr-pricing-card { text-align: right; }
html[dir="rtl"] .dr-pricing-card .feature-list li { flex-direction: row-reverse; }
html[dir="rtl"] .dr-pricing-card .feature-list li svg { margin-right: 0; margin-left: 8px; }

/* =============================================
   CONTACT PAGE
   ============================================= */
html[dir="rtl"] .dr-contact-grid { direction: rtl; }
html[dir="rtl"] .dr-contact-info { text-align: right; }
html[dir="rtl"] .dr-contact-item { flex-direction: row-reverse; }
html[dir="rtl"] .dr-contact-form { text-align: right; }
html[dir="rtl"] .dr-form-group input,
html[dir="rtl"] .dr-form-group textarea,
html[dir="rtl"] .dr-form-group select { text-align: right; }

/* =============================================
   ABOUT PAGE
   ============================================= */
html[dir="rtl"] .dr-about-content { text-align: right; }
html[dir="rtl"] .dr-services-grid { direction: rtl; }
html[dir="rtl"] .dr-service-card { text-align: right; }

/* =============================================
   LEGAL PAGES
   ============================================= */
html[dir="rtl"] .dr-legal-content { text-align: right; }
html[dir="rtl"] .dr-legal-content ol,
html[dir="rtl"] .dr-legal-content ul { padding-left: 0; padding-right: 24px; }
html[dir="rtl"] .dr-legal-toc ol { padding-left: 0; padding-right: 20px; }
html[dir="rtl"] .dr-legal-meta { text-align: right; }
html[dir="rtl"] .dr-legal-table th,
html[dir="rtl"] .dr-legal-table td { text-align: right; }
html[dir="rtl"] .dr-refund-step { flex-direction: row-reverse; }
html[dir="rtl"] .dr-refund-step::before { left: auto; right: 19px; }
html[dir="rtl"] .dr-refund-step-content { text-align: right; }
html[dir="rtl"] .dr-refund-card { text-align: right; }

/* =============================================
   BLOG / SINGLE / ARCHIVE
   ============================================= */
html[dir="rtl"] .dr-blog-grid { direction: rtl; }
html[dir="rtl"] .dr-post-card { text-align: right; }
html[dir="rtl"] .dr-post-content { text-align: right; }
html[dir="rtl"] .dr-post-meta { flex-direction: row-reverse; }
html[dir="rtl"] .dr-post-nav { flex-direction: row-reverse; }

/* =============================================
   WOOCOMMERCE
   ============================================= */
html[dir="rtl"] .woocommerce { direction: rtl; text-align: right; }
html[dir="rtl"] .woocommerce-billing-fields { text-align: right; }
html[dir="rtl"] .woocommerce table { direction: rtl; }

/* =============================================
   PAGE HERO
   ============================================= */
html[dir="rtl"] .dr-page-hero { text-align: right; }

/* =============================================
   LANGUAGE SWITCHER
   ============================================= */
.dr-lang-switcher { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
html[dir="rtl"] .dr-lang-switcher { margin-left: 0; margin-right: 12px; }
.dr-lang-switcher a {
    display: flex; align-items: center; gap: 4px;
    padding: 4px 8px; border-radius: 6px;
    font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.6);
    text-decoration: none; transition: 0.2s ease;
    white-space: nowrap;
}
.dr-lang-switcher a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.dr-lang-switcher a.active { color: #fff; background: rgba(255,255,255,0.12); }
.dr-lang-switcher img.dr-flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; }
.dr-lang-divider { color: rgba(255,255,255,0.2); font-size: 12px; }

/* Global header lang switcher (light bg pages) */
.dr-global-header .dr-lang-switcher a { color: rgba(255,255,255,0.6); }
.dr-global-header .dr-lang-switcher a:hover { color: #fff; }
.dr-global-header .dr-lang-switcher a.active { color: #fff; }

@media (max-width: 768px) {
    .dr-lang-switcher { margin: 0; justify-content: center; padding: 8px 0; }
}
