/* style.css - 合并后的样式文件 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    color: #1a4b8c;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0d2c54;
}

ul {
    list-style: none;
}
.indexnews,.indexnews * {color:#fff}
.indexnews a:hover {color:#4c7ebf!important}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #1a4b8c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0d2c54;
    color: white;
}

.btn-secondary {
    background-color: #e63946;
}

.btn-secondary:hover {
    background-color: #c72c3a;
}

/* 头部通知栏 */
.top-notice {
    background-color: #1a4b8c;
    color: white;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
}

.top-notice a {
    color: white;
    text-decoration: underline;
    font-weight: bold;
}

/* 导航栏 */
header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: #e63946;
    font-size: 24px;
}

.logo-text {
    font-size: 22px;
    font-weight: bold;
    color: #1a4b8c;
}

.search-bar {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 8px 16px;
    padding-right: 40px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}

.search-bar button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-actions button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-nav {
    border-top: 1px solid #eee;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
}

.main-nav li a {
    display: inline-block;
    padding: 12px 16px;
    color: #666;
    font-weight: 500;
    border-bottom: 2px solid transparent;
}

.main-nav li a:hover,
.main-nav li a.active {
    color: #1a4b8c;
    border-bottom-color: #1a4b8c;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    border-top: 1px solid #eee;
}

.mobile-menu ul li a {
    display: block;
    padding: 12px 16px;
    color: #666;
    border-bottom: 1px solid #eee;
}

.mobile-menu ul li a.active {
    background-color: rgba(26, 75, 140, 0.1);
    color: #1a4b8c;
}

/* 头条新闻区 */
.breaking-news {
    background-color: #1a4b8c;
    color: white;
    padding: 40px 0;
}

.news-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e63946;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 20px;
    margin-bottom: 15px;
}

