@font-face {
  font-family: "IRANYekanX VF";
  src: url("fonts/IRANYekanXVF.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* hide the page for a moment while Persian strings are applied (avoids an English flash) */
html[data-lang="fa"]:not(.i18n-ready) body { visibility: hidden; }

/* Persian typography: IRANYekanX VF, same setup as fontiran.com (variable weight + dots axis) */
html[data-lang="fa"] body,
html[data-lang="fa"] body *:not(svg *):not([class*="w-icon"]):not(.w-icon-dropdown-toggle) {
  font-family: "IRANYekanX VF", Tahoma, sans-serif !important;
  font-variation-settings: "dots" 1;
  letter-spacing: 0 !important;
  text-transform: none !important;
  word-spacing: normal;
}
html[data-lang="fa"] h1, html[data-lang="fa"] h2, html[data-lang="fa"] h3,
html[data-lang="fa"] h4, html[data-lang="fa"] h5, html[data-lang="fa"] h6 { line-height: 1.35; }

/* split-letter effects would break Persian letter joining */
html[data-lang="fa"] .roll-char,
html[data-lang="fa"] .about-word,
html[data-lang="fa"] [class*="split-char"] { display: inline !important; transform: none !important; }
html[data-lang="fa"] .roll-line.line-clone { display: none !important; }

/* language toggle (placed next to the Contact Us button) */
.nav-button-wrap { display: flex !important; align-items: center; justify-content: flex-end; gap: 10px; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex: none;
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #111;
  font: 600 11px/1 "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-toggle button.is-active { background: #000; color: #fff; }
.lang-toggle button:not(.is-active):hover { background: rgba(0, 0, 0, 0.1); }
html[data-lang="fa"] .lang-toggle button { font-family: "IRANYekanX VF", Tahoma, sans-serif !important; letter-spacing: 0 !important; }

/* correct punctuation placement for Persian text without changing layout direction */
html[data-lang="fa"] :is(p, h1, h2, h3, h4, h5, h6, li, figcaption, blockquote, .fa-t, #aboutPara) { unicode-bidi: plaintext; }

/* slightly smaller nav buttons */
.nav-button-wrap .primary-button { zoom: 0.86; }
.nav-button-wrap { gap: 8px; }

/* split-word paragraph: inline-blocks have no strong direction, so set RTL reading order explicitly */
html[data-lang="fa"] #aboutPara { direction: rtl; unicode-bidi: normal; }

/* Persian footer: right-to-left layout (columns, text, icon rows) */
html[data-lang="fa"] .footer-primary { direction: rtl; text-align: right; }
html[data-lang="fa"] .footer-primary :is(.footer-link-list, .links-title, .footer-content-title, .footer-heading-wrap, .footer-top-wrap, .footer-locations-block, .footer-link-block, .footer-bottom-wrap, .footer-bottom-links, .footer-contact-link, .footer-heading, .footer-text, .text-body, p, div) { text-align: right; }
html[data-lang="fa"] .footer-primary :is(.footer-bottom, .footer-bottom-wrap, .footer-top-wrap, .footer-top) { direction: rtl; }

/* nav: Contact button and language toggle share one height */
.nav-button-wrap { --nav-h: 36px; align-items: center; }
.nav-button-wrap .lang-toggle { height: var(--nav-h); box-sizing: border-box; padding: 3px; }
.nav-button-wrap .lang-toggle button { height: 100%; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; }
.nav-button-wrap .primary-button { zoom: 1 !important; height: var(--nav-h) !important; min-height: 0 !important; padding: 0 !important; display: inline-flex !important; align-items: center; box-sizing: border-box; }
.nav-button-wrap .primary-button .button-content { height: 100%; min-height: 0 !important; padding: 0 18px !important; display: flex; align-items: center; justify-content: center; }
.nav-button-wrap .primary-button .button-text { font-size: 13px !important; line-height: 1 !important; margin: 0 !important; }

/* Persian FAQ: accordion questions, icons and answers read right to left */
html[data-lang="fa"] :is(.faq-area, [class*="faq-item"], [class*="faq-card"], [class*="faq-"]) { direction: rtl; }
html[data-lang="fa"] .faq-area :is(div, p, h2, h3, h4, h5, h6, a, li, span, strong, em, .w-richtext, .w-dropdown-toggle, .w-dropdown-list) { text-align: right; }
html[data-lang="fa"] .faq-area .w-dropdown-toggle { flex-direction: row; justify-content: space-between; }
html[data-lang="fa"] .faq-area :is(.w-richtext, .faq-item-content p, .faq-item-content div) { direction: rtl; unicode-bidi: plaintext; }
