/* ==========================================================================
   13素材网 (13sc.com) 统一现代化设计系统与自适应引擎
   ========================================================================== */

:root {
  --primary: #ff7b00;
  --primary-hover: #e06d00;
  --primary-light: #fff7ed;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-body: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 12px 24px rgba(255,123,0,0.12);
}

/* 全局重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 顶部导航容器 */
.header-wrapper {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

/* 导航链接 */
.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.nav-list li {
  list-style: none !important;
}

.nav-list li a {
  display: block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav-list li a:hover,
.nav-list li a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
}

.nav-menu span {
  display: block;
  width: 22px;
  height: 2px;
  background: #334155;
  border-radius: 2px;
}

/* 首页主体容器 */
.page-container {
  max-width: 1240px;
  margin: 25px auto 50px;
  padding: 0 20px;
}

/* 板块标题栏 */
.section-box {
  margin-bottom: 35px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 20px;
  background: var(--primary);
  border-radius: 4px;
}

.section-more {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-more:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* 一排4个，3排共12个网格 */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* 卡片样式 */
.material-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s, border-color 0.25s;
  box-shadow: var(--shadow-sm);
}

.material-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.card-img-container {
  width: 100%;
  height: 180px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.material-card:hover .card-img-container img {
  transform: scale(1.06);
}

.card-title-text {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  background: #ffffff;
  transition: color 0.2s;
}

.material-card:hover .card-title-text {
  color: var(--primary);
}

/* 文章详情页样式 */
.main_content {
  max-width: 1240px;
  margin: 25px auto;
  padding: 0 20px;
  display: flex;
  gap: 30px;
}

.main_left {
  flex: 1;
  min-width: 0;
}

.sider {
  width: 320px;
  flex-shrink: 0;
}

.breadcrumb {
  margin-bottom: 15px;
  font-size: 13px;
  color: var(--text-muted);
}

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

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

.detail {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.detail h1 {
  font-size: 26px;
  color: #0f172a;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.detail .info {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

.detail .info a {
  color: var(--primary);
  font-weight: 500;
}

.conwarp {
  margin-top: 20px;
  text-align: center;
}

.conwarp img {
  max-width: 100%;
  height: auto !important;
  border-radius: 8px;
  margin: 16px auto;
  display: block;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--border-color);
}

/* 侧边栏与相关推荐卡片列表 */
.cont {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.cont_bt {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 15px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 8px;
}

.indexlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.indexlist li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #334155;
}

.indexlist li i {
  color: var(--primary);
  font-size: 8px;
}

.indexlist li a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* 页脚 */
footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
  padding: 35px 20px;
  text-align: center;
}

.footer_nav ul {
  display: flex;
  justify-content: center;
  list-style: none !important;
  gap: 25px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.footer_nav ul a {
  color: #475569;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.footer_nav ul a:hover {
  color: var(--primary);
}

.copyright {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 6px;
}

/* 移动端自适应 */
@media screen and (max-width: 860px) {
  .nav-menu {
    display: flex;
  }
  .nav-list {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 6px;
    padding: 6px 0;
  }
  .nav-list::-webkit-scrollbar {
    display: none;
  }
  .nav-list li a {
    padding: 6px 12px;
    font-size: 14px;
  }
  .grid-12 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .card-img-container {
    height: 130px !important;
  }
  .main_content {
    flex-direction: column;
    padding: 0 12px;
  }
  .sider {
    width: 100%;
  }
  .detail {
    padding: 16px;
  }
  .detail h1 {
    font-size: 20px;
  }
}

/* 导航高亮与栏目头部增强 */
.nav-list li.active a,
.nav-list li a.active {
  color: var(--primary) !important;
  background: var(--primary-light) !important;
  font-weight: 700;
}

.category-header {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
}

.category-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 24px;
  background: var(--primary);
  border-radius: 4px;
}

.category-badge {
  font-size: 13px;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 500;
}

/* 现代化 SEO 分页组件 */
.pagination {
  margin-top: 40px;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.pagination .current, .pagination span.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255,123,0,0.3);
}

.pagination .disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: #f8fafc;
}

/* 栏目介绍导读组件 */
.category-intro-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 25px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.category-intro-text {
  font-size: 14px;
  color: #475569;
  line-height: 1.75;
}

.intro-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
}
