/* ============================================
   产品图标呼吸动画效果
   仅作用于：AI应用产品、AI硬件产品、AI软件产品
   三个 section.category 区块内的图标
   ============================================ */

/* ======= 1. 呼吸动画关键帧 ======= */
@keyframes icon-breathe {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1) drop-shadow(0 0 0 rgba(174, 24, 25, 0));
    }
    50% {
        transform: scale(1.08);
        filter: brightness(1.1) drop-shadow(0 0 8px rgba(174, 24, 25, 0.3));
    }
}

@keyframes icon-breathe-gentle {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.05);
        filter: brightness(1.05);
    }
}

@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.06);
        opacity: 0.9;
    }
}

/* ======= 2. 仅对三个产品 section 内的图标应用动画 ======= */
/* 统一基础动画 */
section.category .category-box .thumb img {
    animation: icon-breathe 3s ease-in-out infinite !important;
    will-change: transform, filter;
}

/* ======= 3. 三个模块各自的动画类型 ======= */
/* AI应用产品（第1个） */
section.category:nth-of-type(1) .category-box .thumb img {
    animation-name: icon-breathe !important;
    animation-duration: 3s !important;
}

/* AI硬件产品（第2个） */
section.category:nth-of-type(2) .category-box .thumb img {
    animation-name: icon-pulse !important;
    animation-duration: 3.5s !important;
}

/* AI软件产品（第3个） */
section.category:nth-of-type(3) .category-box .thumb img {
    animation-name: icon-breathe-gentle !important;
    animation-duration: 4s !important;
}

/* ======= 4. 交错动画延迟 ======= */
/* AI应用产品 */
section.category:nth-of-type(1) .category-box:nth-child(1) .thumb img { animation-delay: 0s !important; }
section.category:nth-of-type(1) .category-box:nth-child(2) .thumb img { animation-delay: 0.75s !important; }
section.category:nth-of-type(1) .category-box:nth-child(3) .thumb img { animation-delay: 1.5s !important; }
section.category:nth-of-type(1) .category-box:nth-child(4) .thumb img { animation-delay: 2.25s !important; }

/* AI硬件产品 */
section.category:nth-of-type(2) .category-box:nth-child(1) .thumb img { animation-delay: 0.5s !important; }
section.category:nth-of-type(2) .category-box:nth-child(2) .thumb img { animation-delay: 1.25s !important; }
section.category:nth-of-type(2) .category-box:nth-child(3) .thumb img { animation-delay: 2s !important; }
section.category:nth-of-type(2) .category-box:nth-child(4) .thumb img { animation-delay: 2.75s !important; }

/* AI软件产品 */
section.category:nth-of-type(3) .category-box:nth-child(1) .thumb img { animation-delay: 1s !important; }
section.category:nth-of-type(3) .category-box:nth-child(2) .thumb img { animation-delay: 1.8s !important; }
section.category:nth-of-type(3) .category-box:nth-child(3) .thumb img { animation-delay: 2.6s !important; }

/* ======= 5. 悬停暂停效果 ======= */
section.category .category-box:hover .thumb img {
    animation-play-state: paused !important;
    transform: scale(1.1) !important;
    filter: brightness(1.15) drop-shadow(0 0 12px rgba(174, 24, 25, 0.4)) !important;
    transition: transform 0.3s ease, filter 0.3s ease !important;
}

/* ======= 6. 响应式 ======= */
@media (max-width: 768px) {
    @keyframes icon-breathe-mobile {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.04); }
    }
    @keyframes icon-pulse-mobile {
        0%, 100% { transform: scale(1); opacity: 1; }
        50% { transform: scale(1.03); opacity: 0.95; }
    }

    section.category:nth-of-type(1) .category-box .thumb img {
        animation: icon-breathe-mobile 3s ease-in-out infinite !important;
    }
    section.category:nth-of-type(2) .category-box .thumb img {
        animation: icon-pulse-mobile 3.5s ease-in-out infinite !important;
    }
    section.category:nth-of-type(3) .category-box .thumb img {
        animation: icon-breathe-mobile 4s ease-in-out infinite !important;
    }
}

/* ======= 7. 可访问性 ======= */
@media (prefers-reduced-motion: reduce) {
    section.category .category-box .thumb img {
        animation: none !important;
        transform: none !important;
    }
}

/* ======= 8. 打印 ======= */
@media print {
    section.category .category-box .thumb img {
        animation: none !important;
        filter: none !important;
    }
}
