/* Lazy loading optimizations */

/* Placeholder style for elements waiting to load */
[data-bg-lazy] {
  background-color: #f5f5f5;
  background-size: cover;
  background-position: center;
}

/* Smooth fade-in once loaded */
[data-bg-lazy].bg-loaded {
  animation: bgFadeIn 0.3s ease-in-out;
}

@keyframes bgFadeIn {
  from {
    opacity: 0.9;
  }
  to {
    opacity: 1;
  }
}

/* Optimize font loading */
@font-face {
  font-family: 'Poppins';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Improve Core Web Vitals */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent layout shift for images with loading attribute */
img[loading="lazy"] {
  background-color: #f5f5f5;
}
