/**
 * Cross-Browser Font & Icon Fix
 * This file MUST load last to override all other font declarations
 * Fixes issues in Firefox, Chrome, Safari, and Edge
 */

/* ============================================
   ICON FONTS - Cross-Browser Compatible
   ============================================ */

/* Font Awesome 6 - Solid */
@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("../fonts/fa-solid-900.woff2") format("woff2"),
         url("../fonts/fa-solid-900.ttf") format("truetype");
}

/* Font Awesome 6 - Regular */
@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/fa-regular-400.woff2") format("woff2"),
         url("../fonts/fa-regular-400.ttf") format("truetype");
}

/* Font Awesome 6 - Brands */
@font-face {
    font-family: "Font Awesome 6 Brands";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/fa-brands-400.woff2") format("woff2"),
         url("../fonts/fa-brands-400.ttf") format("truetype");
}

/* Font Awesome 5 Compatibility */
@font-face {
    font-family: "Font Awesome 5 Free";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("../fonts/fa-solid-900.woff2") format("woff2"),
         url("../fonts/fa-solid-900.ttf") format("truetype");
}

@font-face {
    font-family: "Font Awesome 5 Free";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/fa-regular-400.woff2") format("woff2"),
         url("../fonts/fa-regular-400.ttf") format("truetype");
}

@font-face {
    font-family: "Font Awesome 5 Brands";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/fa-brands-400.woff2") format("woff2"),
         url("../fonts/fa-brands-400.ttf") format("truetype");
}

/* Legacy FontAwesome */
@font-face {
    font-family: "FontAwesome";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/fa-solid-900.woff2") format("woff2"),
         url("../fonts/fa-solid-900.ttf") format("truetype");
}

/* Feather Icons */
@font-face {
    font-family: "feather";
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url("../fonts/feather.eot");
    src: url("../fonts/feather.eot?#iefix") format("embedded-opentype"),
         url("../fonts/feather.woff") format("woff"),
         url("../fonts/feather.ttf") format("truetype"),
         url("../fonts/feather.svg#feather") format("svg");
}

/* Bootstrap Icons */
@font-face {
    font-family: "bootstrap-icons";
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url("../fonts/bootstrap-icons.woff2") format("woff2"),
         url("../fonts/bootstrap-icons.woff") format("woff");
}

/* Themify Icons */
@font-face {
    font-family: "themify";
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url("../fonts/themify.eot");
    src: url("../fonts/themify.eot?#iefix") format("embedded-opentype"),
         url("../fonts/themify.woff") format("woff"),
         url("../fonts/themify.ttf") format("truetype"),
         url("../fonts/themify.svg#themify") format("svg");
}

/* Icomoon Icons */
@font-face {
    font-family: "icomoon";
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url("../fonts/icomoon.eot");
    src: url("../fonts/icomoon.eot?#iefix") format("embedded-opentype"),
         url("../fonts/icomoon.woff") format("woff"),
         url("../fonts/icomoon.ttf") format("truetype"),
         url("../fonts/icomoon.svg#icomoon") format("svg");
}

/* ============================================
   TEXT FONTS - Cross-Browser Compatible
   ============================================ */

/* Bebas Neue */
@font-face {
    font-family: "BebasNeue-Regular";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/BebasNeue-Regular.ttf") format("truetype");
}

/* Cerebri Sans */
@font-face {
    font-family: "cerebri-sans-regular";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/CerebriSans-Regular.woff2") format("woff2"),
         url("../fonts/CerebriSans-Regular.woff") format("woff");
}

@font-face {
    font-family: "cerebri-sans-medium";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/CerebriSans-Medium.woff2") format("woff2"),
         url("../fonts/CerebriSans-Medium.woff") format("woff");
}

@font-face {
    font-family: "cerebri-sans-semibold";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/CerebriSans-SemiBold.woff2") format("woff2"),
         url("../fonts/CerebriSans-SemiBold.woff") format("woff");
}

@font-face {
    font-family: "cerebri-sans-bold";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/CerebriSans-Bold.woff2") format("woff2"),
         url("../fonts/CerebriSans-Bold.woff") format("woff");
}

/* ============================================
   ICON CLASS FIXES
   ============================================ */

/* Force icon font families */
.fa, .fas, .far, .fal, .fad, .fab,
[class^="fa-"], [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.fas, [class^="fas "], [class*=" fas "] {
    font-weight: 900 !important;
}

.far, [class^="far "], [class*=" far "] {
    font-weight: 400 !important;
}

.fab, [class^="fab "], [class*=" fab "] {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
}

/* Feather icons */
.feather, [class^="feather-"], [class*=" feather-"],
[class^="icon-feather"], [class*=" icon-feather"] {
    font-family: "feather" !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    speak: never;
}

/* Bootstrap icons */
.bi, [class^="bi-"], [class*=" bi-"] {
    font-family: "bootstrap-icons" !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    display: inline-block;
    vertical-align: -0.125em;
}

/* Themify icons */
[class^="ti-"], [class*=" ti-"] {
    font-family: "themify" !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    speak: never;
}

/* Icomoon / Line icons */
[class^="line-icon-"], [class*=" line-icon-"],
[class^="icon-"], [class*=" icon-"] {
    font-family: "icomoon" !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    speak: never;
}

/* Exception for feather icons that use icon- prefix */
[class^="icon-feather"], [class*=" icon-feather"] {
    font-family: "feather" !important;
}

/* ============================================
   FIREFOX-SPECIFIC FIXES
   ============================================ */

@-moz-document url-prefix() {
    /* Firefox needs explicit font-weight for icons */
    .fa, .fas, .far, .fal, .fad, .fab {
        font-weight: inherit;
    }
    
    .fas {
        font-weight: 900 !important;
    }
    
    .far {
        font-weight: 400 !important;
    }
    
    /* Firefox icon line-height fix */
    [class^="icon-"], [class*=" icon-"],
    [class^="bi-"], [class*=" bi-"],
    [class^="ti-"], [class*=" ti-"],
    [class^="feather"], [class*=" feather"] {
        line-height: inherit;
    }
}

/* ============================================
   WEBKIT/CHROME FIXES
   ============================================ */

@media screen and (-webkit-min-device-pixel-ratio: 0) {
    /* Chrome/Safari icon rendering */
    .fa, .fas, .far, .fab,
    [class^="icon-"], [class*=" icon-"],
    [class^="bi-"], [class*=" bi-"],
    [class^="ti-"], [class*=" ti-"] {
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
    }
}
