@charset "utf-8";
:root {
  --primary: #2c3e50;
  --accent: #3498db;
  --secondary: #e74c3c;
  --bg-light: #f5f6f7;
  --bg-white: #ffffff;
  --text-dark: #2c3e50;
  --text-muted: #7f8c8d;
  --text-light: #95a5a6;
  --border-color: #ecf0f1;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

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

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

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

ul, li {
  list-style: none;
}

/* ========== Header ========== */
.header {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo img {
  height: 36px;
}

.nav-bar {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav {
  display: flex;
  gap: 4px;
}

.nav li a {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: 24px;
  transition: all 0.3s;
}

.nav li a:hover {
  background: var(--accent);
  color: #fff;
}

.nav li.active a {
  background: var(--primary);
  color: #fff;
}

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

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

/* ========== Featured Section ========== */
.featured-section {
  padding: 40px 0;
  background: var(--bg-white);
}

.featured-post {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

.featured-post:hover {
  box-shadow: var(--shadow-hover);
}

.featured-image {
  display: block;
  position: relative;
  height: 420px;
  background-size: cover;
  background-position: center;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.featured-cat {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 20px;
  width: fit-content;
  letter-spacing: 0.5px;
}

.featured-overlay h2 {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.3;
  max-width: 700px;
}

.featured-overlay p {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
  max-width: 600px;
}

.featured-meta {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}

/* ========== Blog Section ========== */
.blog-section {
  padding: 50px 0;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ========== Blog Main ========== */
.blog-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

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

.post-item {
  display: flex;
  gap: 28px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.post-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.post-thumb {
  flex: 0 0 260px;
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.post-item:hover .post-thumb img {
  transform: scale(1.08);
}

.post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
}

.post-cat {
  padding: 5px 14px;
  background: linear-gradient(135deg, var(--accent), #5dade2);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

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

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

.post-content h3 a {
  color: var(--primary);
}

.post-content h3 a:hover {
  color: var(--accent);
}

.post-content p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  line-height: 1.7;
}

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

.post-author {
  font-weight: 600;
  color: var(--text-muted);
}

.read-more {
  margin-left: auto;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 24px;
  transition: all 0.3s;
}

.read-more:hover {
  background: var(--accent);
  transform: translateX(4px);
}

/* ========== Blog Sidebar ========== */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 88px;
}

.sidebar-widget {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.sidebar-widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--accent);
  color: var(--primary);
  letter-spacing: 0.5px;
}

.popular-list li {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.25s;
}

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

.popular-thumb {
  flex: 0 0 70px;
  height: 70px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.popular-info h5 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.5;
}

.popular-info h5 a {
  color: var(--primary);
}

.popular-info h5 a:hover {
  color: var(--accent);
}

.popular-info span {
  font-size: 12px;
  color: var(--text-light);
}

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

.tag-item {
  padding: 8px 16px;
  background: var(--bg-light);
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 500;
  border-radius: 24px;
  transition: all 0.3s;
}

.tag-item:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ========== Recent Post List ========== */
.recent-post-list li {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

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

.recent-post-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.recent-num {
  flex: 0 0 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
}

.recent-post-item:nth-child(1) .recent-num { background: #e74c3c; }
.recent-post-item:nth-child(2) .recent-num { background: #f39c12; }
.recent-post-item:nth-child(3) .recent-num { background: #27ae60; }

.recent-info h5 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.5;
}

.recent-info h5 a {
  color: var(--primary);
}

.recent-info h5 a:hover {
  color: var(--accent);
}

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

/* ========== Category Section ========== */
.category-section {
  padding: 36px 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.category-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-right: 4px;
}

.category-tab {
  padding: 10px 20px;
  background: var(--bg-light);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  border-radius: 24px;
  transition: all 0.3s;
}

.category-tab:hover,
.category-tab.active {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

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

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

.breadcrumb {
  margin-bottom: 16px;
  font-size: 14px;
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

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

.page-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
}

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

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

.page-item:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.page-current {
  padding: 0 16px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border-radius: 24px;
}

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

/* ========== Article Content ========== */
.article-content {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 50px;
  box-shadow: var(--shadow);
}

.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-radius: var(--radius-sm);
  margin: 24px 0;
  box-shadow: var(--shadow);
}

.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 20px;
  color: var(--primary);
}

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

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

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

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

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

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

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

.footer-bottom a {
  color: #5dade2;
  margin: 0 10px;
}

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

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

  .blog-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

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

@media (max-width: 768px) {
  .header-content {
    padding: 0 16px;
  }

  .nav-bar {
    display: none;
  }

  .featured-image {
    height: 320px;
  }

  .featured-overlay {
    padding: 30px;
  }

  .featured-overlay h2 {
    font-size: 24px;
  }

  .post-item {
    flex-direction: column;
    padding: 20px;
  }

  .post-thumb {
    flex: 0 0 220px;
  }

  .blog-sidebar {
    flex-direction: column;
  }

  .sidebar-widget {
    min-width: auto;
  }

  .page-title {
    font-size: 26px;
  }

  .article-content {
    padding: 30px 20px;
  }
}
