/* ============================================================
   news.css - 完整版
   包含：列表页卡片 + 分类导航 + 分页控件 + 详情页
   ============================================================ */

/* ============================================================
   第一部分：全局重置 & 基础
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1a3a6b;
    margin-bottom: 30px;
}

.geo-detail-title {
    text-align: center;
}


/* ============================================================
   第二部分：分类导航
   ============================================================ */

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 16px 0 32px;
    border-bottom: 1px solid #e8ecf1;
    margin-bottom: 20px;
}

.category-nav .cat-btn {
    padding: 8px 24px;
    border: 1.5px solid #d0d7e2;
    border-radius: 30px;
    background: #fff;
    color: #4a5a6e;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.category-nav .cat-btn:hover {
    border-color: #1a3a6b;
    color: #1a3a6b;
    background: #f0f4fc;
}

.category-nav .cat-btn.active {
    background: #1a3a6b;
    border-color: #1a3a6b;
    color: #fff;
}


/* ============================================================
   第三部分：新闻列表（网格卡片）
   ============================================================ */

/* ===== 列表页缩略图（小图） ===== */



.news-card .card-image img {
    width: 330px !important;
    height: 190px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 8px 8px 0 0 !important;
}



.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.news-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef2f7;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
}

.news-card:hover {
    box-shadow: 0 8px 24px rgba(26, 58, 107, 0.10);
    transform: translateY(-4px);
}

.news-card .card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8ecf1;
    flex-shrink: 0;
}

.news-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card .card-body {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card .card-body .card-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #1a3a6b;
    background: #e8edf6;
    padding: 2px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
    align-self: flex-start;
    flex-shrink: 0;
}

.news-card .card-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a2332;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
    flex-shrink: 0;
}

.news-card .card-body .summary {
    font-size: 13px;
    color: #5a6a7e;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
    flex-shrink: 0;
    margin-bottom: 12px;
}

.news-card .card-body .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #f0f2f5;
    padding-top: 12px;
    margin-top: auto;
    flex-shrink: 0;
}

.news-card .card-body .card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: #8a9aaa;
}

.news-card .card-body .card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-card .card-body .read-more {
    font-size: 13px;
    font-weight: 500;
    color: #1a3a6b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
    white-space: nowrap;
}

.news-card .card-body .read-more:hover {
    color: #0f2a4f;
}

.news-card .card-body .read-more::after {
    content: "→";
    transition: transform 0.2s;
}

.news-card .card-body .read-more:hover::after {
    transform: translateX(4px);
}


/* ============================================================
   第四部分：分页控件
   ============================================================ */

.pagination-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 10px;
    border-top: 1px solid #e8ecf1;
}

.pagination-wrapper .page-btn {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1.5px solid #d0d7e2;
    border-radius: 6px;
    background: #fff;
    color: #4a5a6e;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    user-select: none;
}

.pagination-wrapper .page-btn:hover:not(.disabled):not(.active) {
    border-color: #1a3a6b;
    color: #1a3a6b;
}

.pagination-wrapper .page-btn.active {
    background: #1a3a6b;
    border-color: #1a3a6b;
    color: #fff;
}

.pagination-wrapper .page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-wrapper .page-ellipsis {
    color: #8a9aaa;
    padding: 0 4px;
    font-size: 14px;
}

.pagination-wrapper .jump-area {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    font-size: 14px;
    color: #4a5a6e;
}

.pagination-wrapper .jump-area input {
    width: 52px;
    height: 38px;
    border: 1.5px solid #d0d7e2;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #1a2332;
    outline: none;
    transition: border-color 0.2s;
}

.pagination-wrapper .jump-area input:focus {
    border-color: #1a3a6b;
}

.pagination-wrapper .jump-area .jump-btn {
    height: 38px;
    padding: 0 18px;
    border: none;
    border-radius: 6px;
    background: #1a3a6b;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.pagination-wrapper .jump-area .jump-btn:hover {
    background: #0f2a4f;
}


/* ============================================================
   第五部分：列表页响应式
   ============================================================ */

