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

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

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
    padding: 15px 0;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

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

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

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: #fff;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.nav-menu a.active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

/* 轮播图样式 */
.hero-section {
    margin-bottom: 40px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-slide {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.hero-content h2 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 1.2em;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* 新闻卡片样式 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

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

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

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

.news-card-content {
    padding: 20px;
}

.news-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.news-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6; /* 限制行数为6 */
    overflow: hidden;
}

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

.news-category {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

/* 新闻详情页样式 */
.news-detail {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.news-detail-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.news-detail h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-detail-meta {
    color: #666;
    font-size: 16px;
}

.news-detail-image {
    width: 100%;
    max-width: 800px;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin: 30px auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.news-detail-content {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
}

.news-detail-content p {
    margin-bottom: 20px;
    text-indent: 4ch;
    line-height: 2.5;
}

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

/* 新闻列表页样式 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-list-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
}

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

.news-list-image {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

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

.news-list-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.news-list-content p {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5; /* 限制行数为5 */
    overflow: hidden;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

.footer p {
    font-size: 14px;
    color: #ccc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        gap: 15px;
    }

    .hero-content h2 {
        font-size: 2em;
    }

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

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

    .news-list-image {
        width: 100%;
        height: 200px;
    }

    .news-detail {
        padding: 20px;
    }

    .news-detail h1 {
        font-size: 1.8em;
    }

    .main-content {
        padding: 10px;
    }
}

/* 页面标题样式 */
.page-title {
    text-align: center;
    font-size: 2.5em;
    color: #333;
    margin-bottom: 40px;
    position: relative;
}

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

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 分页样式 */
.pagination-section {
    margin: 50px 0;
    text-align: center;
}

.pagination-container {
    display: inline-block;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 20px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 60px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    color: #666;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 45px;
    text-align: center;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.pagination a:hover {
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.pagination .current,
.pagination .active,
.pagination span.current {
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
    color: white;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    position: relative;
}

.pagination .current::before,
.pagination .active::before,
.pagination span.current::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.pagination .disabled {
    color: #ccc;
    background: #f0f0f0;
    border-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination .disabled:hover {
    transform: none;
    box-shadow: none;
    background: #f0f0f0;
    color: #ccc;
}

.pagination a[rel="prev"],
.pagination a[rel="next"] {
    font-weight: 600;
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
    color: white;
    border-color: transparent;
}

.pagination a[rel="prev"]:hover,
.pagination a[rel="next"]:hover {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.pagination-info {
    color: #666;
    font-size: 14px;
    margin: 15px 0 0 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

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

