/*
RTL (Right-to-Left) Styles for Tlawh Academy Theme
Supports Arabic and other RTL languages
*/

/* Base RTL Adjustments */
.rtl {
  direction: rtl;
  text-align: right;
}

.rtl * {
  direction: rtl;
}

/* Typography */
.rtl h1,
/* .rtl h2, */
.rtl h3,
.rtl h4,
.rtl h5,
.rtl h6 {
  text-align: right;
}

.rtl p {
  text-align: right;
  line-height: 1.8; /* Better for Arabic text */
}

/* Header Adjustments */
.rtl .header-content {
  flex-direction: row-reverse;
}

.rtl .main-navigation ul {
  flex-direction: row-reverse;
}

.rtl .main-navigation li {
  margin: 0 0 0 1rem;
}

.rtl .language-switcher {
  flex-direction: row-reverse;
}

/* Hero Section */
.rtl .hero-content {
  direction: rtl;
}

.rtl .hero-buttons {
  justify-content: flex-end;
}

.rtl .hero-buttons .btn-primary,
.rtl .hero-buttons .btn-secondary {
  margin: 0 0 0 1rem;
}

/* Features Grid */
.rtl .features-grid {
  direction: rtl;
}

.rtl .feature-card {
  text-align: right;
}

.rtl .feature-icon {
  margin: 0 0 1rem auto;
}

/* Programs Section */
.rtl .programs-grid {
  direction: rtl;
}

.rtl .program-card {
  text-align: right;
}

.rtl .program-features {
  justify-content: flex-end;
}

.rtl .program-features .feature-tag {
  margin: 0 0 0.5rem 0.5rem;
}

.rtl .learn-more {
  text-align: right;
}

.rtl .learn-more i {
  margin: 0 0.5rem 0 0;
  transform: rotate(180deg);
}

/* Testimonials */
.rtl .testimonials-grid {
  direction: rtl;
}

.rtl .testimonial-card {
  text-align: right;
}

.rtl .testimonial-author {
  flex-direction: row-reverse;
}

.rtl .author-avatar {
  margin: 0 0 0 1rem;
}

.rtl .author-info {
  text-align: right;
}

/* Teachers Section */
.rtl .teachers-grid {
  direction: rtl;
}

.rtl .teacher-card {
  text-align: right;
}

.rtl .teacher-specialties {
  justify-content: flex-end;
}

.rtl .teacher-specialties .specialty-tag {
  margin: 0 0 0.5rem 0.5rem;
}

/* FAQ Section */
.rtl .faq-question {
  text-align: right;
  flex-direction: row-reverse;
}

.rtl .faq-answer {
  text-align: right;
}

.rtl .faq-toggle {
  margin: 0 0 0 auto;
}

/* Blog Section */
.rtl .blog-grid {
  direction: rtl;
}

.rtl .blog-card {
  text-align: right;
}

.rtl .blog-meta {
  justify-content: flex-end;
}

.rtl .blog-meta span {
  margin: 0 0 0 1rem;
}

.rtl .read-more {
  text-align: right;
}

.rtl .read-more i {
  margin: 0 0.5rem 0 0;
  transform: rotate(180deg);
}

/* Footer */
.rtl .footer-content {
  direction: rtl;
}

.rtl .footer-section {
  text-align: right;
}

.rtl .footer-section ul {
  text-align: right;
}

.rtl .contact-info .contact-item {
  flex-direction: row-reverse;
}

.rtl .contact-info .contact-item i {
  margin: 0 0 0 0.5rem;
}

.rtl .newsletter-input {
  flex-direction: row-reverse;
}

.rtl .newsletter-input input {
  border-radius: 0 25px 25px 0;
}

.rtl .newsletter-input button {
  border-radius: 25px 0 0 25px;
}

.rtl .social-links {
  justify-content: flex-end;
}

.rtl .footer-bottom-content {
  flex-direction: row-reverse;
}

.rtl .footer-bottom-links {
  flex-direction: row-reverse;
}

.rtl .footer-bottom-links a {
  margin: 0 0 0 1rem;
}

/* CTA Section */
.rtl .cta-buttons {
  justify-content: center;
}

.rtl .cta-contact-info {
  direction: rtl;
}

.rtl .cta-contact-info .contact-item {
  flex-direction: row-reverse;
}

.rtl .cta-contact-info .contact-item i {
  margin: 0 0 0 0.5rem;
}

.rtl .trust-indicators {
  direction: rtl;
}

.rtl .trust-item {
  flex-direction: row-reverse;
}

.rtl .trust-item i {
  margin: 0 0 0 0.5rem;
}

/* Stats Section */
.rtl .student-stats {
  direction: rtl;
}

.rtl .stat-item {
  text-align: right;
}

