/* ==========================================================================
   postbbs.com 首页 H5 动效与专业化增强
   ========================================================================== */

/* ---------- 动效基础 ---------- */
@keyframes hpFadeUp {
    from { opacity: 0; transform: translateY(38px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes hpSlideLeft {
    from { opacity: 0; transform: translateX(-46px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes hpSlideRight {
    from { opacity: 0; transform: translateX(46px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes hpGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,122,26,.42); }
    50%      { box-shadow: 0 0 0 12px rgba(255,122,26,0); }
}
@keyframes hpFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-11px); }
}
@keyframes hpFloatScreen {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}
@keyframes hpPulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: .5; }
}
@keyframes hpShimmer {
    from { background-position: -420px 0; }
    to   { background-position: 420px 0; }
}
@keyframes hpSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes hpMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes hpLineGrow {
    from { width: 0; }
    to   { width: 54px; }
}
@keyframes hpCountUp {
    from { opacity: 0; transform: scale(.7); }
    to   { opacity: 1; transform: scale(1); }
}

/* ---------- 滚动进场（由 JS 加 .hp-in） ---------- */
.hp-reveal {
    opacity: 0;
    transform: translateY(38px);
    transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
    -webkit-transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.hp-reveal.hp-in {
    opacity: 1;
    transform: translateY(0);
}
/* 卡片交错进场 */
.hp_fc.hp-reveal:nth-child(2),
.hp_ac.hp-reveal:nth-child(2) { transition-delay: .08s; }
.hp_fc.hp-reveal:nth-child(3),
.hp_ac.hp-reveal:nth-child(3) { transition-delay: .16s; }
.hp_fc.hp-reveal:nth-child(4),
.hp_ac.hp-reveal:nth-child(4) { transition-delay: .06s; }
.hp_fc.hp-reveal:nth-child(5),
.hp_ac.hp-reveal:nth-child(5) { transition-delay: .14s; }
.hp_fc.hp-reveal:nth-child(6),
.hp_ac.hp-reveal:nth-child(6) { transition-delay: .22s; }
.hp_fnav_item.hp-reveal:nth-child(2) { transition-delay: .07s; }
.hp_fnav_item.hp-reveal:nth-child(3) { transition-delay: .14s; }
.hp_fnav_item.hp-reveal:nth-child(4) { transition-delay: .05s; }
.hp_fnav_item.hp-reveal:nth-child(5) { transition-delay: .12s; }
.hp_fnav_item.hp-reveal:nth-child(6) { transition-delay: .19s; }
.hp_gc.hp-reveal:nth-child(2) { transition-delay: .09s; }
.hp_gc.hp-reveal:nth-child(3) { transition-delay: .18s; }
.hp_gc.hp-reveal:nth-child(4) { transition-delay: .27s; }

/* ---------- Hero 首屏动效 ---------- */
body.pg_index .hp_hero {
    padding: 74px 0 82px !important;
}
body.pg_index .hp_hero .hp_wrap > * {
    animation: hpFadeUp .9s cubic-bezier(.22,.61,.36,1) both;
}
body.pg_index .hp_hero_l { animation-delay: .1s !important; }
body.pg_index .hp_hero_r { animation: hpFadeIn 1.1s ease both; animation-delay: .34s !important; }

/* Hero 背景光斑缓慢呼吸 */
body.pg_index .hp_hero:before {
    animation: hpPulseDot 7s ease-in-out infinite;
}
body.pg_index .hp_hero:after {
    animation: hpPulseDot 9s ease-in-out infinite reverse;
}

/* Hero 标题：逐字上浮 */
body.pg_index .hp_h1 {
    animation: hpFadeUp .85s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: .18s;
}
body.pg_index .hp_h1 em,
body.pg_index .hp_h1 .hp_h1_em {
    display: inline-block;
    animation: hpFadeUp .85s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: .3s;
    position: relative;
}
/* 橙色标题下划线生长 */
body.pg_index .hp_h1 .hp_h1_em:after {
    content: "";
    position: absolute;
    left: 0; bottom: 3px;
    height: 3px;
    background: #ff7a1a;
    border-radius: 2px;
    animation: hpLineGrow .8s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: 1s;
}
body.pg_index .hp_lead {
    animation: hpFadeUp .85s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: .38s;
}
body.pg_index .hp_btnrow {
    animation: hpFadeUp .85s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: .5s;
}
body.pg_index .hp_tags {
    animation: hpFadeUp .85s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: .6s;
}

/* Hero 标签逐个弹入 */
body.pg_index .hp_tags li {
    animation: hpCountUp .5s cubic-bezier(.34,1.56,.64,1) both;
}
body.pg_index .hp_tags li:nth-child(1) { animation-delay: .62s; }
body.pg_index .hp_tags li:nth-child(2) { animation-delay: .70s; }
body.pg_index .hp_tags li:nth-child(3) { animation-delay: .78s; }
body.pg_index .hp_tags li:nth-child(4) { animation-delay: .86s; }
body.pg_index .hp_tags li:nth-child(5) { animation-delay: .94s; }

/* 按钮呼吸光圈 */
body.pg_index .hp_btn_pri {
    position: relative;
    animation: hpGlow 2.4s ease-out infinite;
}
body.pg_index .hp_btn_pri:after {
    content: "";
    position: absolute;
    inset: -3px;
    border: 1px solid rgba(255,122,26,.5);
    border-radius: 5px;
    animation: hpFadeIn 2.4s ease-in-out infinite;
}
body.pg_index .hp_btn_pri:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255,122,26,.5);
}

