@charset "utf-8";
:root {
  --primary: #8b4513;
  --accent: #c9302c;
  --secondary: #daa520;
  --bg-light: #faf5f0;
  --bg-white: #ffffff;
  --text-dark: #3d3d3d;
  --text-muted: #666666;
  --text-light: #999999;
  --border-color: #d4c4b0;
  --shadow: 4px 4px 0 var(--secondary);
  --shadow-sm: 2px 2px 0 var(--secondary);
  --radius: 4px;
  --radius-sm: 2px;
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

ul, li {
  list-style: none;
}

/* ========== Header ========== */
.header {
  background: var(--bg-white);
  border-bottom: 3px solid var(--primary);
}

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

.logo img {
  width: 65px;
  height: 65px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-bar {
  flex: 1;
}

.nav {
  display: flex;
  gap: 0;
}

.nav li a {
  display: block;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  border-bottom: 3px solid transparent;
  transition: all 0.25s;
}

.nav li a:hover,
.nav li.active a {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

/* ========== Container ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== Hero Section ========== */
.hero-section {
  padding: 40px 0;
  background: var(--bg-white);
  border-bottom: 2px solid var(--border-color);
}

.hero-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.hero-image {
  display: block;
  position: relative;
  height: 400px;
  background-size: cover;
  background-position: center;
  border: 3px solid var(--primary);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(139,69,19,0.9) 0%, rgba(139,69,19,0.3) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
}

.hero-content {
  padding: 30px;
  color: #fff;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.hero-content p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 12px;
}

.hero-date {
  font-size: 13px;
  opacity: 0.7;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-mini {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-light);
  border: 2px solid var(--border-color);
  transition: all 0.25s;
}

.hero-mini:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.mini-thumb {
  flex: 0 0 100px;
  height: 80px;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--border-color);
}

.mini-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mini-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ========== Category Nav ========== */
.category-nav {
  padding: 24px 0;
  background: var(--bg-white);
  border-bottom: 2px solid var(--border-color);
}

.category-list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.category-item {
  padding: 10px 24px;
  background: var(--bg-light);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--border-color);
  transition: all 0.25s;
}

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

/* ========== Section Title ========== */
.section-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.section-title h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.title-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--secondary), transparent);
}

/* ========== Article Section ========== */
.article-section {
  padding: 50px 0;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

.content-main {
  min-width: 0;
}

/* ========== Article List ========== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.article-item {
  display: flex;
  gap: 30px;
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  padding: 24px;
  transition: all 0.25s;
}

.article-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.article-thumb {
  flex: 0 0 280px;
  height: 200px;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--border-color);
}

.article-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-header {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.article-cat {
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.article-date {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
}

.article-info h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
}

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

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

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

.article-footer {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-light);
  margin-top: auto;
}

.article-author {
  font-weight: 600;
}

/* ========== Topic Section ========== */
.topic-section {
  padding: 50px 0;
  background: var(--bg-white);
  border-top: 2px solid var(--border-color);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.topic-card {
  position: relative;
  height: 240px;
  border: 3px solid var(--primary);
  overflow: hidden;
}

.topic-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s;
}

.topic-card:hover .topic-thumb {
  transform: scale(1.1);
}

.topic-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(139,69,19,0.9) 0%, rgba(139,69,19,0.2) 60%, transparent 100%);
}

.topic-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 1;
}

.topic-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.topic-info h3 a {
  color: #fff;
}

.topic-info p {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== Tags Section ========== */
.tags-section {
  padding: 50px 0;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-item {
  padding: 8px 18px;
  background: var(--bg-white);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--border-color);
  transition: all 0.25s;
}

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

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

.sidebar-widget {
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  padding: 20px;
}

.widget-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--secondary);
  color: var(--primary);
}

.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 24px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.rank-list li:nth-child(1) .rank-num { background: var(--accent); }
.rank-list li:nth-child(2) .rank-num { background: var(--secondary); color: var(--primary); }
.rank-list li:nth-child(3) .rank-num { background: #6b8e23; }

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

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

.recent-list li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
}

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

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

.recent-thumb {
  flex: 0 0 60px;
  height: 60px;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--border-color);
}

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

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

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

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

/* ========== Pagination ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-item {
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  transition: all 0.25s;
}

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

.page-current {
  padding: 0 16px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border: 2px solid var(--accent);
}

.no-data {
  text-align: center;
  padding: 80px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-white);
  border: 2px solid var(--border-color);
}

/* ========== Page Header ========== */
.page-header {
  background: var(--bg-white);
  border-bottom: 3px solid var(--primary);
  padding: 50px 0;
}

.page-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb {
  margin-bottom: 16px;
}

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

.separator {
  margin: 0 10px;
  color: var(--text-light);
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

/* ========== Article Content ========== */
.article-content {
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  padding: 40px;
}

.article-body {
  font-size: 16px;
  line-height: 2;
  color: var(--text-dark);
}

.article-body p {
  margin-bottom: 24px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border: 3px solid var(--primary);
  margin: 24px 0;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 32px 0 16px;
  font-weight: 700;
  color: var(--primary);
}

.article-body ul,
.article-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
  list-style: disc;
}

/* ========== Article Tags ========== */
.article-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border-color);
}

.tags-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

/* ========== Footer ========== */
.footer {
  background: var(--primary);
  color: #fff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px;
  text-align: center;
  font-size: 14px;
}

.footer-bottom a {
  color: var(--secondary);
  margin: 0 10px;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

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

  .hero-side {
    flex-direction: row;
  }

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

  .content-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-bar {
    display: none;
  }

  .hero-image {
    height: 300px;
  }

  .hero-side {
    flex-direction: column;
  }

  .article-item {
    flex-direction: column;
  }

  .article-thumb {
    flex: 0 0 200px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .category-list {
    gap: 10px;
  }

  .category-item {
    padding: 8px 16px;
    font-size: 13px;
  }

  .article-content {
    padding: 24px;
  }
}
