/* Font loading optimization - Google Fonts are now loaded in HTML head */
/* Font-display properties for smooth loading */

/* Force font-display: swap for all EB Garamond usage */
@font-face {
    font-family: 'EB Garamond';
    font-display: swap;
}

/* Ensure all elements using EB Garamond have font-display: swap */
body,
h1, h2, h3, h4, h5, h6,
.navbar-brand,
.navbar-nav .nav-link,
.event-card .event-banner,
.event-list-item .event-banner,
.left-column-header,
.btn-footer-subscribe,
.dropdown-header,
.dropdown-item,
.btn-custom-action,
#calendar-type-nav .btn,
.mobile-header .mobile-nav,
.left-nav li a,
.left-nav--external li a,
.left-nav--links li a {
    font-display: swap;
}

/* Add a class to detect when fonts are loaded */
.fonts-loaded {
    font-display: swap;
}

/* Prevent font synthesis to avoid browser-generated fonts */
* {
    font-synthesis: none;
}

/* Ensure consistent font rendering */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Force immediate display of fallback fonts */
body {
    font-display: swap !important;
}

/* Ensure headings use consistent fallback */
h1, h2, h3, h4, h5, h6 {
    font-display: swap !important;
} 