/* 产品窗口悬浮 + 光晕 */
body.pg_index .hp_screen {
    animation: hpFloatScreen 5.5s ease-in-out infinite !important;
    border: 1px solid rgba(120,170,255,.3);
}
body.pg_index .hp_screen:after {
    content: "";
    position: absolute;
}
body.pg_index .hp_screen_body {
    position: relative;
    overflow: hidden;
}
body.pg_index .hp_screen_body:before {
    content: "";
    position: absolute;
    top: 0; left: -130%;
    width: 70%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,.34), transparent);
    animation: hpShimmer 4.2s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}

/* ---------- 区块标题动效 ---------- */
body.pg_index .hp_h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 16px;
}
body.pg_index .hp_sec .hp_h2:after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    margin-left: -27px;
    width: 54px;
    height: 3px;
    background: linear-gradient(90deg, #ff7a1a, #ffb02e);
    border-radius: 2px;
}
body.pg_index .hp_h2sub { margin-bottom: 38px !important; }

/* ---------- 核心能力卡片动效 ---------- */
body.pg_index .hp_fc {
    transition: box-shadow .32s, transform .32s, border-color .32s !important;
    position: relative;
    overflow: hidden;
}
body.pg_index .hp_fc:before {
    content: "";
    position: absolute;
    left: 0; top: 0;
    width: 3px; height: 0;
    background: linear-gradient(180deg, #ff7a1a, #ffb02e);
    transition: height .34s ease;
}
body.pg_index .hp_fc:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 14px 34px rgba(28,39,64,.13) !important;
    border-color: #ffd9bd !important;
}
body.pg_index .hp_fc:hover:before { height: 100%; }
body.pg_index .hp_fcn {
    transition: color .32s, transform .32s;
}
body.pg_index .hp_fc:hover .hp_fcn {
    color: #ffe6d2;
    transform: scale(1.1) rotate(-4deg);
}

/* ---------- 产品优势卡片动效 ---------- */
body.pg_index .hp_ac {
    transition: transform .32s;
}
body.pg_index .hp_aci {
    position: relative;
    box-shadow: 0 3px 12px rgba(28,39,64,.07);
    transition: box-shadow .32s;
}
body.pg_index .hp_ac:hover { transform: translateY(-5px); }
body.pg_index .hp_ac:hover .hp_aci {
    box-shadow: 0 12px 28px rgba(28,39,64,.17);
}
body.pg_index .hp_aci:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(31,95,208,.14));
    opacity: 0;
    transition: opacity .32s;
}
body.pg_index .hp_ac:hover .hp_aci:after { opacity: 1; }

