/* 响应式图片样式 - 优化不同设备的图片显示 */

/* 基础响应式图片样式 */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

/* 响应式图片尺寸控制 */
.img-small {
    max-width: 300px;
}

.img-medium {
    max-width: 600px;
}

.img-large {
    max-width: 1200px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .responsive-img {
        width: 100%;
        max-width: none;
    }
    
    /* 移动端图片压缩 */
    .mobile-optimized {
        transform: scale(0.95);
        transition: transform 0.3s ease;
    }
    
    .mobile-optimized:hover {
        transform: scale(1);
    }
}

/* 平板端优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .responsive-img {
        max-width: 90%;
        margin: 0 auto;
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .high-dpi {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 背景图片响应式优化 */
.responsive-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 768px) {
    .responsive-bg {
        background-size: contain;
        background-attachment: scroll;
    }
}

/* 图片加载动画 */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.img-fade-in {
    animation: fadeInScale 0.6s ease-out;
}

/* 图片悬停效果 */
.img-hover-zoom {
    transition: transform 0.3s ease;
}

.img-hover-zoom:hover {
    transform: scale(1.05);
}

/* 产品图片特定样式 */
.product-image {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.product-image:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* 合作伙伴Logo样式 */
.partner-logo {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* 证书图片样式 */
.certificate-image {
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    padding: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 加载状态指示器 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 图片错误状态 */
.img-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.img-error::before {
    content: "⚠️ 图片加载失败";
    font-size: 14px;
    color: #666;
}

/* 性能优化类 */
.will-change {
    will-change: transform, opacity;
}

.content-visibility {
    content-visibility: auto;
    contain-intrinsic-size: 1px 5000px;
}

/* 打印样式优化 */
@media print {
    .responsive-img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .img-hover-zoom,
    .product-image:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}