/* Beauty SEO 前台样式 (§8.2)
   约束: 单文件、不引框架、移动优先、断点只有 768px 与 1200px。
   首屏关键 CSS 内联在 templates/front/base.html 里, 这里是其余部分。
   没有构建步骤, 所以不压缩 —— gzip 后本文件不到 3KB。 */

/* ---------- 通用 ---------- */
.muted { color: #8a8a90; font-size: 14px; }
.empty { color: #8a8a90; padding: 12px 0; }
.intro { color: #4a4a50; background: #fff; border-left: 3px solid #1a5fb4;
         padding: 10px 14px; border-radius: 0 6px 6px 0; }
button { padding: 7px 14px; font-size: 14px; color: #fff; background: #1a5fb4;
         border: 0; border-radius: 6px; cursor: pointer; }
button:hover { background: #154c93; }

/* ---------- 栏目块 ---------- */
.block { margin: 26px 0; }
/* 顶部栏目导航的样式在 base.html 的内联关键 CSS 里(它在首屏), 这里只补桌面端的排布 */
@media (min-width: 768px) {
  nav.top a { padding: 11px 13px; }
}
.block h3 { font-size: 15px; color: #55555c; margin: 0 0 8px; }

/* ---------- 文章卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.columns { display: grid; grid-template-columns: 1fr; gap: 12px; }
.art-card { background: #fff; border: 1px solid #e6e6e8; border-radius: 8px;
            overflow: hidden; }
.art-card a { display: block; color: #2b2b2b; }
.art-card a:hover { text-decoration: none; color: #1a5fb4; }
.art-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eee; }
.art-card .noimg { display: block; width: 100%; aspect-ratio: 4 / 3; background: #eef1f4;
                   color: #a8a8b0; font-size: 13px; padding: 8px; }
.art-card .t { display: block; padding: 9px 11px 2px; font-size: 15px;
               display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
               overflow: hidden; }
.art-card .meta { display: block; padding: 0 11px 10px; color: #8a8a90; font-size: 13px; }
.art-card .desc { padding: 0 11px 11px; margin: 0; color: #66666d; font-size: 13px;
                  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
                  overflow: hidden; }

/* ---------- 文字列表 ---------- */
.art-list { list-style: none; margin: 0; padding: 0; }
.art-list li { padding: 7px 0; border-bottom: 1px dashed #e6e6e8; font-size: 15px; }
.art-list li:last-child { border-bottom: 0; }
.art-list .meta { color: #8a8a90; font-size: 13px; margin-left: 6px; }

/* ---------- 两列 / 子栏目 ---------- */
.two-col { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 14px; }
.sub-cats { display: grid; grid-template-columns: 1fr; gap: 14px; }
.sub-cat { background: #fff; border: 1px solid #e6e6e8; border-radius: 8px; padding: 12px 14px; }
.sub-cat h3 { margin: 0 0 6px; }
.sub-cat .count { color: #8a8a90; font-size: 13px; font-weight: 400; }

/* ---------- 文章页 ---------- */
.post { background: #fff; border: 1px solid #e6e6e8; border-radius: 8px;
        padding: 16px; }
.post-meta { color: #8a8a90; font-size: 13px; margin: 0 0 14px; }
.post-body { font-size: 16px; line-height: 1.85; word-wrap: break-word; }
.post-body h2 { font-size: 19px; }
.post-body h3 { font-size: 17px; }
.post-body img { margin: 10px 0; border-radius: 6px; }
.post-body blockquote { margin: 12px 0; padding: 8px 14px; background: #f7f7f8;
                        border-left: 3px solid #d8d8db; color: #55555c; }
.post-body pre { overflow-x: auto; padding: 10px 12px; background: #f2f3f5;
                 border-radius: 6px; }
.post-body code { font-size: 14px; }
.post-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
                margin: 14px 0; }
.post-gallery img { width: 100%; border-radius: 6px; }

/* ---------- 图集 ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
                margin: 0 0 16px; }
.gallery-grid figure { margin: 0; }
/* aspect-ratio 是兜底: images_json 里带宽高时 §7.6 要求写在 img 标签上,
   没带的时候至少让图片区域先占住位置, 不要等图加载完才撑开 (CLS) */
.gallery-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
                    border-radius: 6px; background: #eee; }
.gallery-grid figcaption { font-size: 13px; color: #8a8a90; padding: 4px 2px; }

/* ---------- 视频 ---------- */
.video-box { position: relative; margin: 0 0 14px; background: #000; border-radius: 8px;
             overflow: hidden; }
.video-box img { width: 100%; opacity: .8; }
.video-box .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
                   padding: 10px 22px; background: rgba(26, 95, 180, .92); color: #fff;
                   border-radius: 24px; font-size: 15px; }
.video-box .play:hover { text-decoration: none; background: #154c93; }
.src { word-break: break-all; }

/* ---------- 百科 / 问答 ---------- */
.wiki-avatar { width: 150px; border-radius: 8px; float: right; margin: 0 0 12px 14px; }
.qa { background: #fff; border: 1px solid #e6e6e8; border-radius: 8px; padding: 16px; }
.qa .q { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.qa .q h2 { margin: 0; font-size: 19px; }
.qa .a { display: flex; gap: 10px; align-items: flex-start; }
.tag-q, .tag-a { flex: 0 0 26px; height: 26px; line-height: 26px; text-align: center;
                 border-radius: 6px; color: #fff; font-size: 14px; }
.tag-q { background: #1a5fb4; }
.tag-a { background: #1f883d; }

/* ---------- 导流位 ---------- */
.go-box { margin: 20px 0; padding: 14px; background: #f0f6ff; border: 1px solid #cfe0f7;
          border-radius: 8px; }
.go-link { display: inline-block; margin-right: 10px; padding: 9px 20px; background: #1a5fb4;
           color: #fff; border-radius: 6px; font-size: 15px; }
.go-link:hover { text-decoration: none; background: #154c93; }

/* ---------- 上下篇 / 标签 / 分页 ---------- */
.neighbors { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
             margin-top: 22px; padding-top: 14px; border-top: 1px solid #e6e6e8;
             font-size: 14px; }
.tags { margin: 12px 0 0; font-size: 14px; color: #8a8a90; }
.tags a { display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px; background: #f0f1f3;
          border-radius: 12px; color: #55555c; }
.pager { margin: 20px 0 0; font-size: 14px; }
.pager a, .pager .cur { display: inline-block; min-width: 32px; margin: 0 4px 6px 0;
                        padding: 5px 9px; text-align: center; background: #fff;
                        border: 1px solid #d8d8db; border-radius: 6px; }
.pager .cur { background: #1a5fb4; border-color: #1a5fb4; color: #fff; }
.search-form { display: flex; gap: 8px; margin: 12px 0 18px; }
.search-form input { flex: 1; max-width: 420px; padding: 8px 11px; font-size: 15px;
                     border: 1px solid #d8d8db; border-radius: 6px; }

/* ---------- 页脚 ---------- */
footer.site { margin-top: 34px; padding: 22px 0 34px; background: #fff;
              border-top: 1px solid #e6e6e8; }
.foot-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.foot-nav dl { margin: 0; }
.foot-nav dt { font-weight: 600; margin-bottom: 5px; }
.foot-nav dd { margin: 0 0 3px; font-size: 14px; }
.copy { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid #e6e6e8;
        color: #8a8a90; font-size: 13px; }

/* ---------- 断点: 平板 ---------- */
@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
  .columns { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr 1fr; }
  .sub-cats { grid-template-columns: repeat(2, 1fr); }
  .post-gallery { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-nav { grid-template-columns: repeat(3, 1fr); }
  .post { padding: 22px 26px; }
}

/* ---------- 断点: 桌面 ---------- */
@media (min-width: 1200px) {
  .sub-cats { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .foot-nav { grid-template-columns: repeat(5, 1fr); }
}
