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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

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

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

/* 头部导航栏 - 渐变黑背景 */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    height: 60px;
  }

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

.nav-link {
    color: #ccc;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 2px;
}

/* 主内容区域 */
.main {
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #007bff;
}

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

.breadcrumb span {
    margin: 0 0.5rem;
}

/* 轮播图区域 */
.hero-section {
    position: relative;
    margin: 0 auto 3rem;
    width: 1200px;
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-slider {
    position: relative;
    height: 800px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 3rem 2rem 2rem;
}

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

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* 限制行数为3 */
    line-clamp: 3; /* 标准属性 */
    overflow: hidden;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

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

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

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

/* 轮播图导航 */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
}

.hero-prev,
.hero-next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.hero-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

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

.dot.active {
    background: white;
    transform: scale(1.2);
}

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

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

/* 热门资讯网格 */
.featured-news {
    margin-bottom: 3rem;
}

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

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

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


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


.news-content {
    padding: 1.5rem;
}

.news-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #007bff;
    color: white;
    font-size: 0.8rem;
    border-radius: 15px;
    margin-bottom: 0.5rem;
}

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

.news-content h3 a {
    color: #333;
    transition: color 0.3s ease;
}

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

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

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

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


/* 资讯列表页样式 */

.news-list {
    margin-bottom: 2rem;
}

.news-item {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}


.news-image {
    position: relative;
    flex-shrink: 0;
}

.news-item .news-image {
    width: 300px;
}


.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-item .news-image img {
    margin: 10px;
    height: 200px;
}



.news-item .news-content {
    flex: 1;
}

.news-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.news-date {
    color: #999;
    font-size: 0.8rem;
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

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

.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-dots {
    color: #999;
    margin: 0 0.5rem;
}

/* 文章详情页样式 */
.article {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

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

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

.article-category {
    background: #007bff;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

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

.article-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.article-stats > span {
    color: #666;
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn,
.like-btn,
.collect-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;
}

.like-btn:hover {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

.collect-btn:hover {
    background: #ffa502;
    color: white;
    border-color: #ffa502;
}

.article-content {
    padding: 2rem;
}

.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);
}

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

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-body h2 {
    margin: 2rem 0 1rem;
    color: #333;
    font-size: 1.5rem;
    border-left: 4px solid #007bff;
    padding-left: 1rem;
}

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

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

.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.8rem;
}

.article-quote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 5px;
}

.article-quote blockquote {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-quote cite {
    display: block;
    text-align: right;
    font-weight: bold;
    color: #666;
}

.article-conclusion {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.article-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.tag-label {
    color: #666;
    margin-right: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #e9ecef;
    color: #666;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #007bff;
    color: white;
}

/* 相关推荐 */
.related-articles {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.related-articles h3 {
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

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

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

.related-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.related-content {
    flex: 1;
}

.related-content h1 {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.related-content h1 a {
    color: #333;
    transition: color 0.3s ease;
}

.related-content h1 a:hover {
    color: #007bff;
}

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

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


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

.footer p {
    margin: 0;
    font-size: 0.9rem;
}

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

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

    .nav-menu {
        gap: 1rem;
    }

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

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


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

    .news-item .news-image {
        width: 100%;
    }

    .news-item .news-image img {
        height: 200px;
    }


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

    .article-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

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

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

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


    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }

    .nav-menu {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .hero-slider {
        height: 300px;
    }

    .hero-content {
        padding: 2rem 1rem 1rem;
    }

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

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

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


    .article-header,
    .article-content {
        padding: 1.5rem;
    }

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

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

}

/* 动画效果 */
@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: #888;
    border-radius: 4px;
}

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