/* ---------- 论坛导航卡动效 ---------- */
body.pg_index .hp_fnav_item {
    position: relative;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s, border-color .3s;
}
body.pg_index .hp_fnav_item:after {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent);
    transition: left .55s ease;
}
body.pg_index .hp_fnav_item:hover {
    transform: translateX(3px);
    box-shadow: 0 10px 26px rgba(31,95,208,.16);
}
body.pg_index .hp_fnav_item:hover:after { left: 120%; }
body.pg_index .hp_fnav_t { transition: color .3s; }
body.pg_index .hp_fnav_item:hover .hp_fnav_t { color: #1f5fd0; }

/* ---------- CTA 区动效 ---------- */
body.pg_index .hp_cta_btn {
    position: relative;
    overflow: hidden;
    animation: hpGlow 2.8s ease-out infinite;
}
body.pg_index .hp_cta_btn:after {
    content: "";
    position: absolute;
    top: 0; left: -110%;
    width: 55%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
    transition: left .6s ease;
}
body.pg_index .hp_cta_btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255,122,26,.52);
}
body.pg_index .hp_cta_btn:hover:after { left: 130%; }

/* ---------- SEO 正文首字放大 ---------- */
body.pg_index .hp_seo_body p:first-child:before {
    content: "A";
    float: left;
    font-size: 46px;
    line-height: 44px;
    font-weight: 700;
    color: #ff7a1a;
    margin: 6px 10px 0 0;
    text-indent: 0;
}

/* ---------- 服务保障图标 ---------- */
body.pg_index .hp_gc {
    position: relative;
    transition: transform .32s, box-shadow .32s;
}
body.pg_index .hp_gc:before {
    content: "";
    position: absolute;
    left: 50%; top: 0;
    margin-left: -19px;
    width: 38px; height: 3px;
    background: linear-gradient(90deg, #ff7a1a, #ffb02e);
    border-radius: 0 0 3px 3px;
}
body.pg_index .hp_gc:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(28,39,64,.12);
}

/* ---------- 数字统计条 ---------- */
.hp_stats {
    background: #fff;
    border-top: 1px solid #e9edf4;
    padding: 34px 0 30px;
}
.hp_stats_in {
    display: flex;
    justify-content: space-between;
}
.hp_st {
    width: 25%;
    text-align: center;
    position: relative;
}
.hp_st + .hp_st:before {
    content: "";
    position: absolute;
    left: 0; top: 12px;
    width: 1px; height: 46px;
    background: #e9edf4;
}
.hp_stn {
    font-size: 34px;
    font-weight: 700;
    color: #ff7a1a;
    line-height: 1.1;
    margin-bottom: 7px;
    letter-spacing: -.5px;
}
.hp_stn small { font-size: 17px; }
.hp_stl {
    font-size: 13px;
    color: #8a93a5;
    line-height: 20px;
}

/* ---------- 滚动跑马灯（合作伙伴） ---------- */
.hp_mq {
    background: #f5f7fb;
    border-top: 1px solid #e9edf4;
    padding: 26px 0;
    overflow: hidden;
}
.hp_mq_t {
    font-size: 13px;
    color: #8a93a5;
    text-align: center;
    margin-bottom: 18px;
}
.hp_mq_w {
    width: 1088px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.hp_mq_tk {
    display: flex;
    width: 200%;
    animation: hpMarquee 32s linear infinite;
}
.hp_mq_w:hover .hp_mq_tk { animation-play-state: paused; }
.hp_mq_i {
    flex: 0 0 auto;
    width: 174px;
    height: 44px;
    margin-right: 22px;
    background: #fff;
    border: 1px solid #e6eaf2;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #5d6678;
    letter-spacing: .5px;
    flex-shrink: 0;
}

/* ---------- 悬浮工具条微动 ---------- */
#hp_side .hp_sbtn {
    transition: background .25s, transform .25s;
}
#hp_side .hp_sbtn:hover { transform: translateX(-3px); }

/* ---------- 视差：Hero 背景随滚动 ---------- */
body.pg_index .hp_hero {
    background-attachment: fixed !important;
    background-size: cover !important;
}

/* ---------- 平滑滚动 ---------- */
html { scroll-behavior: smooth; }

