/* 懒加载图片样式 - 只对非首屏图片应用淡入效果 */
img[loading="lazy"] {
    /* 移除初始透明度为0的设置，避免首屏图片不显示 */
    transition: opacity 0.3s ease-in-out;
    /* 不设置max-width和height，避免覆盖原有样式 */
}

/* 确保各种图片容器保持原有尺寸 */
.service-one__img img[loading="lazy"] {
    width: 100% !important;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    -webkit-transition: all 500ms ease;
    transition: all 500ms ease;
}

.about-one__img img[loading="lazy"] {
    width: 100% !important;
}

.news-one__img img[loading="lazy"] {
    width: 100% !important;
}

.team-one__img-box img[loading="lazy"] {
    width: 100% !important;
}

.get-insurance__img img[loading="lazy"] {
    width: 100% !important;
}

.news-details__img img[loading="lazy"] {
    width: 100% !important;
}

.portfolio__img img[loading="lazy"] {
    width: 100% !important;
}

/* 只对加载完成的图片应用淡入效果 */
img[loading="lazy"].loaded {
    opacity: 1;
}

/* 为已加载的图片添加样式 */
img[loading="lazy"][complete] {
    opacity: 1;
}

/* 懒加载占位符样式 */
.lazy-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

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

/* 图片容器样式 */
.image-container {
    position: relative;
    overflow: hidden;
}

/* 图片加载完成后的效果 */
.image-loaded {
    transform: scale(1);
    transition: transform 0.3s ease-out;
}

/* 图片加载中的效果 */
.image-loading {
    transform: scale(0.95);
} 