/* ============================================================
   Mirage News — 资讯新闻版式
   布局性改动：头条区 / 分类板块 / 新闻列表 / 新闻门户头部
   ============================================================ */

:root {
    --rvn-red: #c0392b;
    --rvn-red-dark: #922b21;
    --rvn-ink: #222;
    --rvn-grey: #666;
    --rvn-line: #e8e8e8;
    --rvn-bg: #f4f4f4;
}

{
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--rvn-bg);
}


/* ---------- 覆盖父主题 .main-container 的 flex 布局（新闻版式使用自己的网格） ---------- */
.news-headline,
.news-block,
.news-latest {
    display: block;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
}

/* ---------- 头部：新闻门户红条 ---------- */
.site-header,
.header {
    background: #fff;
    border-bottom: 3px solid var(--rvn-red);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.site-header .site-title a,
.header .logo a {
    color: var(--rvn-ink) !important;
    font-weight: 800;
    letter-spacing: 1px;
}
.nav-menu li a,
.main-menu li a {
    color: var(--rvn-ink) !important;
    font-weight: 600;
    padding: 10px 16px;
}
.nav-menu li a:hover,
.main-menu li a:hover {
    color: var(--rvn-red) !important;
    background: transparent;
    box-shadow: inset 0 -3px 0 var(--rvn-red);
}

/* ---------- 头条区 ---------- */
.news-headline {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
    margin-top: 16px;
}
.nh-card {
    position: relative;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.nh-img {
    display: block;
    aspect-ratio: 16 / 8.2;
    overflow: hidden;
    background: #eee;
}
.nh-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}
.nh-card:hover .nh-img img { transform: scale(1.03); }
.nh-body {
    padding: 18px 22px 20px;
    position: relative;
}
.nh-cat {
    display: inline-block;
    background: var(--rvn-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 2px;
    margin-bottom: 10px;
    text-decoration: none;
}
.nh-title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 800;
}
.nh-title a { color: var(--rvn-ink); text-decoration: none; }
.nh-title a:hover { color: var(--rvn-red); }
.nh-excerpt {
    margin: 0 0 12px;
    color: var(--rvn-grey);
    font-size: 14px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nh-date { color: #999; font-size: 13px; }

.nh-side {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 0 18px 10px;
}
.nh-side-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    color: var(--rvn-ink);
    padding: 14px 0 12px;
    border-bottom: 2px solid var(--rvn-ink);
    margin-bottom: 4px;
}
.nh-side-head i {
    width: 4px;
    height: 16px;
    background: var(--rvn-red);
    display: inline-block;
}
.nh-list { list-style: none; margin: 0; padding: 0; }
.nh-list li {
    padding: 11px 0;
    border-bottom: 1px dashed var(--rvn-line);
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.nh-list li:last-child { border-bottom: none; }
.nh-list li a {
    flex: 1;
    color: var(--rvn-ink);
    text-decoration: none;
    font-size: 14.5px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nh-list li a:hover { color: var(--rvn-red); }
.nh-list-date { color: #aaa; font-size: 12px; white-space: nowrap; }

/* ---------- 无图占位 ---------- */
.nh-noimg {
    width: 100%;
    height: 100%;
    min-height: 160px;
    background: linear-gradient(135deg, #d9d9d9, #bdbdbd);
    display: flex;
    align-items: center;
    justify-content: center;
}
.nh-noimg span {
    font-size: 52px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.85);
    font-family: Georgia, serif;
}
.nh-noimg-sm { min-height: 80px; }
.nh-noimg-sm span { font-size: 26px; }

/* ---------- 分类板块 ---------- */
.news-block {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-top: 16px;
    padding: 18px 22px 20px;
}
.nb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--rvn-ink);
    padding-bottom: 10px;
    margin-bottom: 16px;
}
.nb-title {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: var(--rvn-ink);
    display: flex;
    align-items: center;
    gap: 9px;
}
.nb-title::before {
    content: "";
    width: 4px;
    height: 18px;
    background: var(--rvn-red);
    display: inline-block;
}
.nb-more { color: #999; font-size: 13px; text-decoration: none; }
.nb-more:hover { color: var(--rvn-red); }
.nb-body {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    gap: 26px;
    align-items: stretch;
}
.nb-body-single { grid-template-columns: 1fr; }
.nb-feature {
    display: flex;
    gap: 14px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid var(--rvn-line);
    border-radius: 6px;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.nb-feature:hover {
    border-color: #e6c9c9;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}
.nb-feature-img {
    display: block;
    flex: 0 0 216px;
    width: 216px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    background: #eee;
}
.nb-feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}
.nb-feature:hover .nb-feature-img img { transform: scale(1.03); }
.nb-feature-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.nb-feature-title {
    margin: 0 0 7px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nb-feature-title a { color: var(--rvn-ink); text-decoration: none; }
.nb-feature-title a:hover { color: var(--rvn-red); }
.nb-feature-excerpt {
    margin: 0 0 10px;
    color: var(--rvn-grey);
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nb-feature-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #aaa;
}
.nb-feature-meta .nb-cat {
    color: var(--rvn-red);
    background: rgba(192, 57, 43, 0.08);
    padding: 1px 9px;
    border-radius: 10px;
}
.nb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.nb-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11.5px 0;
    border-bottom: 1px dashed var(--rvn-line);
    flex: 1 1 auto;
    min-height: 46px;
    max-height: 82px;
}
.nb-list li:last-child { border-bottom: none; }
.nb-list-flat li { padding: 13.5px 0; max-height: none; }
.nb-list-thumb li { gap: 12px; }
.nb-item-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 54px;
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
    display: block;
}
.nb-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}
.nb-item-thumb:hover img { transform: scale(1.05); }
.nb-item-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #efe6e6, #e3d5d5);
    color: var(--rvn-red);
    font-size: 20px;
    font-weight: 800;
}
.nb-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rvn-red);
    flex-shrink: 0;
}
.nb-item-title {
    flex: 1;
    color: var(--rvn-ink);
    text-decoration: none;
    font-size: 14.5px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nb-item-title:hover { color: var(--rvn-red); }
.nb-date { color: #aaa; font-size: 12px; white-space: nowrap; }

/* ---------- 最新发布列表 ---------- */
.news-latest {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-top: 16px;
    padding: 18px 22px 20px;
}
.nl-list { list-style: none; margin: 0; padding: 0; }
.nl-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--rvn-line);
}
.nl-item:last-child { border-bottom: none; }
.nl-thumb {
    flex-shrink: 0;
    width: 168px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 4px;
    background: #eee;
    display: block;
}
.nl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}
.nl-item:hover .nl-thumb img { transform: scale(1.04); }
.nl-body { flex: 1; min-width: 0; }
.nl-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
}
.nl-title a { color: var(--rvn-ink); text-decoration: none; }
.nl-title a:hover { color: var(--rvn-red); }
.nl-excerpt {
    margin: 0 0 10px;
    color: var(--rvn-grey);
    font-size: 13.5px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nl-meta { display: flex; align-items: center; gap: 12px; }
.nl-date { color: #aaa; font-size: 12.5px; }
.nl-cat {
    font-size: 12px;
    color: var(--rvn-red);
    background: #fdf1ef;
    padding: 2px 9px;
    border-radius: 2px;
    text-decoration: none;
}
.news-empty {
    text-align: center;
    color: #999;
    padding: 50px 0;
    font-size: 15px;
}

/* ---------- 分页 ---------- */
.news-pagination {
    margin-top: 18px;
    text-align: center;
}
.news-pagination .page-numbers {
    display: inline-block;
    min-width: 34px;
    padding: 7px 12px;
    margin: 0 3px;
    background: #fff;
    border: 1px solid var(--rvn-line);
    color: var(--rvn-ink);
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
}
.news-pagination .page-numbers.current,
.news-pagination .page-numbers:hover {
    background: var(--rvn-red);
    border-color: var(--rvn-red);
    color: #fff;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .news-headline { grid-template-columns: 1fr; }
    .nb-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .nl-item { flex-direction: column; }
    .nl-thumb { width: 100%; }
    .nh-title { font-size: 20px; }
    .nb-feature { flex-direction: column; }
    .nb-feature-img { flex: none; width: 100%; aspect-ratio: 16 / 9; }
}

/* ============================================================
   新闻文章页（single.php）
   ============================================================ */
.news-article {
    display: block;
    width: 100%;
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 0 12px;
    margin-top: 22px;
}
/* 资讯门户风：宽幅、扁平、红头版（与其它子主题的“卡片式内页”明显区分） */
.news-article { max-width: 1080px; }
.na-post {
    background: #fff;
    border-top: 4px solid var(--rvn-red);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 34px 46px 30px;
}
.na-title {
    font-size: 30px;
}
.na-related {
    margin-top: 18px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 20px 26px 16px;
}
.na-related-title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 800;
    color: var(--rvn-ink);
    display: flex;
    align-items: center;
    gap: 9px;
}
.na-related-title::before {
    content: "";
    width: 4px;
    height: 16px;
    background: var(--rvn-red);
}
.na-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
}
.na-related-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--rvn-line);
}
.na-related-list a {
    flex: 1;
    color: var(--rvn-ink);
    text-decoration: none;
    font-size: 14.5px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.na-related-list a:hover { color: var(--rvn-red); }
.na-related-date { color: #aaa; font-size: 12px; white-space: nowrap; }
@media (max-width: 640px) {
    .na-post { padding: 22px 18px 20px; }
    .na-title { font-size: 23px; }
    .na-related-list { grid-template-columns: 1fr; }
}
.na-cat {
    display: inline-block;
    background: var(--rvn-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 11px;
    border-radius: 2px;
    text-decoration: none;
    margin-bottom: 14px;
}
.na-title {
    margin: 0 0 14px;
    font-size: 27px;
    font-weight: 900;
    line-height: 1.4;
    color: var(--rvn-ink);
}
.na-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 13px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--rvn-line);
    margin-bottom: 22px;
}
.na-meta-sep { color: #ccc; }
.na-thumb {
    margin: 0 0 24px;
    border-radius: 4px;
    overflow: hidden;
}
.na-thumb img { width: 100%; height: auto; display: block; }
.na-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}
.na-content h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--rvn-ink);
    margin: 30px 0 12px;
    padding-left: 11px;
    border-left: 4px solid var(--rvn-red);
    line-height: 1.4;
}
.na-content h3 { font-size: 17px; font-weight: 700; margin: 24px 0 10px; color: var(--rvn-ink); }
.na-content p { margin: 0 0 16px; }
.na-content ul, .na-content ol { margin: 0 0 16px; padding-left: 24px; }
.na-content li { margin-bottom: 7px; line-height: 1.8; }
.na-content a { color: var(--rvn-red); }
.na-content img { max-width: 100%; height: auto; border-radius: 4px; }
.na-content blockquote {
    margin: 18px 0;
    padding: 12px 18px;
    background: #fdf3f2;
    border-left: 3px solid var(--rvn-red);
    color: #6b4441;
}
.na-foot {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--rvn-line);
}
.na-foot-cat { color: var(--rvn-red); font-size: 14px; text-decoration: none; font-weight: 600; }
.na-foot-cat:hover { text-decoration: underline; }
.na-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
}
.na-post-nav span { flex: 1; min-width: 0; }
.na-post-nav a {
    display: block;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 13px 16px;
    color: var(--rvn-ink);
    font-size: 14px;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.na-post-nav a:hover { color: var(--rvn-red); }
.na-post-nav .na-nav-next { text-align: right; }
@media (max-width: 640px) {
    .na-post { padding: 22px 18px; }
    .na-title { font-size: 22px; }
    .na-post-nav a { white-space: normal; }
}

/* 全局图片安全：用户插入的固定宽度图片不得撑破移动端 */
.na-content img, .kb-post-content img, .mc-post-content img, .wi-entry-content img,
.news-article img, .kb-article img, .mc-article img, .wi-article img {
    max-width: 100%;
    height: auto;
}
