/* --- 1. 全局與變數設定 --- */
:root {
  --primary-color: #0d6cf0ff;
  --secondary-color: rgb(17, 163, 102);
  --accent-color: #1a2a6c;
  --text-dark: #2c3e50;
  --text-light: #5a6a7a;
  --bg-light: #f8f9fa;
  --font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background: linear-gradient(135deg, #4ac7ddff, #22bed3ff);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* --- 2. 首頁 Hero Section (保持不變) --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  color: white;
  position: relative;
}
.container-box {
  background-color: rgba(8, 3, 17, 0.16);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 50px 40px;
  border-radius: 25px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  max-width: 750px;
  width: 90%;
  margin: 0 auto;
  animation: fadeIn 1.2s ease-out;
}
.profile-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
  margin-bottom: 25px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.profile-img:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
h1 {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  font-size: 2.2rem;
}
.hero p {
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 40px;
  font-weight: 400;
}
.custom-btn {
  padding: 14px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-custom-1 {
  background-color: var(--primary-color);
  color: #fff;
}
.btn-custom-2 {
  background-color: var(--primary-color);
  color: #fff;
}
.btn-custom-3 {
  background-color: var(--primary-color);
  color: #fff;
}
.custom-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 2.5rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, -20px);
  }
  60% {
    transform: translate(-50%, -10px);
  }
}

/* --- 3. 文章區塊 --- */
#articles {
  background-color: var(--bg-light);
  padding: 100px 20px;
}
#articles h2 {
  font-weight: 700;
  margin-bottom: 50px;
  text-align: center;
  font-size: 2.5rem;
  color: var(--text-dark);
}
.article {
  max-width: 750px;
  margin: 0 auto 40px auto;
  background: #fff;
  border-radius: 16px;
  padding: 35px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-left: 5px solid var(--primary-color);
}
.article:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}
.article h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-dark);
}
.article p {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 1.05rem;
  /* --- 1. 關鍵修改：保留換行 --- */
  white-space: pre-wrap;
}

/* --- 4. 頁尾 Footer (保持不變) --- */
footer {
  background-color: #2c3e50;
  color: #bdc3c7;
  text-align: center;
  padding: 30px 20px;
}

/* --- 5. 動畫與響應式 (保持不變) --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 576px) {
  .container-box {
    padding: 40px 25px;
    width: 95%;
  }
  h1 {
    font-size: 1.8rem;
  }
  #articles h2 {
    font-size: 2rem;
  }
  .article h3 {
    font-size: 1.4rem;
  }
}
