/* rtl.css - Right-to-Left (RTL) Support for Arabic */
/* Comprehensive RTL styles for NaderTheBroker.com */

/* ═══════════════════════════════════════════════
   GLOBAL RTL ADJUSTMENTS
   ═══════════════════════════════════════════════ */

/* Force body to use flexbox for centering in RTL */
[dir="rtl"] body {
  font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
  direction: rtl;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Apply text-align: right to text content, not layout containers */
[dir="rtl"] p,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] li,
[dir="rtl"] span,
[dir="rtl"] label {
  text-align: right;
}

/* ═══════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════ */

[dir="rtl"] nav {
  direction: rtl;
  /* Navigation centering is handled in calculator section */
}

[dir="rtl"] .nav-brand {
  margin-left: auto;
  margin-right: 0;
}

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

[dir="rtl"] .nav-links a {
  margin-left: 2rem;
  margin-right: 0;
}

[dir="rtl"] .nav-links a:first-child {
  margin-left: 0;
}

/* Mobile menu */
[dir="rtl"] .mobile-menu-toggle {
  left: 2rem;
  right: auto;
}

[dir="rtl"] .mobile-menu {
  left: 0;
  right: auto;
}

/* ═══════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════ */

[dir="rtl"] .hero {
  text-align: right;
  width: 100%;
  align-self: stretch;
}

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