@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .news-card {
        min-height: 320px;
    }
    .pagination-wrapper {
        gap: 6px;
        padding: 16px 0 10px;
    }
    .pagination-wrapper .jump-area {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    .pagination-wrapper .page-btn {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .news-card {
        min-height: auto;
    }
    .news-card .card-body h3 {
        height: auto;
        min-height: 44px;
    }
    .news-card .card-body .summary {
        height: auto;
        min-height: 38px;
    }
    .pagination-wrapper .page-btn {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
        padding: 0 6px;
    }
    .pagination-wrapper .jump-area input {
        width: 44px;
        height: 32px;
        font-size: 13px;
    }
    .pagination-wrapper .jump-area .jump-btn {
        height: 32px;
        padding: 0 12px;
        font-size: 13px;
    }
}


/* ============================================================
   第六部分：文章详情页（GEO 模式）
   ============================================================ */

.geo-detail-wrapper {
    max-width: 860px;
    margin: 0 auto;
    padding: 30px 24px 50px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* ===== 面包屑导航样式（新增） ===== */

/* 1. 整个面包屑容器 */
.breadcrumb {
    padding: 12px 0 16px 0;      /* 上下左右留点空间，不贴边 */
    font-size: 14px;
    color: #888;                 /* 分隔符和当前文字颜色 */
    border-bottom: 1px solid #f0f0f0;  /* 加一条浅色分割线，与下方内容区分 */
    margin-bottom: 20px;         /* 和下方标题拉开距离 */
}

/* 2. 首页链接 */
.breadcrumb a {
    color: #0070c9;              /* 清爽的蓝色，符合主流审美 */
    text-decoration: none;       /* 去掉下划线，更干净 */
    transition: color 0.2s;      /* 鼠标悬停变色过渡 */
}

/* 3. 鼠标悬停到链接时 */
.breadcrumb a:hover {
    color: #005a9e;              /* 悬停时变深一点 */
    text-decoration: underline;  /* 悬停时出现下划线，提示可点击 */
}

/* 4. 分隔符（斜杠 /） */
.breadcrumb .sep {
    margin: 0 8px;               /* 左右留 8px 间距，不要太挤 */
    color: #ccc;                 /* 浅灰色，弱化视觉 */
}

/* 5. 当前页面文字（文章详情） */
.breadcrumb .current {
    color: #333;                 /* 深色，突出“当前位置” */
    font-weight: 600;            /* 加粗，强调这是当前所在页面 */
}

.geo-detail-nav .current {
    color: #4a5a6e;
}

/* ---- 文章头图 ---- */
.geo-detail-hero {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
    background: #e8ecf1;
}

.geo-detail-hero img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* ---- 文章标题 ---- */
.geo-detail-title {
    font-size: 30px;
    font-weight: 700;
    color: #1a2332;
    line-height: 1.4;
    margin-bottom: 14px;
}

/* ---- 文章元数据 ---- */
.geo-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 20px;
    font-size: 14px;
    color: #8a9aaa;
    margin-bottom: 24px;
}

.geo-detail-meta .tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #1a3a6b;
    background: #e8edf6;
    padding: 2px 14px;
    border-radius: 20px;
}

.geo-detail-meta .date,
.geo-detail-meta .views,
.geo-detail-meta .read-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ---- 文章摘要/导语（加粗突出） ---- */
.geo-detail-excerpt {
    background: #f7f9fc;
    border-left: 4px solid #1a3a6b;
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin-bottom: 32px;
}

.geo-detail-excerpt p {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.8;
    color: #1a2332;
    margin: 0;
}

/* ---- 文章正文 ---- */


/* ===== 修复文章页面宽度 ===== */

/* 1. 文章主容器：限制最大宽度，居中，防止溢出 */
.detail-wrapper {
    max-width: 820px;           /* 舒适阅读宽度，可自行调整 */
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;            /* 防止贴边 */
    box-sizing: border-box;
    overflow-x: hidden;         /* 防止任何子元素溢出 */
}

/* 2. 正文区域同样处理 */
.geo-detail-body {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;      /* 长单词/链接自动换行 */
    overflow-wrap: break-word;
}

/* 3. 所有图片自适应 */
.geo-detail-hero img,
.geo-detail-body img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 4. 指标卡片网格：小屏自动换行 */
.geo-metrics-grid {
    display: flex;
    flex-wrap: wrap;            /* 允许换行 */
    gap: 16px;
    justify-content: center;
}

.geo-metric-card {
    flex: 1 1 200px;            /* 最小宽度200px，自动换行 */
    max-width: 100%;
    box-sizing: border-box;
}

/* 5. 引用块、列表等防止溢出 */
.geo-detail-body blockquote,
.geo-detail-body ul,
.geo-detail-body ol {
    max-width: 100%;
    overflow-x: auto;           /* 如果内容实在太长，允许横向滚动 */
}

/* 6. iframe 确保不溢出 */
iframe[src*="header-news"],
iframe[src*="foot"] {
    max-width: 100%;
    display: block;
}



/* 强制图片和视频自适应 */
.article-container img,
.post-content img,
.entry-content img,
.article-container video,
.article-container iframe {
    max-width: 100% !important;
    height: auto !important;
}

