/* 本檔載入頁面：動態消息 (news/news-home.html) */
/* pages/news-home.css — 動態消息 (2026-10 改版) */
/* 使用位置：整份文件：CSS 變數（顏色等共用設定，供下方規則以 var(--名稱) 取用） */
:root {
  --brand: #0a5bb5;
  --brand-ink: #0b2545;
  --accent: #f08a24;
  --line: #e2e8f0;
  --text: #334155;
  --muted: #64748b;
}

/* 使用位置：主要內容區 */
.news-body {
  background: linear-gradient(180deg, #eef4fa 0%, #f6f9fc 320px, #f6f9fc 100%);
  padding: 0;
  color: var(--text);
}

/* 使用位置：麵包屑導覽 */
.news-body .breadcrumb {
  max-width: 1200px;
  width: calc(100% - 2rem);
  margin: 87px auto 0;
  box-sizing: border-box;
  background: transparent;
  box-shadow: none;
  padding: 1.1rem 0 0.4rem;
}

/* 使用位置：主要內容區 */
.news-container {
  max-width: 1200px;
  width: calc(100% - 2rem);
  box-sizing: border-box;
  margin: 0.8rem auto 3.5rem;
  padding: 2.4rem 2.6rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(15, 40, 80, 0.07);
}

/* 使用位置：頁面大標題 (H1) */
.news-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.75rem;
  color: var(--brand-ink);
  margin: 0 0 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

/* 使用位置：頁面大標題 (H1)｜前方裝飾 */
.news-title::before {
  content: "";
  width: 6px;
  height: 1.3em;
  border-radius: 3px;
  background: linear-gradient(180deg, #ffb062, var(--accent));
}

/* 使用位置：「動態消息」區塊 */
.news-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 時間線 */
/* 使用位置：「動態消息」區塊｜前方裝飾 */
.news-list::before {
  content: "";
  position: absolute;
  left: 118px;
  top: 0.8rem;
  bottom: 0.8rem;
  width: 2px;
  background: #e2ebf5;
}

/* 使用位置：「動態消息」區塊 */
.news-item {
  position: relative;
  padding: 0;
  border-bottom: 0;
  display: flex;
  align-items: stretch;
  gap: 0;
}

/* 使用位置：「動態消息」區塊｜第一個 */
.news-item > div:first-child {
  flex: none;
  width: 118px;
  position: relative;
}

/* 使用位置：「動態消息」區塊｜後方裝飾、第一個 */
.news-item > div:first-child::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #b8cde3;
  z-index: 1;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* 使用位置：「動態消息」區塊｜滑鼠移入時、後方裝飾、第一個 */
.news-item:hover > div:first-child::after {
  border-color: var(--accent);
  background: var(--accent);
}

/* 使用位置：「動態消息」區塊 */
.news-date {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  padding-right: 1.4rem;
  box-sizing: border-box;
  color: var(--brand);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

/* 使用位置：「動態消息」區塊 */
.news-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.35rem 0 0.35rem 1.4rem;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* 使用位置：「動態消息」區塊｜滑鼠移入時 */
.news-name:hover {
  color: var(--brand);
  background: #f3f8fe;
  border-color: #d6e5f5;
}

/* 使用位置：「動態消息」區塊 */
.icon {
  color: var(--accent);
  font-size: 1.3rem;
}

@media (max-width: 768px) {
  /* 使用位置：麵包屑導覽、主要內容區｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-body .breadcrumb,
  .news-container {
    width: calc(100% - 1.2rem);
  }

  /* 使用位置：主要內容區｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-container {
    margin-bottom: 2.5rem;
  }

  /* 使用位置：主要內容區｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-container {
    padding: 1.4rem 1rem;
  }

  /* 使用位置：頁面大標題 (H1)｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-title {
    font-size: 1.4rem;
  }

  /* 使用位置：「動態消息」區塊｜前方裝飾｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-list::before {
    left: 6px;
  }

  /* 使用位置：「動態消息」區塊｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-item {
    flex-direction: column;
    padding-left: 1.5rem;
  }

  /* 使用位置：「動態消息」區塊｜第一個｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-item > div:first-child {
    width: auto;
    position: static;
  }

  /* 使用位置：「動態消息」區塊｜後方裝飾、第一個｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-item > div:first-child::after {
    left: 1px;
    right: auto;
    top: 1.25rem;
    margin-top: 0;
  }

  /* 使用位置：「動態消息」區塊｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-date {
    justify-content: flex-start;
    padding: 0.8rem 0 0;
  }

  /* 使用位置：「動態消息」區塊｜螢幕寬度 ≤768px（平板/手機）時 */
  .news-name {
    margin: 0.2rem 0 0.4rem;
    padding: 0.6rem 0.8rem;
    margin-left: -0.8rem;
  }
}

@media (max-width: 480px) {
  /* 使用位置：麵包屑導覽｜螢幕寬度 ≤480px（手機）時 */
  .news-body .breadcrumb {
    margin-top: 70px;
  }
}