[dir="rtl"] .hero-actions {
  justify-content: flex-start;
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-actions .btn:first-child {
  margin-right: 0;
  margin-left: 1rem;
}

/* ═══════════════════════════════════════════════
   STATS SECTION
   ═══════════════════════════════════════════════ */

[dir="rtl"] .stats-section {
  width: 100%;
  align-self: stretch;
}

[dir="rtl"] .stats-grid {
  direction: rtl;
}

[dir="rtl"] .stat-item {
  text-align: center;
}

/* Full-width background sections must stretch edge-to-edge
   (Override body's align-items: center for these sections) */
[dir="rtl"] .about-section,
[dir="rtl"] .expertise-section,
[dir="rtl"] .experience-section,
[dir="rtl"] .social-section,
[dir="rtl"] .exclusive-access-section,
[dir="rtl"] .faq-section,
[dir="rtl"] .investment-process-section,
[dir="rtl"] .market-report-section,
[dir="rtl"] .cta-section,
[dir="rtl"] .roi-calculator-section,
[dir="rtl"] footer {
  width: 100%;
  align-self: stretch;
}

/* ═══════════════════════════════════════════════
   CARDS & GRID LAYOUTS
   ═══════════════════════════════════════════════ */

[dir="rtl"] .access-grid,
[dir="rtl"] .benefits-grid,
[dir="rtl"] .comparison-grid {
  direction: rtl;
}

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

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

/* ═══════════════════════════════════════════════
   COMPARISON TABLE
   ═══════════════════════════════════════════════ */

[dir="rtl"] .comparison-table {
  direction: rtl;
}

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

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

[dir="rtl"] .comparison-item {
  grid-template-columns: 1fr 1fr 1fr;
  direction: rtl;
}

[dir="rtl"] .comparison-label {
  text-align: right;
  border-left: none;
  border-right: 1px solid rgba(212, 175, 55, 0.2);
}

[dir="rtl"] .comparison-offplan,
[dir="rtl"] .comparison-ready {
  text-align: right;
}

/* ═══════════════════════════════════════════════
   TIMELINE (EXPERIENCE & PROCESS)
   ═══════════════════════════════════════════════ */

[dir="rtl"] .timeline {
  direction: rtl;
}

[dir="rtl"] .timeline-item {
  text-align: right;
  padding-right: 2rem;
  padding-left: 0;
  border-right: 2px solid var(--emerald);
  border-left: none;
}

[dir="rtl"] .timeline-item::before {
  right: -9px;
  left: auto;
}

[dir="rtl"] .timeline h3,
[dir="rtl"] .timeline .date,
[dir="rtl"] .timeline p {
  text-align: right;
}

/* Process Timeline */
[dir="rtl"] .process-timeline {
  direction: rtl;
}

[dir="rtl"] .process-step {
  text-align: right;
  padding-right: 3rem;
  padding-left: 0;
  border-right: 3px solid var(--emerald);
  border-left: none;
}

[dir="rtl"] .process-step::before {
  right: -1.3rem;
  left: auto;
}

[dir="rtl"] .step-number {
  right: -2.2rem;
  left: auto;
}

/* ═══════════════════════════════════════════════
   FAQ SECTION
   ═══════════════════════════════════════════════ */

[dir="rtl"] .faq-categories {
  direction: rtl;
}

[dir="rtl"] .faq-category {
  text-align: right;
}

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

[dir="rtl"] .faq-question {
  text-align: right;
  padding-right: 1.5rem;
  padding-left: 3rem;
}

[dir="rtl"] .faq-question::after {
  left: 1.5rem;
  right: auto;
  transform: rotate(-90deg);
}

[dir="rtl"] .faq-item.active .faq-question::after {
  transform: rotate(-90deg) scaleY(-1);
}

[dir="rtl"] .faq-answer {
  text-align: right;
  padding-right: 1.5rem;
  padding-left: 1rem;
}

/* ═══════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════ */

[dir="rtl"] .form-group {
  text-align: right;
}

[dir="rtl"] label {
  text-align: right;
}

[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] input::placeholder,
[dir="rtl"] textarea::placeholder {
  text-align: right;
}

/* Market Report Form */
[dir="rtl"] .report-form {
  direction: rtl;
}

[dir="rtl"] .report-form .form-grid {
  direction: rtl;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */

[dir="rtl"] .btn {
  direction: rtl;
}

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

/* Button icons */
[dir="rtl"] .btn svg,
[dir="rtl"] .btn i {
  margin-left: 0.5rem;
  margin-right: 0;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */

[dir="rtl"] footer {
  text-align: right;
  width: 100%;
  display: flex;
  justify-content: center;
}

[dir="rtl"] .footer-content {
  direction: rtl;
}

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

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

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

/* ═══════════════════════════════════════════════
   BADGES & LABELS
   ═══════════════════════════════════════════════ */

[dir="rtl"] .badge {
  direction: rtl;
}

[dir="rtl"] .section-badge {
  text-align: right;
}

/* ═══════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════ */

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

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

[dir="rtl"] .modal-close {
  left: 1rem;
  right: auto;
}

[dir="rtl"] .modal-body {
  text-align: right;
}

/* ═══════════════════════════════════════════════
   LANGUAGE & CURRENCY SELECTOR
   ═══════════════════════════════════════════════ */

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

[dir="rtl"] #language-switcher,
[dir="rtl"] #currency-selector {
  margin-left: 0;
  margin-right: 1rem;
}

[dir="rtl"] .currency-select {
  text-align: right;
  padding-right: 2.5rem;
  padding-left: 1rem;
  background-position: left 0.75rem center;
}

/* ═══════════════════════════════════════════════
   LISTS
   ═══════════════════════════════════════════════ */

[dir="rtl"] ul,
[dir="rtl"] ol {
  padding-right: 1.5rem;
  padding-left: 0;
}

[dir="rtl"] li {
  text-align: right;
}

/* Benefits list */
[dir="rtl"] .benefits-list {
  text-align: right;
}

[dir="rtl"] .benefits-list li {
  padding-right: 2rem;
  padding-left: 0;
}

[dir="rtl"] .benefits-list li::before {
  right: 0;
  left: auto;
}

/* ═══════════════════════════════════════════════
   ICONS & EMOJIS
   ═══════════════════════════════════════════════ */

/* Flip directional icons in RTL */
[dir="rtl"] .icon-flip {
  transform: scaleX(-1);
}

/* Arrows */
[dir="rtl"] .arrow-right {
  transform: rotate(180deg);
}

[dir="rtl"] .arrow-left {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════
   MOBILE RESPONSIVE RTL
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
  [dir="rtl"] .nav-links a {
    margin-left: 1rem;
    margin-right: 0;
  }

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

  [dir="rtl"] .hero-actions .btn:first-child {
    margin-left: 0;
    margin-bottom: 1rem;
  }

  [dir="rtl"] .comparison-item {
    grid-template-columns: 1fr;
  }

  [dir="rtl"] .comparison-label {
    border-right: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  }

  [dir="rtl"] .timeline-item {
    padding-right: 1.5rem;
  }

  [dir="rtl"] .process-step {
    padding-right: 2.5rem;
  }

  [dir="rtl"] .footer-links {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════
   ANIMATIONS FOR RTL
   ═══════════════════════════════════════════════ */

/* Slide in from right instead of left */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

[dir="rtl"] .slide-in {
  animation: slideInRight 0.3s ease-out;
}

/* ═══════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════ */

[dir="rtl"] .text-left {
  text-align: right !important;
}

[dir="rtl"] .text-right {
  text-align: left !important;
}

[dir="rtl"] .float-left {
  float: right !important;
}

[dir="rtl"] .float-right {
  float: left !important;
}

[dir="rtl"] .mr-1 { margin-right: 0; margin-left: 0.25rem; }
[dir="rtl"] .mr-2 { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .mr-3 { margin-right: 0; margin-left: 1rem; }
[dir="rtl"] .mr-4 { margin-right: 0; margin-left: 1.5rem; }

[dir="rtl"] .ml-1 { margin-left: 0; margin-right: 0.25rem; }
[dir="rtl"] .ml-2 { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .ml-3 { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .ml-4 { margin-left: 0; margin-right: 1.5rem; }

[dir="rtl"] .pr-1 { padding-right: 0; padding-left: 0.25rem; }
[dir="rtl"] .pr-2 { padding-right: 0; padding-left: 0.5rem; }
[dir="rtl"] .pr-3 { padding-right: 0; padding-left: 1rem; }
[dir="rtl"] .pr-4 { padding-right: 0; padding-left: 1.5rem; }

[dir="rtl"] .pl-1 { padding-left: 0; padding-right: 0.25rem; }
[dir="rtl"] .pl-2 { padding-left: 0; padding-right: 0.5rem; }
[dir="rtl"] .pl-3 { padding-left: 0; padding-right: 1rem; }
[dir="rtl"] .pl-4 { padding-left: 0; padding-right: 1.5rem; }

/* ═══════════════════════════════════════════════
   ARABIC TYPOGRAPHY
   ═══════════════════════════════════════════════ */

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
  font-weight: 700;
  letter-spacing: 0; /* Arabic doesn't need letter spacing */
}

[dir="rtl"] p {
  line-height: 1.8; /* Better readability for Arabic */
}

/* Numbers in Arabic can stay LTR */
[dir="rtl"] .number,
[dir="rtl"] .price,
[dir="rtl"] .stat-number {
  direction: ltr;
  display: inline-block;
}

/* ═══════════════════════════════════════════════
   ROI CALCULATOR
   ═══════════════════════════════════════════════ */

/* Keep calculator container centered */
[dir="rtl"] .calculator-container {
  max-width: 1400px;
  margin: 0 auto;
  text-align: start;
  box-sizing: border-box;
}

/* Navigation must also be full width and centered */
[dir="rtl"] nav {
  width: 100%;
  display: flex;
  justify-content: center;
}

[dir="rtl"] .nav-container {
  width: 100%;
  max-width: 1400px;
}

/* Calculator header and description */
[dir="rtl"] .calculator-header,
[dir="rtl"] .calculator-description {
  text-align: right;
}

/* Calculator grid should remain in its layout */
[dir="rtl"] .calculator-grid {
  direction: rtl;
  margin-left: auto;
  margin-right: auto;
}

/* Input sections */
[dir="rtl"] .input-section {
  text-align: right;
}

/* Results section */
[dir="rtl"] .results-section {
  text-align: right;
}

/* Result cards */
[dir="rtl"] .result-card {
  text-align: right;
}

/* Section titles */
[dir="rtl"] .section-title {
  text-align: right;
}

/* Property mode toggle */
[dir="rtl"] .property-mode-toggle {
  direction: rtl;
}

[dir="rtl"] .property-mode-indicator {
  text-align: right;
}

/* Sliders and inputs */
[dir="rtl"] .slider-container {
  direction: rtl;
}

[dir="rtl"] .slider-label {
  text-align: right;
}

/* KPI Row */
[dir="rtl"] .kpi-row {
  direction: rtl;
}

/* Scenarios Grid */
[dir="rtl"] .scenarios-grid {
  direction: rtl;
}

/* ═══════════════════════════════════════════════
   SMOOTH TRANSITIONS
   ═══════════════════════════════════════════════ */

/* Smooth transition when switching between LTR/RTL */
* {
  transition: margin 0.3s ease, padding 0.3s ease, text-align 0.3s ease;
}

/* Disable transitions for direction and transform */
*,
*::before,
*::after {
  transition-property: none !important;
}

html,
body {
  transition: direction 0s;
}
