/* ============================================
   文章资讯页样式
   适配 188mi 火焰橙营销风，响应式
   ============================================ */

/* ===== 布局容器 ===== */
.news-page {
  padding: 40px 40px 60px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  min-height: 60vh;
}

.news-container {
  max-width: 1240px;
  margin: 0 auto;
}

/* ===== 面包屑 ===== */
.news-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.news-breadcrumb a {
  color: var(--ink-3);
  transition: color .2s;
}

.news-breadcrumb a:hover {
  color: var(--or-d);
}

.news-breadcrumb .sep {
  color: var(--ink-4);
  font-size: 11px;
}

.news-breadcrumb .current {
  color: var(--ink);
  font-weight: 600;
}

/* ===== 分类导航 Tabs ===== */
.news-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.news-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: 8px 8px 0 0;
  transition: all .2s;
  position: relative;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
}

.news-tab:hover {
  color: var(--or-d);
  background: var(--surf);
}

.news-tab.active {
  color: var(--or-d);
  background: #fff;
  border-color: var(--line);
  font-weight: 700;
}

.news-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--or);
}

/* ===== 两栏布局 ===== */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* ===== 左侧文章区域 ===== */
.news-main {
  min-width: 0;
}

.news-section {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 24px;
  margin-bottom: 20px;
  transition: box-shadow .25s;
}

.news-section:hover {
  box-shadow: var(--shadow);
}

.news-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.news-section-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-section-header h3::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--grad-flame);
  border-radius: 2px;
  flex-shrink: 0;
}

.news-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--or-d);
  transition: gap .2s;
}

.news-more:hover {
  gap: 8px;
}

/* ===== 文章列表项 ===== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-item {
  display: flex;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: all .2s;
}

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

.news-item:hover {
  opacity: 1;
}

.news-item:first-child {
  padding-top: 0;
}

.news-item-img {
  width: 160px;
  min-width: 160px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream-2);
}

.news-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

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

.news-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-item-body h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-body h4 a {
  color: var(--ink);
  transition: color .2s;
}

.news-item-body h4 a:hover {
  color: var(--or-d);
}

.news-item-desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.news-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-3);
}

.news-item-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.news-item-cat {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--or-d);
  background: var(--surf-2);
  border-radius: 4px;
}

.news-item-views {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-4);
  font-size: 11px;
}

/* ===== 右侧 Sidebar ===== */
.news-sidebar {
  min-width: 0;
}

.news-sidebar-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 20px;
  margin-bottom: 20px;
  transition: box-shadow .25s;
}

.news-sidebar-card:hover {
  box-shadow: var(--shadow);
}

.news-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.news-sidebar-title svg {
  color: var(--or);
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 标签云 */
.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: all .2s;
}

.news-tag:hover {
  color: var(--or-d);
  background: var(--surf-2);
  border-color: rgba(255, 107, 26, .2);
  transform: translateY(-1px);
}

.news-tag small {
  font-size: 11px;
  font-weight: 700;
  color: var(--or);
  background: rgba(255, 107, 26, .1);
  padding: 0 6px;
  border-radius: 100px;
  line-height: 1.6;
}

.news-sidebar-more {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.news-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--or-d);
  transition: gap .2s;
}

.news-sidebar-link:hover {
  gap: 10px;
}

/* 相关文章 */
.news-related-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-related-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  transition: all .2s;
  gap: 12px;
}

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

.news-related-item:first-child {
  padding-top: 0;
}

.news-related-item .title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}

.news-related-item:hover .title {
  color: var(--or-d);
}

.news-related-item .date {
  font-size: 11px;
  color: var(--ink-4);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== 免责声明 ===== */
.news-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 30px;
  padding: 12px 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

/* ===== 空状态 ===== */
.news-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-3);
  font-size: 14px;
}

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

/* ===== 首页文章资讯 ===== */
.home-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 10px;
}

.home-article {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: all .25s;
  text-decoration: none;
  color: inherit;
}

.home-article:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
  border-color: rgba(255,107,26,.2);
}

.home-article .ha-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.home-article .ha-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.home-article .ha-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--or), var(--or-d));
}

.home-article:hover .ha-img img {
  transform: scale(1.05);
}

