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

/* Base RTL Configuration */
html[dir="rtl"] {
  font-family: 'Cairo', 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
}

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

/* Language Switcher - RTL */
html[dir="rtl"] .language-switcher {
  right: auto;
  left: 25px;
}

/* Hero Section - RTL */
html[dir="rtl"] .hero-grid {
  direction: rtl;
}

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

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

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

html[dir="rtl"] .property-facts {
  direction: rtl;
}

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

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

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

html[dir="rtl"] .btn-primary {
  font-family: 'Cairo', sans-serif;
}

/* Features Section - RTL */
html[dir="rtl"] .feature-item {
  direction: rtl;
}

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

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

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

/* About Section - RTL */
html[dir="rtl"] .about-description {
  text-align: center;
}

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

/* Floor Plans - RTL */
html[dir="rtl"] .floor-plan-tabs {
  direction: rtl;
}

html[dir="rtl"] .floor-plan-tab {
  font-family: 'Cairo', sans-serif;
}

/* Gallery Section - RTL */
html[dir="rtl"] .gallery-tabs {
  direction: rtl;
}

html[dir="rtl"] .tab-btn {
  font-family: 'Cairo', sans-serif;
}

/* Swiper Navigation - RTL */
html[dir="rtl"] .swiper-button-next {
  left: 10px;
  right: auto;
}

html[dir="rtl"] .swiper-button-prev {
  right: 10px;
  left: auto;
}

html[dir="rtl"] .swiper-button-next:after {
  content: 'prev';
}

html[dir="rtl"] .swiper-button-prev:after {
  content: 'next';
}

/* Location Section - RTL */
html[dir="rtl"] .location-details {
  direction: rtl;
}

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

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

html[dir="rtl"] .section-header h2 {
  text-align: center;
}

html[dir="rtl"] .section-header p {
  text-align: center;
}

/* Payment Plans - RTL */
html[dir="rtl"] .payment-horizontal {
  direction: rtl;
}

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

html[dir="rtl"] .step-content h4 {
  font-family: 'Cairo', sans-serif;
}

/* Residence Types - RTL */
html[dir="rtl"] .residence-description {
  text-align: right;
}

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

html[dir="rtl"] .residence-type h4 {
  font-family: 'Cairo', sans-serif;
}

html[dir="rtl"] .residence-type p {
  font-family: 'Cairo', sans-serif;
}

/* Expert Features - RTL */
html[dir="rtl"] .expert-features {
  direction: rtl;
}

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

html[dir="rtl"] .expert-feature i {
  margin-left: 1rem;
  margin-right: 0;
}

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

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

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

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

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

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

/* Footer - RTL */
html[dir="rtl"] .footer {
  direction: rtl;
}

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

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

/* Floating Buttons - RTL */
html[dir="rtl"] .floating-buttons {
  left: 20px;
  right: auto;
}

/* Dialog - RTL */
html[dir="rtl"] .dialog-content {
  direction: rtl;
}

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

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

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

html[dir="rtl"] .dialog-form label {
  text-align: right;
  display: block;
}

html[dir="rtl"] .dialog-close {
  left: 20px;
  right: auto;
}

/* Toast Notifications - RTL */
html[dir="rtl"] .toast-container {
  left: 20px;
  right: auto;
}

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

html[dir="rtl"] .toast-icon {
  margin-left: 10px;
  margin-right: 0;
}

/* International Tel Input - RTL Adjustments */
html[dir="rtl"] .iti {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .iti__flag-container {
  left: auto;
  right: 0;
}

html[dir="rtl"] .iti__selected-flag {
  padding-left: 0;
  padding-right: 8px;
}

html[dir="rtl"] input.iti__tel-input {
  padding-left: 52px;
  padding-right: 52px;
  text-align: left;
  direction: ltr;
}

/* Button Icons - RTL */
html[dir="rtl"] .download-brochure-btn i {
  margin-left: 8px;
  margin-right: 0;
}

/* Responsive RTL Adjustments */
@media (max-width: 768px) {
  html[dir="rtl"] .hero-grid {
    direction: rtl;
  }

  html[dir="rtl"] .language-switcher {
    left: 15px;
    right: auto;
  }

  html[dir="rtl"] .floating-buttons {
    left: 15px;
    right: auto;
  }

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

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

/* Typography Adjustments for Arabic */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
}

html[dir="rtl"] p,
html[dir="rtl"] span,
html[dir="rtl"] a {
  font-family: 'Cairo', sans-serif;
}

html[dir="rtl"] .hero-title {
  font-size: 2.5rem;
  line-height: 1.3;
}

html[dir="rtl"] .project-name {
  font-weight: 800;
}

/* Number formatting - keep LTR for numbers */
html[dir="rtl"] .fact-number,
html[dir="rtl"] .step-number,
html[dir="rtl"] .location-detail h3 {
  direction: ltr;
  unicode-bidi: embed;
}

/* Price and numeric values */
html[dir="rtl"] .fact-number {
  font-size: 1.5rem;
}

@media (max-width: 480px) {
  html[dir="rtl"] .hero-title {
    font-size: 1.8rem;
  }

  html[dir="rtl"] .fact-number {
    font-size: 1.2rem;
  }
}

/* Enhanced spacing for Arabic text */
html[dir="rtl"] p {
  line-height: 1.8;
  letter-spacing: 0;
}

html[dir="rtl"] .about-description {
  line-height: 2;
}

/* Form validation messages - RTL */
html[dir="rtl"] .error-message,
html[dir="rtl"] .success-message,
html[dir="rtl"] .validation-output {
  text-align: right;
  direction: rtl;
}

/* Grid layouts - RTL */
html[dir="rtl"] .dialog-grid {
  direction: rtl;
}

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

/* List items and bullet points */
html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-right: 20px;
  padding-left: 0;
}

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

/* Ensure checkmarks and icons align properly */
html[dir="rtl"] .privacy-guarantee {
  display: flex;
  align-items: flex-start;
  text-align: center;
  direction: rtl;
}
