/* 整體容器樣式 */
.blog-single {
  padding: 15rem 2rem 2rem;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* 行與列佈局 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col-lg-8 {
  width: 66.66667%;
  padding: 0 15px;
}

.col-lg-4 {
  width: 33.33333%;
  padding: 0 15px;
}

/* 文章頭部區域 */
.blog-header {
  margin-bottom: 2rem;
}

.blog-title {
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #47025f;
}

.blog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  color: #85796b;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.blog-meta span {
  display: inline-flex;
  align-items: center;
  margin-right: 1rem;
}

.blog-meta i {
  margin-right: 0.5rem;
}

.blog-categories a {
  color: #6c757d; /* 替換 var(--gray-color) */
  text-decoration: none;
  transition: 0.3s;
}

.blog-categories a:hover {
  color: #47025f; /* 替換 var(--primary-color) */
}

/* 文章特色圖片 */
.blog-feature-image {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* 目錄樣式 */
.blog-table-of-contents {
  width: 70%;
  background-color: #fffdff;
  border-radius: 21px;
  border-top-left-radius: 40px;
  border: 1px solid #f1dda6;
  padding: 20px 20px 20px 60px;
  margin-bottom: 30px;
}

.blog-table-of-contents h3 {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  padding-bottom: 10px;
}

.toc-list {
  list-style-type: none;
  padding-left: 25px;
  margin-bottom: 0;
}

.toc-h2-item {
  margin-bottom: 10px;
}

.toc-h2-item > a {
  font-weight: 700;
  font-size: 15px;
  color: #000000;
  text-decoration: none;
}

.toc-h2-item > a:hover {
  color: #007bff;
  text-decoration: underline;
}

.toc-sublist {
  list-style-type: none;
  padding-left: 20px;
  margin-top: 5px;
}

.toc-h3-item {
  margin-bottom: 5px;
}

.toc-h3-item > a,
.toc-h3-orphan-item > a {
  color: #000000;
  text-decoration: none;
}

.toc-h3-item > a {
  font-weight: 200;
  font-size: 13px;
}

.toc-h3-orphan-item > a {
  font-weight: normal;
  color: #6c757d;
}

.toc-h3-item > a:hover,
.toc-h3-orphan-item > a:hover {
  color: #007bff;
  text-decoration: underline;
}

/* 文章內容樣式 */
.blog-content {
  padding: 2rem;
  margin-bottom: 2rem;
  line-height: 1.7;
  color: #333; /* 替換 var(--text-color) */
}

/* 文章中的 h2 標題 */
.blog-content h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #000000;
  border-bottom: 2px solid #f8f9fa; /* 替換 var(--light-color) */
  padding-bottom: 0.5rem;
  scroll-margin-top: 70px;
}

/* 文章中的段落與列表 */
.blog-content p {
  margin-bottom: 1.2rem;
}

.blog-content ul,
.blog-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.blog-content ul li,
.blog-content ol li {
  margin-bottom: 0.8rem;
  line-height: 1.7;
  position: relative;
}

.blog-content ol {
  counter-reset: item;
}

.blog-content ol li {
  counter-increment: item;
}

/* 文章標籤 */
.blog-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: #f8f9fa; /* 替換 var(--light-color) */
  border-radius: 8px;
}

.tags-title {
  margin-right: 1rem;
  font-weight: 600;
  color: #333; /* 替換 var(--text-color) */
  display: flex;
  align-items: center;
}

.tags-title i {
  margin-right: 0.5rem;
}

.blog-tags .tag {
  display: inline-block;
  background: white;
  color: #333; /* 替換 var(--text-color) */
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  border-radius: 50px;
  margin: 0.3rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.blog-tags .tag:hover {
  background: #47025f; /* 替換 var(--primary-color) */
  color: white;
}

/* 返回按鈕 */
.blog-navigation {
  margin-top: 2rem;
  display: flex;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline-primary {
  color: #47025f; /* 替換 var(--primary-color) */
  background: transparent;
  border: 2px solid #47025f; /* 替換 var(--primary-color) */
}

.btn-outline-primary:hover {
  background: #47025f; /* 替換 var(--primary-color) */
  color: white;
}

.btn i {
  margin-right: 0.5rem;
}

/* 側邊欄樣式 */
.blog-sidebar {
  margin-top: 0;
}

.sidebar-widget {
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.widget-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #47025f; /* 替換 var(--primary-color) */
  color: #000000;
}

/* 分類列表樣式 */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 8px;
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 8px;
}

.category-item:last-child {
  border-bottom: none;
}

.category-link {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  color: #333; /* 替換 var(--text-color) */
  text-decoration: none;
}

.category-link:hover {
  color: #47025f; /* 替換 var(--primary-color) */
}

.post-count {
  display: inline-block;
  background-color: #f8f9fa; /* 替換 var(--light-color) */
  color: #333; /* 替換 var(--text-color) */
  border-radius: 12px;
  min-width: 24px;
  height: 24px;
  text-align: center;
  line-height: 24px;
  font-size: 0.8rem;
}

/* 相關文章列表 */
.related-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-post-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 15px;
}

.related-post-item:last-child {
  border-bottom: none;
}

.related-post-link {
  display: flex;
  text-decoration: none;
  color: #333; /* 替換 var(--text-color) */
}

.related-post-image {
  width: 70px;
  height: 50px;
  margin-right: 10px;
  overflow: hidden;
  border-radius: 4px;
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-post-title {
  margin: 0 0 5px;
  font-size: 0.9rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-post-date {
  font-size: 0.8rem;
  color: #6c757d; /* 替換 var(--gray-color) */
}

/* 作者資料區塊 */
.author-title {
  font-size: 1.8rem;
  color: #47025f;
}

.author-profile {
  display: flex;
  background-color: white;
  padding: 25px;
  margin: 30px 0;
}

/* 作者圖片 */
.author-image {
  flex: 0 0 120px;
  margin-right: 25px;
}

.author-image img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #000000;
}

/* 作者資訊 */
.author-info {
  flex: 1;
}

.author-name {
  font-size: 1.4rem;
  color: #000000;
  margin: 0 0 10px;
}

.author-bio {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #85796b;
  margin-bottom: 15px;
}

/* 社群媒體連結 */
.author-social {
  display: flex;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f8f9fa; /* 替換 var(--light-color) */
  color: #000000;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: #47025f; /* 替換 var(--primary-color) */
  color: white;
  transform: translateY(-3px);
}

/* 響應式設計 */
@media (max-width: 992px) {
  .col-lg-8,
  .col-lg-4 {
    width: 100%;
  }

  .blog-sidebar {
    margin-top: 2rem;
  }

  .blog-table-of-contents {
    width: 100%;
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .blog-single {
    padding: 10rem 1rem 1rem;
  }

  .blog-title {
    font-size: 1.8rem;
  }

  .author-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-image {
    margin-right: 0;
    margin-bottom: 15px;
  }
}
