/* =========================================================
   全站动效层（2026-11-19）
   - 滚动入场由 motion.js 添加 .gjcb-reveal / .is-in
   - 只使用 transform / opacity，避免触发布局
   - 无 JS、prefers-reduced-motion 时内容保持可见
   - 用 !important 确保覆盖 theme.css 等后加载样式里的 transition
   ========================================================= */

/* 滚动入场 */
.gjcb-reveal {
    opacity: 0 !important;
    transform: translate3d(0, 18px, 0) !important;
    transition:
        opacity .55s cubic-bezier(.22, .61, .36, 1),
        transform .55s cubic-bezier(.22, .61, .36, 1) !important;
    transition-delay: var(--gjcb-delay, 0ms) !important;
}

.gjcb-reveal.is-in {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
}

/* 内页 Banner 文案逐行入场（只动子元素，不影响 .nybt 的垂直居中） */
.gjcb-banner-anim > * {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    transition:
        opacity .6s cubic-bezier(.22, .61, .36, 1),
        transform .6s cubic-bezier(.22, .61, .36, 1);
}

.gjcb-banner-anim > *:nth-child(1) {
    transition-delay: .05s;
}

.gjcb-banner-anim > *:nth-child(2) {
    transition-delay: .15s;
}

.gjcb-banner-anim > *:nth-child(3) {
    transition-delay: .25s;
}

.gjcb-banner-anim > *:nth-child(n+4) {
    transition-delay: .35s;
}

.gjcb-banner-anim.is-in > * {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* 新闻列表 More 箭头右移（theme.css 未覆盖） */
@media (hover: hover) and (pointer: fine) {
    .xypg-news-list > li .more span {
        display: inline-block;
        transition: transform .25s ease;
    }

    .xypg-news-list > li:hover .more span {
        transform: translateX(5px);
    }
}

/* 手机端：位移和时长收敛 */
@media (max-width: 767px) {
    .gjcb-reveal {
        transform: translate3d(0, 10px, 0) !important;
        transition-duration: .45s !important;
    }
}

/* 减弱动效：全部关闭 */
@media (prefers-reduced-motion: reduce) {
    .gjcb-reveal,
    .gjcb-banner-anim > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .xypg-news-list > li:hover .more span {
        transform: none !important;
    }
}
