/* ============================================================
   首页移动端适配（仅首页引用，桌面端零影响）
   建立日期：2026-10-19
   断点：≤1024px（覆盖手机与平板）
   说明：所有规则都包在 @media 内，桌面端加载本文件无任何副作用
   ============================================================ */

/* 汉堡按钮（桌面隐藏） */
#header .m-nav-btn {
  display: none;
}

@media (max-width: 1024px) {

  /* ---------- 0. 全局：解除 1366px 定宽 ---------- */
  html, body {
    min-width: 0 !important;
    width: 100%;
    overflow-x: hidden !important;
    font-size: 16px;
  }
  img { max-width: 100%; height: auto; }
  #index-container, #banner, #contact, #footer { width: 100%; }
  #slider { display: none !important; }        /* 右侧悬浮客服条，手机端隐藏 */

  /* ---------- 1. 顶部导航 ---------- */
  #header {
    height: 56px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
  }
  #header .logo {
    width: 118px;
    order: 1;
    margin: 0;
  }
  #header .logo img { width: 100%; height: auto; }

  #header .m-nav-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    order: 2;
    margin-left: auto;
    width: 26px;
    height: 18px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
  }
  #header .m-nav-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s, opacity .2s;
  }
  #header.m-nav-open .m-nav-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  #header.m-nav-open .m-nav-btn span:nth-child(2) { opacity: 0; }
  #header.m-nav-open .m-nav-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* 导航抽屉：复用原有 .nav 结构，不新增链接 */
  #header .nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    background: #414590 linear-gradient(180deg, #414590, #6C35B2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
    padding: 6px 0 14px;
    z-index: 998;
  }
  #header.m-nav-open .nav { display: flex; }
  #header .nav li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  #header .nav li:last-child { border-bottom: 0; }
  #header .nav li a {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: .5px;
  }
  #header .nav li.active a { font-size: 15px; }
  #header .right-box { display: none; }

  /* ---------- 2. 首屏 banner ---------- */
  #banner {
    flex-direction: column;
    margin-top: 56px;
    margin-bottom: 8px;
  }
  #banner .left-box {
    width: 100%;
    height: 190px;
    background-size: cover !important;
  }
  #banner .right-box {
    width: 100%;
    height: auto;
    padding-top: 190px;         /* 给绝对定位的图片留位 */
  }
  #banner .right-box .tab {
    width: 100%;
    height: auto;
    margin-top: 0;
    padding: 8px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start !important;
    flex-wrap: nowrap;
  }
  #banner .right-box .tab .item {
    margin-right: 8px;
    flex: 0 0 auto;
  }
  #banner .right-box .tab .item a {
    font-size: 12px;
    height: 28px;
    padding: 0 12px;
    line-height: 26px;
  }
  #banner .right-box .tab .img-box {
    top: 0;
    left: 0;
    width: 100%;
    height: 190px;
  }

  /* ---------- 3. 三张横图 ---------- */
  #index-container .fl-1 { flex-direction: column; }
  #index-container .fl-1 .img {
    width: 100% !important;
    height: 150px;
    margin: 0 0 8px;
  }
  #index-container .fl-1 .img:last-child { margin-bottom: 0; }

  /* ---------- 4. 六格数据块 ---------- */
  #index-container .fl-2 .item {
    width: 50%;
    padding: 16px 12px;
    box-sizing: border-box;
  }
  #index-container .fl-2 .item .title {
    font-size: 1.5rem;
    line-height: 2rem;
    margin-bottom: .25rem;
  }
  #index-container .fl-2 .item .description {
    font-size: .8125rem;
    line-height: 1.25rem;
  }

  /* ---------- 5. 十大基石 ---------- */
  #index-container .fl-3 {
    padding: 26px 12px 12px;
    margin-bottom: 8px;
  }
  #index-container .fl-3 .title {
    font-size: 1.375rem;
    line-height: 1.9rem;
    margin-bottom: 16px;
  }
  #index-container .fl-3 .list li {
    width: 100% !important;
    height: auto !important;
    float: none;
    margin-bottom: 8px;
  }
  #index-container .fl-3 .list li a { padding: 18px 16px; }
  #index-container .fl-3 .list li .tit { font-size: 1.125rem; line-height: 1.6rem; }
  #index-container .fl-3 .list li .des { font-size: .875rem; line-height: 1.4rem; -webkit-line-clamp: 4; }
  #index-container .fl-3 .list li:first-child { height: auto !important; }
  #index-container .fl-3 .list li:first-child .a1 {
    height: auto !important;
    padding: 24px 18px;
  }
  #index-container .fl-3 .list li:first-child .a1 .tit {
    font-size: 1.75rem;
    line-height: 2.2rem;
  }
  #index-container .fl-3 .list li:first-child .a1 .subtit {
    font-size: 1.25rem;
    line-height: 1.8rem;
    margin-top: 4px;
  }
  #index-container .fl-3 .list li:first-child .a1 .des {
    font-size: .9375rem;
    line-height: 1.5rem;
    margin-top: 10px;
  }
  #index-container .fl-3 .list li:first-child .a1 .btn {
    width: 100%;
    height: 36px;
    margin-top: 14px;
    font-size: .875rem;
  }
  #index-container .fl-3 .list li:first-child .a2 {
    width: 100%;
    height: 150px;
  }

  /* ---------- 6. 图文板块通用 ---------- */
  #index-container .index-title {
    max-width: none;
    padding: 0 18px;
    margin-bottom: 16px;
  }
  #index-container .index-title .tit {
    font-size: 1.375rem;
    line-height: 1.9rem;
  }
  #index-container .index-title .subtit {
    font-size: .8125rem;
    line-height: 1.2rem;
    margin-bottom: 10px;
  }
  #index-container .index-title .des {
    font-size: .875rem;
    line-height: 1.55rem;
  }
  #index-container .index-title .btn { font-size: .875rem; }

  #index-container .fl-4 { padding: 26px 0 14px; }
  #index-container .fl-4 .cont { padding: 10px 12px; }
  #index-container .fl-5,
  #index-container .fl-6,
  #index-container .fl-7 { padding: 26px 0 14px; }
  #index-container .fl-5 .cont,
  #index-container .fl-6 .cont,
  #index-container .fl-7 .cont { margin-top: 0; padding: 0 12px; }

  /* ---------- 7. 空间 / 网站 双栏 ---------- */
  #index-container .fl-8 { flex-direction: column; }
  #index-container .fl-8 .left,
  #index-container .fl-8 .right {
    width: 100% !important;
    height: 300px;
    background-size: cover !important;
    background-position: center !important;
    padding: 26px 18px;
    box-sizing: border-box;
  }

  /* ---------- 8. 吉祥物整块背景 ---------- */
  #index-container .fl-9 {
    height: auto !important;
    padding: 26px 18px;
    box-sizing: border-box;
    background-position: center !important;
  }

  /* ---------- 9. 业务资讯 ---------- */
  #index-container .fl-10 { padding: 12px; }
  #index-container .fl-10 ul li,
  #index-container .fl-10 ul li:nth-child(-n+4) {
    width: 100% !important;
    float: none;
    margin-right: 0 !important;
    margin-bottom: 10px;
    box-sizing: border-box;
  }
  #index-container .fl-10 ul li:nth-child(-n+4) a { padding: 12px 12px 16px; }
  #index-container .fl-10 ul li:nth-child(-n+4) a .img-box { height: 180px; }
  #index-container .fl-10 ul li:nth-child(-n+4) a .tit { font-size: 1rem; line-height: 1.5rem; }
  #index-container .fl-10 ul li:nth-child(-n+4) a .des { font-size: .8125rem; line-height: 1.3rem; }

  /* ---------- 10. 联系我们 ---------- */
  #contact {
    flex-direction: column;
    padding: 26px 16px 30px;
  }
  #contact .left-box,
  #contact .right-box {
    width: 100% !important;
    padding: 0 !important;
    border-right: 0;
  }
  #contact .left-box { margin-bottom: 24px; }
  #contact .title { font-size: 1.25rem; line-height: 1.75rem; margin-bottom: 16px; }
  #contact .left-box ul li { margin-bottom: 16px; }
  #contact .left-box ul li .tit { font-size: 1rem; width: auto; margin-right: 6px; }
  #contact .left-box ul li .des { font-size: .9375rem; line-height: 1.5rem; word-break: break-all; }
  #contact .left-box ul li .des span { font-size: 1rem; line-height: 1.5rem; }
  #contact .right-box .from .ipt,
  #contact .right-box .from .ipt.xs,
  #contact .right-box .from .ipt.sm {
    width: 100% !important;
    height: 46px;
    font-size: .9375rem;
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  #contact .right-box .from .ipt.lg { height: 110px; }
  #contact .right-box .from .btn {
    height: 48px;
    font-size: 1rem;
    margin-top: 6px;
  }

  /* ---------- 11. 页脚 ---------- */
  #footer {
    height: auto;
    padding: 14px 12px 22px;
    font-size: .8125rem;
    line-height: 1.4rem;
  }
  #footer a { font-size: .8125rem; }
}

/* 超小屏微调 */
@media (max-width: 360px) {
  #header .logo { width: 100px; }
  #banner .left-box { height: 160px; }
  #banner .right-box { padding-top: 160px; }
  #banner .right-box .tab .img-box { height: 160px; }
  #index-container .fl-2 .item .title { font-size: 1.25rem; }
}

/* ---------- 12. 留言/联系号码条（2026-10-19 补充） ---------- */
@media (max-width: 1024px) {
  #message {
    height: auto !important;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 16px;
    box-sizing: border-box;
  }
  #message .info {
    width: 100% !important;
    margin: 0 0 16px !important;
    padding: 0;
    box-sizing: border-box;
  }
  #message .info .tit {
    font-size: .9375rem;
    line-height: 1.4rem;
    margin-bottom: 6px;
  }
  #message .info .num {
    font-size: 1.25rem;
    line-height: 1.8rem;
    word-break: break-all;
  }
  #message .info .from {
    flex-direction: column;
  }
  #message .info .from .ipt {
    width: 100% !important;
    height: 44px;
    font-size: .9375rem;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
  }
  #message .info .from .btn {
    width: 100% !important;
    height: 46px;
    font-size: 1rem;
  }
}
