/* 
 * Font Consistency Override for Central Pages
 * Ensures all elements use Inter font family consistently
 * Excludes Font Awesome icons to preserve icon functionality
 */

/* Base font family for body and html */
body,
html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.heading-lg, .heading-md, .heading-sm,
.title, .subtitle,
.display-1, .display-2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Text elements */
p, span, div, a, li, td, th,
.text-sm, .text-md, .text-lg,
.small-heading {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Form elements */
input, textarea, select, button,
.form-control, .form-select, .btn,
.site-button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Navigation */
.nav, .navbar, .nav-link, .nav-item,
.navbar-nav, .sub-menu, .menu-item {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Footer */
footer, .footer, .site-footer,
.footer-col, .footer-top, .footer-bottom {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Override inline styles - but NOT for Font Awesome elements */
[style*="font-family"]:not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not([class*="fa-"]) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* CRITICAL: Font Awesome icons MUST be preserved - placed LAST to override everything */
/* Target all possible Font Awesome icon patterns with maximum specificity */

/* Solid icons (.fas, .fa) need font-weight 900 */
i.fas, i.fa,
.fas, .fa,
[class*="fa-"].fas, [class*="fa-"].fa,
body i.fas, body i.fa,
body .fas, body .fa {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome' !important;
    font-style: normal !important;
    font-weight: 900 !important; /* Solid icons require font-weight 900 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Regular icons (.far) need font-weight 400 */
i.far,
.far,
body i.far,
body .far {
    font-family: 'Font Awesome 5 Free' !important;
    font-style: normal !important;
    font-weight: 400 !important; /* Regular icons require font-weight 400 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Light icons (.fal) need font-weight 300 */
i.fal,
.fal,
body i.fal,
body .fal {
    font-family: 'Font Awesome 5 Pro' !important;
    font-style: normal !important;
    font-weight: 300 !important; /* Light icons require font-weight 300 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Brand icons (.fab) need font-weight 400 */
i.fab,
.fab,
body i.fab,
body .fab {
    font-family: 'Font Awesome 5 Brands' !important;
    font-style: normal !important;
    font-weight: 400 !important; /* Brand icons require font-weight 400 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fallback for any other Font Awesome patterns */
i[class*="fa-"]:not(.fas):not(.far):not(.fal):not(.fab):not(.fa),
[class*="fa-"]:not(.fas):not(.far):not(.fal):not(.fab):not(.fa),
body i[class*="fa-"]:not(.fas):not(.far):not(.fal):not(.fab):not(.fa),
body [class*="fa-"]:not(.fas):not(.far):not(.fal):not(.fab):not(.fa) {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome' !important;
    font-style: normal !important;
    font-weight: 900 !important; /* Default to solid weight */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure ::before and ::after pseudo-elements also get the correct font */
[class*="fa-"]::before,
[class*="fa-"]::after,
.fas::before, .fas::after,
.far::before, .far::after,
.fal::before, .fal::after,
.fab::before, .fab::after,
.fa::before, .fa::after {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome' !important;
}

/* CRITICAL: Themify icons MUST be preserved - placed LAST to override everything */
/* Target all possible Themify icon patterns with maximum specificity */
i[class^="ti-"], i[class*=" ti-"],
[class^="ti-"], [class*=" ti-"],
[class^="ti-"]::before, [class*=" ti-"]::before,
[class^="ti-"]::after, [class*=" ti-"]::after,
body i[class^="ti-"], body i[class*=" ti-"],
body [class^="ti-"], body [class*=" ti-"] {
    font-family: 'themify' !important;
    font-style: normal !important;
    font-weight: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

