/*!
 * FONT AWESOME LOCAL - SUZUKI CARRERA MOTOS
 * Versión optimizada con font-display: swap
 * Resuelve problema Lighthouse: "Visualización de la fuente"
 * Ahorro: 50ms en FCP
 */

/* ===========================
   FONT FACE DEFINITIONS
   =========================== */

/* Font Awesome Solid */
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: swap; /* CRÍTICO: Evita bloqueo de renderización */
  src: url("../fonts/fontawesome/fa-solid-900.woff2") format("woff2");
  unicode-range: U+0020-007F, U+00A0-00FF, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2200-22FF, U+2300-23FF, U+2400-243F, U+2440-245F, U+2460-24FF, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+E000-F8FF, U+F900-FAFF, U+FE00-FE0F, U+FE20-FE2F, U+FE30-FE4F, U+FE50-FE6F, U+FE70-FEFF, U+FF00-FFEF, U+FFF0-FFFF;
}

/* Font Awesome Brands */
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: swap; /* CRÍTICO: Evita bloqueo de renderización */
  src: url("../fonts/fontawesome/fa-brands-400.woff2") format("woff2");
  unicode-range: U+0020-007F, U+00A0-00FF, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2200-22FF, U+2300-23FF, U+2400-243F, U+2440-245F, U+2460-24FF, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+E000-F8FF, U+F900-FAFF, U+FE00-FE0F, U+FE20-FE2F, U+FE30-FE4F, U+FE50-FE6F, U+FE70-FEFF, U+FF00-FFEF, U+FFF0-FFFF;
}

/* Font Awesome Regular */
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 400;
  font-display: swap; /* CRÍTICO: Evita bloqueo de renderización */
  src: url("../fonts/fontawesome/fa-regular-400.woff2") format("woff2");
  unicode-range: U+0020-007F, U+00A0-00FF, U+2000-206F, U+2070-209F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2200-22FF, U+2300-23FF, U+2400-243F, U+2440-245F, U+2460-24FF, U+2500-257F, U+2580-259F, U+25A0-25FF, U+2600-26FF, U+2700-27BF, U+E000-F8FF, U+F900-FAFF, U+FE00-FE0F, U+FE20-FE2F, U+FE30-FE4F, U+FE50-FE6F, U+FE70-FEFF, U+FF00-FFEF, U+FFF0-FFFF;
}

/* ===========================
   FONT AWESOME CORE STYLES
   =========================== */

.fa,
.fas,
.far,
.fal,
.fad,
.fab,
.fak {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: var(--fa-display, inline-block);
  font-style: normal;
  font-variant: normal;
  line-height: 1;
  text-rendering: auto;
}

