/* ============================================================
   益路公益 · 首页横幅现代化样式（文字与底图解耦）
   色系沿用官网蓝系 #0060cf / #0161c7
   仅作用于 .banner，独立文件，不触碰原 sjstyle.css / style.css
   ============================================================ */

/* ---------- 手机端 ---------- */
@media (max-width: 767px) {
  .banner { position: relative; overflow: hidden; height: 58vw; min-height: 210px; max-height: 300px; }
  .banner .swiper-slide {
    position: relative;
    overflow: hidden;
    background: #0a4fa0;
    height: 100%;
  }
  .banner .swiper-slide > img.bm-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* 底图走实时缩放接口，避免 10MB 原图 */
  }

  /* 文字层 */
  .banner .bm-text {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 46px 20px 26px;
    background: linear-gradient(to top, rgba(3,36,84,.86) 0%, rgba(3,44,104,.62) 45%, rgba(3,52,120,0) 100%);
    color: #fff;
    z-index: 3;
    pointer-events: none; /* 不挡轮播滑动 */
  }
  .banner .bm-inner { max-width: 100%; }
  .banner .bm-kicker {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 2px;
    line-height: 1.4;
    padding: 3px 10px;
    margin-bottom: 9px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 20px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .banner .bm-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.42;
    letter-spacing: .5px;
    margin: 0 0 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,.3);
  }
  .banner .bm-desc {
    font-size: 12.5px;
    line-height: 1.7;
    color: rgba(255,255,255,.9);
    margin: 0;
    text-shadow: 0 1px 6px rgba(0,0,0,.28);
  }
  .banner .bm-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 600;
    color: #0a4fa0;
    background: #fff;
    border-radius: 22px;
    pointer-events: auto; /* 按钮可点 */
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
  }
  .banner .bm-btn::after { content: ' →'; }

  /* 入场动效：仅对当前激活页生效 */
  .banner .swiper-slide-active .bm-kicker { animation: bmUp .6s .12s both; }
  .banner .swiper-slide-active .bm-title  { animation: bmUp .6s .22s both; }
  .banner .swiper-slide-active .bm-desc   { animation: bmUp .6s .32s both; }
  .banner .swiper-slide-active .bm-btn    { animation: bmUp .6s .42s both; }
}

/* ---------- PC 端 ---------- */
@media (min-width: 768px) {
  .banner { position: relative; overflow: hidden; height: 34vw; min-height: 320px; max-height: 520px; }
  .banner .swiper-slide {
    position: relative;
    overflow: hidden;
    background: #0a4fa0;
    height: 100%;
  }
  .banner .swiper-slide > img.bm-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .banner .bm-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 8%;
    background: linear-gradient(to right, rgba(3,36,84,.72) 0%, rgba(3,44,104,.42) 38%, rgba(3,52,120,0) 72%);
    color: #fff;
    z-index: 3;
    pointer-events: none;
  }
  .banner .bm-inner { max-width: 620px; }
  .banner .bm-kicker {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 3px;
    padding: 5px 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 24px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .banner .bm-title {
    font-size: clamp(30px, 3.4vw, 52px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1px;
    margin: 0 0 18px;
    text-shadow: 0 3px 16px rgba(0,0,0,.3);
  }
  .banner .bm-desc {
    font-size: clamp(14px, 1.15vw, 18px);
    line-height: 1.85;
    color: rgba(255,255,255,.92);
    margin: 0;
    max-width: 560px;
    text-shadow: 0 2px 10px rgba(0,0,0,.28);
  }
  .banner .bm-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    color: #0a4fa0;
    background: #fff;
    border-radius: 30px;
    pointer-events: auto;
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    transition: transform .25s ease, box-shadow .25s ease;
  }
  .banner .bm-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.26); }
  .banner .bm-btn::after { content: ' →'; }

  .banner .swiper-slide-active .bm-kicker { animation: bmUp .7s .12s both; }
  .banner .swiper-slide-active .bm-title  { animation: bmUp .7s .24s both; }
  .banner .swiper-slide-active .bm-desc   { animation: bmUp .7s .36s both; }
  .banner .swiper-slide-active .bm-btn    { animation: bmUp .7s .48s both; }
}

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

/* ---------- 首页板块轻度活化（滚动进场） ---------- */
.bm-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.bm-reveal.bm-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .bm-reveal { opacity: 1; transform: none; transition: none; }
  .banner .bm-kicker, .banner .bm-title, .banner .bm-desc, .banner .bm-btn { animation: none !important; }
}