/* 强制打断超长英文/链接换行 */
.article-container p,
.article-container span,
.article-container a {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.article-container {
    width: 100%;
    max-width: 760px; /* 或您需要的舒适阅读宽度 */
    margin: 0 auto;
    padding: 0 20px; /* 防止贴边 */
    box-sizing: border-box;
}

.geo-detail-body {
    font-size: 16px;
    line-height: 1.9;
    color: #2a3344;
}

.geo-detail-body p {
    margin-bottom: 18px;
}

.geo-detail-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a2332;
    margin: 36px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef2f7;
}

.geo-detail-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a2332;
    margin: 26px 0 12px;
}

.geo-detail-body ul,
.geo-detail-body ol {
    margin: 14px 0 20px 24px;
}

.geo-detail-body li {
    margin-bottom: 8px;
}

.geo-detail-body blockquote {
    margin: 26px 0;
    padding: 18px 24px;
    background: #f5f8ff;
    border-left: 4px solid #1a3a6b;
    border-radius: 0 8px 8px 0;
    color: #1a2332;
    font-style: italic;
}

.geo-detail-body blockquote p {
    margin-bottom: 4px;
}

.geo-detail-body blockquote cite {
    font-style: normal;
    font-size: 14px;
    color: #8a9aaa;
}

/* ---- 指标卡片 ---- */
.geo-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0 28px;
}

.geo-metric-card {
    background: #f7f9fc;
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    border: 1px solid #eef2f7;
    transition: box-shadow 0.2s;
}

.geo-metric-card:hover {
    box-shadow: 0 4px 12px rgba(26, 58, 107, 0.08);
}

.geo-metric-card .metric-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.geo-metric-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 4px;
}

.geo-metric-card p {
    font-size: 13px;
    color: #5a6a7e;
    line-height: 1.5;
    margin: 0;
}

/* ---- 文章底部 ---- */
.geo-detail-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #f0f2f5;
}

.geo-detail-footer .geo-detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.geo-detail-footer .geo-detail-tags .label {
    font-size: 14px;
    color: #8a9aaa;
}

.geo-detail-footer .geo-detail-tags .tag-link {
    display: inline-block;
    font-size: 13px;
    color: #1a3a6b;
    background: #e8edf6;
    padding: 2px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.geo-detail-footer .geo-detail-tags .tag-link:hover {
    background: #1a3a6b;
    color: #fff;
}

.geo-detail-footer .geo-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.geo-detail-footer .geo-detail-actions .prev-next {
    display: flex;
    gap: 20px;
}

.geo-detail-footer .geo-detail-actions .prev-next a {
    font-size: 14px;
    color: #1a3a6b;
    text-decoration: none;
    transition: color 0.2s;
}

.geo-detail-footer .geo-detail-actions .prev-next a:hover {
    color: #0f2a4f;
    text-decoration: underline;
}

.geo-detail-footer .geo-detail-actions .back-btn {
    display: inline-block;
    padding: 8px 26px;
    border: 1.5px solid #1a3a6b;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1a3a6b;
    text-decoration: none;
    transition: all 0.25s ease;
}

.geo-detail-footer .geo-detail-actions .back-btn:hover {
    background: #1a3a6b;
    color: #fff;
}


/* ============================================================
   第七部分：详情页响应式
   ============================================================ */

@media (max-width: 768px) {
    .geo-detail-wrapper {
        padding: 20px 16px 32px;
        border-radius: 10px;
    }
    .geo-detail-title {
        font-size: 24px;
    }
    .geo-detail-hero img {
        max-height: 260px;
    }
    .geo-detail-excerpt p {
        font-size: 15px;
    }
    .geo-detail-body {
        font-size: 15px;
    }
    .geo-detail-body h2 {
        font-size: 20px;
    }
    .geo-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .geo-detail-footer .geo-detail-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .geo-detail-footer .geo-detail-actions .prev-next {
        justify-content: space-between;
    }
    .geo-detail-footer .geo-detail-actions .back-btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .geo-detail-wrapper {
        padding: 14px 12px 24px;
    }
    .geo-detail-title {
        font-size: 20px;
    }
    .geo-detail-hero img {
        max-height: 180px;
    }
    .geo-detail-meta {
        font-size: 13px;
        gap: 10px 14px;
    }
    .geo-detail-excerpt p {
        font-size: 14px;
        font-weight: 600;
    }
    .geo-detail-body {
        font-size: 14px;
    }
    .geo-detail-body h2 {
        font-size: 18px;
    }
    .geo-metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .geo-metric-card {
        padding: 14px 12px;
    }
    .geo-metric-card .metric-icon {
        font-size: 22px;
    }
}