/* ---------- 佈局 ---------- */
.blog-single-layout {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
}



/* ---------- 主要內容 ---------- */
.blog-content {
  flex: 1;
}
.post-header {
  margin-bottom: 20px;
}
.post-title {
  font-size: 2rem;
  line-height: 1.3;
  margin: 0;
}

/* 文章縮圖與分類標籤蓋層 */
.post-thumbnail {
  position: relative;
  margin-bottom: 25px;
}
.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.category-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 8px;
  font-size: 0.85em;
  border-radius: 999px;
  z-index: 5;
}
.category-overlay a {
  color: inherit;
  text-decoration: none;
}

/* 文章內容 */
.post-content {
  line-height: 1.75;
  color: #333;
}
.post-content p {
  margin-bottom: 16px;
}

/* 內頁分頁連結 */
.page-links {
  margin: 30px 0;
  font-size: 0.9rem;
}
.page-links a {
  margin: 0 4px;
  text-decoration: none;
  color: #0066cc;
}
.page-links .current {
  font-weight: bold;
  color: #000;
}

/* ---------- 上下篇導航 ---------- */
.cosbox.navigation {
  margin: 20px 0;
}
nav[role="navigation"],
.cosbox.navigation nav {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}
.nav-previous,
.nav-next {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  background-color: #f8f8f8;
  transition: background 0.3s ease;
  min-height: 100px;
  cursor: pointer;
}
.nav-previous:hover,
.nav-next:hover {
  background-color: #e0e0e0;
}
.nav-previous {
  padding-right: 25px;
}
.nav-next {
  padding-left: 25px;
  border-left: 1px solid #ddd;
}
.nav-previous a,
.nav-next a {
  display: contents;
  text-decoration: none;
  color: inherit;
}
.nav-previous-label,
.nav-next-label {
  font-size: 14px;
  color: #888;
  margin-bottom: 5px;
}
.nav-previous-label {
  text-align: left;
}
.nav-next-label {
  text-align: right;
}
.nav-previous-title,
.nav-next-title {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.4;
  color: #333;
}
.nav-previous-title {
  text-align: left;
}
.nav-next-title {
  text-align: right;
}

/* ---------- 相關文章圖片＋標題 (三欄) ---------- */
.related-posts {
  margin: 40px 0;
}
.related-posts h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #333;
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-item {
  text-align: center;
}
.related-item img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}
.related-item h4 {
  margin-top: 8px;
  font-size: 1rem;
  color: #333;
  line-height: 1.4;
}

/* ---------- 留言區 ---------- */
.comments-area {
  margin-top: 50px;
}

/* ---------- 手機響應式（小於 768px） ---------- */
@media (max-width: 768px) {
  .blog-single-layout {
    flex-direction: column;
  }
  .blog-sidebar {
    margin-bottom: 30px;
  }
  /* 相關文章改為 2 欄 */
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  aside{
    display: none;
}
}
@media (max-width: 480px) {
  /* 相關文章改為 1 欄 */
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}
