/* =====================================
   全局樣式
===================================== */
body {
  font-family: "Noto Sans TC", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background: #fdf6e3;
  color: #333;
}

h1, h2, h3, h4, h5, h6 {
  margin: 1em 0 0.5em 0;
  font-weight: 700;
}

p {
  margin: 0.5em 0;
}

/* =====================================
   導覽列（桌面 & 手機）
===================================== */
/* ========== 導覽列（桌機版） ========== */
.fixed-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: #3B5B7A; /* 桌機主色 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  z-index: 999;
}

.fixed-nav .logo {
  font-size: 20px;
  font-weight: bold;
  color: #FDF6EC;
  text-decoration: none;
}

.nav-links {
  display: flex; /* 桌機版橫向排列 */
  gap: 32px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: #FDF6EC;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 4px;
  transition: all 0.3s ease;
}

.nav-links a::after {
  content: "";
  display: block;
  width: 0;
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  background: #ffffff;
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  font-weight: 600;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* 漢堡按鈕（桌機隱藏） */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

/* ========== 手機版（768px 以下） ========== */
@media (max-width: 768px) {
  .hamburger {
    display: flex; /* 手機顯示 */
  }

  /* 導覽列變成相對高度 */
  .fixed-nav {
    padding: 12px 20px;
  }

  .nav-links {
    display: none; /* 初始隱藏 */
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #3B5B7A; /* 手機版背景色可同桌機或改 */
    padding: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  }

  .nav-links a {
    font-size: 18px;
    color: #FDF6EC;
  }

  .nav-links.active {
    display: flex;
  }
}

/* =====================================
   卡片樣式升級版
===================================== */

/* ----- 基本樣式----- */
.card-section,
.card-section-1 {
  border-radius: 12px;
  padding: 32px 24px;         /* 桌機內距 */
  margin: 30px auto;          /* 自動置中 */
  max-width: 1000px;          /* 桌機最大寬度 */
  width: 90%;                 /* 手機自適應 */
  word-break: break-word;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease;
}

/* 原始配色保持 */
.card-section {
  background-color: #dceeff;
}

.card-section-1 {
  background-color: #ffffff;
  padding: 30px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 20px auto;
}

/* ----- 卡片按鈕 ----- */
.btn-external {
  display: inline-block;           /* 行內區塊，可自適應內容寬度 */
  padding: 10px 20px;              /* 上下左右內距 */
  background-color: #3B5B7A;       /* 按鈕背景色 */
  color: #ffffff;                  /* 文字顏色 */
  font-weight: 600;                /* 粗體字 */
  font-size: 16px;                 /* 字體大小 */
  text-decoration: none;           /* 移除下劃線 */
  border-radius: 6px;              /* 圓角 */
  border: 2px solid #3B5B7A;      /* 邊框顏色 */
  transition: all 0.3s ease;       /* 過渡效果 */
  margin-top: 15px;                /* 與上方元素間距 */
  width: fit-content;              /* 自動適應內容寬度 */
  max-width: 100%;                 /* 防止超出容器 */
}

.card-section-1 ul {
    list-style: none;  /* 移除預設黑點 */
    padding-left: 0;
    text-align: center;
}

.card-section-1 ul li::before {
    content: "• ";     /* 自訂黑點 */
    color: #333;       /* 黑點顏色 */
}


/* =====================================
   動畫：滑入效果
===================================== */
.slide-in {
  opacity: 0;                  /* 初始隱藏 */
  transform: translateY(40px); /* 從下方位移 40px */
  transition: all 0.8s ease;   /* 平滑過渡效果 */
}

.slide-in.show {
  opacity: 1;                  /* 顯示 */
  transform: translateY(0);    /* 回到原位 */
}

/* =====================================
   內文字體保持統一
===================================== */
.card-section p,
.card-section-1 p,
.card-highlight p {
  margin: 0.5em 0;
  font-size: 16px;
  line-height: 1.6;
}

/* ----- 手機 RWD ----- */
@media (max-width: 600px) {
  .card-section,
  .card-section-1,
  .card-highlight {
    padding: 22px 16px;
    margin: 20px auto;
  }

  .card-section p,
  .card-section-1 p,
  .card-highlight p {
    font-size: 15px;
    line-height: 1.5;
  }
}

/* =====================================
   大頭照 / 個人簡介
===================================== */
.about-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 20px auto;
  object-fit: cover;
  border: 3px solid #C48E64;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@media (max-width: 480px) {
  .about-img {
    width: 100px;
    height: 100px;
  }
}

/* =====================================
   電子報訂閱
===================================== */
.newsletter-box {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.newsletter-box form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: 100%;
}

.newsletter-box input[type="email"] {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.newsletter-box button {
  padding: 10px;
  background-color: #3B5B7A;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.newsletter-box button:hover {
  background-color: #2E4660;
}

/* =====================================
   回到頂端按鈕
===================================== */
#backToTop {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  font-size: 20px;
  background: #3B5B7A;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#backToTop:hover {
  transform: scale(1.1);
  background: #2E4660;
}
