/*
Theme Name: Kaixuan News
Theme URI: http://47.120.76.215/
Author: Kaixuan Network
Author URI: http://47.120.76.215/
Description: 楷轩网络新闻资讯主题 · 商务靛蓝风格 · 与静态主站完全一致。复刻 news.html 的视觉设计，深蓝渐变 Banner、卡片式文章列表、置顶大图卡、订阅区与悬浮工具。
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: kaixuan-news
Tags: news, business, blue, responsive, custom-menu, featured-image
*/

/* 主题样式继承根目录 /assets/css/main.css，此文件保留基本兼容样式 */

/* WP 默认必备样式（防止某些插件依赖） */
.aligncenter { display: block; margin: 0 auto; }
.alignright { float: right; margin: 0 0 10px 20px; }
.alignleft { float: left; margin: 0 10px 20px 0; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--color-text-light); text-align: center; margin-top: 8px; }
.screen-reader-text { position: absolute; left: -9999px; }
.sticky { /* 占位 */ }
.gallery-caption { font-size: 13px; }
.bypostauthor { /* 占位 */ }

/* 文章正文排版（适配 WP 富文本编辑器输出） */
.entry-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text);
}
.entry-content > * { margin-bottom: 1.2em; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--color-primary);
  margin: 2em 0 0.8em;
  font-weight: 700;
  line-height: 1.35;
}
.entry-content h1 { font-size: 28px; }
.entry-content h2 {
  font-size: 24px;
  padding-left: 14px;
  border-left: 4px solid var(--color-accent);
}
.entry-content h3 { font-size: 20px; }
.entry-content h4 { font-size: 17px; }
.entry-content a {
  color: var(--color-accent);
  border-bottom: 1px dashed var(--color-accent);
}
.entry-content a:hover {
  background: rgba(59,130,246,0.08);
  border-bottom-style: solid;
}
.entry-content ul,
.entry-content ol {
  padding-left: 28px;
  margin-bottom: 1.2em;
}
.entry-content ul li { list-style: disc; margin-bottom: 6px; }
.entry-content ol li { list-style: decimal; margin-bottom: 6px; }
.entry-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 16px 20px;
  background: var(--color-bg-soft);
  margin: 1.5em 0;
  color: var(--color-text-light);
  font-style: italic;
  border-radius: 0 8px 8px 0;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content code {
  background: var(--color-bg-section);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-secondary);
}
.entry-content pre {
  background: #0F172A;
  color: #E2E8F0;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  margin: 1.5em auto;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
  background: white;
  box-shadow: var(--shadow-sm);
  border-radius: 8px;
  overflow: hidden;
}
.entry-content table th {
  background: var(--gradient-primary);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}
.entry-content table td {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
}
.entry-content table tr:nth-child(even) td {
  background: var(--color-bg-soft);
}
.entry-content hr {
  border: none;
  border-top: 1px dashed var(--color-border);
  margin: 2em 0;
}

/* 文章详情页布局 */
.single-article {
  max-width: 860px;
  margin: 0 auto;
  background: white;
  padding: 56px 64px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.single-article-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}
.single-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--color-border);
  flex-wrap: wrap;
}
.single-meta span { display: inline-flex; align-items: center; gap: 4px; }
.single-featured-image {
  margin: 0 -24px 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.single-featured-image img { width: 100%; height: auto; display: block; }

/* 文章标签 */
.entry-tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px dashed var(--color-border);
}
.entry-tags-label {
  font-size: 13px;
  color: var(--color-text-light);
  margin-right: 8px;
}
.entry-tags a {
  display: inline-block;
  padding: 4px 12px;
  margin: 0 6px 6px 0;
  background: var(--color-bg-section);
  color: var(--color-text-light);
  border-radius: 12px;
  font-size: 12px;
  transition: var(--transition);
}
.entry-tags a:hover {
  background: var(--color-accent);
  color: white;
}

/* 上下篇 */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}
.post-nav a {
  display: block;
  padding: 20px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.post-nav a:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.post-nav-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.post-nav-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.5;
}
.post-nav .next { text-align: right; }

/* 评论 */
.comments-area {
  margin-top: 48px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  background: white;
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.comments-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
}
.comment-list li {
  padding: 16px 0;
  border-bottom: 1px dashed var(--color-border);
}
.comment-author { font-weight: 600; color: var(--color-primary); }
.comment-meta { font-size: 12px; color: var(--color-text-muted); margin: 4px 0 8px; }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 60px 0 0;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-light);
  transition: var(--transition);
}
.pagination a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.pagination .current {
  background: var(--gradient-accent);
  color: white;
  border-color: transparent;
}

/* 侧边栏（可选） */
.sidebar {
  background: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.widget {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--color-border);
}
.widget:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.widget-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--color-accent);
}
.widget ul li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border);
}
.widget ul li:last-child { border-bottom: none; }
.widget a { font-size: 14px; color: var(--color-text); }
.widget a:hover { color: var(--color-accent); }

/* 评论表单 */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
}
.comment-form textarea { min-height: 100px; resize: vertical; }
.comment-form .submit {
  background: var(--gradient-accent);
  color: white;
  padding: 10px 28px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 768px) {
  .single-article { padding: 32px 24px; }
  .single-featured-image { margin: 0 -24px 24px; }
  .post-nav { grid-template-columns: 1fr; }
  .comments-area { padding: 24px 20px; }
}