.home-article .ha-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.home-article .ha-cat {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--or-d);
  background: var(--surf-2);
  border-radius: 4px;
  margin-bottom: 10px;
  align-self: flex-start;
}

.home-article .ha-body h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-article .ha-body p {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 0 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-article .ha-date {
  font-size: 12px;
  color: var(--ink-4);
}

.sec-footer {
  text-align: center;
  margin-top: 32px;
}

.pagination-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-wrap .page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all .2s;
  cursor: pointer;
  text-decoration: none;
}

.pagination-wrap .page-btn:hover {
  color: var(--or-d);
  border-color: rgba(255, 107, 26, .3);
  background: var(--surf);
}

.pagination-wrap .page-btn.active {
  color: #fff;
  background: var(--grad-flame);
  border-color: transparent;
}

.pagination-wrap .page-btn.disabled {
  color: var(--ink-4);
  background: var(--cream);
  border-color: var(--line);
  cursor: default;
  pointer-events: none;
}

.pagination-wrap .page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 36px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

/* ============================================
   文章详情页
   ============================================ */
.news-detail-page {
  padding: 40px 40px 60px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
}

.news-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

.news-detail-main {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 36px;
  min-width: 0;
}

.news-detail-header {
  margin-bottom: 28px;
}

.news-detail-header h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin-bottom: 16px;
}

.news-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-3);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta-item svg {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--ink-4);
}

.news-detail-cover {
  margin-bottom: 28px;
  border-radius: 12px;
  overflow: hidden;
}

.news-detail-cover img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
}

.news-detail-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 32px;
}

.news-detail-content p {
  margin-bottom: 1.2em;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
}

.news-detail-content h2,
.news-detail-content h3 {
  margin-top: 1.5em;
  margin-bottom: .6em;
  font-weight: 800;
  color: var(--ink);
}

.news-detail-content h2 { font-size: 22px; }
.news-detail-content h3 { font-size: 18px; }

.news-detail-content a {
  color: var(--or-d);
  text-decoration: underline;
}

.news-detail-content blockquote {
  border-left: 3px solid var(--or);
  padding: 12px 20px;
  margin: 1.2em 0;
  background: var(--cream);
  border-radius: 0 8px 8px 0;
  color: var(--ink-2);
  font-style: italic;
}

.news-detail-content ul,
.news-detail-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.news-detail-content li {
  margin-bottom: .4em;
}

.news-detail-content pre {
  background: var(--ink);
  color: #f0f0f0;
  padding: 16px 20px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 1.2em 0;
}

.news-detail-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: .92em;
}

.news-detail-footer {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.news-detail-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   全部分类页
   ============================================ */
.news-all-categories {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 36px;
}

.news-all-categories h2 {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.news-all-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.news-all-cat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all .25s;
  background: var(--cream);
}

.news-all-cat-item:hover {
  border-color: rgba(255, 107, 26, .25);
  background: var(--surf);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surf-2);
  color: var(--or-d);
  flex-shrink: 0;
}

.cat-icon svg {
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.cat-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.cat-count {
  font-size: 12px;
  color: var(--ink-3);
}

.cat-arrow {
  color: var(--ink-4);
  transition: all .2s;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-all-cat-item:hover .cat-arrow {
  color: var(--or);
  transform: translateX(3px);
}

/* ============================================
   响应式适配
   ============================================ */
@media (max-width: 1024px) {
  .news-layout {
    grid-template-columns: 1fr;
  }
  .news-detail-layout {
    grid-template-columns: 1fr;
  }
  .news-sidebar {
    order: -1;
  }
}

@media (max-width: 768px) {
  .news-page,
  .news-detail-page {
    padding: 20px 16px 40px;
  }
  .news-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0;
    padding-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .news-tabs::-webkit-scrollbar {
    display: none;
  }
  .news-tab {
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .news-item {
    flex-direction: column;
    gap: 12px;
  }
  .news-item-img {
    width: 100%;
    min-width: unset;
    height: 180px;
  }
  .news-detail-main {
    padding: 20px;
  }
  .news-detail-header h1 {
    font-size: 22px;
  }
  .news-all-categories {
    padding: 24px 16px;
  }
  .news-all-categories-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .news-item-img {
    height: 140px;
  }
  .news-detail-content {
    font-size: 15px;
  }
}
