/* 羅賓斯科技 · 補助輔導諮詢、實績展示與官網導流樣式（與晴藍工作台 Sky Clarity 一致） */

/* 桌機左側導覽欄底部的輔導邀請卡 */
.rail-consult-card {
  margin: 0 10px 10px;
  padding: 13px 13px 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, #e7f5fa 0%, #f4fbfd 60%, #fef9ea 100%);
  border: 1px solid #bfe3f2;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: none;
  box-shadow: 0 4px 12px rgba(14, 90, 138, 0.06);
}
.rail-consult-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--pri);
}
.rail-consult-card h3 {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
}
.rail-consult-card p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--sub);
}
.rail-consult-cta {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pri), var(--cyan));
  color: #fff;
  font-size: 12.5px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 4px 10px rgba(14, 90, 138, 0.18);
}
.rail-consult-cta:hover { filter: brightness(1.06); }
.rail-site-link {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pri);
  text-decoration: none;
  text-align: center;
  padding-top: 2px;
}
.rail-site-link:hover { text-decoration: underline; }

.rail-foot-link {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pri);
  text-decoration: none;
  white-space: nowrap;
}
.rail-foot-link:hover { text-decoration: underline; }

/* 計畫詳情頁底部的「想申請這項計畫？」引導卡 */
.detail-consult-card {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #eef8fc 58%, #fff8e6 100%);
  border: 1.5px solid #bfe3f2;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.detail-consult-info { flex: 1 1 300px; min-width: 0; }
.detail-consult-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--pri-soft);
  color: var(--pri-ink);
  font-size: 11.5px;
  font-weight: 750;
  margin-bottom: 6px;
}
.detail-consult-info h3 { font-size: 16.5px; font-weight: 800; color: var(--ink); line-height: 1.35; }
.detail-consult-info p { font-size: 13px; color: var(--sub); margin-top: 4px; line-height: 1.55; }
.detail-consult-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }

/* 手機探索頁頂部的精簡導流橫幅 */
.m-consult-strip { display: none; }

/* 展示 Modal（桌機置中 / 手機獨立分頁視圖） */
.consult-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 37, 55, 0.48);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.consult-overlay.open { display: flex; }

.consult-modal {
  width: min(940px, 100%);
  max-height: 88dvh;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(15, 37, 55, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: consultPop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes consultPop {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cm-head {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}
.cm-head img { width: 30px; height: 30px; object-fit: contain; }
.cm-head-txt { flex: 1; min-width: 0; }
.cm-head-txt b { display: block; font-size: 15.5px; color: var(--ink); }
.cm-head-txt small { display: block; font-size: 12px; color: var(--sub); }
.cm-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  color: var(--sub);
}
.cm-close:hover { border-color: var(--pri); color: var(--ink); }

.cm-body {
  overflow-y: auto;
  padding: 20px;
  display: grid;
  gap: 20px;
}

/* 計畫情境提示列 */
.cm-context-pill {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--fund-bg);
  border: 1px solid var(--fund-line);
  color: var(--fund-ink);
  font-size: 13px;
  font-weight: 700;
}
.cm-context-pill.show { display: flex; flex-wrap: wrap; }
.cm-context-clear {
  border: 0;
  background: rgba(255, 255, 255, 0.7);
  color: var(--fund-ink);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 700;
}

/* Hero Banner */
.cm-hero {
  background: linear-gradient(135deg, #ffffff 0%, #e9f6fb 56%, #fff7e2 100%);
  border: 1px solid #c7e5f3;
  border-radius: 18px;
  padding: 22px 24px;
  display: grid;
  gap: 12px;
}
.cm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--pri);
  letter-spacing: 0.04em;
}
.cm-hero h2 { font-size: 24px; line-height: 1.3; font-weight: 850; color: var(--ink); }
.cm-hero h2 em { font-style: normal; color: var(--pri); }
.cm-hero p { font-size: 14.5px; color: var(--sub); max-width: 62ch; }
.cm-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cm-btn-pri {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pri), var(--cyan));
  color: #fff;
  font-size: 13.5px;
  font-weight: 750;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 16px rgba(14, 90, 138, 0.22);
}
.cm-btn-pri:hover { filter: brightness(1.06); }
.cm-btn-sec {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cm-btn-sec:hover { border-color: var(--pri); color: var(--pri); }

.cm-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.cm-sec-head h3 { font-size: 16px; font-weight: 800; color: var(--ink); }
.cm-sec-head span { font-size: 12px; color: var(--sub); }

/* 獎項肯定 4 格 */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.award-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.award-yr {
  font: 800 11px ui-monospace, monospace;
  color: var(--fund-ink);
  background: var(--fund-bg);
  border: 1px solid var(--fund-line);
  align-self: flex-start;
  padding: 1px 7px;
  border-radius: 999px;
}
.award-card b { font-size: 13.5px; line-height: 1.35; color: var(--ink); margin-top: 2px; }
.award-card small { font-size: 12px; color: var(--sub); line-height: 1.4; }

/* 實績案例 3 格 */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.case-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.case-tag {
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 8px;
  background: var(--pri-soft);
  color: var(--pri-ink);
  font-size: 11.5px;
  font-weight: 750;
}
.case-card h4 { font-size: 15px; font-weight: 800; color: var(--ink); line-height: 1.35; }
.case-metric {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--free-bg);
  border: 1px solid var(--free-line);
  color: var(--free-ink);
  font-size: 12.5px;
  font-weight: 750;
}
.case-card p { font-size: 13px; color: var(--sub); line-height: 1.55; }

