@charset "utf-8";
/* CSS Document */

:root {
--primary: #2c3e50;/* ISTJ 代表色：沈穩深藍 */
--secondary: #34495e;
--accent: #3498db; /* 亮點色：理性藍 */
--bg-light: #f4f6f7;
--text-main: #333;
--sidebar-width: 260px;
}

* { box-sizing: border-box; }

body {
  font-family: "Helvetica Neue", Helvetica, "Microsoft JhengHei", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-light);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
}

/* --- 側邊導航欄 --- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--primary);
  color: white;
  padding: 20px;
  position: fixed;
  height: 100%;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar h3 {
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 10px;
  margin-top: 20px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #bdc3c7;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li { margin-bottom: 5px; }

.sidebar a {
  display: block;
  color: #ecf0f1;
  text-decoration: none;
  padding: 10px;
  border-radius: 4px;
  transition: background 0.2s;
  font-size: 0.95rem;
}

.sidebar a:hover {
  background-color: var(--secondary);
  padding-left: 15px; /* 懸停時的小動畫 */
}

.sidebar a.active {
  background-color: var(--accent);
  font-weight: bold;
}

/* --- 主內容區 --- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 40px;
  max-width: 1200px;
}

header {
  border-bottom: 3px solid var(--primary);
  padding-bottom: 20px;
  margin-bottom: 40px;
}

h1 { font-size: 2.5rem; color: var(--primary); margin: 0; }
.subtitle { font-size: 1.2rem; color: #7f8c8d; margin-top: 5px; }

.tags { margin-top: 15px; }
.tag { 
background: var(--primary); color: white; 
padding: 4px 10px; border-radius: 4px; 
font-size: 0.8rem; margin-right: 5px; 
}

.clearfix {
  clear: both; /* 同時清除左浮動和右浮動 */
}

/* --- 文章樣式 --- */
section {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

h2 { color: var(--primary); border-left: 5px solid var(--accent); padding-left: 15px; margin-top: 0; }
h3 { color: var(--secondary); margin-top: 25px; }
p { line-height: 1.8; text-align: justify; margin-bottom: 1.5rem; }
li { line-height: 1.5; text-align: justify; margin-bottom: 0.8rem; }

blockquote {
  background: #eef2f7;
  border-left: 4px solid var(--accent);
  margin: 20px 0;
  padding: 15px 20px;
  font-style: italic;
  color: #555;
}

/* 認知功能卡片 */
.cognitive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.cog-card {
  background: #f8f9fa;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.cog-card strong { color: var(--accent); display: block; margin-bottom: 5px; font-size: 1.1rem; }

/* 優缺點列表 */
.pros-cons-container { display: flex; gap: 30px; flex-wrap: wrap; }
.pc-box { flex: 1; min-width: 300px; }
.pc-box ul { list-style: none; padding: 0; }
.pc-box li { padding: 8px 0; padding-left: 25px; position: relative; border-bottom: 1px dashed #eee; }

.pros li::before { content: '✔'; color: green; position: absolute; left: 0; }
.cons li::before { content: '✘'; color: red; position: absolute; left: 0; }

/* 回首頁按鈕 */
.btn-home-wrapper {
    text-align: center;
    margin: 40px 0 20px 0;
}
.btn-home {
    display: inline-block;
    padding: 12px 35px;
    background-color: #029F14;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.btn-home:hover {
    color: #fff;
    background-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* --- 響應式設計 --- */
@media (max-width: 768px) {
body { flex-direction: column; }
.sidebar { 
  width: 100%; 
  position: relative; 
  height: auto; 
  padding: 10px;
}
.sidebar ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.sidebar h3 { display: none; } /* 手機版隱藏分類標題以節省空間 */
.sidebar a { text-align: center; font-size: 0.8rem; padding: 5px; }

.main-content { margin-left: 0; padding: 20px; }
.pros-cons-container { flex-direction: column; }
}
