/* ================================================================
   國教行動聯盟政策知識庫 - 兒少權法 165 條修法子站
   配色：完全沿用既有 amber 主題 (#D97706 / #fef3c7 / #7f1d1d)
   ================================================================ */

/* ============= ORGANIZATION BANNER ============= */
.org-banner {
  background: linear-gradient(135deg, #B45309 0%, #D97706 100%);
  color: white; padding: 12px 20px;
  border-bottom: 3px solid #78350F;
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.5px;
}
.banner-content { max-width: 1200px; margin: 0 auto; }
.separator { margin: 0 8px; opacity: 0.7; }

/* ============= ACTIVE CAMPAIGN BAR (新增：進行中倡議) ============= */
.active-campaign-bar {
  position: sticky; top: 0; z-index: 100;
  background: #fef3c7; border-bottom: 2px solid #D97706;
  color: #7f1d1d; padding: 10px 20px;
  font-size: 0.92rem; font-weight: 600;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 4px rgba(217, 119, 6, 0.1);
}
.campaign-icon { font-size: 1.1rem; }
.campaign-label { color: #7f1d1d; font-weight: 700; }
.campaign-hearings { color: #1f2937; font-weight: 500; }
.campaign-hearings .session {
  display: inline-block; padding: 2px 8px; margin: 0 4px;
  background: white; border: 1px solid #D97706; border-radius: 12px;
  font-size: 0.85rem;
}
.campaign-hearings .session.past { opacity: 0.45; text-decoration: line-through; }
.campaign-hearings .session.next {
  background: #D97706; color: white; font-weight: 700;
}
.campaign-countdown {
  background: #7f1d1d; color: white; padding: 4px 10px;
  border-radius: 12px; font-weight: 700; font-size: 0.88rem;
}

/* ============= BREADCRUMB ============= */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap;
  padding: 12px 20px; font-size: 0.9rem;
  background: #f9fafb; border-bottom: 1px solid #e5e7eb;
}
.breadcrumb a { color: #2563eb; text-decoration: none; }
.breadcrumb a:hover { color: #1d4ed8; text-decoration: underline; }
.breadcrumb .current { color: #4b5563; font-weight: 600; }

/* ============= TYPOGRAPHY ============= */
body {
  font-family: "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7; color: #0f172a; background: #ffffff; margin: 0;
}
main { max-width: 900px; margin: 0 auto; padding: 20px; }
p { margin: 16px 0; line-height: 1.8; }
a { color: #2563eb; text-decoration: none; }

h1 { font-size: 2rem; font-weight: 700; margin: 40px 0 20px; line-height: 1.4; color: #0f172a; }
h1 .entity {
  background: linear-gradient(120deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-weight: 800;
}
h2 {
  font-size: 1.5rem; font-weight: 700;
  margin: 32px 0 16px; color: #1f2937;
  border-left: 4px solid #D97706; padding-left: 12px;
}
h3 { font-size: 1.15rem; font-weight: 700; margin: 20px 0 12px; color: #1f2937; }

/* ============= META INFO ============= */
.meta-info {
  display: flex; flex-wrap: wrap; gap: 20px;
  padding: 16px 0; margin: 16px 0 24px;
  border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem; color: #4b5563;
}
.meta-info a { color: #2563eb; text-decoration: none; }
.meta-info a:hover { text-decoration: underline; }
.person { font-weight: 600; color: #0f172a; }

/* ============= EXECUTIVE SUMMARY ============= */
.executive-summary {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #D97706; border-radius: 8px;
  padding: 20px; margin: 24px 0;
}
.executive-summary h2 { border: none; padding: 0; margin: 0 0 16px; color: #7f1d1d; font-size: 1.2rem; }
.executive-summary ul { margin: 0; padding-left: 20px; }
.executive-summary li { margin-bottom: 10px; color: #1f2937; line-height: 1.6; }
.executive-summary strong { color: #7f1d1d; font-weight: 700; }

/* ============= ANSWER CAPSULE ============= */
.answer-capsule {
  background: #f0fdf4; border-left: 4px solid #22c55e;
  padding: 20px; margin: 24px 0; border-radius: 4px;
  font-size: 1.05rem; line-height: 1.7; color: #1f2937;
}
.answer-capsule strong { color: #15803d; font-weight: 700; }

/* ============= STATISTICS ============= */
.stat {
  background: #fef3c7; color: #92400e;
  padding: 2px 6px; border-radius: 3px;
  font-weight: 600; white-space: nowrap;
}

/* ============= SOURCE LINKS ============= */
.source-link {
  color: #2563eb; text-decoration: none;
  font-size: 0.85em; vertical-align: super; padding: 0 2px;
}
.source-link:hover { background: #eff6ff; text-decoration: underline; }

/* ============= ENTITY MARKUP ============= */
.entity {
  background: linear-gradient(120deg, rgba(217, 119, 6, 0.15), rgba(217, 119, 6, 0.08));
  padding: 2px 4px; border-radius: 2px; font-weight: 600;
}

/* ============= BLOCKQUOTE ============= */
blockquote {
  margin: 32px 0; padding: 20px;
  border-left: 4px solid #8b5cf6; background: #faf5ff;
  font-style: italic; color: #4c1d95; line-height: 1.8;
}
blockquote p { margin: 0 0 12px; }
blockquote cite {
  display: block; font-weight: 600; font-style: normal;
  color: #6d28d9; margin-top: 8px;
}

/* ============= THREE PILLARS ============= */
.three-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin: 20px 0;
}
.pillar-card {
  background: white; border: 2px solid #e5e7eb;
  border-top: 4px solid #D97706; border-radius: 8px;
  padding: 20px; transition: all 0.2s;
}
.pillar-card:hover { box-shadow: 0 4px 12px rgba(217, 119, 6, 0.15); }
.pillar-card h3 { font-size: 1.1rem; margin: 0 0 12px; color: #D97706; font-weight: 700; }
.pillar-card p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: #4b5563; }

/* ============= TIMELINE ============= */
.timeline { background: #f9fafb; border-radius: 8px; padding: 24px; margin: 24px 0; }
.timeline-item { display: flex; gap: 20px; padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.timeline-item:last-child { border-bottom: none; }
.timeline-year { font-weight: 700; color: #D97706; min-width: 90px; }
.timeline-content { flex: 1; line-height: 1.6; }

/* ============= COMPARISON TABLE ============= */
.comparison-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.comparison-table th { background: #D97706; color: white; padding: 12px; text-align: left; font-weight: 600; }
.comparison-table td { padding: 12px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.comparison-table tr:hover { background: #fffbeb; }
.check-yes { color: #15803d; font-weight: 700; }
.check-no { color: #D97706; font-weight: 700; }

/* ============= FAQ ============= */
.faq-section { margin: 40px 0; }
.faq-item { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #e5e7eb; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1.1rem; font-weight: 600; color: #D97706; margin: 0 0 12px; }
.faq-item p { margin: 0; font-size: 0.95rem; line-height: 1.7; color: #4b5563; }

/* ============= RELATED LINKS & SOURCES ============= */
.related-links {
  background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 8px; padding: 24px; margin: 40px 0;
}
.related-links h3 { border: none; padding: 0; margin: 0 0 16px; }
.related-links ul { list-style: none; padding: 0; margin: 0; }
.related-links li { margin-bottom: 10px; }
.related-links a { color: #2563eb; text-decoration: none; }
.related-links a:hover { color: #1d4ed8; text-decoration: underline; }
.related-links a::before { content: "→ "; color: #D97706; font-weight: 700; }

.sources {
  background: #f0f9ff; border: 1px solid #0284c7;
  border-radius: 8px; padding: 24px; margin: 40px 0;
}
.sources h3 { border: none; padding: 0; margin: 0 0 16px; color: #0c4a6e; }
.sources ol { padding-left: 20px; margin: 0; }
.sources li { margin-bottom: 10px; line-height: 1.6; font-size: 0.92rem; }
.sources a { color: #0284c7; word-break: break-all; }
.sources a:hover { text-decoration: underline; }

/* ============= UPDATE DATE FOOTER ============= */
.update-date {
  text-align: center; padding: 20px; margin-top: 40px;
  border-top: 1px solid #e5e7eb; font-size: 0.85rem; color: #6b7280;
}

/* ============= DOWNLOAD CTA ============= */
.download-cta {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #D97706; border-radius: 10px;
  padding: 24px; margin: 32px 0;
}
.download-cta h3 { color: #7f1d1d; margin: 0 0 12px; border: none; padding: 0; }
.download-cta-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.download-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; background: white;
  border: 2px solid #D97706; color: #B45309;
  border-radius: 8px; font-weight: 600; text-decoration: none;
  transition: all 0.2s;
}
.download-cta-btn:hover {
  background: #D97706; color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(217, 119, 6, 0.25);
}

/* ============= ICONS ============= */
.ico { display: inline-block; vertical-align: -0.15em; margin-right: 4px; }
.ico-warn { color: #D97706; }
.ico-star { color: #F59E0B; }
.ico-no { color: #B91C1C; }
.ico-yes { color: #16A34A; }

/* ============= INTERACTIVE A-LEVEL TABLE (新增) ============= */
.article-explorer { margin: 28px 0; }
.article-explorer-controls {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 16px; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 8px 8px 0 0;
}
.article-search {
  flex: 1; min-width: 200px;
  padding: 10px 14px; border: 1px solid #d1d5db;
  border-radius: 6px; font-size: 0.95rem;
}
.article-search:focus { outline: 2px solid #D97706; outline-offset: -1px; }
.article-chapter-filter {
  padding: 10px 14px; border: 1px solid #d1d5db;
  border-radius: 6px; font-size: 0.95rem; background: white;
}
.article-list {
  list-style: none; padding: 0; margin: 0;
  border: 1px solid #fde68a; border-top: none;
  border-radius: 0 0 8px 8px; overflow: hidden;
}
.article-card {
  padding: 16px 20px; border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s;
}
.article-card:last-child { border-bottom: none; }
.article-card:hover { background: #fffbeb; }
.article-card.hidden { display: none; }
.article-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; flex-wrap: wrap;
}
.article-no {
  background: #fef3c7; color: #92400e;
  padding: 4px 10px; border-radius: 4px;
  font-weight: 700; font-size: 0.95rem;
}
.article-chapter-tag {
  background: #e0e7ff; color: #3730a3;
  padding: 2px 8px; border-radius: 12px;
  font-size: 0.8rem; font-weight: 500;
}
.article-title {
  font-weight: 600; color: #1f2937;
  font-size: 1rem; flex: 1; min-width: 200px;
}
.article-tabs {
  display: flex; gap: 4px; margin: 12px 0 8px;
  border-bottom: 2px solid #f3f4f6;
}
.article-tab {
  padding: 8px 14px; cursor: pointer;
  border: none; background: none;
  color: #6b7280; font-weight: 500; font-size: 0.9rem;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.15s;
}
.article-tab:hover { color: #D97706; }
.article-tab.active {
  color: #D97706; border-bottom-color: #D97706;
  font-weight: 700;
}
.article-tab-content {
  display: none; padding: 12px 0;
  font-size: 0.95rem; line-height: 1.7; color: #374151;
}
.article-tab-content.active { display: block; }
.article-actions {
  display: flex; gap: 8px; margin-top: 10px;
  font-size: 0.85rem;
}
.article-action-btn {
  background: none; border: 1px solid #d1d5db;
  padding: 4px 10px; border-radius: 4px;
  color: #4b5563; cursor: pointer; font-size: 0.85rem;
  transition: all 0.15s;
}
.article-action-btn:hover {
  background: #D97706; color: white; border-color: #D97706;
}
.article-card.highlighted {
  background: #fef3c7;
  box-shadow: inset 4px 0 0 #D97706;
  animation: highlightPulse 2s ease-out;
}
@keyframes highlightPulse {
  0% { background: #fde68a; }
  100% { background: #fef3c7; }
}

/* ============= SPEECH SECTIONS (公聽會發言參考頁) ============= */
.speech-session {
  border: 1px solid #e5e7eb; border-radius: 8px;
  margin: 20px 0; overflow: hidden;
}
.speech-session-header {
  background: #fffbeb; padding: 16px 20px;
  cursor: pointer; user-select: none;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #fde68a;
}
.speech-session-header:hover { background: #fef3c7; }
.speech-session-title { font-weight: 700; color: #92400e; font-size: 1.05rem; }
.speech-session-meta { font-size: 0.85rem; color: #6b7280; }
.speech-session-body { padding: 20px; display: none; }
.speech-session.open .speech-session-body { display: block; }
.speech-session.open .speech-toggle { transform: rotate(180deg); }
.speech-toggle { transition: transform 0.2s; color: #D97706; font-weight: 700; }
.speech-time-mark {
  background: #fef3c7; padding: 4px 10px;
  border-left: 3px solid #D97706; margin: 16px 0 8px;
  font-weight: 700; color: #92400e; font-size: 0.9rem;
}
.speech-block {
  padding: 8px 12px 8px 16px; margin: 10px 0;
  border-left: 3px solid #16A34A; background: #f9fafb;
  font-size: 1rem; line-height: 1.7;
}
.speech-block.emphasize { background: #fffbeb; border-left-color: #D97706; font-weight: 600; }

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  .meta-info { flex-direction: column; gap: 8px; }
  .three-pillars { grid-template-columns: 1fr; }
  .breadcrumb { font-size: 0.8rem; }
  main { padding: 12px; }
  .comparison-table { font-size: 0.85rem; }
  .timeline-item { flex-direction: column; gap: 4px; }
  .active-campaign-bar { font-size: 0.85rem; padding: 8px 12px; }
  .campaign-hearings { width: 100%; text-align: center; }
  .download-cta-list { flex-direction: column; }
  .download-cta-btn { width: 100%; justify-content: center; }
  .article-explorer-controls { flex-direction: column; }
  .article-search, .article-chapter-filter { width: 100%; }
  .article-header { flex-direction: column; align-items: flex-start; gap: 6px; }
}
