/* ==================================================
   Global Font Settings
   ================================================== */

/* Main font stack for general content */
*:not(i):not(.fa):not([class*="fa-"]):not([class*="icon"]):not(.dashicons):not(.emoji),
body,
html,
div, span, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,
b, u, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    font-family: 'Philosopher', 'Amiri', serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Language-specific fonts */
[lang^="en"], :not([lang]) {
    font-family: 'Philosopher', serif !important;
}

[lang^="ar"] {
    font-family: 'Amiri', serif !important;
    direction: rtl;
    text-align: right;
}

[lang^="ar"] h1, [lang^="ar"] h2, [lang^="ar"] h3,
[lang^="ar"] h4, [lang^="ar"] h5, [lang^="ar"] h6 {
    font-weight: 700;
    line-height: 1.6;
}

/* Keep system fonts for forms and monospace for code */
input, textarea, select, button {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

code, pre, kbd, samp, tt {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
}

/* Font Awesome icons preservation */
i, [class*="fa-"], .fa, .icon, .dashicons, .wp-block-search__button {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome' !important;
}

/* Emoji support */
.emoji, img.emoji, .wp-emoji,
[class*="emoji"], ::placeholder {
    font-family: Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji !important;
}
