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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

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

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #007bff, #0056b3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #004085;
}

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

.nav-brand img {
    height: 60px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.btn-outline {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

/* 轮播图样式 */
.hero-slider {
    margin-top: 20px;
    position: relative;
    height: 500px;
    overflow: hidden;
    margin-bottom: 3rem;
}

.slider-container {
    margin: auto;
    position: relative;
    width: 1200px;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 1200px;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.slide.active {
    opacity: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 2rem;
    z-index: 2;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 轮播导航点 */
.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-dot.active,
.nav-dot:hover {
    background: white;
    transform: scale(1.2);
}

/* 热门资讯区域 */
.featured-news {
    padding: 3rem 0;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 2px;
}

/* 新闻网格布局 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.4;
}

.news-content h3:hover {
    color: #007bff;
}

.news-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6; /* 限制行数为6 */
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.date {
    color: #999;
}

.category {
    color: #007bff;
    font-weight: 500;
}

.read-more {
    color: #007bff;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #0056b3;
}

.view-more {
    text-align: center;
    margin-top: 2rem;
}

/* 页脚样式 */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    margin: 0;
    opacity: 0.8;
}

/* 资讯列表页样式 */
.news-list-page {
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
}

/* 分类筛选标签 */
.filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
    transform: translateY(-2px);
}

/* 资讯列表样式 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-item img {
    margin: 20px;
    width: 380px;
    height: 250px;
    object-fit: cover;
    flex-shrink: 0;
}

.news-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-info h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.4;
}

.news-info h3 a:hover {
    color: #007bff;
}

.news-info p {
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.6;
}

.news-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    background: #e3f2fd;
    color: #007bff;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-btn {
    padding: 0.7rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

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

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

.page-dots {
    color: #999;
    padding: 0 0.5rem;
}

/* 资讯详情页样式 */
.news-detail-page {
    padding: 2rem 0;
}

/* 面包屑导航 */
.breadcrumb {
    margin-bottom: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #007bff;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.5rem;
    color: #ccc;
}

/* 文章样式 */
.article {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    border: 1px solid #e9ecef;
}

.article-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 2rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.article-meta .category {
    color: #007bff;
    font-weight: 500;
}

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

.article-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

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

.article-image img {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.image-caption {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

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

.article-content .lead {
    font-size: 1.3rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 4px solid #007bff;
    background: #f8f9fa;
    padding: 1rem 1rem 1rem 2rem;
    border-radius: 0 8px 8px 0;
}

.article-content h2 {
    font-size: 1.6rem;
    color: #333;
    margin: 2.5rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
}

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

.article-content p img{
    display: block;
    margin: auto;
}

/* 文章页脚 */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.share-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* 相关文章 */
.related-articles {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.related-articles h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.related-grid {
    display: grid;
    gap: 1.5rem;
}

.related-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.related-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.related-item img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-item p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5; /* 限制行数为4 */
    overflow: hidden;
}

.related-content {
    flex: 1;
}

.related-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.related-item h4 a:hover {
    color: #007bff;
}

.related-date {
    color: #999;
    font-size: 0.85rem;
}

.back-to-list {
    text-align: center;
    margin: 2rem 0;
}

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

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

    .nav-menu {
        gap: 1rem;
    }

    .slide-content h2 {
        font-size: 1.8rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .news-item {
        flex-direction: column;
    }

    .news-item img {
        width: 100%;
        height: 200px;
    }

    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .article {
        padding: 1.5rem;
    }

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

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

    .related-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .page-numbers {
        gap: 0.3rem;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 300px;
    }

    .slide-content {
        padding: 1rem;
    }

    .slide-content h2 {
        font-size: 1.5rem;
    }

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

    .page-header h1 {
        font-size: 2rem;
    }

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

    .article-content .lead {
        font-size: 1.1rem;
    }

    .related-item {
        flex-direction: column;
        text-align: center;
    }

    .related-item img {
        width: 100%;
        height: 120px;
    }
}

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

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}
