/* Language-based Font Switching */

/* Default - English Fonts */
body {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, h6, .heading {
  font-family: 'Roboto Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Persian/Farsi - YekanBakh Font */
body.lang-fa {
  font-family: 'YekanBakh', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body.lang-fa p,
body.lang-fa span:not([class*="fa-"]):not([class*="icon-"]),
body.lang-fa a,
body.lang-fa li,
body.lang-fa div:not([class*="fa-"]):not([class*="icon-"]) {
  font-family: 'YekanBakh', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

body.lang-fa h1,
body.lang-fa h2,
body.lang-fa h3,
body.lang-fa h4,
body.lang-fa h5,
body.lang-fa h6,
body.lang-fa .heading {
  font-family: 'YekanBakh', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Preserve Font Awesome and icon fonts */
body.lang-fa i,
body.lang-fa [class*="fa-"],
body.lang-fa [class*="icon-"],
body.lang-fa .fa,
body.lang-fa .fas,
body.lang-fa .far,
body.lang-fa .fal,
body.lang-fa .fab {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
}

/* English - Noto Sans for text, Roboto Condensed for headings */
body.lang-en,
body.lang-en p,
body.lang-en span,
body.lang-en a,
body.lang-en li,
body.lang-en div {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.lang-en h1,
body.lang-en h2,
body.lang-en h3,
body.lang-en h4,
body.lang-en h5,
body.lang-en h6,
body.lang-en .heading {
  font-family: 'Roboto Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* German - Same as English */
body.lang-de,
body.lang-de p,
body.lang-de span,
body.lang-de a,
body.lang-de li,
body.lang-de div {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.lang-de h1,
body.lang-de h2,
body.lang-de h3,
body.lang-de h4,
body.lang-de h5,
body.lang-de h6,
body.lang-de .heading {
  font-family: 'Roboto Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* French - Same as English and German */
body.lang-fr,
body.lang-fr p,
body.lang-fr span,
body.lang-fr a,
body.lang-fr li,
body.lang-fr div {
  font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.lang-fr h1,
body.lang-fr h2,
body.lang-fr h3,
body.lang-fr h4,
body.lang-fr h5,
body.lang-fr h6,
body.lang-fr .heading {
  font-family: 'Roboto Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* RTL Support for Persian */
body.lang-fa {
  direction: rtl;
  text-align: right;
}

/* Fix RTL for help section - slick slider resets direction */
body.lang-fa .help .slick-slider,
body.lang-fa .help .slick-list,
body.lang-fa .help .slick-track,
body.lang-fa .help .slick-slide,
body.lang-fa .help .slick-slide > div {
  direction: rtl;
}

body.lang-fa .help__content {
  direction: rtl;
  text-align: right;
}

body.lang-fa .help__content h2,
body.lang-fa .help__content p,
body.lang-fa .help__content ul,
body.lang-fa .help__content li {
  direction: rtl;
  text-align: right;
}

body.lang-fa .help__content-list li {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

/* Override any conflicting font families */
body.lang-fa input,
body.lang-fa textarea,
body.lang-fa button,
body.lang-fa select {
  font-family: 'YekanBakh', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
