@charset "utf-8";
:root {
  --primary: #8b4513;
  --primary-light: #a0522d;
  --secondary: #228b22;
  --accent: #d4a574;
  --bg-main: #faf8f5;
  --bg-card: #ffffff;
  --text-dark: #2c2416;
  --text-muted: #6b5d4d;
  --text-light: #8b7355;
  --border-color: #e8e2db;
  --shadow-sm: 0 1px 3px rgba(139, 69, 19, 0.06);
  --shadow-md: 0 4px 12px rgba(139, 69, 19, 0.08);
  --radius: 6px;
  --radius-sm: 4px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background: var(--bg-main);
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  color: var(--text-dark);
  line-height: 1.8;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

ul, li {
  list-style: none;
}

/* ========== Header ========== */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-bg {
  display: none;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
}

.logo img {
  height: 44px;
  border-radius: var(--radius-sm);
}

.navigation {
  display: flex;
  align-items: center;
  margin-left: 48px;
  gap: 4px;
}

.navbar-item a {
  padding: 8px 16px;
  font-size: 15px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.navbar-item a:hover,
.navbar-item.active a {
  color: var(--primary);
  background: rgba(139, 69, 19, 0.06);
}

.header-right {
  margin-left: auto;
}

.search-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
}

.search-btn:hover {
  color: var(--primary);
  background: rgba(139, 69, 19, 0.06);
}

/* ========== Main Wrapper ========== */
.main-wrapper {
  min-height: calc(100vh - 200px);
  padding: 40px 0 80px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Content with Sidebar ========== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

/* ========== Main Content ========== */
.main-content {
  min-width: 0;
}

/* ========== Blog Banner ========== */
.blog-banner {
  margin-bottom: 40px;
}

.banner-card {
  position: relative;
  height: 320px;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(44, 36, 22, 0.85) 0%, rgba(44, 36, 22, 0.4) 100%);
}

.banner-text {
  position: absolute;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  max-width: 500px;
}

.banner-category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.banner-text h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.banner-text p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.banner-btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.banner-btn:hover {
  background: var(--primary-light);
}

/* ========== Article Section ========== */
.article-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.article-item {
  display: flex;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
}

.article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.article-thumb {
  flex: 0 0 200px;
  height: 150px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease;
}

.article-item:hover .article-thumb {
  transform: scale(1.03);
}

.article-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.meta-category {
  padding: 2px 10px;
  background: rgba(139, 69, 19, 0.1);
  color: var(--primary);
  border-radius: 2px;
}

.article-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.5;
}

.article-info h3 a {
  color: var(--text-dark);
}

.article-info h3 a:hover {
  color: var(--primary);
}

.article-info p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

/* ========== Pagination ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.page-item {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-dark);
}

.page-item:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-current {
  padding: 0 14px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
}

/* ========== Sidebar ========== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* Widget About */
.widget-about {
  text-align: center;
  padding: 32px 24px;
}

.widget-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
}

.widget-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-about h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.widget-about p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Widget Title */
.widget-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--primary);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

/* Category List */
.category-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 14px;
  color: var(--text-dark);
}

.category-list li a:hover {
  color: var(--primary);
}

.category-list li:last-child a {
  border-bottom: none;
}

.category-list .count {
  font-size: 12px;
  color: var(--text-light);
  background: var(--bg-main);
  padding: 2px 8px;
  border-radius: 10px;
}

/* Recent List */
.recent-list li {
  margin-bottom: 14px;
}

.recent-list li:last-child {
  margin-bottom: 0;
}

.recent-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.recent-thumb {
  flex: 0 0 56px;
  height: 56px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
}

.recent-info {
  flex: 1;
  min-width: 0;
}

.recent-title {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item:hover .recent-title {
  color: var(--primary);
}

.recent-date {
  font-size: 12px;
  color: var(--text-light);
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  padding: 5px 12px;
  background: var(--bg-main);
  color: var(--text-muted);
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.tag-item:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Rank List */
.rank-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
}

.rank-list li:last-child {
  border-bottom: none;
}

.rank-num {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 2px;
}

.rank-list li:nth-child(1) .rank-num { background: #e74c3c; }
.rank-list li:nth-child(2) .rank-num { background: #e67e22; }
.rank-list li:nth-child(3) .rank-num { background: #f39c12; }

.rank-list a {
  flex: 1;
  font-size: 14px;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-list a:hover {
  color: var(--primary);
}

/* ========== Footer ========== */
.footer {
  background: #1a1510;
  color: #8a7d6d;
  margin-top: 0;
}

.footer-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 32px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
}

.footer-col h4 {
  color: var(--accent);
  font-size: 16px;
  margin-bottom: 18px;
}

.footer-col p,
.footer-col a {
  display: block;
  font-size: 13px;
  line-height: 2;
  color: #8a7d6d;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(138, 125, 109, 0.2);
  margin-top: 32px;
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
}

.footer-bottom a {
  display: inline;
  margin: 0 8px;
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-widget {
    flex: 1;
    min-width: 280px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
    gap: 12px;
  }

  .navigation {
    margin-left: 0;
    order: 3;
    width: 100%;
    flex-wrap: wrap;
  }

  .banner-card {
    height: 240px;
  }

  .banner-text {
    left: 20px;
    right: 20px;
  }

  .banner-text h2 {
    font-size: 22px;
  }

  .article-item {
    flex-direction: column;
    gap: 16px;
  }

  .article-thumb {
    flex: none;
    width: 100%;
    height: 180px;
  }

  .article-section {
    padding: 24px 20px;
  }

  .sidebar-widget {
    min-width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}