/**
 * Persian pages only (loaded after theme-rtl.css, which is theme.css mirrored by rtlcss).
 *
 * What a mirror cannot do: the typeface, the looser line spacing Persian needs,
 * and the few things that must point the other way or stay as they are.
 */

/* Persian letters come from Vazirmatn; Latin letters and digits keep the site's own typefaces. */
@font-face {
	font-family: Vazirmatn;
	src: url("../fonts/vazirmatn-variable.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}

:root {
	--fa-text: Figtree, Vazirmatn, Tahoma, "Segoe UI", sans-serif;
	--fa-head: Vazirmatn, Figtree, Tahoma, "Segoe UI", sans-serif;
	--sans: var(--fa-text);
	--serif: var(--fa-head);
	--wp--preset--font-family--figtree: var(--fa-text);
	--wp--preset--font-family--newsreader: var(--fa-head);
}

/* Letter spacing breaks the joins between Persian letters; capitals and italics do not exist. */
html[dir="rtl"] * { letter-spacing: 0 !important; text-transform: none !important; }
html[dir="rtl"] em, html[dir="rtl"] i, html[dir="rtl"] cite { font-style: normal; }

/* Persian needs more room between lines than Latin. */
html[dir="rtl"] body { line-height: 1.9; }
html[dir="rtl"] p, html[dir="rtl"] li, html[dir="rtl"] dd, html[dir="rtl"] dt { line-height: 1.9; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 { font-family: var(--fa-head) !important; font-weight: 600 !important; line-height: 1.5 !important; }
html[dir="rtl"] h1, html[dir="rtl"] h2 { font-weight: 500 !important; line-height: 1.45 !important; }
/* The emphasised half of a headline is italic in English; in Persian it is set lighter instead. */
html[dir="rtl"] h1 em, html[dir="rtl"] h2 em { font-weight: 300; }

/* Arrows and chevrons point the way the text reads. */
html[dir="rtl"] .wp-block-button.is-style-tcc-text-link > .wp-block-button__link::after,
html[dir="rtl"] .tcc-readmore::after,
html[dir="rtl"] .tcc-nav-mobile .is-menu-open .wp-block-navigation-item__content::after { transform: scaleX(-1); }
html[dir="rtl"] .tcc-crumbs li + li::before { transform: rotate(90deg); }
html[dir="rtl"] .wp-block-button.is-style-tcc-text-link > .wp-block-button__link, html[dir="rtl"] .tcc-readmore { text-align: right; }

/* Phone and fax numbers, postal codes and web addresses always read left to right. */
html[dir="rtl"] a[href^="tel:"], html[dir="rtl"] .tcc-ltr { direction: ltr; unicode-bidi: isolate; }

/* The logo in the mobile menu sits at the start of the line, which is now the right. */
html[dir="rtl"] .tcc-nav-mobile .is-menu-open .wp-block-navigation__responsive-dialog::before { background-position: right var(--gutter) center; }

/* Step numbers in Persian digits. */
html[dir="rtl"] .tcc-step::before { content: counter(step, persian); font-family: var(--fa-head); font-weight: 500; }
