/* ============================================================
   昌途代驾官网 · 移动端适配
   用法：在每个页面的 </head> 之前加一行：
         <link rel="stylesheet" href="mobile.css">
   已内附全站通用规则，不影响原电脑版样式。
   断点：≤820px（平板竖屏 / 手机）；≤400px（小屏手机）
   ============================================================ */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; }
img { max-width: 100%; height: auto; }

@media (max-width: 820px) {

    /* ---------- 全局 ---------- */
    body { font-size: 16px; line-height: 1.65; padding-bottom: 68px; }
    .container { width: 92%; }

    /* ---------- 顶部导航：横向滚动，不再挤成一团 ---------- */
    header { position: sticky; top: 0; }
    header .container { flex-direction: column; align-items: flex-start; gap: 8px; padding: 2px 0; }
    .logo { font-size: 20px !important; }
    nav { display: flex; width: 100%; gap: 16px; overflow-x: auto; white-space: nowrap;
          -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
    nav::-webkit-scrollbar { display: none; }
    nav a { flex: 0 0 auto; margin-left: 0 !important; font-size: 14px !important; padding: 4px 0; }

    /* ---------- 首屏 ---------- */
    .hero { padding: 52px 16px 44px !important; }
    .hero h1 { font-size: 25px !important; line-height: 1.35; margin-bottom: 12px !important; }
    .hero .lead, .hero p { font-size: 15px !important; }
    .hero .sub { font-size: 13px !important; }
    .hero-actions { flex-direction: column; gap: 10px; margin-top: 22px; }
    .btn-main { display: block; width: 100%; text-align: center; padding: 13px 0 !important; font-size: 16px !important; }
    .hero-note { font-size: 12px !important; }

    /* ---------- 信任条 / 数据条 ---------- */
    .trustbar { padding: 20px 0; }
    .trustbar .container { grid-template-columns: 1fr 1fr; gap: 14px 10px; text-align: left; }
    .trust-item strong { font-size: 15px; }
    .trust-item span { font-size: 12px; }
    .stats .container { flex-direction: column; gap: 16px; padding: 0; }
    .stat-item h3 { font-size: 24px !important; }

    /* ---------- 区块与标题 ---------- */
    section { padding: 42px 0 !important; }
    .section-title { margin-bottom: 26px !important; }
    .section-title h2 { font-size: 21px !important; }
    .section-title p { font-size: 13px !important; }

    /* ---------- 卡片栅格：全部单列 ---------- */
    .services-grid { grid-template-columns: 1fr !important; gap: 13px !important; }
    .service-card { padding: 18px 20px !important; }
    .service-card h3 { font-size: 17px !important; }
    .service-card p { font-size: 14px !important; }
    .features-grid { grid-template-columns: 1fr !important; gap: 13px !important; }
    .feature-item { padding: 18px !important; }
    .feature-icon { font-size: 26px !important; }

    /* ---------- 流程：两列 ---------- */
    .process-steps { grid-template-columns: repeat(2, 1fr) !important; gap: 20px 10px !important; }
    .step { min-width: 0 !important; }
    .step-num { width: 34px; height: 34px; font-size: 15px; }
    .step h4 { font-size: 14px !important; }
    .step p { font-size: 12px !important; }

    /* ---------- 城市列表：三列 ---------- */
    .city-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
    .city-link { padding: 8px 2px !important; font-size: 13px !important; }
    .city-group { margin-bottom: 24px !important; }
    .city-group h3 { font-size: 15px !important; }

    /* ---------- 报价表单 ---------- */
    .quote-box { padding: 18px !important; border-radius: 10px !important; }
    .quote-grid { grid-template-columns: 1fr !important; gap: 13px !important; }
    .quote-actions { flex-direction: column; }
    .quote-actions button { width: 100%; }
    .quote-tip { font-size: 12px !important; }

    /* ---------- 城市四宫格摘要 ---------- */
    .quick .container { grid-template-columns: 1fr 1fr !important; gap: 14px 10px !important; text-align: left !important; padding: 0 !important; }

    /* ---------- 二维码 / APP ---------- */
    .download-wrapper { flex-direction: column !important; align-items: center; gap: 16px !important; margin-top: 26px !important; }
    .qr-box, .app-box { width: 100% !important; max-width: 340px; }
    .qr-img { width: 130px !important; height: 130px !important; }
    .contact-phone { font-size: 18px !important; }

    /* ---------- 表格：字号收小、允许换行，实在放不下才横滑 ---------- */
    table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: normal; }
    th, td { padding: 9px 8px !important; font-size: 13px; line-height: 1.5; }
    /* 列数多的表（如收费页七类服务总表）保持最小宽度，改成横向滑动，不挤压换行 */
    table.wide-table { min-width: 580px; }
    table.wide-table th, table.wide-table td { white-space: nowrap; }

    /* ---------- 报价 / 算价器 ---------- */
    .calc { margin-top: -24px !important; padding: 18px !important; border-radius: 10px !important; }
    .calc-row { grid-template-columns: 1fr !important; gap: 12px !important; }
    .calc-result .num { font-size: 26px !important; }
    .quick-lines button { padding: 7px 12px !important; font-size: 12px !important; }

    /* ---------- 内页正文 ---------- */
    .content { padding: 30px 16px !important; }
    .content h1, .hero h1 { font-size: 22px !important; }
    .content h2 { font-size: 19px !important; margin-top: 24px !important; }
    .content h3 { font-size: 16px !important; }

    /* ---------- 页脚 ---------- */
    footer { padding: 24px 16px !important; font-size: 13px !important; }
    footer .beian-info { gap: 8px; font-size: 12px; }
    footer .beian-info img { width: 14px; height: 14px; }
    .friend-links { font-size: 12px; line-height: 2; }
    .friend-links a { display: inline-block; margin: 0 3px; }

    /* ---------- 底部固定拨打条（页面里有 .mobile-bar 才显示） ---------- */
    .mobile-bar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
        background: #fff; box-shadow: 0 -2px 12px rgba(0, 0, 0, .12);
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 10px;
    }
    .mobile-bar a { flex: 1; text-align: center; padding: 12px 0; border-radius: 8px;
                     font-weight: bold; font-size: 15px; text-decoration: none; }
    .mobile-bar .mb-call { background: #ff7a00; color: #fff; }
    .mobile-bar .mb-quote { background: #eaf4ff; color: #0b7bbf; }
}

/* 电脑端：强制隐藏底部拨打条、去掉底部留白 */
@media (min-width: 821px) {
    .mobile-bar { display: none !important; }
    body { padding-bottom: 0; }
}

/* 小屏手机再收一档 */
@media (max-width: 400px) {
    .hero h1 { font-size: 22px !important; }
    .city-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .trustbar .container { grid-template-columns: 1fr; }
    .process-steps { grid-template-columns: 1fr 1fr !important; }
    .container { width: 94%; }
}
