/*
 * Zahra Dental — RTL overrides
 * WordPress loads this automatically when is_rtl() is true.
 *
 * The theme is built almost entirely with CSS logical properties
 * (margin-inline, inset-inline, border-inline, text-align: start/end), so the
 * layout mirrors on its own. Only the few things that cannot flip logically —
 * directional icons, Latin-only elements, and font stack — are handled here.
 */

body {
	--zd-font-body: "ModamFaNum", "Vazirmatn", Tahoma, ui-sans-serif, system-ui, sans-serif;
	--zd-font-display: "Yekan Bakh FaNum", "Vazirmatn", Tahoma, ui-sans-serif, system-ui, sans-serif;
	letter-spacing: 0;
}

/* Persian headings look better without the negative tracking used for Latin */
h1, h2, h3, h4,
.zd-hero__title,
.zd-section-title,
.zd-stat__value,
.zd-price__value {
	letter-spacing: 0;
	line-height: 1.35;
}

.zd-eyebrow,
.zd-team-card__role,
.zd-footer__title,
.zd-post-nav__label,
.zd-ba figcaption {
	letter-spacing: 0;
}

/* Mirror directional glyphs (arrows, chevrons, next/prev) */
.zd-i--arrow,
.zd-slider__btn svg,
.zd-post-nav svg,
.zd-breadcrumbs svg {
	transform: scaleX(-1);
}

.zd-btn:hover .zd-i--arrow {
	transform: scaleX(-1) translateX(3px);
}

/* Phone numbers, emails and times stay LTR even inside RTL text.
   Only elements that contain *nothing but* the number are forced — anything
   that also carries a Persian label uses an inner <span dir="ltr"> instead,
   otherwise the label and the digits reorder each other. */
.zd-header__phone,
[dir="ltr"],
.zd-hours__time,
.zd-stat__value {
	direction: ltr;
	unicode-bidi: isolate;
}

/* Compact FaNum glyphs without affecting LTR email addresses or Latin copy. */
.zd-number,
.zd-hours__time,
.zd-stat__value,
.zd-pagination .page-numbers,
.zd-404__code {
	letter-spacing: -.02em;
}

/* Latin numerals in an RTL layout read best isolated */
.zd-hours__row,
.zd-price__value {
	unicode-bidi: isolate;
}

/* Never mirror photography in RTL. The frame itself supplies the direction. */
.zd-hero__figure {
	border-radius: 8px 8px 8px 48px;
	transform: none;
}

.zd-hero__figure > * {
	transform: none;
}

/* Article prose: quotes and lists */
.zd-prose blockquote {
	border-inline-start: 4px solid var(--zd-mint);
}

.zd-post-nav__next {
	text-align: start;
}

.zd-post-nav__prev {
	text-align: end;
}
