/* ============================================================
   WebTA Blog — shared design system
   Used by /blog (index) and all /blog/<slug> article pages.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: #0a5cff; --blue-light: #4f83ff; --blue-bg: #eff6ff;
  --green: #06C755; --green-dark: #00a843;
  --dark: #0f172a; --mid: #334155; --muted: #64748b;
  --border: #e2e8f0; --bg: #f5f7fb; --white: #ffffff;
  --radius-lg: 1.25rem; --radius-xl: 1.5rem;
  --shadow-sm: 0 4px 12px rgba(15,23,42,0.07);
  --shadow-md: 0 12px 36px rgba(15,23,42,0.11);
}
html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans TC', system-ui, -apple-system, sans-serif; color: var(--dark); background: var(--white); line-height: 1.7; font-size: 16px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Nav ── */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.93); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 0 clamp(1rem, 5vw, 3rem); }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.site-logo { font-size: 1.3rem; font-weight: 900; color: var(--blue); display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.site-logo span { color: var(--dark); font-weight: 500; font-size: 0.85rem; }
.header-nav { display: flex; align-items: center; gap: 0.25rem; flex-wrap: nowrap; }
.nav-link { padding: 0.5rem 0.9rem; border-radius: 0.6rem; font-size: 0.875rem; font-weight: 600; color: var(--mid); transition: background 0.15s; white-space: nowrap; }
.nav-link:hover { background: var(--bg); }
.nav-link.active { color: var(--green); background: #f0fdf4; }
.btn-nav-cta { padding: 0.5rem 1.2rem; border-radius: 0.75rem; background: var(--green); color: #fff; font-weight: 700; font-size: 0.875rem; white-space: nowrap; }

/* ── Sections ── */
.section { padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 3rem); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label { display: inline-block; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--green); margin-bottom: 0.75rem; }
.section-h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 900; color: var(--dark); line-height: 1.25; margin-bottom: 0.75rem; }
.section-sub { font-size: 1rem; color: var(--muted); max-width: 640px; line-height: 1.8; }
.section-header { margin-bottom: 2.5rem; }

/* ── Hero (blog index) ── */
.hero-section { background: linear-gradient(160deg, #f0fdf4 0%, #f5f7fb 50%, #eff6ff 100%); padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 5vw, 3rem) clamp(3rem, 6vw, 5rem); text-align: center; }
.hero-inner { max-width: 900px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--white); border: 1px solid #bbf7d0; border-radius: 999px; padding: 0.35rem 1rem; margin-bottom: 1.75rem; font-size: 0.8rem; font-weight: 700; color: var(--green-dark); box-shadow: var(--shadow-sm); }
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.hero-h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; color: var(--dark); line-height: 1.2; margin-bottom: 1.25rem; letter-spacing: -0.02em; }
.hero-h1 em { color: var(--green); font-style: normal; }
.hero-h1 b { color: var(--blue); }
.hero-desc { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--muted); max-width: 680px; margin: 0 auto 2rem; line-height: 1.8; }
.hero-kw { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 2.25rem; }
.kw-tag { background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.78rem; font-weight: 600; color: var(--mid); }
.hero-cta { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.btn-green-lg { display: inline-flex; align-items: center; gap: 0.5rem; background: linear-gradient(120deg, var(--green), var(--green-dark)); color: #fff; font-weight: 800; font-size: 1rem; padding: 0.85rem 2rem; border-radius: 0.85rem; box-shadow: 0 14px 32px rgba(6,199,85,0.3); transition: filter 0.15s, transform 0.15s; }
.btn-green-lg:hover { filter: brightness(0.93); transform: translateY(-1px); }
.btn-outline-lg { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--white); border: 1.5px solid var(--border); color: var(--dark); font-weight: 700; font-size: 1rem; padding: 0.85rem 2rem; border-radius: 0.85rem; }
.btn-outline-lg:hover { border-color: var(--green); background: #f0fdf4; }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.25rem; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem 1.75rem; box-shadow: var(--shadow-sm); }
.card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.card h3 { font-size: 1rem; font-weight: 800; color: var(--dark); margin-bottom: 0.5rem; }
.card p { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }

/* ── Blog post list cards ── */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.post-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 0.75rem; transition: transform 0.15s, box-shadow 0.15s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card-cat { font-size: 0.75rem; font-weight: 800; color: var(--green-dark); text-transform: uppercase; letter-spacing: 0.06em; }
.post-card h2, .post-card h3 { font-size: 1.15rem; font-weight: 800; color: var(--dark); line-height: 1.5; }
.post-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.75; }
.post-card-meta { font-size: 0.78rem; color: var(--muted); display: flex; gap: 0.75rem; align-items: center; }
.post-card-link { font-size: 0.875rem; font-weight: 700; color: var(--green-dark); margin-top: auto; }
.post-kw { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── Article prose ── */
.article-header { max-width: 780px; margin: 0 auto; text-align: left; }
.article-breadcrumb { font-size: 0.8rem; color: var(--muted); margin-bottom: 1.25rem; }
.article-breadcrumb a { color: var(--green-dark); font-weight: 600; }
.article-h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 900; color: var(--dark); line-height: 1.3; margin-bottom: 1rem; }
.article-meta { font-size: 0.85rem; color: var(--muted); display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.article-lead { font-size: 1.05rem; color: var(--mid); line-height: 1.9; margin-bottom: 0.5rem; }
.prose { max-width: 780px; margin: 0 auto; font-size: 1rem; color: var(--mid); line-height: 1.9; }
.prose h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 900; color: var(--dark); margin: 2.5rem 0 1rem; line-height: 1.4; }
.prose h3 { font-size: 1.15rem; font-weight: 800; color: var(--dark); margin: 1.75rem 0 0.75rem; }
.prose p { margin-bottom: 1.1rem; }
.prose ul, .prose ol { margin: 0 0 1.1rem 1.4rem; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--dark); }
.prose a { color: var(--green-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose .callout { background: var(--blue-bg); border-left: 4px solid var(--blue); border-radius: 0.6rem; padding: 1rem 1.25rem; margin: 1.5rem 0; font-size: 0.925rem; color: var(--mid); }
.toc { max-width: 780px; margin: 0 auto 2.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; }
.toc-title { font-size: 0.8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { font-size: 0.9rem; margin-bottom: 0.4rem; }
.toc a { color: var(--mid); font-weight: 600; }
.toc a:hover { color: var(--green-dark); }
.share-tags { max-width: 780px; margin: 2rem auto 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.related-posts { max-width: 780px; margin: 2.5rem auto 0; padding-top: 2rem; border-top: 1px solid var(--border); }
.related-posts h3 { font-size: 1rem; font-weight: 800; margin-bottom: 1rem; }
.related-posts a { display: block; font-size: 0.925rem; font-weight: 700; color: var(--green-dark); margin-bottom: 0.6rem; }

/* ── Steps ── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.step-card { text-align: center; padding: 2rem 1.25rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.step-num { width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: #fff; font-size: 1.2rem; font-weight: 900; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.step-h3 { font-size: 0.95rem; font-weight: 800; color: var(--dark); margin-bottom: 0.4rem; }
.step-desc { font-size: 0.825rem; color: var(--muted); line-height: 1.65; }

/* ── Compare table ── */
.compare-table { width: 100%; border-collapse: collapse; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.compare-table th { background: var(--green); color: #fff; padding: 0.85rem 1rem; font-size: 0.875rem; font-weight: 700; text-align: left; }
.compare-table td { padding: 0.75rem 1rem; font-size: 0.875rem; border-bottom: 1px solid var(--border); color: var(--mid); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: #f8fafb; }
.check { color: var(--green); font-weight: 900; }
.cross { color: #ef4444; }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.faq-q { display: block; padding: 1rem 1.25rem; font-weight: 700; font-size: 0.95rem; cursor: pointer; color: var(--dark); background: var(--white); list-style: none; }
.faq-q::marker, .faq-q::-webkit-details-marker { display: none; }
.faq-item[open] .faq-q { color: var(--green); background: #f0fdf4; }
.faq-a { padding: 0 1.25rem 1rem; font-size: 0.875rem; color: var(--mid); line-height: 1.8; }

/* ── CTA ── */
.cta-section { background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%); padding: clamp(3rem,6vw,5rem) clamp(1rem,5vw,3rem); text-align: center; }
.cta-inner { max-width: 700px; margin: 0 auto; }
.cta-h2 { font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 900; color: #fff; margin-bottom: 1rem; line-height: 1.3; }
.cta-sub { font-size: 1rem; color: rgba(255,255,255,0.88); margin-bottom: 2rem; line-height: 1.8; }
.btn-cta-white { display: inline-flex; align-items: center; gap: 0.5rem; background: #fff; color: var(--green-dark); font-weight: 800; font-size: 1rem; padding: 0.85rem 2rem; border-radius: 0.85rem; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.btn-cta-ghost { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.18); color: #fff; font-weight: 700; font-size: 0.9rem; padding: 0.85rem 1.5rem; border-radius: 0.85rem; border: 1.5px solid rgba(255,255,255,0.45); }

/* ── Footer ── */
.site-footer { background: var(--dark); padding: clamp(2rem,4vw,3rem) clamp(1rem,5vw,3rem); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 2rem 3rem; justify-content: space-between; margin-bottom: 2rem; }
.footer-brand { font-size: 1.1rem; font-weight: 900; color: var(--green); margin-bottom: 0.5rem; }
.footer-tagline { font-size: 0.825rem; color: rgba(255,255,255,0.55); line-height: 1.7; max-width: 280px; }
.footer-link-title { font-size: 0.75rem; font-weight: 800; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.footer-link { display: block; font-size: 0.875rem; color: rgba(255,255,255,0.7); margin-bottom: 0.4rem; }
.footer-link:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; color: rgba(255,255,255,0.4); display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }

@media (max-width: 640px) {
  .header-nav .nav-link:not(.btn-nav-cta) { display: none; }
}