/* ---------- 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    body.pg_index *,
    .hp-reveal,
    .hp_mq_tk {
        animation: none !important;
        transition: none !important;
    }
    .hp-reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- 窄屏适配补充 ---------- */
@media screen and (max-width: 1120px) {
    body.pg_index .hp_hero { background-attachment: scroll !important; }
    .hp_stats_in { flex-wrap: wrap; }
    .hp_st { width: 50%; margin-bottom: 18px; }
    .hp_st + .hp_st:before { display: none; }
    .hp_mq_w { width: 100%; padding: 0 16px; box-sizing: border-box; }
}
/* ==========================================================================
   v2 细节修正
   ========================================================================== */

/* Hero 下方 IDE 图：改成左右渐隐的通栏展示，去掉生硬的左右黑边 */
body.pg_index .hp_hero_strip {
    position: relative;
    height: 340px !important;
    background: #0d1832;
}
body.pg_index .hp_hero_strip img {
    width: 100% !important;
    height: 340px !important;
    object-fit: cover !important;
    object-position: center 30% !important;
}
body.pg_index .hp_hero_strip:before,
body.pg_index .hp_hero_strip:after {
    content: "";
    position: absolute;
    top: 0;
    width: 260px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
body.pg_index .hp_hero_strip:before {
    left: 0;
    background: linear-gradient(90deg, #0d1832 0%, rgba(13,24,50,0) 100%);
}
body.pg_index .hp_hero_strip:after {
    right: 0;
    background: linear-gradient(270deg, #0d1832 0%, rgba(13,24,50,0) 100%);
}

/* CTA 背景图：加深遮罩，保证文字对比度 */
body.pg_index .hp_cta:before {
    background: linear-gradient(115deg, rgba(16,29,60,.95) 0%, rgba(28,22,62,.93) 100%) !important;
}

/* SEO 区块标题不被挤压，单行显示 */
body.pg_index .hp_seo .hp_h2 {
    white-space: nowrap;
    font-size: 24px !important;
    letter-spacing: 0;
}
body.pg_index .hp_seo_body p:first-child:before {
    font-size: 42px !important;
    line-height: 40px !important;
}

/* 跑马灯两端渐隐 */
.hp_mq_w {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent) !important;
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent) !important;
}

/* 统计条：数字更醒目 */
body.pg_index .hp_stn {
    font-size: 36px !important;
    background: linear-gradient(180deg, #ff8f3c, #ff6a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/* ==========================================================================
   最新源码分享模块
   ========================================================================== */

body.pg_index .hp_feed {
    background: #fff;
}

body.pg_index .hp_feed_head {
    position: relative;
    margin-bottom: 30px;
}

/* 标题右侧「进入版块」按钮 */
body.pg_index .hp_feed_more {
    position: absolute;
    right: 0;
    top: 6px;
    font-size: 14px;
    color: #1f5fd0;
    text-decoration: none;
    padding: 8px 20px;
    border: 1px solid #1f5fd0;
    border-radius: 4px;
    transition: all .28s ease;
}
body.pg_index .hp_feed_more:hover {
    background: #1f5fd0;
    color: #fff;
    box-shadow: 0 6px 18px rgba(31,95,208,.28);
}

body.pg_index .hp_feed_box {
    width: 1088px;
    overflow: hidden;
}

/* 主列表：1088 - 300(侧栏) - 24(间距) = 764 */
body.pg_index .hp_feed_main {
    width: 764px;
    float: left;
    border: 1px solid #e6eaf2;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(28,39,64,.07);
    background: #fff;
}

body.pg_index .hp_feed_i {
    display: block;
    height: 52px;
    line-height: 52px;
    padding: 0 20px;
    border-bottom: 1px solid #f0f3f8;
    text-decoration: none;
    transition: background .22s ease;
    position: relative;
    overflow: hidden;
}
body.pg_index .hp_feed_i:last-child {
    border-bottom: 0;
}
body.pg_index .hp_feed_i:hover {
    background: #f6f9ff;
}
/* 左侧主题色条 */
body.pg_index .hp_feed_i:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -11px;
    width: 3px;
    height: 22px;
    background: #ff7a1a;
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: all .26s ease;
}
body.pg_index .hp_feed_i:hover:before {
    opacity: 1;
    transform: translateX(0);
}

body.pg_index .hp_feed_t {
    display: block;
    float: left;
    width: 380px;
    font-size: 14px;
    color: #242c3d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.pg_index .hp_feed_i:hover .hp_feed_t {
    color: #1f5fd0;
}

body.pg_index .hp_feed_m {
    display: block;
    float: right;
    font-style: normal;
    font-size: 12px;
    color: #98a0b0;
    line-height: 52px;
}
body.pg_index .hp_feed_m em {
    font-style: normal;
    margin-left: 16px;
}
body.pg_index .hp_feed_a {
    color: #6b7382;
}
body.pg_index .hp_feed_d {
    color: #a8b0be;
}
body.pg_index .hp_feed_n b {
    color: #1f5fd0;
    font-weight: 600;
}

/* 右侧统计卡 */
body.pg_index .hp_feed_side {
    width: 300px;
    float: right;
}
body.pg_index .hp_feed_card {
    width: 300px;
    padding: 26px 24px 24px;
    box-sizing: border-box;
    border-radius: 6px;
    background: linear-gradient(160deg, #1b3f7d 0%, #12306a 60%, #0d2350 100%);
    box-shadow: 0 12px 32px rgba(13,35,80,.3);
    position: relative;
    overflow: hidden;
}
body.pg_index .hp_feed_card:before {
    content: "";
    position: absolute;
    right: -46px;
    top: -46px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
body.pg_index .hp_feed_card:after {
    content: "";
    position: absolute;
    right: -14px;
    top: 84px;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(255,138,26,.14);
}
body.pg_index .hp_feed_cnum {
    position: relative;
    z-index: 2;
    font-size: 42px;
    line-height: 46px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, #ffb066, #ff7a1a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body.pg_index .hp_feed_clab {
    position: relative;
    z-index: 2;
    font-size: 13px;
    color: rgba(255,255,255,.72);
    margin-bottom: 18px;
}
body.pg_index .hp_feed_cu {
    position: relative;
    z-index: 2;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}
body.pg_index .hp_feed_cu li {
    font-size: 13px;
    color: rgba(255,255,255,.86);
    line-height: 30px;
    padding-left: 16px;
    position: relative;
}
body.pg_index .hp_feed_cu li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 13px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ff8f3c;
}
body.pg_index .hp_feed_cbtn {
    position: relative;
    z-index: 2;
    display: block;
    height: 38px;
    line-height: 38px;
    text-align: center;
    border-radius: 4px;
    background: #ff7a1a;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: all .26s ease;
}
body.pg_index .hp_feed_cbtn:hover {
    background: #ff8f3c;
    box-shadow: 0 6px 18px rgba(255,122,26,.45);
}

/* 窄屏自适应 */
@media screen and (max-width: 1120px) {
    body.pg_index .hp_feed_more {
        position: static;
        display: inline-block;
        margin-top: 10px;
    }
    body.pg_index .hp_feed_box {
        width: 100%;
    }
    body.pg_index .hp_feed_main,
    body.pg_index .hp_feed_side,
    body.pg_index .hp_feed_card {
        width: 100%;
        float: none;
    }
    body.pg_index .hp_feed_side {
        margin-top: 18px;
    }
    body.pg_index .hp_feed_t {
        width: 100%;
        white-space: normal;
        line-height: 24px;
        padding: 10px 0 2px;
    }
    body.pg_index .hp_feed_i {
        height: auto;
        min-height: 52px;
        line-height: 24px;
    }
    body.pg_index .hp_feed_m {
        line-height: 24px;
        padding-bottom: 10px;
    }
}

/* feed 进场动画：hp-pre = 待进场，hp-in = 已进场 */
body.pg_index .hp_feed_i.hp-pre {
    opacity: 0;
    transform: translateY(14px);
}
body.pg_index .hp_feed_i.hp-pre.hp-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .5s ease, transform .5s ease, background .22s ease;
}
/* 窄屏不做位移动画，直接显示 */
@media screen and (max-width: 1120px) {
    body.pg_index .hp_feed_i.hp-pre {
        opacity: 1 !important;
        transform: none !important;
    }
}
