/*
 * Sahah Addariyah — Font global "Stack Sans Text"
 * Dipakai di SEMUA halaman kecuali laman Artikel (dikontrol lewat class
 * 'sahah-font-stack' pada <body> dari sisi PHP).
 *
 * Catatan Arabic: Stack Sans Text adalah font Latin. Untuk teks Arab
 * (mis. versi /ar/), huruf yang tidak ada di Stack Sans otomatis jatuh ke
 * fallback Arab di stack (Segoe UI / Noto Sans Arabic / Tahoma), jadi teks
 * Arab tetap tampil rapi.
 */

@font-face {
	font-family: "Stack Sans Text";
	src: url("../fonts/stacksanstext-extralight.woff2") format("woff2");
	font-weight: 200;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Stack Sans Text";
	src: url("../fonts/stacksanstext-light.woff2") format("woff2");
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Stack Sans Text";
	src: url("../fonts/stacksanstext-regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Stack Sans Text";
	src: url("../fonts/stacksanstext-medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Stack Sans Text";
	src: url("../fonts/stacksanstext-semibold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Stack Sans Text";
	src: url("../fonts/stacksanstext-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* Satu variabel supaya gampang diubah kalau perlu */
body.sahah-font-stack {
	--sahah-font-stack: "Stack Sans Text", "Segoe UI", system-ui, -apple-system,
		"Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

/* Terapkan ke body (diwariskan ke sebagian besar teks) */
body.sahah-font-stack {
	font-family: var(--sahah-font-stack) !important;
}

/* Elemen teks yang biasanya di-set font-family sendiri oleh tema/Elementor,
   jadi harus ditarget eksplisit. Sengaja TIDAK menyertakan elemen ikon
   (i, .fa*, .dashicons, .eicon, svg) supaya ikon font tidak rusak. */
body.sahah-font-stack :is(
	h1, h2, h3, h4, h5, h6,
	p, a, span, li, ul, ol, dl, dt, dd,
	blockquote, figcaption, label, small, strong, em, b,
	button, input, select, textarea, optgroup,
	th, td, caption,
	.site-title, .site-description,
	nav, .menu, .menu a, .nav-menu a, .sub-menu a,
	.widget, .widget-title,
	.elementor-widget-container, .elementor-heading-title,
	.elementor-button, .elementor-text-editor,
	.wp-block-heading, .wp-block-button__link
) {
	font-family: var(--sahah-font-stack) !important;
}

/* Kembalikan font ikon (jaga-jaga kalau ada yang terlanjur kena inherit).
   revert -> pakai nilai yang ditetapkan stylesheet ikon masing-masing. */
body.sahah-font-stack :is(
	i[class], .fa, .fas, .far, .fal, .fab, .fad,
	[class^="fa-"], [class*=" fa-"],
	.dashicons, [class^="dashicons"], [class*=" dashicons"],
	.eicon, [class^="eicon"], [class*=" eicon"],
	.elementor-icon i, .elementor-social-icon i
) {
	font-family: revert !important;
}

/* Section custom kita (Lobi & Tentang) ikut Stack Sans juga —
   termasuk judul yang tadinya serif di halaman Tentang Kami. */
body.sahah-font-stack .sahah-tentang {
	--tt-serif: var(--sahah-font-stack);
}
