/* 基础样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
    margin: 0;
    padding: 0;
}
a{
    text-decoration: none;
}

/* 顶部导航栏 */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 3.5rem;
}

.logo {
    font-size: 1.25rem;width: 100%;
    font-weight: bold;
    color: #3b82f6;text-align: center;
}

.search-btn {
    color: #6b7280;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: #3b82f6;
}

/* 分类导航栏 */
.category-nav {
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px solid #f3f4f6;
    background-color: white;
}

.category-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-link:hover {
    color: #3b82f6;
}

.category-link.active {
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
    font-weight: 500;
}

/* 主内容区 */
.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem 0 1rem;
}

.section {
    /*margin-bottom: 2.5rem;*/
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    justify-content: space-between;
}

.title-with-icon {
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0 6px;
    text-align: left;
}

.icon-newspaper { color: #3b82f6; }
.icon-weibo { color: #ef4444; }
.icon-official { color: #2563eb; }
.icon-video { color: #a855f7; }

/* 内容卡片 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-image-container {
    position: relative;
}

.card-image-container-4x3 {
    padding-bottom: 75%;
}

.card-image-container-3x4 {
    padding-bottom: 133.33%;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 0.75rem;
}

.card-title {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-source {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* 图片懒加载效果 */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

/* 移动端适配 */
@media (min-width: 640px) {
    .category-container {
        gap: 1.5rem;
        padding: 0.75rem 1rem;
    }

    .card-grid {
        gap: 1.5rem;
    }
}

/* 分类标签样式 */
.category-tags {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.8125rem;
    color: #6b7280;
    text-decoration: none;
    padding: 0.25rem 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tag:hover {
    color: #3b82f6;
    background-color: #eff6ff;
}

.tag.active {
    color: #3b82f6;
    font-weight: 500;
    border-bottom: 1px solid #3b82f6;
}

/* 图片预览弹窗样式 */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.image-preview-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.preview-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border: 4px solid white;
    border-radius: 4px;
}

.close-preview {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-preview:hover {
    color: #ff4d4d;
}
.section-more {
    color: #666;font-size: 14px;text-decoration: none;
}

.pagination span{
    margin:0;
    cursor:pointer
}
.pagination{

    padding:40px 0;text-align: center;
}
.pagination a{
    margin-right:6px;
    padding:6px 12px;
    border:1px #cccccc solid;
    background:#fff;
    text-decoration:none;
    color:#808080;
    font-size:12px;
    line-height:24px;
}
.pagination a:hover{
    background: #0099ff;
    border:1px #0099ff solid;color:#fff;
}
.pagination a.cur{
    border:1px #0099ff solid;
    background:#0099ff;
    color:#fff;padding:6px 12px;
}
.pagination span{
    padding:6px 12px;
    font-size:12px;
    line-height:24px;
    color:#bbb;
    border:1px #ccc solid;
    background:#fcfcfc;
    margin-right:8px;
}

.pagination span.pageRemark{
    border-style:none;
    background:none;
    margin-right:0px;
    padding:4px 0px;
    color:#666;
}
.pagination span.pageRemark b{
    color:red;
}
.pagination span.pageEllipsis{
    border-style:none;
    background:none;
    padding:4px 0;
    color:#808080;
}


/* 搜索框样式 */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background-color: #fff;
    z-index: 10000; /* 确保在最上层 */
    transition: height 0.3s ease-in-out;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.search-overlay.active {
    height: 120px;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
}

.search-input:focus {
    border-color: #4285f4;
}

.search-submit, .search-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 4px;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-submit:hover {
    background-color: #4285f4;
    color: white;
}

.search-close:hover {
    background-color: #ff4d4f;
    color: white;
}
/* 新增半透明遮罩层 */
.search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5); /* 半透明黑色 */
    z-index: 40; /* 位于搜索框下方 */
    opacity: 0; /* 默认隐藏 */
    pointer-events: none; /* 默认不响应点击 */
    transition: opacity 0.3s ease-in-out;
}

.search-backdrop.active {
    opacity: 1; /* 显示遮罩层 */
    pointer-events: auto; /* 响应点击 */
}
.province{border:#ddd 1px solid;height: 30px;}