/* 常見問題 FAQ 頁（elderlyhub）— 切換式分類（同首頁 qa-section 做法） */
.faq-page main { padding: 0 0 72px; }
.faq-wrap { width: min(1400px, calc(100% - 32px)); margin: 0 auto; box-sizing: border-box; }

/* Hero */
.faq-hero {
  background: linear-gradient(180deg, #12b4ac 0%, #48c7c0 72%, #d9f3f0 100%);
  color: #fff; padding: 42px 0 36px;
}
.faq-hero .breadcrumb { color: #fff; font-size: 13px; margin-bottom: 10px; }
.faq-hero .breadcrumb a { color: #fff; text-decoration: none; opacity: .9; }
.faq-hero .breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.faq-hero .section-kicker { color: #fff; }
.faq-hero h1 { color: #fff; margin: 8px 0; font-size: clamp(34px, 3.3vw, 48px); line-height: 1.15; font-weight: 700; letter-spacing: -.025em; }
.faq-hero p { color: #fff; font-size: 16px; line-height: 1.7; margin: 0; max-width: 940px; }
.faq-hero p b { font-weight: 700; }

/* 搜尋 */
.faq-search { display: flex; align-items: center; gap: 12px; margin-top: 22px; max-width: 680px; }
.faq-search input {
  flex: 1; height: 52px; box-sizing: border-box; padding: 0 20px;
  border: 1px solid rgba(255,255,255,.72); border-radius: 999px;
  background: rgba(3,103,96,.76); color: #fff; font: inherit; font-size: 16px;
}
.faq-search input::placeholder { color: rgba(255,255,255,.82); }
.faq-search button {
  height: 42px; padding: 0 16px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.9); color: #067a75; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.faq-search span { color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; }

/* 版面：左切換欄 + 右面板 */
.faq-content { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 30px; padding-top: 34px; align-items: start; }
.faq-side {
  position: sticky; top: 96px; display: grid; gap: 4px;
  border: 1px solid #d6e5e4; border-radius: 14px; background: #fff; padding: 16px;
  box-shadow: 0 5px 18px rgba(23,60,72,.04);
}
.faq-side > b { font-size: 14px; color: #607277; margin: 0 0 8px 6px; letter-spacing: .02em; }
.faq-page .faq-side button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 11px 12px; border: 0; border-radius: 10px; background: transparent;
  color: #263538; font: inherit; font-size: 17.5px; font-weight: 700!important; text-align: left; cursor: pointer;
}
.faq-page .faq-side button:hover { background: #eef8f7; color: #078d8f; }
.faq-page .faq-side button.active { background: #078d8f; color: #fff; }
.faq-page .faq-side button span { font-size: 14px; font-weight: 700; opacity: .75; }
.faq-page .faq-side button.active span { opacity: .95; }

/* 面板 */
.faq-panel { display: none; }
.faq-panel.active { display: block; }
.faq-panel > header h2 { margin: 0 0 4px; color: #263538; font-size: 24px; font-weight: 750; }
.faq-panel > header p { margin: 0 0 14px; color: #61767c; font-size: 14px; }

/* 問答卡 */
.faq-panel details, .faq-results details {
  border: 1px solid #e1e9e9; border-radius: 12px; background: #fff; margin-bottom: 10px; overflow: hidden;
}
.faq-panel details[open], .faq-results details[open] { border-color: #bdd7d5; box-shadow: 0 6px 16px rgba(23,60,72,.06); }
.faq-panel summary, .faq-results summary {
  position: relative; cursor: pointer; list-style: none;
  padding: 14px 42px 14px 18px; color: #263538; font-size: 16px; font-weight: 650!important; line-height: 1.5;
}
.faq-panel summary::-webkit-details-marker, .faq-results summary::-webkit-details-marker { display: none; }
.faq-panel summary::after, .faq-results summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: #00b19f; font-size: 22px; font-weight: 700; line-height: 1;
}
.faq-panel details[open] summary::after, .faq-results details[open] summary::after { content: "−"; }
.faq-panel summary:hover, .faq-results summary:hover { background: #f4faf9; }
.faq-panel details > p, .faq-results details > p { margin: 0; padding: 0 18px 14px; color: #536b70; font-size: 15px; line-height: 1.75; }
.faq-panel details > p.faq-src, .faq-results details > p.faq-src { padding: 0 18px 14px; color: #93a3a9; font-size: 13px; }
.faq-panel details > p.faq-src a, .faq-results details > p.faq-src a { color: #078d8f; text-decoration: none; font-weight: 600; }
.faq-panel details > p.faq-src a:hover, .faq-results details > p.faq-src a:hover { text-decoration: underline; }

.faq-results > header, .faq-empty { color: #61767c; font-size: 15px; }
.faq-empty { padding: 12px 2px; }
.faq-results { display: grid; gap: 0; }

@media (max-width: 900px) {
  .faq-content { grid-template-columns: 1fr; gap: 18px; }
  .faq-side { position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .faq-side > b { width: 100%; }
  .faq-page .faq-side button { width: auto; border: 1px solid #e1e9e9; padding: 9px 12px; }
  .faq-page .faq-side button.active { border-color: #078d8f; }
}

/* hidden 屬性要壓過 .active 的 display */
.faq-panel[hidden], .faq-results[hidden], .faq-empty[hidden] { display: none !important; }
