/* Comprehensive font optimization for all webfonts - FCP improvement */
/* Override font-display to swap for better performance */

/* FontAwesome 6 Free - Regular */
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 400;
  font-display: swap !important;
  src: url(../webfonts/fa-regular-400.woff2) format("woff2"),
       url(../webfonts/fa-regular-400.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* FontAwesome 6 Free - Solid */
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: swap !important;
  src: url(../webfonts/fa-solid-900.woff2) format("woff2"),
       url(../webfonts/fa-solid-900.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* FontAwesome 6 Brands */
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: swap !important;
  src: url(../webfonts/fa-brands-400.woff2) format("woff2"),
       url(../webfonts/fa-brands-400.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* Iconly Fonts */
@font-face {
  font-family: "Iconly";
  font-style: normal;
  font-weight: normal;
  font-display: swap !important;
  src: url(../vendor/iconly/fonts/iconly.woff) format("woff"),
       url(../vendor/iconly/fonts/iconly.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

@font-face {
  font-family: "Iconly";
  font-style: normal;
  font-weight: bold;
  font-display: swap !important;
  src: url(../vendor/iconly/fonts/Iconly-Bold.woff) format("woff"),
       url(../vendor/iconly/fonts/Iconly-Bold.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* Iconly Broken - Fallback */
@font-face {
  font-family: "Iconly";
  font-style: normal;
  font-weight: normal;
  font-display: swap !important;
  src: url(../vendor/iconly/fonts/Iconly-Broken.woff) format("woff"),
       url(../vendor/iconly/fonts/Iconly-Broken.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* Iconly Light */
@font-face {
  font-family: "Iconly";
  font-style: normal;
  font-weight: 300;
  font-display: swap !important;
  src: url(../vendor/iconly/fonts/Iconly-light.woff) format("woff"),
       url(../vendor/iconly/fonts/Iconly-light.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* Iconly Bulk */
@font-face {
  font-family: "Iconly";
  font-style: normal;
  font-weight: 900;
  font-display: swap !important;
  src: url(../vendor/iconly/fonts/Iconly-bulk.woff) format("woff"),
       url(../vendor/iconly/fonts/Iconly-bulk.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* VideoJS Font */
@font-face {
  font-family: "VideoJS";
  font-style: normal;
  font-weight: normal;
  font-display: swap !important;
  src: url(../../../node_modules/video.js/dist/font/VideoJS.woff) format("woff"),
       url(../../../node_modules/video.js/dist/font/VideoJS.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* Geist Fonts - Next.js DevTools */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap !important;
  src: url(../../../node_modules/next/dist/esm/next-devtools/server/font/geist-latin-ext.woff2) format("woff2"),
       url(../../../node_modules/next/dist/esm/next-devtools/server/font/geist-latin-ext.woff2) format("woff2");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap !important;
  src: url(../../../node_modules/next/dist/esm/next-devtools/server/font/geist-latin.woff2) format("woff2"),
       url(../../../node_modules/next/dist/esm/next-devtools/server/font/geist-latin.woff2) format("woff2");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap !important;
  src: url(../../../node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin-ext.woff2) format("woff2"),
       url(../../../node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin-ext.woff2) format("woff2");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap !important;
  src: url(../../../node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin.woff2) format("woff2"),
       url(../../../node_modules/next/dist/esm/next-devtools/server/font/geist-mono-latin.woff2) format("woff2");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* Noto Sans Font - Vercel Analytics */
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap !important;
  src: url(../../../node_modules/@vercel/og/dist/_next/static/media/2d14134d-8b22-4658-11d4-2d86a-6f89f2b822.woff2) format("woff2"),
       url(../../../node_modules/@vercel/og/dist/_next/static/media/2d14134d-8b22-4658-11d4-2d86a-6f89f2b822.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* Font Awesome 5 Compatibility */
@font-face {
  font-family: "Font Awesome 5 Free";
  font-display: swap !important;
  font-weight: 900;
  src: url(../webfonts/fa-solid-900.woff2) format("woff2"),
       url(../webfonts/fa-solid-900.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

@font-face {
  font-family: "Font Awesome 5 Free";
  font-display: swap !important;
  font-weight: 400;
  src: url(../webfonts/fa-regular-400.woff2) format("woff2"),
       url(../webfonts/fa-regular-400.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* Legacy FontAwesome */
@font-face {
  font-family: "FontAwesome";
  font-display: swap !important;
  src: url(../webfonts/fa-solid-900.woff2) format("woff2"),
       url(../webfonts/fa-solid-900.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

@font-face {
  font-family: "FontAwesome";
  font-display: swap !important;
  src: url(../webfonts/fa-brands-400.woff2) format("woff2"),
       url(../webfonts/fa-brands-400.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

@font-face {
  font-family: "FontAwesome";
  font-display: swap !important;
  src: url(../webfonts/fa-regular-400.woff2) format("woff2"),
       url(../webfonts/fa-regular-400.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

@font-face {
  font-family: "FontAwesome";
  font-display: swap !important;
  src: url(../webfonts/fa-v4compatibility.woff2) format("woff2"),
       url(../webfonts/fa-v4compatibility.ttf) format("truetype");
  /* Font metric overrides to prevent layout shifts */
  ascent-descent: normal;
  units-per-em: 1000;
  cap-height: 700;
  x-height: 500;
  /* Performance optimizations */
  font-stretch: normal;
  font-variant: normal;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

/* Font metric overrides to prevent layout shifts */
/* These ensure consistent dimensions during font swapping */
.fa, .fas, .far, .fab, .fak, .fa-brands, .fa-regular, .fa-solid, .fa-light, .fa-thin, .fa-duotone, .fa-sharp, .fa-classic, .fa-kit, .fa-brands {
  /* Prevent layout shift by setting consistent dimensions */
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: -0.125em;
  /* Ensure text remains visible during font loading */
  font-display: swap;
  /* Reserve space to prevent layout shift */
  min-width: 1em;
  min-height: 1em;
  overflow: hidden;
}

/* Iconly icons specific overrides */
[class^="iconly-"] {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: -0.125em;
  font-display: swap;
  min-width: 1em;
  min-height: 1em;
  overflow: hidden;
}

/* VideoJS icon overrides */
.vjs-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: -0.125em;
  font-display: swap;
  min-width: 1em;
  min-height: 1em;
  overflow: hidden;
}

/* Geist font overrides */
[class*="geist-"] {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1;
  vertical-align: -0.125em;
  font-display: swap;
  min-width: 1em;
  min-height: 1em;
  overflow: hidden;
}

/* Prevent invisible text during font loading */
body {
  /* Ensure text visibility during font loading */
  font-display: swap;
}

/* Specific icon size optimizations */
.fa-1x { 
  font-size: 1em; 
  width: 1em; 
  height: 1em; 
  line-height: 1;
}

.fa-2x { 
  font-size: 2em; 
  width: 2em; 
  height: 2em; 
  line-height: 1;
}

.fa-3x { 
  font-size: 3em; 
  width: 3em; 
  height: 3em; 
  line-height: 1;
}

.fa-4x { 
  font-size: 4em; 
  width: 4em; 
  height: 4em; 
  line-height: 1;
}

.fa-5x { 
  font-size: 5em; 
  width: 5em; 
  height: 5em; 
  line-height: 1;
}

/* Critical icon prioritization */
.fa-play, .fa-play-circle, .fa-heart, .fa-star, .fa-plus, .fa-share, .fa-download, .fa-home, .fa-search, .fa-user, .fa-menu, .fa-bars, .fa-times, .fa-check, .fa-arrow-left, .fa-arrow-right, .fa-arrow-up, .fa-arrow-down, .fa-chevron-left, .fa-chevron-right, .fa-chevron-up, .fa-chevron-down, .fa-angle-left, .fa-angle-right, .fa-angle-up, .fa-angle-down {
  /* Prioritize critical icons for immediate visibility */
  font-display: swap !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Loading states with font swap optimization */
.loading {
  font-display: swap;
}

.skeleton {
  font-display: swap;
}

.breadcrumb-item {
  font-display: swap;
}

/* Fallback for slow connections */
@media (prefers-reduced-data: reduce) {
  .fa, .fas, .far, .fab {
    font-display: optional;
  }
}

/* Performance optimizations for text rendering */
body, html {
  /* Optimize text rendering */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Enable font-variant-numeric for better rendering */
  font-variant-numeric: oldstyle-nums;
  /* Optimize font loading */
  font-display: swap;
}

/* Critical text elements */
h1, h2, h3, h4, h5, h6, p, span, div, a, button {
  /* Ensure immediate text visibility */
  font-display: swap;
}

/* Icon containers with consistent sizing */
.icon-container, .button-icon, .nav-icon {
  /* Prevent layout shifts in icon containers */
  min-height: 1em;
  min-width: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-container > *, .button-icon > *, .nav-icon > * {
  /* Ensure consistent icon sizing */
  min-height: inherit;
  min-width: inherit;
}

/* Critical icons - prioritize loading */
.fa-play, .fa-play-circle, .fa-heart, .fa-star, .fa-plus, .fa-share, .fa-download {
  font-display: swap;
  /* Ensure these critical icons are always visible */
  opacity: 1 !important;
}
