/* ── APCS 專區介紹頁（page-apcs.php）────────────────────────
   配色沿用 page-roadmap.css（深 teal hero、#00a896 主色、淡 teal 卡片），
   讓「怎麼選課」與「APCS 專區」兩頁看起來是同一組說明頁。 */
.az-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans TC', 'Segoe UI', sans-serif;
  color: #0f172a;
  background: #f8fafc;
}
.az-page *, .az-page *::before, .az-page *::after { box-sizing: border-box; }

/* ── Hero ── */
.az-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0a3d42 100%);
  padding: 56px 20px 52px;
  text-align: center;
}
.az-hero-inner { max-width: 760px; margin: 0 auto; }
.az-hero-pill {
  display: inline-block; padding: 4px 16px; border-radius: 999px; margin-bottom: 16px;
  background: rgba(0,168,150,.18); border: 1px solid rgba(0,168,150,.4);
  color: #5eead4; font-size: .75rem; font-weight: 800; letter-spacing: .1em;
}
.az-hero-title {
  font-size: clamp(1.9rem,4.4vw,3rem); font-weight: 900; color: #fff;
  letter-spacing: -.03em; line-height: 1.1; margin: 0 0 16px;
}
.az-hero-title em {
  display: block; margin-top: 10px;
  font-style: normal; color: #5eead4;
  font-size: clamp(1rem,2vw,1.35rem); font-weight: 700; letter-spacing: 0; line-height: 1.4;
}
.az-hero-desc { font-size: .98rem; color: rgba(200,230,255,.8); max-width: 60ch; margin: 0 auto 26px; line-height: 1.8; }
.az-hero-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.az-hero-note { margin: 18px 0 0; font-size: .82rem; color: rgba(200,230,255,.6); }
.az-hero-note a { color: #5eead4; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.az-hero-note a:hover { color: #99f6e4; }

/* ── Buttons ── */
.az-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 26px; border-radius: 999px;
  font-size: .92rem; font-weight: 700; line-height: 1.3;
  text-decoration: none !important; transition: background .15s, transform .15s, box-shadow .15s;
}
.az-btn-p { background: #00a896; color: #fff !important; box-shadow: 0 2px 10px rgba(0,168,150,.3); }
.az-btn-p:hover { background: #00786c; color: #fff !important; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,168,150,.35); }
.az-btn-s { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35); color: #fff !important; }
.az-btn-s:hover { background: rgba(255,255,255,.18); color: #fff !important; }
.az-btn-line { background: #06c755; color: #fff !important; box-shadow: 0 2px 10px rgba(6,199,85,.3); }
.az-btn-line:hover { background: #05a547; color: #fff !important; transform: translateY(-2px); }
.az-btn:focus-visible, .az-entry:focus-visible, .az-link-pill:focus-visible { outline: 2px solid #00a896; outline-offset: 3px; }

/* ── Body ── */
.az-body { max-width: 1040px; margin: 0 auto; padding: 52px 20px 80px; }
.az-section { margin-bottom: 60px; }
.az-section-title {
  font-size: 1.25rem; font-weight: 900; color: #0f172a;
  margin: 0 0 20px; padding-bottom: 10px;
  border-bottom: 3px solid #00a896; display: inline-block;
}
.az-section-lead { margin: -6px 0 22px; max-width: 70ch; font-size: .9rem; color: #475569; line-height: 1.7; }

/* ── 四個入口卡 ── */
.az-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.az-entry {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 22px 22px 20px; border-radius: 14px;
  background: #fff; border: 1px solid #e2e8f0; border-top: 3px solid #00a896;
  box-shadow: 0 2px 10px rgba(15,23,42,.05);
  color: #0f172a !important; text-decoration: none !important;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.az-entry:hover { box-shadow: 0 10px 30px rgba(0,168,150,.14); transform: translateY(-3px); border-color: rgba(0,168,150,.5); }
.az-entry-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: #00a896; }
.az-entry-num {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 2.4rem; font-weight: 800; line-height: 1; color: #0f172a; letter-spacing: -.03em;
}
.az-entry-num small { font-size: .95rem; font-weight: 700; color: #475569; margin-left: 4px; font-family: inherit; }
.az-entry-title { font-size: 1.02rem; font-weight: 800; line-height: 1.4; margin-top: 4px; }
.az-entry-text { font-size: .86rem; color: #475569; line-height: 1.7; }
.az-entry-more { margin-top: auto; padding-top: 10px; font-size: .84rem; font-weight: 700; color: #00786c; }

/* ── 還有這些 ── */
.az-more-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.az-more {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 20px; border-radius: 12px;
  background: #f0fdfa; border: 1px solid rgba(0,168,150,.18);
}
.az-more strong { font-size: .95rem; font-weight: 800; color: #0f4c40; line-height: 1.4; }
.az-more span { font-size: .84rem; color: #475569; line-height: 1.7; }
.az-more a { color: #00786c; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.az-more a:hover { color: #005f57; }

/* ── 怎麼開始 ── */
.az-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.az-step {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 18px 22px; border-radius: 14px;
  background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 2px 10px rgba(15,23,42,.04);
}
.az-step-num {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ccfbf1; color: #0f766e;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 1.1rem; font-weight: 800;
}
.az-step strong { display: block; font-size: 1rem; font-weight: 800; color: #0f172a; margin: 8px 0 6px; line-height: 1.3; }
.az-step p { margin: 0; font-size: .88rem; color: #475569; line-height: 1.75; }
.az-start-cta { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.az-start-note { font-size: .84rem; color: #64748b; }

/* ── 適合誰 ── */
.az-who-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.az-who {
  padding: 20px 20px 18px; border-radius: 14px;
  background: #fff; border: 1px solid #e2e8f0; border-top: 3px solid #00a896; box-shadow: 0 2px 10px rgba(15,23,42,.05);
}
.az-who h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 800; color: #0f172a; line-height: 1.35; }
.az-who p { margin: 0; font-size: .86rem; color: #475569; line-height: 1.7; }
.az-who a { color: #00786c; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.az-who a:hover { color: #005f57; }

/* ── 和課程的關係 ── */
.az-course {
  padding: 24px 28px; border-radius: 16px;
  background: linear-gradient(135deg, #e8faf8, #ccfbf1); border: 1px solid rgba(0,168,150,.3);
}
.az-course .az-section-title { border-bottom-color: rgba(0,168,150,.5); margin-bottom: 14px; }
.az-course-text { margin: 0 0 16px; font-size: .92rem; color: #0f4c40; line-height: 1.75; }
.az-course-links { display: flex; flex-wrap: wrap; gap: 8px; }
.az-link-pill {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid rgba(0,168,150,.4); color: #0f766e !important;
  font-size: .82rem; font-weight: 700; line-height: 1.4; text-decoration: none !important;
  transition: background .15s, border-color .15s;
}
.az-link-pill:hover { background: #ccfbf1; border-color: #00a896; color: #0f766e !important; }

/* ── FAQ ── */
.az-faq { display: grid; gap: 10px; }
.az-faq-item {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15,23,42,.04); overflow: hidden;
}
.az-faq-item summary {
  list-style: none; cursor: pointer;
  padding: 16px 48px 16px 20px; position: relative;
  font-size: .98rem; font-weight: 800; color: #0f172a; line-height: 1.4;
}
.az-faq-item summary::-webkit-details-marker { display: none; }
.az-faq-item summary::after {
  content: ''; position: absolute; right: 20px; top: 50%;
  width: 9px; height: 9px; border-right: 2px solid #00a896; border-bottom: 2px solid #00a896;
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.az-faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.az-faq-item[open] summary { border-bottom: 1px solid #f1f5f9; }
.az-faq-item p { margin: 0; padding: 14px 20px 18px; font-size: .9rem; color: #475569; line-height: 1.8; }

/* ── CTA ── */
.az-cta {
  margin-top: 52px; padding: 32px 36px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0a3d42 100%);
  border-radius: 20px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px;
}
.az-cta h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 900; color: #fff; }
.az-cta p  { margin: 0; font-size: .86rem; color: #5eead4; }
.az-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── 響應式 ── */
@media (max-width: 880px) {
  .az-more-grid, .az-who-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .az-hero { padding: 44px 16px 40px; }
  .az-body { padding: 40px 16px 64px; }
  .az-section { margin-bottom: 44px; }
  .az-entry-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .az-entry { padding: 18px 18px 16px; }
  .az-step { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 16px 16px; }
  .az-step-num { width: 36px; height: 36px; font-size: .95rem; }
  .az-step strong { margin-top: 4px; }
  .az-course { padding: 20px 18px; }
  .az-cta { padding: 24px 20px; flex-direction: column; align-items: flex-start; }
  .az-cta-btns { width: 100%; }
  .az-cta-btns .az-btn { flex: 1 1 100%; justify-content: center; }
  .az-hero-btns .az-btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .az-btn, .az-entry, .az-faq-item summary::after { transition: none; }
  .az-btn:hover, .az-entry:hover { transform: none; }
}
