@charset "UTF-8";
/**
 * 首頁「最新文章」區塊。
 *
 * 為什麼獨立成一個檔案，而不直接寫進 assets/style.css：
 *   assets/style.css 與原站 amprofitinv.com 的樣式表是「逐位元組相同」的，
 *   這是驗收時證明「版面沒被改壞」的基準。新增區塊屬於在原本的基礎上增加內容（增項），
 *   放在獨立檔案裡就不會動到那份基準，日後要回溯也容易。
 *
 * 這個檔案只在首頁載入（inc/setup.php 用 is_front_page() 判斷）。
 * 顏色與字體全部沿用 assets/style.css 的 CSS 變數，不另外定義。
 */

/* ---------- 區塊外框 ---------- */
.latest-posts {
  padding: 95px 0 100px;
  background: #f8f8f2;
  border-top: 1px solid var(--line);
}

.latest-posts-top {
  margin-bottom: 46px;
}

.latest-posts-all {
  padding-bottom: 10px;
  white-space: nowrap;
}

/* ---------- 單篇文章 ---------- */
.latest-post + .latest-post {
  margin-top: 52px;
  padding-top: 52px;
  border-top: 1px solid var(--line);
}

.latest-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.latest-post-index {
  color: var(--gold);
  font-weight: 600;
}

.latest-post-cats::before {
  content: "·";
  margin-right: 10px;
  color: #b9c0b6;
}

.latest-post-title {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.4vw, 31px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 1px;
}

.latest-post-title a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.latest-post-title a:hover {
  color: var(--forest);
  border-bottom-color: var(--gold);
}

/* ---------- 文章全文 ---------- */
.latest-post-body {
  max-width: 880px;
  font-family: var(--serif);
  color: #55625a;
  letter-spacing: 0.5px;
}

/* 內文標題已整體下移兩級，主要小節因此落在 h4，字級要像一般文章的小節。 */
.latest-post-body h4 {
  margin: 34px 0 14px;
  font-family: var(--serif);
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 1px;
  color: var(--ink);
}

.latest-post-body h5 {
  margin: 28px 0 12px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--ink);
}

.latest-post-body h6 {
  margin: 24px 0 10px;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--ink);
}

.latest-post-body > *:first-child {
  margin-top: 0;
}

.latest-post-body p {
  margin: 0 0 19px;
  font-size: 15.5px;
  line-height: 2.15;
}

.latest-post-body ul,
.latest-post-body ol {
  margin: 0 0 19px;
  padding-left: 24px;
}

.latest-post-body li {
  margin-bottom: 9px;
  font-size: 15.5px;
  line-height: 2.1;
}

.latest-post-body a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.latest-post-body strong {
  color: var(--ink);
  font-weight: 600;
}

.latest-post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 26px auto;
}

.latest-post-body figure {
  margin: 26px 0;
}

.latest-post-body figcaption {
  margin-top: 9px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.8px;
  color: var(--muted);
  text-align: center;
}

.latest-post-body blockquote {
  margin: 26px 0;
  padding: 6px 0 6px 22px;
  border-left: 2px solid var(--gold);
  color: var(--ink);
  font-style: normal;
}

.latest-post-body blockquote p:last-child {
  margin-bottom: 0;
}

.latest-post-body table {
  width: 100%;
  margin: 26px 0;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 13.5px;
}

.latest-post-body th,
.latest-post-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.latest-post-body th {
  background: #eeeee7;
  color: var(--ink);
  font-weight: 600;
}

