/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #2c7be5;
    transition: color 0.3s;
}

a:hover {
    color: #1c65d9;
}

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

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

/* 顶部导航 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
}

.logo a {
    color: #2c7be5;
}

.logo span {
    color: #ff6b35;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 30px;
}

nav a {
    color: #555;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

nav a:hover {
    color: #2c7be5;
}

nav a.active {
    color: #2c7be5;
}

nav a.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #2c7be5;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

/* 特色内容/轮播图 */
.featured-section {
    background-color: #f0f4f8;
    padding: 40px 0;
}

.featured-slider {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.featured-item {
    display: none;
}

.featured-item.active {
    display: block;
}

.featured-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 40px;
}

.featured-category {
    display: inline-block;
    background-color: #ff6b35;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.featured-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.featured-content h2 a {
    color: white;
}

.featured-content h2 a:hover {
    color: #ffd166;
}

.featured-content p {
    font-size: 16px;
    opacity: 0.9;
}

/* 面包屑导航 */
.breadcrumb {
    margin: 20px auto;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #2c7be5;
}

/* 主要内容区域 */
main {
    padding: 40px 0;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    color: #333;
}

.content-with-sidebar {
    display: flex;
    gap: 40px;
}

.main-content {
    flex: 1;
}

.sidebar {
    width: 300px;
}

/* 栏目头部 */
.category-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header .section-title {
    margin-bottom: 0;
    border-bottom: none;
    font-size: 24px;
}

.view-all {
    color: #2c7be5;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.article-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.article-content {
    padding: 20px;
}

.article-category {
    display: inline-block;
    background-color: #eef4ff;
    color: #2c7be5;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.article-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-title a {
    color: #333;
}

.article-title a:hover {
    color: #2c7be5;
}

.article-excerpt {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 13px;
}

/* 侧边栏 */
.sidebar-widget {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.trending-list, .category-list {
    list-style: none;
}

.trending-item, .category-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.trending-item:last-child, .category-item:last-child {
    border-bottom: none;
}

.trending-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #f0f0f0;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 10px;
    font-size: 12px;
}

.trending-number.top {
    background-color: #ff6b35;
    color: white;
}

/* 广告位 */
.ad-widget {
    text-align: center;
    background-color: #f8f9fa;
    border: 2px dashed #ddd;
}

.ad-content {
    padding: 20px 0;
}

.ad-content p {
    margin-bottom: 10px;
    color: #666;
}

/* 订阅表单 */
#subscribe-form input, #subscribe-form-sidebar input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

#subscribe-form button, #subscribe-form-sidebar button {
    width: 100%;
    padding: 12px;
    background-color: #2c7be5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

#subscribe-form button:hover, #subscribe-form-sidebar button:hover {
    background-color: #1c65d9;
}


/* 文章列表页样式 */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
	margin-bottom: 20px;
}

.list-article {
    display: flex;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.list-article-image {
    width: 250px;
    overflow: hidden;
    flex-shrink: 0;
}

.list-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.list-article:hover .list-article-image img {
    transform: scale(1.05);
}

.list-article-content {
    padding: 25px;
    flex: 1;
}

/* 文章详情页样式 */
.article-detail {
    background-color: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 50px;
}

.article-header {
    margin-bottom: 30px;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: #888;
    font-size: 14px;
}

.article-header h1 {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 15px;
    color: #333;
}

.article-header .article-excerpt {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

.article-featured-image {
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.image-caption {
    text-align: center;
    font-size: 14px;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

/* 文章内容样式 - 统一内容样式，便于动态加载 */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    font-size: 24px;
    margin: 15px 0 15px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.article-content h3 {
    font-size: 20px;
    margin: 25px 0 12px;
    color: #333;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul, .article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content strong {
    font-weight: 600;
    color: #333;
}

blockquote {
    border-left: 4px solid #2c7be5;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.article-image {
    margin: 30px 10px 0;
}

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

.read-time {
    background-color: #f0f4f8;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 13px;
}

/* 文章导航 */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.prev-article, .next-article {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-weight: 500;
}

.prev-article:hover, .next-article:hover {
    color: #2c7be5;
}

/* 相关文章 */
.related-articles {
    margin-bottom: 50px;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 30px;
}

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

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bdc3c7;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links i {
    width: 20px;
    margin-right: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #34495e;
    color: white;
    font-size: 18px;
}

.social-links a:hover {
    background-color: #2c7be5;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
    font-size: 14px;
}


/* 推荐文章区域 */
.recommended-articles {
    margin: 4rem 0;
    padding-top: 3rem;
    border-top: 2px solid #e5e7eb;
}

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

.recommended-column {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.recommended-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.recommended-list {
    list-style: none;
}

.recommended-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.recommended-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recommended-list a {
    display: block;
    color: #374151;
    font-size: 1rem;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.recommended-list a:hover {
    color: #2563eb;
}
