/* 
 * FontAwesome Fix CSS
 * Este archivo corrige problemas de visualización de iconos FontAwesome
 * Versión: 1.1 - Optimizado para rendimiento
 * Fecha: 2025-10-15
 */

/* Optimización de font-display para mejor rendimiento */
@font-face {
    font-family: "Font Awesome 6 Free";
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-solid-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: "Font Awesome 6 Brands";
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-brands-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

/* Forzar la carga correcta de FontAwesome */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* Asegurar que los iconos se muestren correctamente */
[class^="fa-"], [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "FontAwesome", sans-serif !important;
    font-weight: 900 !important;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Específico para iconos de marcas */
.fa-brands,
[class^="fa-brands"], 
[class*=" fa-brands"] {
    font-family: "Font Awesome 6 Brands", "FontAwesome", sans-serif !important;
    font-weight: 400 !important;
}

/* Específico para iconos sólidos */
.fa-solid,
[class^="fa-solid"], 
[class*=" fa-solid"] {
    font-family: "Font Awesome 6 Free", "FontAwesome", sans-serif !important;
    font-weight: 900 !important;
}

/* Fallbacks específicos para iconos problemáticos */
.fa-phone::before {
    content: "\f095" !important;
}

.fa-envelope::before {
    content: "\f0e0" !important;
}

.fa-location-dot::before {
    content: "\f3c5" !important;
}

.fa-whatsapp::before {
    content: "\f232" !important;
}

.fa-facebook-f::before {
    content: "\f39e" !important;
}

.fa-instagram::before {
    content: "\f16d" !important;
}

/* Asegurar que no hay conflictos con otros CSS */
i.fa-solid,
i.fa-brands,
span.fa-solid,
span.fa-brands {
    font-family: inherit !important;
}

i.fa-solid::before,
span.fa-solid::before {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900 !important;
}

i.fa-brands::before,
span.fa-brands::before {
    font-family: "Font Awesome 6 Brands", "FontAwesome" !important;
    font-weight: 400 !important;
}

/* Prevenir que otros estilos interfieran */
.fa-phone,
.fa-envelope,
.fa-location-dot,
.fa-whatsapp,
.fa-facebook-f,
.fa-instagram {
    font-family: inherit !important;
    font-weight: inherit !important;
}

.fa-phone::before,
.fa-envelope::before,
.fa-location-dot::before {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900 !important;
}

.fa-whatsapp::before,
.fa-facebook-f::before,
.fa-instagram::before {
    font-family: "Font Awesome 6 Brands", "FontAwesome" !important;
    font-weight: 400 !important;
}