/* ============================================================
   style.css — 大有呼吸官网样式
   设计原则：移动优先（mobile-first），微信内置浏览器无变形
   ============================================================ */

:root {
    --brand: #1a73e8;       /* 主色（蓝，呼吸/医疗感）*/
    --brand-dark: #1558b0;
}

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #222;
}

/* ---------- 首页服务入口卡片 ---------- */
.service-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 90px; padding: 8px; border-radius: 12px;
    background: #fff; border: 1px solid #e6e6e6; color: var(--brand);
    font-weight: 600; text-decoration: none; transition: .15s;
}
.service-card:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }

.hero { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }

/* ---------- AI 咨询浮动按钮（全站唯一悬浮入口，联系方式已并入聊天窗）---------- */
.ai-fab {
    position: fixed; right: 16px; bottom: 20px; z-index: 1040;
    width: 60px; height: 60px; border-radius: 50%; border: none;
    background: var(--brand); color: #fff; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.ai-fab span { font-size: 10px; margin-top: 2px; }

/* ---------- AI 聊天窗口 ---------- */
.ai-chat {
    position: fixed; right: 16px; bottom: 16px; z-index: 1050;
    width: 80vw; max-width: 380px; height: 80vh; max-height: 500px;
    background: #fff; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.3);
    display: flex; flex-direction: column; overflow: hidden;
}
/* PC 端固定 380 x 500 */
@media (min-width: 768px) {
    .ai-chat { width: 380px; height: 500px; }
}
.ai-chat-header {
    background: var(--brand); color: #fff; padding: 10px 14px;
    display: flex; justify-content: space-between; align-items: center; font-weight: 600;
}
.ai-chat-close {
    background: transparent; border: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.ai-chat-body { flex: 1; overflow-y: auto; padding: 12px; background: #f5f7fb; }
.ai-chat-actions { padding: 6px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chat-actions:empty { display: none; padding: 0; }
.ai-chat-input { display: flex; border-top: 1px solid #eee; }
.ai-chat-input input { flex: 1; border: none; padding: 12px; outline: none; font-size: 15px; }
.ai-chat-input button { border: none; background: var(--brand); color: #fff; padding: 0 18px; font-size: 15px; }

/* ---------- 聊天窗底部固定联系按钮条（拨号 / 复制微信 / 在线咨询）---------- */
.ai-contact-bar {
    display: flex; gap: 6px; padding: 8px; background: #fafbfd;
    border-top: 1px solid #e9ecef; flex-shrink: 0;
}
.ai-contact-btn {
    flex: 1; min-height: 48px;              /* 手机端足够大的触控区 */
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; border: none; border-radius: 10px; cursor: pointer;
    color: #fff; text-decoration: none; line-height: 1.1;
    -webkit-tap-highlight-color: transparent;
}
.ai-contact-btn .ico { font-size: 17px; }
.ai-contact-btn .txt { font-size: 12px; font-weight: 600; }
.ai-contact-btn:active { opacity: .82; transform: scale(.97); }
.ai-contact-call   { background: #e53935; }
.ai-contact-wechat { background: #07c160; }
.ai-contact-online { background: var(--brand); }

/* 聊天气泡 */
.ai-msg { max-width: 85%; margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.ai-msg-bot { background: #fff; align-self: flex-start; border: 1px solid #e6e6e6; }
.ai-msg-user { background: var(--brand); color: #fff; margin-left: auto; }
.ai-msg a { color: var(--brand); text-decoration: underline; }
.ai-msg-user a { color: #fff; }

/* 动作按钮（拨号/复制微信）出现在聊天内 */
.ai-action-btn {
    border: 1px solid var(--brand); background: #fff; color: var(--brand);
    border-radius: 16px; padding: 4px 12px; font-size: 13px; cursor: pointer; text-decoration: none;
}
.ai-rec-title { width: 100%; font-size: 12px; color: #888; margin: 4px 0 0; }
.ai-prod-btn { background: #fff7f0; border-color: #e88; color: #c0392b; font-weight: 600; }

/* ---------- 复制提示 toast ---------- */
.toast-box {
    position: fixed; left: 50%; top: 30%; transform: translateX(-50%);
    background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 8px;
    z-index: 1090; font-size: 14px;
}

/* 文章/知识库富文本排版 */
.article-content, .kb-content { line-height: 1.8; }
.article-content h3, .kb-content h3 { font-size: 1.1rem; margin-top: 1rem; }

/* 表格在手机端横向滚动已由 .table-responsive 处理 */
@media (max-width: 576px) {
    .ai-fab { width: 56px; height: 56px; font-size: 18px; }
    /* 手机端联系按钮再放大，方便手指点击 */
    .ai-contact-btn { min-height: 54px; }
    .ai-contact-btn .ico { font-size: 19px; }
    .ai-contact-btn .txt { font-size: 13px; }
}