.latest-post-body hr {
  margin: 34px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.latest-post-body code {
  font-size: 0.92em;
  padding: 1px 5px;
  background: #eeeee7;
}

.latest-post-body pre {
  overflow-x: auto;
  margin: 26px 0;
  padding: 16px 18px;
  background: var(--forest);
  color: var(--paper);
  font-size: 13px;
  line-height: 1.75;
}

.latest-post-body pre code {
  padding: 0;
  background: none;
  color: inherit;
}

/* ---------- 手機 ---------- */
@media (max-width: 980px) {
  .latest-posts {
    padding: 72px 0 76px;
  }
  .latest-post-body {
    max-width: none;
  }
}

@media (max-width: 700px) {
  .latest-posts {
    padding: 58px 0 62px;
  }
  .latest-posts-top {
    margin-bottom: 34px;
  }
  .latest-posts-all {
    padding-bottom: 4px;
  }
  .latest-post + .latest-post {
    margin-top: 38px;
    padding-top: 38px;
  }
  .latest-post-title {
    font-size: 21px;
    margin-bottom: 18px;
  }
  .latest-post-body p,
  .latest-post-body li {
    font-size: 15px;
    line-height: 2.05;
  }
  .latest-post-body h4 {
    font-size: 18px;
    margin: 28px 0 12px;
  }
  .latest-post-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ---------------------------------------------------------------------------
 * 文章單頁（single.php）
 * 這個主題原本沒有 single.php，文章點進去會落到 index.php 顯示「最新內容」，
 * 對一個要放文章的首頁來說很奇怪，所以補一個單頁版型。
 * ------------------------------------------------------------------------ */
.post-single {
  padding: 82px 0 96px;
  background: #f8f8f2;
  border-top: 1px solid var(--line);
}

.post-single-inner {
  max-width: 880px;
  margin: 0 auto;
}

.breadcrumb {
  margin-bottom: 34px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--forest);
}

.breadcrumb span[aria-hidden="true"] {
  margin: 0 10px;
  color: #b9c0b6;
}

.post-single-head {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.post-single-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.post-single-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 1px;
  color: var(--ink);
}

.post-single-body {
  padding-top: 34px;
  font-family: var(--serif);
  color: #55625a;
  letter-spacing: 0.5px;
}

.post-single-body > *:first-child {
  margin-top: 0;
}

.post-single-body p {
  margin: 0 0 19px;
  font-size: 16px;
  line-height: 2.15;
}

.post-single-body h2 {
  margin: 38px 0 15px;
  font-size: clamp(20px, 2.1vw, 25px);
}

.post-single-body h3 {
  margin: 32px 0 13px;
  font-size: 19px;
}

.post-single-body h2,
.post-single-body h3,
.post-single-body h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 1px;
  color: var(--ink);
}

.post-single-body ul,
.post-single-body ol {
  margin: 0 0 19px;
  padding-left: 24px;
}

.post-single-body li {
  margin-bottom: 9px;
  font-size: 16px;
  line-height: 2.1;
}

.post-single-body a {
  color: var(--forest);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}

.post-single-body strong {
  color: var(--ink);
  font-weight: 600;
}

.post-single-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 28px auto;
}

.post-single-body blockquote {
  margin: 28px 0;
  padding: 6px 0 6px 22px;
  border-left: 2px solid var(--gold);
  color: var(--ink);
}

.post-single-body blockquote p:last-child {
  margin-bottom: 0;
}

.post-single-body table {
  width: 100%;
  margin: 28px 0;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 13.5px;
}

.post-single-body th,
.post-single-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.post-single-body th {
  background: #eeeee7;
  color: var(--ink);
  font-weight: 600;
}

.post-single-body hr {
  margin: 34px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.post-single-foot {
  margin-top: 46px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

@media (max-width: 700px) {
  .post-single {
    padding: 56px 0 62px;
  }
  .post-single-title {
    font-size: 23px;
  }
  .post-single-body p,
  .post-single-body li {
    font-size: 15px;
    line-height: 2.05;
  }
  .post-single-body table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ---------- 文章列表頁（index.php） ---------- */
.archive-list {
  margin-top: 46px;
}

.archive-foot {
  margin-top: 36px;
}

/* WordPress 的分頁輸出是 .navigation.pagination > .nav-links，主題原本沒有樣式 */
.pagination {
  margin-top: 54px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.pagination .nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 1px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.pagination .page-numbers:hover {
  border-color: var(--gold);
  color: var(--forest);
}

.pagination .page-numbers.current {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}

.pagination .dots {
  border-color: transparent;
}

.pagination .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