/* 4 階段一條龍輔導流程 */
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.flow-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
}
.flow-no {
  font: 800 12px ui-monospace, monospace;
  color: var(--cyan);
  margin-bottom: 4px;
}
.flow-step b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 3px; }
.flow-step p { font-size: 12.5px; color: var(--sub); line-height: 1.5; }

/* 底部聯絡與官網卡片 */
.cm-footer-box {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.cm-contact-meta b { display: block; font-size: 14.5px; color: var(--ink); }
.cm-contact-meta p { font-size: 12.5px; color: var(--sub); margin-top: 3px; line-height: 1.55; }
.cm-contact-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 手機版適配 (<= 900px) ---------- */
@media (max-width: 900px) {
  .m-bottom-nav {
    grid-template-columns: repeat(4, 1fr);
    padding-left: 4px;
    padding-right: 4px;
  }
  .m-tab-btn { font-size: 11px; }

  .m-consult-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(90deg, #e7f5fa, #fff9ea);
    border-bottom: 1px solid #cbe5f1;
    flex: none;
  }
  .m-consult-strip-txt { min-width: 0; font-size: 12.5px; color: var(--ink); font-weight: 600; }
  .m-consult-strip-txt small { display: block; font-size: 11px; color: var(--sub); font-weight: 500; }
  .m-consult-strip-btn {
    flex: none;
    height: 32px;
    padding: 0 11px;
    border: 0;
    border-radius: 999px;
    background: var(--pri);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }

  /* 手機切到「專人輔導」分頁時，將 .consult-overlay 轉為內嵌全螢幕分頁 */
  body.m-tab-consult .center,
  body.m-tab-consult .ai-pane { display: none; }
  body.m-tab-consult .consult-overlay {
    display: flex;
    position: static;
    grid-row: 1;
    grid-column: 1;
    padding: 0;
    background: var(--bg);
    backdrop-filter: none;
    min-height: 0;
  }
  body.m-tab-consult .consult-modal {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }
  body.m-tab-consult .cm-close { display: none; }
  body.m-tab-consult .cm-head { padding-top: calc(11px + var(--safe-top)); }

  .consult-overlay.open { padding: 0; }
  .consult-modal { width: 100%; max-height: 100dvh; border-radius: 0; border: 0; }
  .cm-body { padding: 14px 12px 24px; gap: 16px; }
  .cm-hero { padding: 16px; }
  .cm-hero h2 { font-size: 20px; }
  .awards-grid { grid-template-columns: 1fr 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: 1fr 1fr; }
  .detail-consult-card { padding: 15px; }
}
