/*
 * Tek Translate: Arabic typography and right-to-left fixes.
 *
 * 1. Arabic glyphs for the site's fonts. Declaring IBM Plex Sans Arabic under the family names the site
 *    already uses, limited to the Arabic Unicode ranges, makes browsers draw Latin text with the original
 *    font and Arabic text with Plex, regardless of per-widget font settings. Files are fetched only when
 *    a page contains Arabic characters.
 */
@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-300.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-400.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-500.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-600.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "IBM Plex Sans Arabic";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-700.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-300.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-400.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-500.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-600.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-700.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-300.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-400.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-500.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-600.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-arabic-700.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* 2. Arabic pages only. */

/* Letter spacing breaks the joins between Arabic letters. */
html[lang="ar"] body,
html[lang="ar"] body :is(h1, h2, h3, h4, h5, h6, p, a, span, li, button, .elementor-heading-title, .elementor-button-text, .elementor-icon-list-text) {
	letter-spacing: normal !important;
}

/* Arabic needs more vertical room than Latin at the same size. */
html[lang="ar"] body :is(p, li, .elementor-widget-text-editor, .elementor-icon-list-text) {
	line-height: 1.8;
}

/* Arrows and chevrons point in the reading direction. */
html[dir="rtl"] :is(.fa-arrow-right, .fa-arrow-left, .fa-long-arrow-alt-right, .fa-long-arrow-alt-left,
	.fa-chevron-right, .fa-chevron-left, .fa-angle-right, .fa-angle-left, .fa-angle-double-right,
	.e-fas-arrow-right, .e-fas-arrow-left, .e-fas-long-arrow-alt-right, .e-fas-chevron-right,
	.e-fas-chevron-left, .e-fas-angle-right, .e-fas-angle-left, .eicon-arrow-right, .eicon-arrow-left,
	.eicon-chevron-right, .eicon-chevron-left, .tek-cta-2 .ico) {
	transform: scaleX(-1);
}

/* Phone numbers and email addresses keep their left-to-right order inside Arabic text. */
html[dir="rtl"] :is(a[href^="tel:"], a[href^="mailto:"], [dir="ltr"]) {
	direction: ltr;
	unicode-bidi: isolate;
}

/* 3. Language switcher widget. */
.tek-lang-switcher ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tek-lang-gap, 12px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.tek-lang-switcher a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
}
.tek-lang-switcher .tek-lang-flag {
	width: 18px;
	height: auto;
}

/*
 * 4. Arabic twins of the Customizer CSS rules that target English-only IDs.
 *    #menu-item-34 (Schedule Free Assessment) -> #menu-item-7654, .page-id-5530 (Tekno365 Subscription) -> .page-id-7616.
 *    If the Arabic menu or page is ever rebuilt, update these IDs.
 */
#menu-item-7654 a {
	color: #fff !important;
}
#menu-1-cd94303 #menu-item-7654 a {
	color: #fff !important;
	background: linear-gradient(-90deg, #00AE4E, #004820);
	border-radius: 12px;
}
.page-id-7616 .elementor-icon-box-content ul {
	margin-bottom: 0 !important;
}

/*
 * 5. Announcement bar (header, .tk-top-announcement) and AWS Marketplace popup (.tk-aws-popup) set their own
 *    font stack. Put the Arabic face first: it only covers Arabic characters, so Latin text keeps their design.
 */
html[lang="ar"] :is(.tk-top-announcement, .tk-aws-popup) {
	font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif !important;
}
html[lang="ar"] :is(.tk-top-announcement-label, .tk-aws-kicker, .tk-aws-badge, .tk-aws-popup h2) {
	letter-spacing: normal !important;
}