/* Mobile Menu RTL */
.rtl .mobile-menu-overlay {
  direction: rtl;
}

.rtl .mobile-navigation {
  text-align: right;
}

.rtl .mobile-language-switcher {
  text-align: right;
}

.rtl .mobile-cta {
  text-align: right;
}

/* Form Adjustments */
.rtl form {
  direction: rtl;
}

.rtl input,
.rtl textarea,
.rtl select {
  text-align: right;
  direction: rtl;
}

.rtl .form-group {
  text-align: right;
}

.rtl label {
  text-align: right;
}

/* Navigation Arrows */
.rtl .prev-arrow {
  transform: rotate(180deg);
}

.rtl .next-arrow {
  transform: rotate(180deg);
}

/* Pagination */
.rtl .pagination {
  direction: rtl;
}

.rtl .page-numbers {
  flex-direction: row-reverse;
}

/* Back to Top Button */
.rtl #back-to-top {
  left: 30px;
  right: auto;
}

/* Floating Elements */
.rtl .floating-element {
  animation-direction: reverse;
}

/* Custom Arabic Font Support with Cairo */
.rtl {
  font-family:
    "Cairo", "Arabic UI Text", "Geeza Pro", "Arabic Typesetting", sans-serif !important;
  line-height: 1.7;
}

.rtl h1,
.rtl h2,
.rtl h3,
.rtl h4,
.rtl h5,
.rtl h6 {
  font-family:
    "Cairo", "Arabic UI Text", "Geeza Pro", "Arabic Typesetting", sans-serif !important;
  font-weight: 700;
  line-height: 1.4;
}

/* Arabic language specific styling */
html[lang="ar"] *,
html[lang="ar-SA"] *,
body.arabic *,
.arabic * {
  /* font-family: "Cairo", "Arabic UI Text", "Geeza Pro", "Arabic Typesetting",
    sans-serif !important; */
}

/* Enhanced typography for Arabic */
.rtl p,
.rtl span,
.rtl div {
  font-family:
    "Cairo", "Arabic UI Text", "Geeza Pro", "Arabic Typesetting", sans-serif !important;
}

/* Navigation in Arabic */
.rtl nav,
.rtl .nav,
.rtl .navigation,
.rtl .main-navigation {
  font-family:
    "Cairo", "Arabic UI Text", "Geeza Pro", "Arabic Typesetting", sans-serif !important;
  font-weight: 500;
}

/* Buttons and UI elements */
.rtl .btn,
.rtl button,
.rtl .button,
.rtl input[type="submit"],
.rtl input[type="button"] {
  font-family:
    "Cairo", "Arabic UI Text", "Geeza Pro", "Arabic Typesetting", sans-serif !important;
  font-weight: 500;
}

/* Form elements */
.rtl input,
.rtl textarea,
.rtl select {
  font-family:
    "Cairo", "Arabic UI Text", "Geeza Pro", "Arabic Typesetting", sans-serif !important;
}

/* Arabic Text Spacing */
.rtl p,
.rtl li,
.rtl span {
  word-spacing: 0.1em;
  letter-spacing: 0.02em;
}

/* List Adjustments */
/* .rtl ul,
.rtl ol {
  padding-right: 1.5em;
  padding-left: 0;
} */

.rtl li {
  text-align: right;
}

/* Table Adjustments */
.rtl table {
  direction: rtl;
}

.rtl th,
.rtl td {
  text-align: right;
}

/* Media Queries for RTL */
@media (max-width: 768px) {
  .rtl .header-content {
    flex-direction: column;
    text-align: center;
  }

  .rtl .main-navigation ul {
    flex-direction: column;
    text-align: center;
  }

  .rtl .main-navigation li {
    margin: 0.5rem 0;
  }

  .rtl .hero-buttons {
    justify-content: center;
  }

  .rtl .hero-buttons .btn-primary,
  .rtl .hero-buttons .btn-secondary {
    margin: 0.5rem;
  }
}

/* Print Styles for RTL */
@media print {
  .rtl * {
    direction: rtl !important;
    text-align: right !important;
  }
}

/* Accessibility Improvements for RTL */
.rtl .screen-reader-text {
  direction: rtl;
}

.rtl :focus {
  outline-offset: 2px;
}

/* WordPress Block Editor RTL Support */
.rtl .wp-block {
  direction: rtl;
  text-align: right;
}

.rtl .wp-block-quote {
  border-right: 4px solid #2c5aa0;
  border-left: none;
  padding-right: 1em;
  padding-left: 0;
}

.rtl .wp-block-pullquote {
  text-align: right;
}

/* Custom RTL Animations */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.rtl .animate-slide-in-right {
  animation: slideInFromRight 0.6s ease-out;
}

.rtl .animate-slide-in-left {
  animation: slideInFromLeft 0.6s ease-out;
}
