/* ===== 禾裕膳官网 · 转化钩子组件 ===== */
/* 复用全局变量 --primary #B81820 / --secondary #F88000 / --bg-gray #F5F5F5 等 */

/* ---------- 1. 悬浮咨询按钮 + 迷你表单 ---------- */
.fab-wrap {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  /* 收起时容器本身不拦截点击，仅按钮与展开面板可点，避免巨盒遮挡页面内容 */
  pointer-events: none;
}
.fab-btn {
  width: 60px;
  height: 60px;
  pointer-events: auto;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(184, 24, 32, 0.38);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fab-btn:hover { transform: scale(1.06); box-shadow: 0 10px 30px rgba(184, 24, 32, 0.5); }
.fab-ico { font-size: 20px; margin-bottom: 1px; }
.fab-txt { letter-spacing: 1px; }

.fab-panel {
  width: 300px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  padding: 18px 18px 20px;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transform-origin: bottom right;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.fab-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.fab-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.fab-panel-head span { font-size: 17px; font-weight: 700; color: var(--primary); }
.fab-panel-close {
  border: none; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: #bbb; padding: 0 2px;
}
.fab-panel-close:hover { color: var(--primary); }
.fab-panel-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }

/* ---------- 2. 通用留资表单 ---------- */
.lead-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.lead-form { display: flex; flex-direction: column; gap: 10px; }
.lead-form input,
.lead-form select,
.lead-form textarea {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 48px;
  padding: 0 13px;
  font-size: 15px;
  line-height: 1.4;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184, 24, 32, 0.12);
}
.lead-form .lf-row { display: flex; gap: 10px; }
.lead-form .lf-row input { flex: 1; min-width: 0; }
.lf-submit {
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 13px 16px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 2px;
}
.lf-submit:hover { transform: translateY(-1px); }
.lf-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* 表单提交结果反馈 */
.lead-feedback {
  text-align: center;
  padding: 22px 16px;
  border-radius: 12px;
  animation: lfPop 0.25s ease;
}
.lead-feedback .lf-icon { font-size: 38px; margin-bottom: 6px; }
.lead-feedback h4 { font-size: 18px; margin-bottom: 6px; }
.lead-feedback p { font-size: 13.5px; color: #555; }
.lead-ok { background: #e8f5ee; }
.lead-ok h4 { color: #1a7a3a; }
.lead-err { background: #fef0f0; }
.lead-err h4 { color: var(--primary); }
@keyframes lfPop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* ---------- 3. 内容页内嵌留资卡片 ---------- */
.lead-section { padding: 64px 0; background: linear-gradient(180deg, #fff 0%, var(--bg-gray) 100%); }
.lead-form-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: center;
  background: #fff;
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border);
}
.lfc-tag, .qc-tag {
  display: inline-block;
  background: rgba(248, 128, 0, 0.12);
  color: var(--secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.lfc-left h2 { font-size: 26px; color: var(--text); margin-bottom: 12px; line-height: 1.3; }
.lfc-left p { font-size: 14.5px; color: #555; margin-bottom: 18px; }
.lfc-points { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lfc-points li { font-size: 13.5px; color: #444; }
.lfc-right { background: var(--bg-gray); border-radius: 14px; padding: 22px; }

/* ---------- 4. 餐标计算器 ---------- */
.quote-section { padding: 64px 0; background: var(--bg-gray); }
.quote-card {
  background: #fff;
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  max-width: 760px;
  margin: 0 auto;
}
.qc-head { text-align: center; margin-bottom: 26px; }
.qc-head h2 { font-size: 26px; margin-bottom: 10px; }
.qc-head p { font-size: 15px; color: #555; max-width: 520px; margin: 0 auto; }
.qc-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.qc-form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #666; font-weight: 500; min-width: 0; }
.qc-form select, .qc-form input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 48px;
  padding: 0 12px;
  font-size: 15px;
  line-height: 1.4;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
.qc-form select:focus, .qc-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(184,24,32,0.12); }
.qc-result {
  margin-top: 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(184,24,32,0.06), rgba(248,128,0,0.06));
  border: 1px dashed var(--secondary);
  border-radius: 14px;
  padding: 22px;
}
.qc-result p { font-size: 16px; color: #444; margin-bottom: 6px; }
.qc-monthly { font-size: 30px; color: var(--primary); font-weight: 800; }
.qc-note { font-size: 13px; color: var(--text-muted); margin-bottom: 16px !important; }

/* ---------- 5. 滚动触发弹窗 ---------- */
.lead-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lead-popup.show { display: flex; animation: lpFade 0.25s ease; }
@keyframes lpFade { from { opacity: 0; } to { opacity: 1; } }
.lp-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
.lp-card {
  position: relative;
  width: 380px;
  max-width: 100%;
  background: #fff;
  border-radius: 18px;
  padding: 30px 26px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: lpPop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes lpPop { from { transform: translateY(20px) scale(0.94); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.lp-close {
  position: absolute; top: 12px; right: 14px;
  border: none; background: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: #bbb;
}
.lp-close:hover { color: var(--primary); }
.lp-badge {
  display: inline-block;
  background: var(--secondary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.lp-card h3 { font-size: 22px; color: var(--primary); margin-bottom: 10px; }
.lp-desc { font-size: 13.5px; color: #555; margin-bottom: 18px; line-height: 1.6; }
.lp-desc strong { color: var(--primary); }
.lp-foot { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .fab-wrap { right: 14px; bottom: 16px; }
  .fab-btn { width: 54px; height: 54px; }
  .fab-panel { width: calc(100vw - 28px); }
  .lead-form-card { grid-template-columns: 1fr; gap: 24px; padding: 26px 20px; }
  .lfc-left h2 { font-size: 22px; }
  .quote-card { padding: 26px 20px; }
  .qc-form { grid-template-columns: 1fr; }
  .qc-head h2 { font-size: 22px; }
}

/* ── 静态常见问题卡片化（services.html 及各区域页共用） ── */
#faq .faq-list { max-width: 860px; margin: 0 auto; }
#faq .faq-item {
  background: #fff;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: var(--radius-lg, 14px);
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.3s;
}
#faq .faq-item:hover {
  border-color: rgba(184,24,32,0.2);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
#faq .faq-item h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 30px;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text, #222);
}
#faq .faq-item h3::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 22px;
  background: linear-gradient(180deg, var(--primary, #B81820), var(--secondary, #F88000));
  border-radius: 3px;
}
#faq .faq-answer {
  padding: 4px 30px 24px 56px;
  background: linear-gradient(to bottom, rgba(248,128,0,0.02), transparent);
  border-top: 1px solid rgba(0,0,0,0.05);
}
#faq .faq-answer p {
  font-size: 16px;
  color: #444;
  line-height: 2;
  margin: 0;
}
@media (max-width: 768px) {
  #faq .faq-item h3 { padding: 18px 20px; font-size: 16px; }
  #faq .faq-answer { padding: 4px 16px 20px 36px; }
  #faq .faq-answer p { font-size: 15px; line-height: 1.85; }
}

/* ════════════════════════════════════════════════════════════════
   禾裕膳官网 · 全站质感打磨层
   挂载于 conversion.css 末尾，所有引用 conversion.css 的页面自动生效。
   定位：微交互、排版渲染、焦点可达性、卡片一致性，不动大框架。
   ════════════════════════════════════════════════════════════════ */

/* ---------- 1. 基础渲染与滚动 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 选中文本：品牌红 */
::selection {
  background: var(--primary, #B81820);
  color: #fff;
  text-shadow: none;
}
::-moz-selection {
  background: var(--primary, #B81820);
  color: #fff;
  text-shadow: none;
}

/* 滚动条：纤细、品牌色 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f5f5;
}
::-webkit-scrollbar-thumb {
  background: rgba(184, 24, 32, 0.32);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(184, 24, 32, 0.55);
}

/* ---------- 2. 焦点可达性（无障碍 + 质感） ---------- */
:focus-visible {
  outline: 2px solid var(--primary, #B81820);
  outline-offset: 2px;
  border-radius: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary, #B81820);
  outline-offset: 2px;
}

/* ---------- 3. 链接与按钮的微交互 ---------- */
a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.btn,
button.btn,
a.btn {
  will-change: transform, box-shadow;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* 主按钮：统一渐变 + 按压反馈 */
.btn-primary,
.btn-dark,
.cert-honor-cta a,
.lf-submit {
  background: linear-gradient(135deg, var(--secondary, #F88000) 0%, var(--secondary-light, #FD8603) 100%);
  position: relative;
  overflow: hidden;
}

.btn-primary::after,
.btn-dark::after,
.cert-honor-cta a::after,
.lf-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.btn-primary:hover::after,
.btn-dark:hover::after,
.cert-honor-cta a:hover::after,
.lf-submit:hover::after {
  opacity: 0.75;
}

/* 按钮悬停统一强化 */
.btn:hover,
button.btn:hover,
a.btn:hover {
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 8px 24px rgba(184, 24, 32, 0.15);
}

/* 按钮按下 */
.btn:active,
button.btn:active,
a.btn:active {
  transform: translateY(0) translateZ(0);
  box-shadow: 0 4px 12px rgba(184, 24, 32, 0.1);
}

/* 次要/幽灵按钮：补全边框语义 */
.btn-outline {
  background: transparent !important;
  color: var(--secondary, #F88000) !important;
  border: 1.5px solid currentColor !important;
}
.btn-outline:hover {
  background: rgba(248, 128, 0, 0.08) !important;
  color: var(--secondary, #F88000) !important;
}

/* ---------- 4. 导航下划线动效 ---------- */
.nav a {
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary, #B81820);
  border-radius: 2px;
  transition: width 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* ---------- 5. 卡片统一过渡 ---------- */
.feature-card,
.price-card,
.article-card,
.case-card,
.rel-case-card,
.news-grid-card,
.service-card,
.cert-card,
.cert-img-card,
.biz-preview-card,
.honor-compact-card,
.honor-page-card,
.lead-form-card,
.fourd-card,
.culture-card,
.strength-card,
.scene-card,
.case-stat-card,
.ty-card,
.error-link-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
}

/* ---------- 6. 表单输入焦点统一 ---------- */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--primary, #B81820);
  box-shadow: 0 0 0 3px rgba(184, 24, 32, 0.12);
  background-color: #fff;
}

/* ---------- 7. 表格与数据展示 ---------- */
.data-table tbody tr {
  transition: background-color 0.15s ease;
}
.data-table tbody tr:hover {
  background-color: rgba(184, 24, 32, 0.03);
}

/* ---------- 8. 标题排版优化 ---------- */
h1, h2, h3 {
  text-wrap: balance;
}

/* ---------- 9. Header 滚动阴影过渡 ---------- */
.header {
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

/* ---------- 10. 图片去抖动 ---------- */
img {
  transition: opacity 0.25s ease;
}

/* 响应式：小屏减少夸张动效 */
@media (max-width: 768px) {
  .btn:hover,
  button.btn:hover,
  a.btn:hover,
  .feature-card:hover,
  .price-card:hover,
  .article-card:hover,
  .case-card:hover,
  .news-grid-card:hover,
  .service-card:hover,
  .cert-card:hover,
  .biz-preview-card:hover,
  .honor-compact-card:hover,
  .fourd-card:hover,
  .strength-card:hover,
  .scene-card:hover {
    transform: none;
  }
  :focus-visible {
    outline-offset: 1px;
  }
}
