/* 文章區補充樣式：沿用 styles.css 變數與 .button，以及 service-detail.css 的 .detail-section／.detail-card／.detail-faq／.detail-related-link／.detail-check。 */

html { scrollbar-width: thin; scrollbar-color: #27313b #0a0f14; }

@supports selector(::-webkit-scrollbar) {
  html { scrollbar-width: auto; scrollbar-color: auto; }
  html::-webkit-scrollbar { width: 4px; height: 4px; }
  html::-webkit-scrollbar-track { background: #0a0f14; }
  html::-webkit-scrollbar-thumb { border: 0; border-radius: 99px; background: #27313b; }
  html::-webkit-scrollbar-thumb:hover { background: #394550; }
}

.article-page {
  background:
    radial-gradient(circle at 76% 8%, rgba(85, 215, 255, 0.09), transparent 28rem),
    radial-gradient(circle at 12% 55%, rgba(157, 123, 255, 0.06), transparent 30rem),
    var(--bg);
}

/* 共用導覽 #site-header 為 fixed（樣式在 styles.css），主體需預留導覽列高度；頁尾樣式見下 */
.article-page { padding-top: 76px; }

.article-footer {
  width: min(calc(100% - 48px), var(--max));
  min-height: 132px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #566171;
  font-size: 11px;
}

.article-footer-brand { color: #9ca8b7; font-weight: 700; letter-spacing: 0.14em; }
.article-footer p { margin: 0; }

/* 主體寬度：文章窄版、列表寬版 */
.article-main { width: min(calc(100% - 48px), 860px); margin: 0 auto; padding-bottom: 72px; }
.article-main.article-main-wide { width: min(calc(100% - 48px), var(--max)); }

.article-breadcrumb { margin: 48px 0 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #748091; font-size: 12px; }
.article-breadcrumb a:hover { color: var(--cyan); }
.article-breadcrumb-separator { color: #44505f; }

.article-title {
  margin: 0;
  font-size: clamp(30px, 6vw, 50px);
  line-height: 1.22;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.article-lead { max-width: 720px; margin: 18px 0 0; color: #9aa5b4; font-size: 16px; line-height: 1.85; }

/* 一句話答案 */
.article-answer {
  margin: 28px 0 0;
  padding: 22px 24px;
  border: 1px solid rgba(85, 215, 255, 0.2);
  border-left: 3px solid var(--cyan);
  border-radius: 14px;
  color: #dce4ed;
  background: linear-gradient(145deg, rgba(85, 215, 255, 0.08), rgba(255, 255, 255, 0.02));
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

/* 區塊：疊在 .detail-section 之上，縮小留白 */
.article-section.detail-section { margin-top: 48px; padding: 44px 0 0; }
.article-section h2 { margin: 0 0 18px; font-size: clamp(22px, 4vw, 30px); line-height: 1.3; letter-spacing: -0.03em; }
.article-section > p { margin: 0; color: #aab4c2; font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
.article-section > p + p { margin-top: 12px; }
.article-section a.article-inline-link,
.article-source a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.article-source { margin-top: 14px !important; color: #748091 !important; font-size: 12px !important; line-height: 1.8 !important; }

/* 功能清單與步驟 */
.article-feature-list,
.article-steps { margin: 0; padding: 0; display: grid; gap: 10px; list-style: none; }

.article-feature-list li {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #c3cdd8;
  background: rgba(255, 255, 255, 0.025);
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.article-feature-list a { color: #eaf3fb; font-weight: 700; }
.article-feature-list a:hover { color: var(--cyan); }
.article-feature-term { color: #eaf3fb; font-weight: 700; }

.article-steps { counter-reset: article-step; }

.article-steps li {
  position: relative;
  min-height: 52px;
  padding: 14px 18px 14px 58px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #c3cdd8;
  background: rgba(255, 255, 255, 0.025);
  font-size: 14px;
  line-height: 1.75;
  counter-increment: article-step;
  overflow-wrap: anywhere;
}

.article-steps li::before {
  content: counter(article-step);
  position: absolute;
  top: 14px;
  left: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #07130e;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
}

/* 比較表：固定欄寬並允許斷行，手機不產生水平捲動 */
.article-table { width: 100%; border-collapse: collapse; table-layout: fixed; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: rgba(255, 255, 255, 0.025); }
.article-table th,
.article-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.article-table thead th { color: var(--cyan); background: rgba(85, 215, 255, 0.07); font-size: 12px; letter-spacing: 0.04em; }
.article-table tbody th { width: 22%; color: #dce4ed; font-weight: 700; }
.article-table td { color: #b7c1ce; }
.article-table tbody tr:last-child th,
.article-table tbody tr:last-child td { border-bottom: 0; }

.article-section > .article-table + p { margin-top: 16px; }

.article-faq-list { display: grid; gap: 12px; }

/* CTA（對應範本 #detail-contact） */
.article-cta {
  margin-top: 48px;
  padding: 36px;
  border: 1px solid rgba(85, 215, 255, 0.2);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(85, 215, 255, 0.08), rgba(157, 123, 255, 0.055));
}

.article-cta h2 { margin: 0; font-size: clamp(24px, 4vw, 34px); letter-spacing: -0.035em; }
.article-cta p { max-width: 620px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.article-cta-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }

/* 相關文章 */
.article-related-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.article-related-list .detail-related-link { min-height: 104px; padding: 20px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

/* 列表頁 */
.article-intro { max-width: 720px; margin: 18px 0 0; color: #9aa5b4; font-size: 16px; line-height: 1.85; }
.article-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.article-card.detail-card { min-height: 0; display: flex; flex-direction: column; }
.article-card h2 { margin: 22px 0 12px; font-size: 19px; line-height: 1.45; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.article-card h2 a:hover { color: var(--cyan); }
.article-card p { margin-bottom: 20px; }
.article-card-more { margin-top: auto; color: var(--cyan); font-size: 13px; font-weight: 700; }

@media (max-width: 900px) {
  .article-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-related-list { grid-template-columns: 1fr; }
  .article-related-list .detail-related-link { min-height: 0; gap: 12px; }
}

@media (max-width: 620px) {
  .article-main,
  .article-main.article-main-wide,
  .article-footer { width: min(calc(100% - 32px), var(--max)); }
  .article-page { padding-top: 68px; }
  .article-breadcrumb { margin: 34px 0 24px; }
  .article-section.detail-section { margin-top: 36px; padding-top: 34px; }
  .article-answer { padding: 18px; font-size: 15px; }
  .article-table th,
  .article-table td { padding: 10px 8px; font-size: 12px; }
  .article-cta { padding: 26px 20px; }
  .article-cta-actions { flex-direction: column; align-items: stretch; }
  .article-card-grid { grid-template-columns: 1fr; }
  .article-footer { min-height: 150px; align-items: flex-start; justify-content: center; flex-direction: column; }
}
