/* ============================================================
   gafei_v3 内页样式（栏目列表 / 文章详情 / 搜索结果页）
   依赖 main.css 的 :root 变量，必须在 main.css 之后加载
   ============================================================ */

/* ============ 面包屑 ============ */
.bi-breadcrumb {
    font-size: 13px;
    color: var(--bi-gray);
    padding: 14px 0 0;
}
.bi-breadcrumb a { color: var(--bi-gray); }
.bi-breadcrumb a:hover { color: var(--bi-red); }
.bi-breadcrumb .sep { margin: 0 6px; color: #ccc; }
.bi-breadcrumb .cur { color: var(--bi-black); font-weight: 600; }

/* ============ 页面标题条 ============ */
.bi-pagehead {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 14px 0 12px;
    border-bottom: 3px solid var(--bi-black);
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.bi-pagehead h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    overflow-wrap: break-word;
}
.bi-pagehead .sub { font-size: 13px; color: var(--bi-gray); }
.bi-pagehead .count { font-size: 13px; color: var(--bi-gray); margin-left: auto; }

/* ============ 栏目简介 ============ */
.bi-catintro {
    font-size: 14px;
    line-height: 1.9;
    color: #555;
    background: var(--bi-light);
    padding: 16px 18px;
    border-left: 3px solid var(--bi-red);
    margin-bottom: 26px;
    overflow-wrap: break-word;
}

/* ============ 列表：横向大卡 ============ */
.bi-list { display: flex; flex-direction: column; }
.bi-list-item {
    display: flex;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid #F0F0EE;
    min-width: 0;
}
.bi-list-item:hover .bi-list-title { color: var(--bi-red); }
.bi-list-item .bi-list-img {
    width: 250px;
    height: 165px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    background: #f2f2f0;
}
.bi-list-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.bi-list-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--bi-black);
    margin-top: 2px;
    overflow-wrap: break-word;
}
.bi-list-desc {
    font-size: 13.5px;
    color: #777;
    line-height: 1.8;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
}
.bi-list-meta {
    font-size: 12px;
    color: #999;
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.bi-list-meta a { color: #999; }
.bi-list-meta a:hover { color: var(--bi-red); }
.bi-list-meta em { font-style: normal; color: var(--bi-red); }

/* 搜索结果关键词标签 */
.bi-kw {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.bi-kw a {
    font-size: 12px;
    padding: 3px 10px;
    background: var(--bi-light);
    color: #666;
    border-radius: 2px;
}
.bi-kw a:hover { background: var(--bi-red); color: #fff; }

/* 搜索无结果 */
.bi-searchnull {
    text-align: center;
    padding: 60px 0;
    color: var(--bi-gray);
    font-size: 15px;
}
.bi-searchnull b { color: var(--bi-red); }

/* ============ 搜索页大搜索框 ============ */
.bi-searchpage {
    background: var(--bi-light);
    padding: 30px 0 26px;
    margin-bottom: 8px;
}
.bi-searchpage-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.bi-searchpage h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 14px;
}
.bi-searchform {
    display: flex;
    max-width: 660px;
}
.bi-searchform input {
    flex: 1;
    height: 46px;
    border: 2px solid var(--bi-black);
    border-right: 0;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    min-width: 0;
}
.bi-searchform input:focus { border-color: var(--bi-red); }
.bi-searchform button {
    width: 100px;
    height: 46px;
    background: var(--bi-red);
    color: #fff;
    border: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
}
.bi-searchform button:hover { background: var(--bi-red-dark); }
.bi-searchpage .bi-hotwords { color: #777; }
.bi-searchpage .bi-hotwords a { color: #666; }
.bi-searchpage .bi-hotwords a:hover { color: var(--bi-red); }

/* ============ 分页 ============ */
.bi-pagination {
    padding: 26px 0 6px;
    line-height: 1;
}
.bi-pagination ul,
.bi-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.bi-pagination li { list-style: none; }
.bi-pagination a,
.bi-pagination span,
.bi-pagination li span,
.bi-pagination li a {
    display: inline-block;
    min-width: 34px;
    height: 34px;
    line-height: 34px;
    padding: 0 10px;
    text-align: center;
    background: #fff;
    border: 1px solid #E2E2DE;
    color: #444;
    font-size: 13px;
}
.bi-pagination a:hover {
    border-color: var(--bi-red);
    color: var(--bi-red);
}
.bi-pagination .active,
.bi-pagination li .page_active,
.bi-pagination span[class*="active"] {
    background: var(--bi-red);
    border-color: var(--bi-red);
    color: #fff;
    font-weight: 700;
}
.bi-pagination .pagination .disabled { color: #bbb; }

/* ============ 文章详情 ============ */
.bi-article {
    background: #fff;
    min-width: 0;
}
.bi-article-head {
    padding: 18px 0 14px;
    border-bottom: 1px solid #EAEAE6;
}
.bi-article-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.45;
    color: var(--bi-black);
    overflow-wrap: break-word;
}
.bi-article-meta {
    font-size: 12.5px;
    color: #999;
    margin-top: 12px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.bi-article-meta a { color: #999; }
.bi-article-meta a:hover { color: var(--bi-red); }

/* 正文排版 */
.bi-article-content {
    font-size: 16.5px;
    line-height: 2;
    color: #333;
    padding: 26px 0 10px;
    word-break: normal;
    overflow-wrap: break-word;
}
.bi-article-content p { margin: 0 0 1.1em; }
.bi-article-content h2 {
    font-size: 21px;
    font-weight: 800;
    margin: 1.6em 0 0.7em;
    padding-left: 12px;
    border-left: 4px solid var(--bi-red);
    overflow-wrap: break-word;
}
.bi-article-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 1.5em 0 0.6em;
    overflow-wrap: break-word;
}
.bi-article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 14px auto;
    border-radius: 2px;
}
.bi-article-content a { color: var(--bi-red); }
.bi-article-content table {
    max-width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 14px;
}
.bi-article-content td,
.bi-article-content th {
    border: 1px solid #E2E2DE;
    padding: 8px 10px;
}
.bi-article-content blockquote {
    margin: 14px 0;
    padding: 10px 16px;
    border-left: 4px solid var(--bi-red);
    background: var(--bi-light);
    color: #555;
}
.bi-article-content strong { color: var(--bi-black); }

/* 文内公众号二维码 */
.bi-article-content .bi-qr {
    text-align: center;
    margin: 18px 0;
    font-size: 13px;
    color: #777;
}
.bi-article-content .bi-qr img { width: 200px; }

/* 声明 */
.bi-avow {
    margin: 26px 0 0;
    padding: 14px 16px;
    background: var(--bi-light);
    font-size: 12.5px;
    color: #888;
    line-height: 1.9;
}

/* 相关文章 */
.bi-related {
    margin-top: 30px;
}
.bi-related-head {
    font-size: 18px;
    font-weight: 800;
    padding: 0 0 10px;
    border-bottom: 2px solid var(--bi-black);
    margin-bottom: 6px;
}
.bi-related-head::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--bi-red);
    margin-right: 8px;
}
.bi-related ul { list-style: none; margin: 0; padding: 0; }
.bi-related li {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed #EAEAE6;
    font-size: 14.5px;
}
.bi-related li::before {
    content: "·";
    color: var(--bi-red);
    font-weight: 900;
    flex-shrink: 0;
}
.bi-related a { color: #333; line-height: 1.6; overflow-wrap: break-word; }
.bi-related a:hover { color: var(--bi-red); }

/* ============ 侧栏组件 ============ */
.bi-sideblock {
    background: #fff;
    margin-bottom: 26px;
    min-width: 0;
}
.bi-sideblock-title {
    font-size: 16px;
    font-weight: 800;
    padding: 0 0 10px;
    border-bottom: 2px solid var(--bi-black);
    margin-bottom: 4px;
}
.bi-sideblock-title::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--bi-red);
    margin-right: 8px;
}
.bi-sideitem {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F0F0EE;
}
.bi-sideitem img {
    width: 100px;
    height: 64px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    background: #f2f2f0;
}
.bi-sideitem .t {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    min-width: 0;
}
.bi-sideitem:hover .t { color: var(--bi-red); }
.bi-sideitem .c {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}
.bi-sidelist { list-style: none; margin: 0; padding: 0; }
.bi-sidelist li {
    padding: 9px 0;
    border-bottom: 1px solid #F0F0EE;
    font-size: 14px;
    display: flex;
    gap: 8px;
}
.bi-sidelist li::before {
    content: "·";
    color: var(--bi-red);
    font-weight: 900;
    flex-shrink: 0;
}
.bi-sidelist a { color: #333; line-height: 1.6; overflow-wrap: break-word; }
.bi-sidelist a:hover { color: var(--bi-red); }
.bi-sideblock .bi-qrbox {
    text-align: center;
    padding: 14px 0 4px;
    font-size: 13px;
    color: #777;
}
.bi-sideblock .bi-qrbox img { width: 160px; margin-top: 8px; }

/* ============================================================
   响应式 —— 保持在本文件末尾
   ============================================================ */
@media (max-width: 960px) {
    .bi-list-item .bi-list-img { width: 200px; height: 132px; }
    .bi-list-title { font-size: 17px; }
    .bi-article-title { font-size: 23px; }
    .bi-article-content { font-size: 15.5px; }
}

@media (max-width: 640px) {
    .bi-list-item { flex-direction: column; gap: 10px; }
    .bi-list-item .bi-list-img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
    .bi-pagehead h1 { font-size: 21px; }
    .bi-article-title { font-size: 20px; }
    .bi-article-content { font-size: 15px; line-height: 1.95; }
    .bi-searchform input { height: 42px; }
    .bi-searchform button { width: 78px; height: 42px; }
    .bi-pagination a, .bi-pagination span,
    .bi-pagination li span, .bi-pagination li a { min-width: 30px; height: 32px; line-height: 32px; }
}
