﻿/* ==================== 动画效果 ==================== */

/* 淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 缩放动画 */
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* 脉冲动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 旋转动画 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== 动画工具类 ==================== */
.animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-timing-function: ease-out;
}

.animated.fast { animation-duration: 0.5s; }
.animated.slow { animation-duration: 1.2s; }
.animated.infinite { animation-iteration-count: infinite; }

.fadeIn { animation-name: fadeIn; }
.fadeInUp { animation-name: fadeInUp; }
.fadeInDown { animation-name: fadeInDown; }
.fadeInLeft { animation-name: fadeInLeft; }
.fadeInRight { animation-name: fadeInRight; }
.zoomIn { animation-name: zoomIn; }
.pulse { animation-name: pulse; }
.float { animation-name: float; }
.rotate { animation-name: rotate; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1s; }

/* 数字滚动动画辅助 */
.count-up {
    display: inline-block;
}

/* 滚动触发动画类 */
.scroll-animate {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

html.js .scroll-animate {
    opacity: 0;
    transform: translateY(24px);
}

html.js .scroll-animate.fadeInLeft {
    transform: translateX(-24px);
}

html.js .scroll-animate.fadeInRight {
    transform: translateX(24px);
}

html.js .scroll-animate.fadeInDown {
    transform: translateY(-24px);
}

html.js .scroll-animate.animated {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.scroll-animate.delay-1 { transition-delay: 0.1s; }
.scroll-animate.delay-2 { transition-delay: 0.2s; }
.scroll-animate.delay-3 { transition-delay: 0.3s; }
.scroll-animate.delay-4 { transition-delay: 0.4s; }
.scroll-animate.delay-5 { transition-delay: 0.5s; }

html.js .scroll-animate.unified-card {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
    transition:
        opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .scroll-animate.unified-card.animated {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* Banner动画：按激活slide统一入场 */
html.js .banner-swiper .swiper-slide .banner-content > * {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .banner-swiper .swiper-slide.is-active .banner-content > * {
    opacity: 1;
    transform: translateY(0);
}

.banner-swiper .swiper-slide .banner-content .hero-kicker {
    transition-delay: 0.08s;
}

.banner-swiper .swiper-slide .banner-content h1 {
    transition-delay: 0.18s;
}

.banner-swiper .swiper-slide .banner-content .en {
    transition-delay: 0.28s;
}

.banner-swiper .swiper-slide .banner-content .hero-actions {
    transition-delay: 0.38s;
}

.banner-swiper .swiper-slide .banner-content .hero-points {
    transition-delay: 0.48s;
}

/* 悬停效果 */
.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* 图片悬停效果 */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

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

/* 时间线动画 */
html.js .timeline-stats .stat-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

html.js .timeline-stats.animated .stat-item {
    opacity: 1;
    transform: translateY(0);
}

.timeline-stats.animated .stat-item:nth-child(1) { transition-delay: 0.1s; }
.timeline-stats.animated .stat-item:nth-child(2) { transition-delay: 0.2s; }
.timeline-stats.animated .stat-item:nth-child(3) { transition-delay: 0.3s; }
.timeline-stats.animated .stat-item:nth-child(4) { transition-delay: 0.4s; }
.timeline-stats.animated .stat-item:nth-child(5) { transition-delay: 0.5s; }
.timeline-stats.animated .stat-item:nth-child(6) { transition-delay: 0.6s; }

/* 时间线线条动画 */
html.js .timeline-line {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
}

html.js .timeline-stats.animated .timeline-line {
    transform: scaleX(1);
}

/* 关于页统计区：数字轴加载 */
html.js .about-stats-timeline::before {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .about-stats-timeline.animated::before {
    transform: scaleX(1);
}

html.js .about-stats-timeline .about-stat-item {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.56s ease,
        transform 0.56s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

html.js .about-stats-timeline.animated .about-stat-item {
    opacity: 1;
    transform: translateY(0);
}

html.js .about-stats-timeline .axis-dot {
    transform: scale(0.4);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

html.js .about-stats-timeline.animated .axis-dot {
    transform: scale(1);
}

html.js .about-stats-timeline.animated .about-stat-item:nth-child(1) { transition-delay: 0.14s; }
html.js .about-stats-timeline.animated .about-stat-item:nth-child(2) { transition-delay: 0.24s; }
html.js .about-stats-timeline.animated .about-stat-item:nth-child(3) { transition-delay: 0.34s; }
html.js .about-stats-timeline.animated .about-stat-item:nth-child(4) { transition-delay: 0.44s; }
html.js .about-stats-timeline.animated .about-stat-item:nth-child(1) .axis-dot { transition-delay: 0.18s; }
html.js .about-stats-timeline.animated .about-stat-item:nth-child(2) .axis-dot { transition-delay: 0.3s; }
html.js .about-stats-timeline.animated .about-stat-item:nth-child(3) .axis-dot { transition-delay: 0.42s; }
html.js .about-stats-timeline.animated .about-stat-item:nth-child(4) .axis-dot { transition-delay: 0.54s; }

/* 新闻卡片动画 */
html.js .news-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

html.js .news-item.animated {
    opacity: 1;
    transform: translateX(0);
}

html.js .news-item:nth-child(1) { transition-delay: 0.1s; }
html.js .news-item:nth-child(2) { transition-delay: 0.2s; }
html.js .news-item:nth-child(3) { transition-delay: 0.3s; }

/* 解决方案切换动画 */
.solution-item {
    animation: fadeIn 0.5s ease;
}

.solution-item .tbox .inner > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.solution-item.active .tbox .inner > * {
    opacity: 1;
    transform: translateY(0);
}

.solution-item.active .tbox .inner .tit { transition-delay: 0.1s; }
.solution-item.active .tbox .inner .desc { transition-delay: 0.2s; }
.solution-item.active .tbox .inner .btn { transition-delay: 0.3s; }
.solution-item.active .tbox .inner .databox { transition-delay: 0.4s; }

/* 导航下拉菜单动画 */
.dropdown {
    transform: translateX(-50%) translateY(10px);
}

.main-nav > ul > li:hover .dropdown {
    transform: translateX(-50%) translateY(0);
}

/* 播放按钮动画 */
.playico {
    position: relative;
}

.playico::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #ec6a00;
    border-radius: 12px;
    opacity: 0;
    animation: playPulse 2s ease-in-out infinite;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); opacity: 0; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

/* 加载动画 */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ec6a00;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* 返回顶部按钮动画 */
.backtop,
.back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.backtop.show,
.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .animated,
    .scroll-animate,
    .news-item,
    .timeline-stats .stat-item,
    .timeline-line,
    .about-stats-timeline::before,
    .about-stats-timeline .about-stat-item,
    .about-stats-timeline .axis-dot {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .banner-swiper .swiper-slide .banner-content > * {
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

@media (max-width: 992px) {
    html.js .scroll-animate,
    html.js .scroll-animate.unified-card,
    html.js .news-item,
    html.js .timeline-stats .stat-item,
    html.js .timeline-line {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

