/* =========================================
   【新闻资讯】列表页专属 CSS (Blog Specific)
   维护记录：已剥离所有全局冗余，完美适配移动端与滑动导航
========================================= */

/* --- 1. 顶部 Banner 与面包屑 --- */
.page-banner { background-color: var(--auth-blue-dark, #172554); padding: 60px 0 40px; color: var(--white, #ffffff); border-bottom: 4px solid var(--eco-green, #059669); }
.page-title { font-size: 2.5rem; font-weight: 900; margin-bottom: 10px; }
.page-desc { color: #cbd5e1; font-size: 1.1rem; margin-bottom: 25px; max-width: 800px; }
.breadcrumbs { font-size: 0.9rem; color: #94a3b8; }
.breadcrumbs a { color: #cbd5e1; transition: var(--transition, all 0.3s ease); text-decoration: none; }
.breadcrumbs a:hover { color: var(--warn-yellow, #f59e0b); }
.breadcrumbs span { color: var(--warn-yellow, #f59e0b); font-weight: 700; }

/* --- 2. 悬浮分类导航 (大厂质感胶囊滑动版) --- */
.category-sticky-nav { 
    background: var(--white, #ffffff); 
    border-bottom: 1px solid var(--border-color, #e2e8f0); 
    position: sticky; 
    top: 85px; 
    z-index: 990; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
}

.sticky-nav-inner { 
    display: flex; 
    justify-content: flex-start; 
    gap: 15px; /* 胶囊自带内边距，所以这里的间距缩小到 15px */
    overflow-x: auto; 
    white-space: nowrap; 
    padding: 16px 24px; 
    scrollbar-width: none; 
    -webkit-overflow-scrolling: touch; 
    align-items: center; 
}
.sticky-nav-inner::-webkit-scrollbar { display: none; }

/* 升级为带灰底的胶囊按钮 */
.anchor-link { 
    color: var(--text-main, #1e293b); 
    font-weight: 600; 
    font-size: 0.95rem; 
    padding: 8px 24px; 
    background-color: var(--bg-gray, #f1f5f9); 
    border: 1px solid transparent;
    border-radius: 50px; /* 圆润的胶囊造型 */
    transition: var(--transition, all 0.3s ease); 
    text-decoration: none; 
    display: inline-flex;
}

/* 悬浮时的立体浮起效果 */
.anchor-link:hover { 
    color: var(--auth-blue, #1e3a8a); 
    background-color: var(--white, #ffffff);
    border-color: var(--auth-blue, #1e3a8a);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.08);
}

/* 激活状态：强势的政务蓝底色 */
.anchor-link.active { 
    background-color: var(--auth-blue, #1e3a8a); 
    color: var(--white, #ffffff); 
    border-color: var(--auth-blue, #1e3a8a); 
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
    pointer-events: none; /* 当前页不可再点击 */
}

/* 移动端胶囊大小微调 */
@media (max-width: 768px) {
    .sticky-nav-inner { padding: 12px 20px; gap: 10px; }
    .anchor-link { padding: 6px 18px; font-size: 0.9rem; }
}

/* --- 3. 页面主体排版与网格 --- */
.blog-page-content { padding: 60px 0 100px; background-color: var(--bg-gray, #f1f5f9); }
.blog-layout-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.blog-main-list { display: flex; flex-direction: column; gap: 40px; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

/* 空数据状态提示 */
.empty-data-tips { grid-column: 1/-1; text-align: center; padding: 60px 40px; color: #94a3b8; font-weight: bold; background: var(--white, #ffffff); border: 1px dashed var(--border-color, #e2e8f0); border-radius: 8px; font-size: 1.1rem; }

/* --- 4. 新闻卡片通用样式 --- */
.news-card { background: var(--white, #ffffff); border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color, #e2e8f0); box-shadow: 0 5px 15px rgba(0,0,0,0.03); display: flex; flex-direction: column; transition: var(--transition, all 0.3s ease); }
.news-card:hover { box-shadow: 0 15px 30px rgba(30,58,138,0.08); transform: translateY(-5px); border-color: rgba(30,58,138,0.15); }
.nc-img-link { display: block; position: relative; height: 200px; overflow: hidden; background-color: #f1f5f9; }
.news-image-img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.5s ease; display: block; border: none; }
.news-card:hover .news-image-img { transform: scale(1.05); }

.featured-badge { display: none; }
.news-date { position: absolute; top: 15px; left: 15px; background: var(--white, #ffffff); border-radius: 6px; padding: 5px 10px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 2; pointer-events: none; }
.news-date .day { display: block; font-size: 1.4rem; font-weight: 900; color: var(--auth-blue, #1e3a8a); line-height: 1; }
.news-date .month { display: block; font-size: 0.8rem; color: var(--text-light, #64748b); font-weight: 700; }

.news-content { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.news-category { display: inline-block; color: var(--eco-green, #059669); font-weight: 800; font-size: 0.9rem; margin-bottom: 10px; background: rgba(5,150,105,0.1); padding: 4px 12px; border-radius: 4px; align-self: flex-start; }
.nc-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; line-height: 1.5; margin-top: 0; }
.nc-title a { color: var(--text-main, #1e293b); transition: color 0.3s; text-decoration: none; }
.nc-title a:hover { color: var(--auth-blue, #1e3a8a); }
.nc-desc { color: var(--text-light, #64748b); font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; flex: 1; }
.post-meta { display: none; }

.btn-text { color: var(--auth-blue, #1e3a8a); font-weight: 700; transition: color 0.3s; display: inline-flex; align-items: center; gap: 5px; margin-top: auto; text-decoration: none; }
.btn-text:hover { color: var(--warn-yellow-hover, #d97706); }
.btn-read-more-small { display: inline-flex; }

/* --- 5. 【核心排版】：头条文章采用上下结构（完整画幅） --- */
.blog-grid article:first-child { grid-column: 1 / -1; display: flex; flex-direction: column; border-top: 4px solid var(--warn-yellow, #f59e0b); }
.blog-grid article:first-child .nc-img-link { height: 450px; width: 100%; border-radius: 8px 8px 0 0; }
.blog-grid article:first-child .news-content { padding: 40px; justify-content: flex-start; }
.blog-grid article:first-child .featured-badge { display: block; position: absolute; top: 20px; left: 20px; background: var(--warn-yellow, #f59e0b); color: var(--white, #ffffff); padding: 6px 15px; border-radius: 4px; font-weight: 900; font-size: 0.9rem; z-index: 2; pointer-events: none; letter-spacing: 1px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.blog-grid article:first-child .news-date { display: none; }
.blog-grid article:first-child .nc-title { font-size: 1.8rem; margin-bottom: 15px; line-height: 1.4; }
.blog-grid article:first-child .nc-desc { font-size: 1.05rem; margin-bottom: 25px; flex: none; line-height: 1.7; }
.blog-grid article:first-child .post-meta { display: flex; align-items: center; gap: 20px; color: #94a3b8; font-size: 0.95rem; margin-top: auto; }
.blog-grid article:first-child .btn-text { margin-top: 0; margin-left: auto; }
.blog-grid article:first-child .btn-read-more-small { display: none !important; }

/* --- 6. 侧边栏及内部组件 --- */
.blog-sidebar { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 30px; }
.sidebar-widget { background: var(--white, #ffffff); border-radius: 8px; padding: 30px; border: 1px solid var(--border-color, #e2e8f0); box-shadow: 0 5px 15px rgba(0,0,0,0.02); }
.widget-cta { background: linear-gradient(135deg, var(--auth-blue-dark, #172554) 0%, var(--auth-blue, #1e3a8a) 100%); color: var(--white, #ffffff); border: none; }
.widget-cta h3 { color: var(--white, #ffffff); font-size: 1.4rem; font-weight: 900; margin-top: 0; margin-bottom: 10px; }
.widget-cta p { color: #cbd5e1; margin-bottom: 20px; font-size: 0.95rem; line-height: 1.6; }
.widget-cta .btn { width: 100%; display: flex; justify-content: center; }

.widget-title { font-size: 1.2rem; color: var(--auth-blue, #1e3a8a); font-weight: 900; margin-top: 0; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--border-color, #e2e8f0); position: relative; }
.widget-title::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 40px; height: 2px; background: var(--warn-yellow, #f59e0b); }

.hot-posts-list { list-style: none; margin: 0; padding: 0; }
.hot-posts-list li { display: flex; gap: 15px; margin-bottom: 15px; border-bottom: 1px dashed var(--border-color, #e2e8f0); padding-bottom: 15px; }
.hot-posts-list li:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.hot-rank { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; background: #e2e8f0; color: var(--text-light, #64748b); font-weight: 900; border-radius: 4px; font-size: 0.85rem; flex-shrink: 0; }
.hot-rank.rank-top { background: var(--warn-yellow, #f59e0b); color: var(--white, #ffffff); }
.hot-posts-list a { color: var(--text-main, #1e293b); font-weight: 500; font-size: 0.95rem; line-height: 1.5; transition: color 0.3s; display: block; text-decoration: none; }
.hot-posts-list a:hover { color: var(--auth-blue, #1e3a8a); }

.mini-product-card { display: flex; gap: 15px; margin-bottom: 20px; }
.mini-product-card:last-child { margin-bottom: 0; }
.mini-p-img { width: 80px; height: 80px; border-radius: 6px; flex-shrink: 0; object-fit: cover; object-position: center; background-color: var(--bg-gray, #f1f5f9); display: block; border: none; }
.mini-p-info { display: flex; flex-direction: column; justify-content: center; }
.mini-p-info h4 { margin: 0 0 5px 0; }
.mini-p-info h4 a { font-size: 0.95rem; color: var(--text-main, #1e293b); font-weight: 700; line-height: 1.4; display: block; text-decoration: none; }
.mini-p-info h4 a:hover { color: var(--auth-blue, #1e3a8a); }
.mini-p-info .btn-text { font-size: 0.85rem; margin-top: 0; }

/* SDCMS 分页自适应兼容 */
.pagination ul { display: flex; justify-content: center; gap: 10px; margin-top: 50px; flex-wrap: wrap; list-style: none; padding: 0; }
.pagination li { display: block; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 15px; background: var(--white, #ffffff); border: 1px solid var(--border-color, #e2e8f0); border-radius: 4px; color: var(--text-main, #1e293b); font-weight: 700; transition: var(--transition, all 0.3s ease); text-decoration: none; }
.pagination a:hover { background: #f8fafc; color: var(--auth-blue, #1e3a8a); border-color: var(--auth-blue, #1e3a8a); }
.pagination .active, .pagination .active a, .pagination .current, .pagination .current a { background: var(--auth-blue, #1e3a8a) !important; color: var(--white, #ffffff) !important; border-color: var(--auth-blue, #1e3a8a) !important; }
.pagination .disabled, .pagination .disabled a { color: #cbd5e1 !important; pointer-events: none; background: #f8fafc !important; }

/* =========================================
   7. 移动端/平板响应式适配 (Mobile Responsiveness)
========================================= */
@media (max-width: 1024px) {
    .blog-layout-grid { grid-template-columns: 1fr; }
    .blog-grid article:first-child .nc-img-link { height: 350px; }
    .blog-sidebar { position: static; margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
}

@media (max-width: 768px) {
    .blog-page-content { padding: 40px 0; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-sidebar { grid-template-columns: 1fr; }
    .sticky-nav-inner { padding: 12px 20px; gap: 20px; }
    
    /* 【核心交互】：手机端取消头条文章的巨幕展现，回归普通卡片，节省宝贵首屏空间 */
    .blog-grid article:first-child { border-top: none; }
    .blog-grid article:first-child .nc-img-link { height: 220px; border-radius: 0; }
    .blog-grid article:first-child .news-content { padding: 25px; }
    .blog-grid article:first-child .featured-badge { display: none; }
    .blog-grid article:first-child .news-date { display: block; }
    .blog-grid article:first-child .nc-title { font-size: 1.25rem; margin-bottom: 10px; }
    .blog-grid article:first-child .nc-desc { font-size: 0.95rem; margin-bottom: 20px; line-height: 1.6; }
    .blog-grid article:first-child .post-meta { display: none; }
    .blog-grid article:first-child .btn-read-more-small { display: inline-flex !important; }
    .blog-grid article:first-child .btn-text { margin-top: auto; margin-left: 0; }
}