/* ============================================================
   新网站(ecardt.com) 手机端 V3 — 兴邦 V2 同款视觉
   结构参考兴邦手机版V2: 渐变顶栏+徽章logo / 快捷入口宫格 /
   卡片化区块 / 抽屉菜单 / 底部悬浮导航
   ============================================================ */

/* PC 端默认隐藏手机端专属元素 */
.m-quick { display: none; }

/* ---------- 平板(992) ---------- */
@media (max-width: 992px) {
  .hero-content h1, .hero-content h2 { font-size: 34px; }
  .hero-image { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-preview-wrapper { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .content-wrapper { grid-template-columns: 1fr; }
  .page-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .honor-list { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   手机端主断点 768px — 兴邦 V2 视觉
   ============================================================ */
@media (max-width: 768px) {
  /* ---------- 顶栏: 只留电话 ---------- */
  .top-bar { display: none; }

  /* ---------- 头部: 深蓝渐变顶栏 ---------- */
  .header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: transparent; box-shadow: none; }
  .header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(135deg,#1a237e 0%,#0d47a1 55%,#061d63 100%);
  }
  .header-wrapper { height: 56px; justify-content: space-between; padding: 0 12px; }
  .header-wrapper .nav { margin-left: 0; }
  .header .container { max-width: 100%; padding: 0; }

  /* 徽章式 logo */
  .logo a { gap: 8px; }
  .logo a > img { height: 36px !important; width: auto; border-radius: 8px; }
  .logo-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg,#ffb300,#ff8f00);
    color: #1a237e; font-size: 15px; font-weight: 800;
    box-shadow: 0 2px 6px rgba(255,179,0,.4);
  }
  .logo-text h1, .logo-text .logo-title { font-size: 16px; color: #fff; font-weight: 800; line-height: 1.2; }
  .logo-text span { font-size: 10px; color: rgba(255,255,255,.65); letter-spacing: .5px; }

  /* 电话胶囊按钮 */
  .header-tel {
    display: flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
    color: #fff; font-size: 13px; font-weight: 700;
    padding: 6px 11px; border-radius: 20px; white-space: nowrap;
  }
  .header-tel:active { background: rgba(255,255,255,.28); }

  /* 汉堡按钮 */
  .menu-toggle { display: flex; z-index: 1101; padding: 5px; }
  .menu-toggle span { width: 26px; height: 2.6px; background: #fff; border-radius: 3px; }
  .menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* ---------- 抽屉式导航(兴邦同款) ---------- */
  .nav {
    display: block;
    position: fixed; top: 0; right: -290px; bottom: 0;
    width: 286px; max-width: 86%;
    height: 100vh; height: 100dvh;
    background: #fff;
    box-shadow: -6px 0 24px rgba(6,31,77,.18);
    padding: 0; margin: 0;
    overflow-y: auto;
    transition: right .3s cubic-bezier(.25,.8,.35,1);
    z-index: 1100;
  }
  .nav.active { right: 0; }
  .nav::before {
    content: "网站导航"; display: block;
    padding: 22px 18px 14px;
    background: linear-gradient(135deg,#1a237e,#061d63);
    color: #fff; font-size: 19px; font-weight: 800; letter-spacing: 1px;
  }
  .nav::after {
    content: "XINGBANG · SMART ENERGY"; display: block;
    padding: 0 18px 14px; margin-top: -12px;
    background: linear-gradient(135deg,#1a237e,#061d63);
    color: rgba(255,255,255,.55); font-size: 10px; letter-spacing: 2px;
  }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 0 16px; }
  .nav > ul > li > a {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px;
    padding: 13px 18px; font-size: 15px; font-weight: 600;
    border-bottom: 1px solid #f2f4f8; border-radius: 0;
    color: #1f2937;
  }
  .nav > ul > li > a.active { color: #1a237e; background: #eef0fb; font-weight: 700; }
  .nav > ul > li > a:hover { background: #f6f7fb; }
  .nav > ul > li > a i:first-child { width: 22px; text-align: center; color: #1a237e; }
  .nav > ul > li > a .sub-arrow { margin-left: auto; color: #9ca3af; }
  .submenu {
    display: none !important; position: static; box-shadow: none;
    padding: 4px 0; margin: 0; background: #f8f9fd;
    min-width: 0; border-radius: 0;
  }
  .has-submenu:hover > .submenu { display: none !important; }
  .has-submenu.open > .submenu { display: block !important; }
  .submenu li a { padding: 10px 18px 10px 34px; font-size: 13.5px; color: #5b6472; }
  .submenu li a:hover { padding-left: 38px; background: transparent; color: #1a237e; }
  .sub-arrow { transition: transform .25s; }
  .has-submenu.open > a .sub-arrow { transform: rotate(180deg); }

  /* 菜单遮罩 */
  .nav-mask {
    display: block;
    position: fixed; inset: 0; background: rgba(6,31,77,.55);
    z-index: 1099; opacity: 0; visibility: hidden; transition: all .3s;
  }
  .nav-mask.active { opacity: 1; visibility: visible; }

  /* 主体下移避开固定头 */
  body { padding-top: 56px; }
  .header ~ main, main { position: relative; }

  /* ---------- Hero: 渐变横幅(兴邦 banner 风格) ---------- */
  .hero, .hero-slider, .hero-slide { min-height: 210px; }
  .hero-slide .container { padding: 0 16px; }
  .hero-content { padding: 40px 0 50px; text-align: center; }
  .hero-content h1, .hero-content h2 { font-size: 22px; margin-bottom: 10px; white-space: normal; line-height: 1.35; }
  .hero-content p { font-size: 12.5px; margin-bottom: 16px; line-height: 1.6; opacity: .85; }
  .hero-content p br { display: none; }
  .hero-buttons { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .hero-buttons .btn { padding: 9px 18px; font-size: 13px; border-radius: 8px; }
  .hero-dots { bottom: 12px; gap: 6px; }
  .hero-dots .dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.55); border: 0; }
  .hero-dots .dot.active { width: 18px; background: #fff; transform: none; border-radius: 3px; }

  /* ---------- 快捷入口(兴邦同款 4 宫格) ---------- */
  .m-quick {
    display: flex; margin: 12px 12px 0;
    background: #fff; border-radius: 14px; box-shadow: 0 2px 12px rgba(6,31,77,.06);
    padding: 14px 4px;
  }
  .m-quick a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .m-quick a .q-ico {
    width: 44px; height: 44px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; color: #fff;
    box-shadow: 0 4px 10px rgba(6,31,77,.14);
  }
  .m-quick a:nth-child(1) .q-ico { background: linear-gradient(135deg,#1a237e,#3949ab); }
  .m-quick a:nth-child(2) .q-ico { background: linear-gradient(135deg,#00897b,#26a69a); }
  .m-quick a:nth-child(3) .q-ico { background: linear-gradient(135deg,#ffb300,#ff8f00); }
  .m-quick a:nth-child(4) .q-ico { background: linear-gradient(135deg,#7b1fa2,#ab47bc); }
  .m-quick a .q-txt { font-size: 12px; color: #333; font-weight: 600; }

  /* ---------- 区块卡片化 ---------- */
  .section { padding: 12px; }
  .section-header { margin-bottom: 12px; text-align: left; display: flex; align-items: center; gap: 8px; }
  .section-header h2 { font-size: 17px; color: #111827; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 7px; }
  .section-header h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: linear-gradient(180deg,#00897b,#1a237e); }
  .section-header h2:after { display: none; }
  .section-header p { font-size: 12px; color: #999; margin: 0; }
  .section-header > div { width: 100%; }
  .bg-light { background: transparent; }

  /* 统计条 */
  .stats-section {
    margin: 12px 12px 0; padding: 14px 6px;
    background: #fff; border-radius: 14px;
    box-shadow: 0 2px 12px rgba(6,31,77,.06);
  }
  .stats-grid { gap: 4px; }
  .stat-item { padding: 10px 4px; }
  .stat-icon { width: 40px; height: 40px; font-size: 17px; margin-bottom: 6px; }
  .stat-number { font-size: 24px; }
  .stat-label { font-size: 11.5px; }

  /* 分类宫格(兴邦 3 列卡片) */
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .category-card {
    padding: 10px 4px 8px; border-radius: 12px;
    box-shadow: 0 2px 12px rgba(6,31,77,.06);
    border: 0; text-align: center;
  }
  .category-card:hover { transform: none; box-shadow: 0 2px 12px rgba(6,31,77,.06); border: 0; }
  .category-icon { width: 52px; height: 52px; font-size: 21px; margin-bottom: 8px; border-radius: 12px; }
  .category-card h3 { font-size: 12.5px; margin-bottom: 0; line-height: 1.35; }
  .category-card p { font-size: 11px; margin-bottom: 0; -webkit-line-clamp: 2; max-height: 32px; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .category-link { display: none; }

  /* 产品两列卡片 */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card { border-radius: 12px; box-shadow: 0 2px 12px rgba(6,31,77,.06); min-height: 0; }
  .product-card:hover { transform: none; box-shadow: 0 2px 12px rgba(6,31,77,.06); }
  .product-card-img { aspect-ratio: 4/3; border-radius: 12px 12px 0 0; }
  .product-card-body { padding: 9px 10px 10px; }
  .product-card-body h3 { font-size: 13px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .product-subtitle { font-size: 11px; margin-bottom: 4px; }
  .product-desc { font-size: 11px; margin-bottom: 6px; -webkit-line-clamp: 2; }
  .product-badge { font-size: 10px; padding: 3px 8px; top: 8px; left: 8px; }
  .product-card .btn-sm { display: none; }

  /* 方案/案例/新闻 单列卡片 */
  .solutions-grid, .cases-grid, .news-grid { grid-template-columns: 1fr; gap: 10px; }
  .solution-card {
    padding: 16px; border-radius: 12px;
    box-shadow: 0 2px 12px rgba(6,31,77,.06);
    display: flex; align-items: center; gap: 14px; text-align: left;
    min-height: 0;
  }
  .solution-card .solution-icon { width: 48px; height: 48px; font-size: 19px; margin: 0; flex: 0 0 auto; border-radius: 12px; }
  .solution-card h3 { font-size: 14.5px; margin-bottom: 4px; }
  .solution-card p { font-size: 12px; margin-bottom: 0; -webkit-line-clamp: 2; }
  .solution-card .btn-link { display: none; }
  .case-card { border-radius: 12px; box-shadow: 0 2px 12px rgba(6,31,77,.06); min-height: 0; }
  .case-card-body { padding: 14px; }
  .case-card h3 { font-size: 14.5px; }
  .case-summary { font-size: 12.5px; }
  .case-card .btn { display: none; }
  .news-card { padding: 14px; gap: 12px; border-radius: 12px; box-shadow: 0 2px 12px rgba(6,31,77,.06); }
  .news-card-body h3 { font-size: 14px; }
  .news-card-body p { font-size: 12px; }
  .news-card-body .btn-link { display: none; }

  /* 区块间距 */
  .text-center.mt-4 { margin-top: 12px; }
  .text-center.mt-4 .btn { padding: 9px 22px; font-size: 13px; }

  /* ---------- CTA ---------- */
  .cta-section { padding: 34px 14px; border-radius: 14px; margin: 12px; }
  .cta-content h2 { font-size: 21px; }
  .cta-content p { font-size: 13px; margin-bottom: 18px; }
  .cta-buttons { flex-direction: column; align-items: center; gap: 10px; }
  .cta-buttons .btn { width: 100%; max-width: 300px; justify-content: center; font-size: 14px; }

  /* ---------- 关于 ---------- */
  .about-preview-wrapper { gap: 20px; }
  .about-preview-content h2 { font-size: 21px; }
  .about-preview-content p { font-size: 13.5px; }
  .about-features { grid-template-columns: 1fr 1fr; gap: 8px; }
  .about-feature { font-size: 13px; }
  .about-image-placeholder { height: 200px; }
  .about-preview-content .btn { padding: 10px 20px; font-size: 13px; }

  /* ---------- 页头横幅 ---------- */
  .page-banner {
    margin: 12px 12px 0; border-radius: 14px;
    padding: 26px 16px;
    background: linear-gradient(135deg,#1a237e,#0d47a1 60%,#061d63);
  }
  .page-banner h1 { font-size: 22px; }
  .breadcrumb { font-size: 12px; }

  /* ---------- 产品详情 ---------- */
  .product-detail { gap: 18px; }
  .product-main-image, .product-detail-left { height: 220px; border-radius: 12px; }
  .product-detail-right h2 { font-size: 19px; }
  .product-actions { flex-direction: column; gap: 10px; }
  .product-actions .btn { width: 100%; justify-content: center; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .specs-table td { padding: 9px 10px; font-size: 12.5px; }
  .spec-key { width: 100px; }

  /* ---------- 表单/联系 ---------- */
  .form-row { flex-direction: column; gap: 0; }
  .form-control { padding: 12px 14px; font-size: 14.5px; }
  .contact-item { gap: 12px; margin-bottom: 16px; }
  .contact-item i { width: 42px; height: 42px; font-size: 17px; }
  .contact-item h4 { font-size: 14px; }
  .contact-item p { font-size: 13px; word-break: break-all; }

  /* ---------- 页脚(手机端精简) ---------- */
  .footer { padding-top: 26px; background: linear-gradient(160deg,#1a237e,#061d63); }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; text-align: center; }
  /* 手机端只显示第 1 列(公司简介)和第 4 列(联系方式) */
  .footer-grid .footer-col:nth-child(2), .footer-grid .footer-col:nth-child(3) { display: none; }
  .footer-logo { justify-content: center; font-size: 18px; margin-bottom: 10px; }
  .footer-col p { font-size: 12.5px; line-height: 1.7; max-width: 320px; margin: 0 auto; }
  .footer-col h4 { font-size: 14px; margin-bottom: 10px; }
  .footer-contact { display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .footer-contact li { font-size: 12.5px; justify-content: center; }
  .footer-social { justify-content: center; gap: 8px; margin-top: 12px; }
  .footer-social a { width: 32px; height: 32px; font-size: 13px; }
  .footer-bottom { margin-top: 14px; padding: 12px 0 84px; }
  .footer-bottom p { font-size: 11px; line-height: 1.7; }

  /* ---------- 底部悬浮导航(兴邦同款) ---------- */
  .mobile-fbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
    background: #fff; display: flex;
    box-shadow: 0 -2px 14px rgba(6,31,77,.10);
    padding-bottom: env(safe-area-inset-bottom);
    height: 58px;
  }
  .mobile-fbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 11px; color: #8a94a6; border-top: 0; padding: 0;
  }
  .mobile-fbar a i { font-size: 19px; }
  .mobile-fbar a.on { color: #1a237e; font-weight: 700; }
  .mobile-fbar a.call { background: linear-gradient(135deg,#00897b,#00796b); color: #fff; margin: 0; border-radius: 0; }
  .mobile-fbar a.call i { font-size: 21px; }
  .mobile-fbar a:active { background: #f4f6f9; }

  /* ---------- 正文内容 ---------- */
  .rich-content { font-size: 15px; }
  .rich-content img { width: 100% !important; height: auto !important; border-radius: 8px; }
  .rich-content table { width: 100% !important; }
  .rich-content iframe { width: 100%; height: 210px; }
  .content-wrapper > div { width: 100% !important; }

  /* 回到顶部 */
  .back-to-top { bottom: 70px; right: 14px; width: 40px; height: 40px; font-size: 16px; }

  /* 时间线/荣誉 */
  .timeline:before { left: 20px; }
  .timeline-item { flex-direction: column; gap: 10px; }
  .timeline-year { text-align: left; font-size: 20px; }
  .timeline-content:before { display: none; }
  .honor-list { grid-template-columns: 1fr 1fr; gap: 10px; }
  .honor-list > * { border-radius: 10px; }
}

/* ---------- 小屏 480px ---------- */
@media (max-width: 480px) {
  .hero-content h1, .hero-content h2 { font-size: 20px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .category-card { padding: 8px 3px 6px; }
  .category-icon { width: 46px; height: 46px; font-size: 18px; }
  .category-card h3 { font-size: 11.5px; }
  .products-grid { gap: 8px; }
  .product-card-body h3 { font-size: 12.5px; }
  .stats-grid { gap: 2px; }
  .stat-number { font-size: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .mobile-fbar a { font-size: 10px; }
  .container { padding: 0 14px; }
  .header-wrapper { padding: 0 10px; }
  .logo-text span { display: none; }
}