.breaking-news h2 {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-meta {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 主要内容区 */
main {
    padding: 40px 0;
}

.content-wrapper {
    display: flex;
    gap: 30px;
}

.main-content {
    flex: 2;
}

.sidebar {
    flex: 1;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a4b8c;
}

.section-title h3 {
    font-size: 22px;
    color: #333;
}

.section-title a {
    color: #1a4b8c;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-card {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-card-flex {
    display: flex;
    gap: 20px;
    align-items: center;
}

.news-card-flex .news-info {
    flex: 2;
}

.news-card-flex .news-title {
    flex: 1;
}

.news-card h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.news-card p {
    color: #666;
    margin-bottom: 15px;
}

.small-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.small-news {
    background-color: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.small-news h4 {
    font-size: 16px;
    margin-bottom: 10px;
}

.news-date {
    color: #888;
    font-size: 13px;
}

.news-list {
    margin-bottom: 30px;
}

.news-list-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-item h4 {
    margin-bottom: 5px;
}

/* 侧边栏 */
.sidebar-block {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-block h3 {
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-block h3 .icon {
    color: #e63946;
}

.ranked-news {
    margin-bottom: 10px;
}

.ranked-news li {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #e63946;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.ranked-news li:nth-child(2) .rank-number {
    background-color: rgba(230, 57, 70, 0.8);
}

.ranked-news li:nth-child(3) .rank-number {
    background-color: rgba(230, 57, 70, 0.6);
}

.ranked-news li:nth-child(n+4) .rank-number {
    background-color: #ddd;
    color: #666;
}

.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    color: #666;
    transition: all 0.3s ease;
}

.category-item:hover {
    border-color: #1a4b8c;
    color: #1a4b8c;
}

.subscribe-form {
    background-color: #1a4b8c;
    color: white;
    padding: 20px;
    border-radius: 6px;
}

.subscribe-form h3 {
    color: white;
    margin-bottom: 10px;
}

.subscribe-form p {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.subscribe-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
}

.subscribe-form button {
    width: 100%;
    padding: 10px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.subscribe-form button:hover {
    background-color: #c72c3a;
}

.subscribe-form .disclaimer {
    font-size: 12px;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.6);
}

/* 推荐阅读 */
.recommended-news {
    background-color: white;
    padding: 40px 0;
    border-top: 1px solid #eee;
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.recommended-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.recommended-item:hover {
    transform: translateY(-3px);
}

.recommended-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.recommended-item p {
    color: #666;
    font-size: 14px;
}

/* 页脚 */
footer {
    background-color: #212529;
    color: white;
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #adb5bd;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #343a40;
    color: white;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-icon:hover {
    background-color: #1a4b8c;
    color: white;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid #343a40;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.footer-bottom p,
.footer-links a {
    color: #6c757d;
    font-size: 14px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #1a4b8c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* 列表页特有样式 */
.category-header {
    background-color: #1a4b8c;
    padding: 30px 0;
    margin-bottom: 30px;
}

.category-title {
    color: white;
    font-size: 28px;
    margin-bottom: 10px;
}

.category-desc {
    color: rgba(255, 255, 255, 0.8);
    max-width: 800px;
}

.filter-bar {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-bar strong {
    margin-right: 10px;
}

.filter-tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f1f5f9;
    color: #666;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag:hover, .filter-tag.active {
    background-color: #1a4b8c;
    color: white;
}

.list-item {
    background-color: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.list-item-content {
    padding: 20px;
}

.list-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.list-item:hover h3 {
    color: #1a4b8c;
}

.list-item-summary {
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 8px;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover, .page-btn.active {
    background-color: #1a4b8c;
    color: white;
    border-color: #1a4b8c;
}

/* 内容页特有样式 */
.article-header {
    background-color: white;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.article-category {
    display: inline-block;
    padding: 4px 10px;
    background-color: #1a4b8c;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 20px;
    margin-bottom: 15px;
}

.article-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-body {
    background-color: white;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 16px;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h3 {
    font-size: 20px;
    margin: 30px 0 15px;
    color: #1a4b8c;
}

.quote-block {
    border-left: 4px solid #1a4b8c;
    padding: 15px 20px;
    margin: 20px 0;
    background-color: #f1f5f9;
    font-style: italic;
}

.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-tags span {
    display: inline-block;
    margin-right: 10px;
    color: #888;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f1f5f9;
    color: #666;
    border-radius: 20px;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.article-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: #e9ecef;
    color: #1a4b8c;
}

.related-news {
    margin-top: 40px;
}

.related-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a4b8c;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.related-item {
    background-color: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-item h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.related-date {
    color: #888;
    font-size: 13px;
}

/* 评论区 */
.comments-section {
    background-color: white;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.comments-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    min-height: 120px;
    margin-bottom: 15px;
    font-family: inherit;
    resize: vertical;
}

.comment-form button {
    background-color: #1a4b8c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-form button:hover {
    background-color: #0d2c54;
}

.comments-list {
    margin-top: 30px;
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
}

.comment-time {
    color: #888;
    font-size: 13px;
}

.author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 15px;
}

.author-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.author-title {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.author-bio {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .small-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .search-bar,
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .news-card-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .small-news-grid {
        grid-template-columns: 1fr;
    }
    
    .recommended-grid {
        grid-template-columns: 1fr;
    }
    
    .category-title {
        font-size: 24px;
    }
    
    .list-item h3 {
        font-size: 18px;
    }
    
    .article-header,
    .article-body,
    .comments-section {
        padding: 20px;
    }
    
    .article-title {
        font-size: 22px;
    }
    
    .article-meta {
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .breaking-news h2 {
        font-size: 22px;
    }
    
    .section-title h3 {
        font-size: 18px;
    }
    
    .news-card h4 {
        font-size: 16px;
    }
    
    .category-header {
        padding: 20px 0;
    }
    
    .filter-bar {
        padding: 10px;
    }
    
    .list-item-content {
        padding: 15px;
    }
}