/* RTL (Right-to-Left) specific styles for Hebrew version */

/* Basic RTL setup */
body[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* Text alignments */
body[dir="rtl"] .hero-content, 
body[dir="rtl"] .section-title, 
body[dir="rtl"] .section-subtitle, 
body[dir="rtl"] .form-group label, 
body[dir="rtl"] .google-reviews-container,
body[dir="rtl"] .footer-content, 
body[dir="rtl"] .faq-container,
body[dir="rtl"] p,
body[dir="rtl"] h1, 
body[dir="rtl"] h2, 
body[dir="rtl"] h3, 
body[dir="rtl"] h4,
body[dir="rtl"] .testimonial-content {
  text-align: right;
}

/* Main navigation fixes */
body[dir="rtl"] .main-nav ul {
  padding-right: 0;
}

/* Language switcher position fixes */
body[dir="rtl"] .language-switcher {
  margin-right: 0;
  margin-left: 20px;
}

@media (max-width: 768px) {
  body[dir="rtl"] .language-switcher {
    left: auto;
    right: 70px;
  }
}

/* Fix for language options */
body[dir="rtl"] .language-separator {
  margin: 0 5px;
  color: var(--color-text-light);
}

/* Make language selection text right-aligned */
body[dir="rtl"] .language-switcher a {
  text-align: right;
}

/* Expert qualifications list fixes */
body[dir="rtl"] .expert-qualifications li {
  padding-right: 40px;
  padding-left: 0;
}

body[dir="rtl"] .qualification-icon {
  right: 0;
  left: auto;
}

body[dir="rtl"] .expert-title::after {
  right: 0;
  left: auto;
}

/* Fix for service grid */
body[dir="rtl"] .services-grid {
  direction: rtl;
}

/* FAQ arrow direction fix */
body[dir="rtl"] .faq-question::after {
  left: auto;
  right: calc(100% - 30px);
  transform: var(--faq-arrow-transform, rotate(180deg));
}

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

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

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

/* Fix for stars display */
body[dir="rtl"] .stars,
body[dir="rtl"] .review-stars,
body[dir="rtl"] .review-stars-small {
  direction: ltr; /* Star characters should always be displayed LTR */
  display: inline-block;
}

/* Fix for review date position */
body[dir="rtl"] .review-date {
  text-align: right;
}

/* Service card icon adjustments */
body[dir="rtl"] .service-card {
  text-align: right;
}

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

/* Business info in footer */
body[dir="rtl"] .business-info p {
  text-align: right;
}

/* Footer social media icons */
body[dir="rtl"] .footer-social a {
  margin-right: 0;
  margin-left: 10px;
}

/* Mobile navigation adjustments */
body[dir="rtl"] .mobile-nav a span {
  text-align: center;
}

/* Mobile specific fixes */
@media (max-width: 767px) {
  /* Mobile menu toggle position */
  body[dir="rtl"] .mobile-menu-toggle {
    right: auto;
    left: 15px;
  }

  /* Time slots in booking form */
  body[dir="rtl"] .time-slot {
    text-align: center;
  }

  /* Adjust hero buttons on small screens */
  body[dir="rtl"] .cta-buttons {
    text-align: center;
  }

  /* Expert qualifications in mobile view */
  body[dir="rtl"] .expert-qualifications li {
    padding-right: 0;
  }
  
  body[dir="rtl"] .qualification-icon {
    right: 50%;
    transform: translateX(50%);
  }
  
  body[dir="rtl"] .expert-title::after {
    right: 50%;
    transform: translateX(50%);
  }

  /* Mobile header */
  body[dir="rtl"] .site-header .logo {
    margin-right: 0;
    margin-left: auto;
  }
}

/* Specific layout fixes for Hebrew text in common components */
body[dir="rtl"] .google-review-header {
  flex-direction: row; /* Maintain flex direction for reviews */
}

body[dir="rtl"] .google-review-header .reviewer-avatar {
  margin-right: 0;
  margin-left: 15px;
}

/* Fix for back to top button */
body[dir="rtl"] .back-to-top {
  right: auto;
  left: 20px;
}

/* Font optimization for Hebrew */
body[dir="rtl"] h1, 
body[dir="rtl"] h2, 
body[dir="rtl"] h3, 
body[dir="rtl"] h4, 
body[dir="rtl"] p, 
body[dir="rtl"] li, 
body[dir="rtl"] label, 
body[dir="rtl"] button, 
body[dir="rtl"] a {
  font-family: 'Rubik', 'Assistant', 'Open Sans', sans-serif;
}

/* Hero ratings RTL fix */
body[dir="rtl"] .hero-ratings span {
  text-align: right;
}

/* Process section RTL fixes */
body[dir="rtl"] .process-item {
  flex-direction: row-reverse;
}

body[dir="rtl"] .process-content {
  padding-left: 0;
  padding-right: 30px;
}

/* Video play button positioning */
body[dir="rtl"] .video-play-button svg {
  transform: none; /* No need to flip play button triangles */
}

/* RTL fixes for form fields */
body[dir="rtl"] input,
body[dir="rtl"] select,
body[dir="rtl"] textarea {
  text-align: right;
}

/* RTL fix for hero buttons */
body[dir="rtl"] .hero-buttons .cta-buttons {
  direction: rtl;
}

/* Fix RTL for phone links */
body[dir="rtl"] [dir="ltr"] {
  display: inline-block; /* Force LTR direction for phone numbers */
}

/* Additional fixes for RTL accessibility */
body[dir="rtl"] .skip-link {
  right: 0;
  left: auto;
}

/* Keep some elements in LTR direction */
body[dir="rtl"] .logo img,
body[dir="rtl"] video,
body[dir="rtl"] .video-accessibility-controls {
  direction: ltr;
}