/* 重型矿山机械 - 资讯风格样式 */
/* 查询关键词: 重型矿山机械 www.zhongxingkuangshanjixie.cn zhongxingkuangshanjixie cn 矿山设备资讯 */

/* ===== CSS 变量 ===== */
:root {
  --accent-color: #d63384;
  --primary-color: #1a365d;
  --secondary-color: #2c5282;
  --text-color: #2d3748;
  --text-muted: #718096;
  --bg-color: #f7fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --max-width: 1200px;
  --header-height: 70px;
}

/* ===== 重置样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.2s;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== 布局容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-text span {
  color: var(--accent-color);
}

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

.nav a {
  font-weight: 500;
  color: var(--text-color);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border-radius: 20px;
  padding: 8px 16px;
  width: 240px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}

.search-box button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* ===== 三栏布局 ===== */
.main-layout {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 24px;
  padding: 24px 0;
}

/* ===== 侧边栏通用样式 ===== */
.sidebar-left,
.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.widget-title {
  font-size: 14px;
  font-weight: 600;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.widget-content {
  padding: 16px;
}

.widget-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.widget-list a {
  color: var(--text-color);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* ===== 主内容区 ===== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius);
  padding: 40px;
  color: white;
  text-align: center;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 16px;
  opacity: 0.9;
}

/* ===== 头条轮播 ===== */
.headlines {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.headline-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 280px;
}

.headline-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.headline-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
}

.headline-content h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.headline-content .meta {
  font-size: 12px;
  opacity: 0.8;
}

.headline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.headline-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.headline-item h3 {
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.headline-item .meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== 内容卡片 ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
}

.card-more {
  font-size: 13px;
  color: var(--text-muted);
}

.card-body {
  padding: 20px;
}

/* ===== 内容列表 ===== */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.content-thumb {
  width: 160px;
  height: 100px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

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

.content-item:hover .content-thumb img {
  transform: scale(1.05);
}

.content-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.content-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
}

.content-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.content-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== 热点排行 ===== */
.hot-list {
  counter-reset: hot-counter;
}

.hot-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.hot-list li::before {
  counter-increment: hot-counter;
  content: counter(hot-counter);
  width: 24px;
  height: 24px;
  background: var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.hot-list li:nth-child(1)::before {
  background: #e53e3e;
  color: white;
}

.hot-list li:nth-child(2)::before {
  background: #dd6b20;
  color: white;
}

.hot-list li:nth-child(3)::before {
  background: #d69e2e;
  color: white;
}

.hot-list a {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 标签云 ===== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg-color);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-color);
  transition: all 0.2s;
}

.tag:hover {
  background: var(--accent-color);
  color: white;
}

/* ===== 分类页特有样式 ===== */
.breadcrumb {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

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

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

.breadcrumb-separator {
  color: var(--text-muted);
}

.category-header {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.category-header h1 {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.category-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-color);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.filter-options {
  display: flex;
  gap: 16px;
}

.filter-options a {
  font-size: 13px;
  color: var(--text-muted);
}

.filter-options a.active {
  color: var(--accent-color);
  font-weight: 500;
}

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

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  background: var(--card-bg);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-color);
  box-shadow: var(--shadow);
}

.pagination a:hover {
  background: var(--accent-color);
  color: white;
}

.pagination .current {
  background: var(--accent-color);
  color: white;
}

/* ===== 文章页特有样式 ===== */
.article-header {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
}

.article-title {
  font-size: 28px;
  line-height: 1.4;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-featured-image {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}

.article-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  font-size: 15px;
  line-height: 1.8;
}

.article-content h2 {
  font-size: 22px;
  color: var(--primary-color);
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
  font-size: 18px;
  color: var(--primary-color);
  margin: 24px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
}

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

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

.article-content ol li {
  list-style: decimal;
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-content code {
  background: var(--bg-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}

.article-content pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 20px 0;
}

.article-content pre code {
  background: none;
  padding: 0;
}

/* ===== 作者信息 ===== */
.author-card {
  text-align: center;
}

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

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

.author-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.author-bio {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.author-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
}

.author-stats span {
  color: var(--text-muted);
}

.author-stats strong {
  color: var(--primary-color);
}

/* ===== 分享按钮 ===== */
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.share-btn:hover {
  background: var(--accent-color);
  color: white;
}

/* ===== 目录 ===== */
.toc-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.toc-list a {
  color: var(--text-color);
  font-size: 13px;
}

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

/* ===== 404 页面 ===== */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-size: 24px;
  color: var(--text-color);
  margin-bottom: 12px;
}

.error-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.error-actions {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: #b52a6f;
  color: white;
}

.btn-secondary {
  background: var(--bg-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

/* ===== Footer ===== */
.footer {
  background: var(--primary-color);
  color: white;
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  opacity: 0.8;
  line-height: 1.8;
}

.footer-links h4 {
  font-size: 14px;
  margin-bottom: 16px;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  opacity: 0.8;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 180px 1fr;
  }

  .sidebar-right {
    display: none;
  }
}

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

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 12px;
    gap: 20px;
  }

  .search-box {
    width: 180px;
  }

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

  .sidebar-left {
    display: none;
  }

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

  .headline-main {
    height: 200px;
  }

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

  .content-thumb {
    width: 100%;
    height: 180px;
  }

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

  .article-title {
    font-size: 22px;
  }

  .article-featured-image {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .nav {
    gap: 12px;
    font-size: 13px;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 24px;
  }

  .hero h1 {
    font-size: 20px;
  }

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

  .error-code {
    font-size: 80px;
  }
}
