/* Language-specific Font Application */
/* Simple approach: Only target specific text elements, leave FontAwesome alone */

/* IMPORTANT: Apply fonts immediately on page load to prevent flash of wrong font */
html[lang="kh"], body[lang="kh"] {
  font-family: 'KhmerOS Battambang', serif !important;
}

html[lang="en"], body[lang="en"] {
  font-family: 'Times New Roman', serif !important;
}

/* Default fallback */
html, body {
  font-family: 'Times New Roman', 'KhmerOS Battambang', serif;
}

/* Apply fonts ONLY to text elements - NOT FontAwesome icons */
body, html, 
h1, h2, h3, h4, h5, h6, h7, h8,
p, 
a, 
button, 
input, select, textarea,
label, small, strong, em, b, u, s, strike, del, ins, mark, sub, sup,
ul, ol, li, dl, dt, dd,
table, thead, tbody, tfoot, tr, td, th, caption,
form, fieldset, legend, optgroup, option, datalist, output,
article, aside, footer, header, main, nav, section, figure, figcaption,
address, blockquote, pre, code, kbd, samp, var, abbr, acronym, cite, dfn,
time, data, meter, progress, details, summary, dialog {
  font-family: inherit;
}

/* Helper classes for explicit language control */
.khmer-text, .kh-text {
  font-family: 'KhmerOS Battambang', serif !important;
}

.english-text, .en-text {
  font-family: 'Times New Roman', serif !important;
}