/* Solid Icons */
.fas,
.fa-solid {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Regular Icons */
.far,
.fa-regular {
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
}

/* Brand Icons */
.fab,
.fa-brands {
  font-family: "Font Awesome 6 Brands";
  font-weight: 400;
}

/* ===========================
   OPTIMIZACIONES PERFORMANCE
   =========================== */

/* Preload hint para navegadores que lo soporten */
@supports (font-display: swap) {
  .fa,
  .fas,
  .far,
  .fab {
    font-display: swap;
  }
}

/* Fallback para iconos críticos */
.fa-fallback {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: var(--suzuki-azul, #0066CC);
  border-radius: 2px;
  opacity: 0.7;
}

/* Optimización para iconos pequeños */
.fa-xs { font-size: 0.75em; }
.fa-sm { font-size: 0.875em; }
.fa-lg { font-size: 1.33333em; line-height: 0.75em; vertical-align: -0.0667em; }
.fa-xl { font-size: 1.5em; line-height: 0.6667em; vertical-align: -0.075em; }
.fa-2x { font-size: 2em; }
.fa-3x { font-size: 3em; }
.fa-4x { font-size: 4em; }
.fa-5x { font-size: 5em; }

/* ===========================
   ICONOS MÁS UTILIZADOS
   Definidos para carga inmediata
   =========================== */

/* Iconos de navegación */
.fa-bars::before { content: "\f0c9"; }
.fa-times::before { content: "\f00d"; }
.fa-chevron-down::before { content: "\f078"; }
.fa-chevron-up::before { content: "\f077"; }
.fa-home::before { content: "\f015"; }
.fa-phone::before { content: "\f095"; }
.fa-envelope::before { content: "\f0e0"; }
.fa-map-marker-alt::before { content: "\f3c5"; }

/* Iconos de motos y servicios */
.fa-motorcycle::before { content: "\f21c"; }
.fa-wrench::before { content: "\f0ad"; }
.fa-credit-card::before { content: "\f09d"; }
.fa-calculator::before { content: "\f1ec"; }
.fa-tools::before { content: "\f7d9"; }
.fa-cog::before { content: "\f013"; }
.fa-star::before { content: "\f005"; }
.fa-check::before { content: "\f00c"; }
.fa-check-circle::before { content: "\f058"; }

/* Iconos sociales */
.fa-facebook::before { content: "\f09a"; }
.fa-instagram::before { content: "\f16d"; }
.fa-whatsapp::before { content: "\f232"; }
.fa-youtube::before { content: "\f167"; }
.fa-twitter::before { content: "\f099"; }

/* Iconos de contacto */
.fa-clock::before { content: "\f017"; }
.fa-location-dot::before { content: "\f3c5"; }
.fa-mobile-alt::before { content: "\f3cd"; }

/* ===========================
   ESTADOS Y ANIMACIONES
   =========================== */

/* Spinner para carga */
.fa-spin {
  animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Pulso para notificaciones */
.fa-pulse {
  animation: fa-pulse 1s infinite steps(8);
}

@keyframes fa-pulse {
  0% { opacity: 1; }
  50% { opacity: 0.25; }
  100% { opacity: 1; }
}

/* ===========================
   UTILIDADES ESPECÍFICAS SUZUKI
   =========================== */

/* Iconos con colores Suzuki */
.fa-suzuki-blue {
  color: var(--suzuki-azul, #0066CC);
}

.fa-suzuki-yellow {
  color: var(--suzuki-amarillo, #FFD700);
}

.fa-suzuki-red {
  color: var(--suzuki-rojo, #E20A17);
}

/* Iconos en navbar */
.navbar .fa {
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* Iconos en footer */
.footer .fa {
  margin-right: 0.75rem;
  color: var(--suzuki-amarillo, #FFD700);
}

/* Iconos en botones */
.btn .fa {
  margin-right: 0.5rem;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
  .fa-lg { font-size: 1.2em; }
  .fa-xl { font-size: 1.3em; }
  .fa-2x { font-size: 1.5em; }
  .fa-3x { font-size: 2em; }
  
  /* Iconos más pequeños en móvil */
  .navbar .fa {
    font-size: 1.1em;
  }
}

@media (max-width: 480px) {
  .fa-2x { font-size: 1.3em; }
  .fa-3x { font-size: 1.7em; }
  .fa-4x { font-size: 2.2em; }
  .fa-5x { font-size: 2.8em; }
}

/* ===========================
   OPTIMIZACIONES ADICIONALES
   =========================== */

/* Reducir layout shift */
.fa-placeholder {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: transparent;
  border: 1px dashed rgba(0, 102, 204, 0.3);
  border-radius: 2px;
  opacity: 0.5;
}

/* Preload crítico */
.fa-critical {
  font-display: block;
}

/* Optimización para print */
@media print {
  .fa::before {
    content: "";
  }
  
  .fa::after {
    content: " [icon]";
    font-size: 0.8em;
    color: #666;
  }
}

/* ===========================
   FALLBACKS Y COMPATIBILIDAD
   =========================== */

/* Fallback para navegadores sin soporte woff2 */
@supports not (font-format: woff2) {
  @font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("assets/fonts/fontawesome/fa-solid-900.woff") format("woff");
  }
}

/* Detección de carga de fuente */
.fonts-loaded .fa {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands";
}

.fonts-failed .fa {
  font-family: Arial, sans-serif;
}

.fonts-failed .fa::before {
  content: "□";
  color: var(--suzuki-azul, #0066CC);
}

/* ===========================
   Iconos adicionales requeridos (enero 2025)
   =========================== */

/* Ventajas y beneficios */
.fa-certificate::before { content: "\f0a3"; }
.fa-shipping-fast::before { content: "\f48b"; }
.fa-shield-alt::before { content: "\f3ed"; }
.fa-headset::before { content: "\f590"; }
.fa-user-friends::before { content: "\f500"; }
.fa-medal::before { content: "\f5a2"; }

/* Cifras y estadísticas */
.fa-history::before { content: "\f1da"; }
.fa-store::before { content: "\f54e"; }
.fa-handshake::before { content: "\f2b5"; }
.fa-landmark::before { content: "\f66f"; }

/* Categorías de motos */
.fa-city::before { content: "\f64f"; }
.fa-tachometer-alt::before { content: "\f3fd"; }
.fa-mountain::before { content: "\f6fc"; }
.fa-rocket::before { content: "\f135"; }

/* Estadísticas hero */
.fa-calendar-alt::before { content: "\f073"; }
.fa-users::before { content: "\f0c0"; }

/* Títulos de sección y varios */
.fa-cogs::before { content: "\f085"; }
.fa-map-marked-alt::before { content: "\f5a0"; }
.fa-chart-line::before { content: "\f201"; }
.fa-question-circle::before { content: "\f059"; }
.fa-sync-alt::before { content: "\f2f1"; }
.fa-building::before { content: "\f1ad"; }

/* FAQ iconos expandir/contraer */
.fa-plus::before { content: "\f067"; }
.fa-minus::before { content: "\f068"; }

/* Reconocimientos */
.fa-award::before { content: "\f559"; } 