/* ============================================================
   Shangjin Craft · 博客模块样式（独立维护，勿改动主站 CSS）
   作用范围：
   1) 首页 hero 轮播（由 blog.js 动态注入 DOM）
   2) blog/index.html 博客页
   色板与主站保持一致（primary/gold 深蓝金体系）
   ============================================================ */

/* ---------- 首页 hero 轮播 ---------- */
/* 双屏用 grid 叠放在同一格，容器高度自动取两屏最大值，切换时高度不跳动 */
.hero-slides { display: grid; max-width: 900px; margin: 0 auto; position: relative; }
.hero-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.hero-slide.active { opacity: 1; visibility: visible; }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}
.hero-arrow:hover { background: #c9a062; border-color: #c9a062; color: #1a1f2e; }
.hero-arrow.prev { left: 1.2rem; }
.hero-arrow.next { right: 1.2rem; }

.hero-dots {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 3;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}
.hero-dot.active { background: #c9a062; border-color: #c9a062; }

/* 轮播第 2 屏标题：沿用主页 hero 大标题的视觉规格 */
.hero-blog-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
  color: #fff;
}
@media (max-width: 968px) { .hero-blog-title { font-size: 2.4rem; } }
@media (max-width: 600px) { .hero-blog-title { font-size: 2rem; } }

/* 轮播第 2 屏：博客卡片 */
.sjcb-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.2rem;
  text-align: left;
}
.sjcb-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}
.sjcb-card:hover { border-color: #c9a062; transform: translateY(-4px); }
.sjcb-card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #0f1219; }
.sjcb-card-img.sjcb-ph {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1f2e 0%, #0f1219 100%);
  color: #c9a062; font-size: 1.6rem; letter-spacing: 2px;
}
.sjcb-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.sjcb-card-date { font-size: 0.75rem; color: #e6c896; letter-spacing: 1px; margin-bottom: 0.45rem; }
.sjcb-card-title { font-size: 1rem; font-weight: 600; line-height: 1.4; color: #fff; }
.sjcb-card-summary {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-top: 0.5rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 968px) {
  .sjcb-cards { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .hero-arrow.prev { left: 0.5rem; }
  .hero-arrow.next { right: 0.5rem; }
}

/* ============================================================
   博客页（blog/index.html）
   ============================================================ */
.sjcb-page { background: #fafaf7; color: #2d3142; font-family: 'Helvetica Neue','Segoe UI',Arial,'PingFang SC','Microsoft YaHei',sans-serif; min-height: 100vh; }

/* 顶栏 */
.sjcb-nav {
  background: #1a1f2e;
  color: #fff;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.sjcb-logo { font-size: 1.15rem; font-weight: 700; letter-spacing: 1px; color: #fff; text-decoration: none; }
.sjcb-logo span { color: #c9a062; }
.sjcb-nav-right { display: flex; align-items: center; gap: 1rem; }
.sjcb-home-link { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.sjcb-home-link:hover { color: #e6c896; }
.sjcb-lang { display: flex; gap: 0.4rem; }
.sjcb-lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.85);
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
  font-family: inherit;
}
.sjcb-lang-btn:hover { border-color: #c9a062; color: #c9a062; }
.sjcb-lang-btn.active { background: #1a1f2e; border-color: #c9a062; color: #e6c896; }

/* 页头 */
.sjcb-head {
  background: linear-gradient(135deg, #1a1f2e 0%, #0f1219 100%);
  color: #fff;
  text-align: center;
  padding: 4.5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.sjcb-head::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201,160,98,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(201,160,98,0.1) 0%, transparent 50%);
}
.sjcb-head > * { position: relative; }
.sjcb-head-tag {
  display: inline-block;
  border: 1px solid #c9a062;
  color: #e6c896;
  padding: 0.4rem 1.2rem;
  font-size: 0.75rem;
  letter-spacing: 3px;
  margin-bottom: 1.4rem;
  text-transform: uppercase;
}
.sjcb-head h1, .sjcb-head h2 { font-size: 2.6rem; font-weight: 700; margin-bottom: 0.9rem; }
.sjcb-head p { color: rgba(255,255,255,0.75); max-width: 620px; margin: 0 auto; font-size: 1.05rem; line-height: 1.6; }

/* 列表 */
.sjcb-wrap { max-width: 1100px; margin: 0 auto; padding: 3.5rem 2rem 4.5rem; }
.sjcb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.sjcb-post {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}
.sjcb-post:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); border-color: #c9a062; }
.sjcb-post-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #0f1219; }
.sjcb-post-img.sjcb-ph {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1f2e 0%, #0f1219 100%);
  color: #c9a062; font-size: 1.8rem; letter-spacing: 2px;
}
.sjcb-post-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.sjcb-post-date { font-size: 0.78rem; color: #c9a062; letter-spacing: 1px; margin-bottom: 0.5rem; }
.sjcb-post-title { font-size: 1.12rem; font-weight: 600; color: #1a1f2e; line-height: 1.45; }
.sjcb-post-summary {
  font-size: 0.88rem; color: #6b7280; margin-top: 0.55rem; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sjcb-post-more {
  margin-top: auto; padding-top: 1rem;
  font-size: 0.82rem; font-weight: 600; color: #c9a062; letter-spacing: 0.5px;
}
.sjcb-post-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.sjcb-post-tag {
  background: #fafaf7; border: 1px solid #e5e7eb;
  padding: 0.2rem 0.65rem; font-size: 0.72rem; color: #2d3142; border-radius: 3px;
}

.sjcb-empty {
  text-align: center; color: #6b7280; padding: 5rem 1rem; font-size: 1rem;
  border: 1px dashed #e5e7eb; border-radius: 8px; background: #fff;
}

/* 文章页 */
.sjcb-article { max-width: 800px; margin: 0 auto; padding: 3.5rem 2rem 4.5rem; }
.sjcb-back {
  display: inline-block; margin-bottom: 2rem;
  color: #c9a062; text-decoration: none; font-size: 0.9rem; font-weight: 600;
}
.sjcb-back:hover { color: #1a1f2e; }
.sjcb-article-date { font-size: 0.85rem; color: #c9a062; letter-spacing: 1px; margin-bottom: 0.8rem; }
.sjcb-article h1 { font-size: 2.1rem; color: #1a1f2e; line-height: 1.3; margin-bottom: 1.2rem; }
.sjcb-article-cover { width: 100%; border-radius: 6px; margin: 1.6rem 0; display: block; }
.sjcb-article-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 2rem; }
.sjcb-content { font-size: 1rem; line-height: 1.85; color: #2d3142; }
.sjcb-content p { margin-bottom: 1.2rem; }
.sjcb-content h2 {
  font-size: 1.45rem; color: #1a1f2e; line-height: 1.4;
  margin: 2.4rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid #ece7dd;
}
.sjcb-content h2:first-child { margin-top: 0; }
.sjcb-content h3 { font-size: 1.18rem; color: #1a1f2e; margin: 1.8rem 0 0.8rem; }
.sjcb-content h4 { font-size: 1.02rem; color: #1a1f2e; margin: 1.5rem 0 0.6rem; }
.sjcb-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 1.2rem 0; }
.sjcb-content ul, .sjcb-content ol { margin: 0 0 1.2rem 0; padding-left: 1.4rem; }
.sjcb-content li { margin-bottom: 0.45rem; }
.sjcb-content li::marker { color: #c9a062; }
.sjcb-content ul { list-style: none; padding-left: 1.15rem; }
.sjcb-content ul > li { position: relative; }
.sjcb-content ul > li::before {
  content: ""; position: absolute; left: -0.95rem; top: 0.72em;
  width: 5px; height: 5px; border-radius: 50%; background: #c9a062;
}
.sjcb-content a { color: #c9a062; text-decoration: underline; text-underline-offset: 2px; }
.sjcb-content a:hover { color: #a87f3f; }
.sjcb-content strong { color: #1a1f2e; }
.sjcb-content hr { border: none; border-top: 1px solid #e6e1d7; margin: 2rem 0; }
.sjcb-content code {
  background: #f5f1e9; color: #8a6a2f; padding: 0.1em 0.38em;
  border-radius: 3px; font-size: 0.9em; font-family: Consolas, Menlo, monospace;
}
.sjcb-content blockquote {
  border-left: 3px solid #c9a062; padding: 0.6rem 1.2rem; margin: 1.4rem 0;
  background: #fff; color: #6b7280; border-radius: 0 4px 4px 0;
}
.sjcb-content blockquote p:last-child { margin-bottom: 0; }

/* 分栏内容（正文里用 ｜ 或 | 分隔的行，自动转成表格） */
.sjcb-tbl-wrap { margin: 1.4rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sjcb-tbl {
  width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.6;
  background: #fff; border: 1px solid #ece7dd; min-width: 520px;
}
.sjcb-tbl th, .sjcb-tbl td {
  padding: 0.6rem 0.8rem; border-bottom: 1px solid #f0ece3;
  text-align: left; vertical-align: top;
}
.sjcb-tbl tbody th {
  font-weight: 600; color: #1a1f2e; background: #fbf9f4;
  white-space: nowrap; width: 1%;
}
.sjcb-tbl thead th { font-weight: 600; color: #1a1f2e; background: #f7f3ea; }
.sjcb-tbl tbody tr:last-child th, .sjcb-tbl tbody tr:last-child td { border-bottom: none; }
.sjcb-tbl tbody tr:hover { background: #fcfaf6; }
.sjcb-missing { color: #6b7280; font-style: italic; }

/* 文章页底部「更多文章」 */
.sjcb-more-wrap { max-width: 1100px; margin: 0 auto; padding: 0 2rem 4.5rem; }
.sjcb-more-title { font-size: 1.3rem; color: #1a1f2e; margin-bottom: 1.6rem; }

/* 页脚 */
.sjcb-footer {
  background: #1a1f2e; color: rgba(255,255,255,0.6);
  text-align: center; padding: 2rem; font-size: 0.85rem;
}

@media (max-width: 968px) {
  .sjcb-grid { grid-template-columns: 1fr 1fr; }
  .sjcb-head h1, .sjcb-head h2 { font-size: 2rem; }
}
@media (max-width: 600px) {
  .sjcb-grid { grid-template-columns: 1fr; }
  .sjcb-head h1, .sjcb-head h2 { font-size: 1.7rem; }
  .sjcb-wrap, .sjcb-article, .sjcb-more-wrap { padding-left: 1.2rem; padding-right: 1.2rem; }
  .sjcb-article h1 { font-size: 1.6rem; }
}
