/* Custom Styles for HPJ Design */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page load fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: fadeIn 0.5s ease-in-out;
}

/* 图片懒加载优化 */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

img.lazy-loading {
  background-color: #f5f0eb;
  background-image: linear-gradient(90deg, #f5f0eb 0%, #e3d1c1 50%, #f5f0eb 100%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 图片加载错误处理 */
img[data-src]:not([src]) {
  min-height: 200px;
  background-color: #f5f0eb;
}

/* Add a subtle animation to cards on hover */
.card-hover-effect {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card-hover-effect:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
