/**
 * 傳統編輯器內文樣式（前台與後台編輯器共用同一份）
 *
 * 前台：工程實績「工程說明」、最新消息內文外層加上 .huProse
 * 後台：TinyMCE 編輯區 <body> 也加上 .huProse（functions：tiny_mce_before_init）
 * 所以這裡的設定在兩邊會完全相同；修改內文樣式請只改這個檔案。
 *
 * 色彩與字級對應 Figma 設計規範：
 *   品牌藍 #396A98／品牌綠 #528A45／輔助藍 #4F8BAD
 *   深色文字 #292929／一般文字 #5F6870／分隔線 #CED6D8／淺底 #F4F6F7
 */

/* ---------- 基本文字 ---------- */
.huProse {
  font-family: "Noto Sans TC", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 1px;
  color: #292929;
  word-break: break-word;
}

/* 子元素一律繼承（覆蓋主題 * { color; font-family }）
   :where() 讓權重只有 .huProse 一層，下方 h2、a 等設定可正常覆蓋 */
.huProse :where(*) {
  color: inherit;
  font-family: inherit;
  letter-spacing: inherit;
}

.huProse > *:first-child {
  margin-top: 0;
}
.huProse > *:last-child {
  margin-bottom: 0;
}

.huProse p,
.huProse li,
.huProse td,
.huProse th,
.huProse dd,
.huProse dt {
  font-size: 17px;
  line-height: 1.8;
}

.huProse p {
  margin: 0 0 1em;
}

/* ---------- 標題 ---------- */
.huProse h1,
.huProse h2,
.huProse h3,
.huProse h4,
.huProse h5,
.huProse h6 {
  margin: 1.6em 0 0.6em;
  line-height: 1.5;
}

/* 大標題：品牌藍、中粗 */
.huProse h1,
.huProse h2 {
  font-size: 26px;
  font-weight: 500;
  color: #396a98;
  letter-spacing: 1px;
}

/* 中標題：設計稿「˙ 全面提升防洪標準…」 */
.huProse h3 {
  font-size: 22px;
  font-weight: 400;
  color: #292929;
}

/* 小標題：粗體 */
.huProse h4 {
  font-size: 18px;
  font-weight: 700;
  color: #292929;
}

.huProse h5,
.huProse h6 {
  font-size: 16px;
  font-weight: 700;
  color: #5f6870;
}

/* ---------- 行內 ---------- */
.huProse strong,
.huProse b {
  font-weight: 700;
}

.huProse em,
.huProse i {
  font-style: italic;
}

.huProse a {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit; /* 主題 a 預設 line-height 100%，內文需跟隨段落 */
  color: #396a98;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s;
}
.huProse a:hover {
  color: #4f8bad;
}

.huProse del,
.huProse s {
  text-decoration: line-through;
}

.huProse sup,
.huProse sub {
  font-size: 0.7em;
}

/* ---------- 清單 ---------- */
.huProse ul,
.huProse ol {
  margin: 0 0 1em;
  padding-left: 1.6em;
}
.huProse ul {
  list-style: disc;
}
.huProse ol {
  list-style: decimal;
}
.huProse ul ul {
  list-style: circle;
}
.huProse li {
  margin: 0.2em 0;
}
.huProse li::marker {
  color: #396a98;
}

/* ---------- 引言、分隔線 ---------- */
.huProse blockquote {
  margin: 1.4em 0;
  padding: 16px 24px;
  border-left: 3px solid #396a98;
  background: #f4f6f7;
}
.huProse blockquote p:last-child {
  margin-bottom: 0;
}

.huProse hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid #ced6d8;
}

/* ---------- 表格 ---------- */
.huProse table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
}
.huProse th,
.huProse td {
  padding: 10px 14px;
  border: 1px solid #ced6d8;
  text-align: left;
  vertical-align: top;
}
.huProse th,
.huProse thead td {
  background: #f4f6f7;
  font-weight: 700;
}

/* ---------- 圖片（編輯器的對齊按鈕） ---------- */
.huProse img {
  max-width: 100%;
  height: auto;
}
.huProse .alignleft {
  float: left;
  margin: 0.4em 1.5em 1em 0;
}
.huProse .alignright {
  float: right;
  margin: 0.4em 0 1em 1.5em;
}
.huProse .aligncenter {
  display: block;
  margin: 1em auto;
}
.huProse .wp-caption {
  max-width: 100%;
}
.huProse .wp-caption-text {
  margin-top: 6px;
  font-size: 14px;
  color: #5f6870;
  text-align: center;
}
.huProse::after {
  content: "";
  display: table;
  clear: both;
}

/* ---------- 編輯器「樣式」下拉選單 ---------- */

/* 藍色標語：設計稿各區塊的藍色粗體標語 */
.huProse .huProse-lead {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: #396a98;
}

/* 說明小字 */
.huProse .huProse-note {
  font-size: 14px;
  color: #5f6870;
}

/* 重點框 */
.huProse .huProse-box {
  margin: 1.4em 0;
  padding: 20px 24px;
  border-radius: 10px;
  background: #f4f6f7;
}

/* 標籤（設計稿「工程說明」藍底白字） */
.huProse .huProse-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 10px;
  background: rgba(79, 139, 173, 0.6);
  color: #fff;
  font-weight: 700;
}

/* 按鈕連結 */
.huProse a.huProse-btn {
  display: inline-block;
  padding: 8px 28px;
  border-radius: 60px;
  background: linear-gradient(157deg, #396a98 7.19%, #4f8bad 43.17%, #528a46 79.14%);
  color: #fff;
  text-decoration: none;
}
.huProse a.huProse-btn:hover {
  color: #fff;
  opacity: 0.85;
}

/* ---------- 手機 ---------- */
@media (max-width: 768px) {
  .huProse,
  .huProse p,
  .huProse li,
  .huProse td,
  .huProse th {
    font-size: 15px;
  }
  .huProse h1,
  .huProse h2 {
    font-size: 22px;
  }
  .huProse h3 {
    font-size: 18px;
  }
  .huProse h4 {
    font-size: 16px;
  }
  .huProse .alignleft,
  .huProse .alignright {
    float: none;
    margin: 1em auto;
  }
}
