/* 通用重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

a {
    margin: auto;
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #007bff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 导航栏样式 */
.navbar {
    background: #499cd9;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand img {
    height: 60px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #fff;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #007bff;
    color: #fff;
}

/* 按钮样式 */
.btn-primary {
    background: #007bff;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background: #0056b3;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background: #545b62;
    color: #fff;
}



/* 区块标题 */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
}

/* 热门资讯网格 */
.featured-news {
    padding: 80px 0;
    background: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card.featured {
    grid-row: 1 / -1;
}

.news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.news-image {
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card.featured .news-image img {
    height: 300px;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
}

.news-category {
    background: #007bff;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-card.featured .news-content h3 {
    font-size: 1.5rem;
}

.news-content p {
    color: #666;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.news-date {
    color: #888;
}

.news-views {
    color: #007bff;
}

/* 最新资讯列表 */
.latest-news {
    padding: 80px 0;
    background: #f8f9fa;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.news-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-2px);
}

.news-thumbnail {
    flex-shrink: 0;
}

.news-thumbnail img {
    object-fit: cover;
    border-radius: 8px;
}

.news-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-info p {
    color: #666;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-center {
    text-align: center;
}



/* 资讯列表页网格 */
.news-list-section {
    padding: 3rem 0;
}

.news-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 分页 */
.pagination {
    margin: auto;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

/* 面包屑导航 */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb-nav {
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb-nav a {
    color: #007bff;
}

.breadcrumb-nav span {
    margin: 0 0.5rem;
}

.breadcrumb-nav .current {
    color: #666;
}

/* 文章详情页 */
.article-detail {
    padding: 3rem 0;
}

.article-detail .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.article-main {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.article-header {
    margin-bottom: 2rem;
}

.article-category {
    background: #007bff;
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

.article-title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #333;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}



.article-image {
    margin: 2rem 0;
}

.article-image img {
    width: 100%;
    border-radius: 8px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    color: #333;
}

.article-content p {
    text-indent: 2ch;
    margin-bottom: 1.5rem;
    line-height: 2.5;
}

.article-content p img{
    display: block;
    text-indent: -2ch;
    margin: auto;
}

.article-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
}



/* 侧边栏 */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-image img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.related-content{
    width: 130px;
}

.related-content h4 {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.related-date {
    font-size: 0.8rem;
    color: #888;
}



.latest-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.latest-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.latest-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.latest-item h4 {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.latest-date {
    font-size: 0.8rem;
    color: #888;
}



/* 页脚 */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 3rem 0 1rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section h3 {
    font-size: 1.3rem;
}

.footer-section p {
    line-height: 1.6;
    color: #bdc3c7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }



    .news-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .news-card.featured {
        grid-row: auto;
    }

    .news-list-grid {
        grid-template-columns: 1fr;
    }



    .article-detail .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .article-tags {
        margin-left: 0;
    }





    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {

    .section-title {
        font-size: 1.5rem;
    }

    .article-main {
        padding: 1rem;
    }

    .sidebar-widget {
        padding: 1rem;
    }


}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card,
.news-item {
    animation: fadeInUp 0.6s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
