/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #81C784;
    --accent-color: #66BB6A;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.logo .tagline {
    font-size: 14px;
    opacity: 0.9;
}

.header-contact {
    display: flex;
    gap: 30px;
    font-size: 14px;
}

.main-nav {
    background: rgba(0, 0, 0, 0.1);
}

.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
}

.main-nav a {
    display: block;
    padding: 16px 30px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* 页面标题区 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.breadcrumb {
    font-size: 14px;
    opacity: 0.9;
}

/* 新闻列表页面 */
.news-page {
    padding-bottom: 60px;
}

.news-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* 新闻卡片 */
.news-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr;
}

.news-card.featured {
    grid-template-columns: 400px 1fr;
}

.news-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.news-image {
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card.featured .news-image img {
    height: 100%;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 25px;
}

.news-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 15px;
}

.news-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-dark);
    line-height: 1.4;
}

.news-card.featured .news-content h3 {
    font-size: 24px;
}

.news-excerpt {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-light);
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--primary-dark);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 侧边栏 */
.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-box button {
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* 分类列表 */
.category-list {
    list-style: none;
}

.category-list li {
    border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.category-list span {
    color: var(--text-light);
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* 热门新闻 */
.popular-list {
    list-style: none;
}

.popular-list li {
    margin-bottom: 15px;
}

.popular-list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.popular-list a:hover {
    color: var(--primary-color);
}

.popular-list .rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

/* 订阅表单 */
.subscribe-widget p {
    color: var(--text-gray);
    margin-bottom: 15px;
    font-size: 14px;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subscribe-form input {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s ease;
}

.subscribe-form input:focus {
    border-color: var(--primary-color);
}

.subscribe-form button {
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.subscribe-form button:hover {
    background: var(--primary-dark);
}

/* 新闻详情页面 */
.news-detail-page {
    padding-bottom: 60px;
}

.news-article {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.article-header {
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
    font-size: 32px;
    margin: 20px 0;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-gray);
}

.article-cover {
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 40px;
    font-size: 16px;
    line-height: 1.8;
}

.article-content .lead {
    font-size: 20px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.article-content h2 {
    font-size: 26px;
    margin: 40px 0 20px;
    color: var(--text-dark);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.article-content p {
    margin-bottom: 20px;
    text-indent: 2em;
}

.article-content ul {
    margin: 20px 0;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content li strong {
    color: var(--primary-dark);
}

.article-content blockquote {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.article-content blockquote cite {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-gray);
    font-style: normal;
}

/* 文章底部 */
.article-footer {
    padding: 30px 40px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.article-tags strong,
.article-share strong {
    color: var(--text-dark);
    margin-right: 10px;
}

.article-tags a,
.article-share a {
    display: inline-block;
    padding: 6px 15px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.article-tags a:hover,
.article-share a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 相关推荐 */
.related-news {
    padding: 40px;
    border-bottom: 1px solid var(--border-color);
}

.related-news h3 {
    font-size: 22px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.related-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.related-item {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-item:hover {
    transform: translateY(-5px);
}

.related-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
}

.related-info h4 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-item:hover .related-info h4 {
    color: var(--primary-color);
}

.related-info .date {
    font-size: 13px;
    color: var(--text-light);
}

/* 上一篇/下一篇 */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
}

.article-navigation a {
    display: block;
    padding: 30px 40px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-navigation a:hover {
    background: var(--bg-light);
}

.prev-article {
    text-align: left;
    border-right: 1px solid var(--border-color);
}

.next-article {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.article-navigation h4 {
    font-size: 16px;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

.article-navigation a:hover h4 {
    color: var(--primary-color);
}

/* 底部 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .news-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .related-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-contact {
        flex-direction: column;
        gap: 8px;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav a {
        padding: 12px 20px;
    }

    .page-header h2 {
        font-size: 28px;
    }

    .news-card.featured {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 24px;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .article-cover {
        height: 300px;
    }

    .article-content {
        padding: 20px;
    }

    .article-content h2 {
        font-size: 22px;
    }

    .article-footer {
        flex-direction: column;
        text-align: center;
    }

    .related-list {
        grid-template-columns: 1fr;
    }

    .article-navigation {
        grid-template-columns: 1fr;
    }

    .next-article {
        border-top: 1px solid var(--border-color);
        border-right: none;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 24px;
    }

    .page-header {
        padding: 40px 20px;
    }

    .page-header h2 {
        font-size: 22px;
    }

    .news-content {
        padding: 15px;
    }

    .news-content h3 {
        font-size: 16px;
    }

    .article-header {
        padding: 20px;
    }

    .article-header h1 {
        font-size: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
