/* 响应式设计 */

/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.site-title {
    font-size: 24px;
    margin: 0;
}

.site-title a {
    text-decoration: none;
    color: #333;
}

/* 导航菜单 */
.main-navigation {
    display: flex;
    align-items: center;
}

#primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#primary-menu li {
    margin-left: 30px;
}

#primary-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

#primary-menu a:hover {
    color: #0073aa;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #333;
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #0073aa;
}

/* 主内容区 */
.site-main {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding: 40px 0;
}

.content-area {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 文章网格 */
.posts-grid {
    display: grid;
    gap: 30px;
}

.post-card {
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.post-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.post-thumbnail {
    margin-bottom: 20px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.post-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.post-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #0073aa;
}

.post-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.post-meta span {
    margin-right: 15px;
}

.post-excerpt {
    margin-bottom: 20px;
    color: #555;
}

.read-more {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s;
}

.read-more:hover {
    background: #005a87;
}

/* 分页 */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
}

.pagination .page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.pagination .page-numbers:hover {
    background: #f0f0f0;
}

/* 侧边栏 */
.sidebar {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

/* 单篇文章样式 */
.single-post {
    background: #fff;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.single-post .post-title {
    font-size: 32px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.single-post .post-meta {
    margin-bottom: 30px;
    font-size: 16px;
}

.single-post .post-content {
    font-size: 18px;
    line-height: 1.8;
}

.single-post .post-content p {
    margin-bottom: 20px;
}

.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    margin: 30px 0 20px;
    color: #333;
}

.single-post .post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

.single-post .post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.single-post .post-tags a {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 5px 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
}

.single-post .post-tags a:hover {
    background: #0073aa;
    color: #fff;
}

.share-buttons {
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.share-buttons a {
    display: inline-block;
    padding: 8px 20px;
    margin-right: 10px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s;
}

.share-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 相关文章 */
.related-posts {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.related-posts h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    transition: all 0.3s;
}

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.related-post h4 {
    font-size: 16px;
    line-height: 1.5;
}

.related-post a {
    text-decoration: none;
    color: #333;
}

.related-post a:hover {
    color: #0073aa;
}

/* 页脚 */
.site-footer {
    background: #333;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget {
    color: #ccc;
}

.footer-widget a {
    color: #ccc;
    text-decoration: none;
}

.footer-widget a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

#footer-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#footer-menu li {
    margin-right: 20px;
}

#footer-menu a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
}

#footer-menu a:hover {
    color: #fff;
}

.site-info {
    font-size: 14px;
    color: #999;
    text-align: right;
}

.site-info a {
    color: #ccc;
    text-decoration: none;
}

.site-info a:hover {
    color: #fff;
    text-decoration: underline;
}

/* 响应式设计 */

/* 平板设备 */
@media (max-width: 991px) {
    .site-main {
        grid-template-columns: 1fr;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机设备 */
@media (max-width: 767px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .site-branding {
        margin-bottom: 20px;
    }
    
    .menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 20px;
    }
    
    #primary-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 20px;
    }
    
    #primary-menu.active {
        display: flex;
    }
    
    #primary-menu li {
        margin: 10px 0;
    }
    
    .content-area,
    .sidebar,
    .single-post {
        padding: 20px;
    }
    
    .site-main {
        padding: 20px 0;
    }
    
    .post-title {
        font-size: 20px;
    }
    
    .single-post .post-title {
        font-size: 24px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    #footer-menu {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 20px;
    }
    
    #footer-menu li {
        margin: 0 10px 10px;
    }
    
    .site-info {
        text-align: center;
    }
}

/* 小手机 */
@media (max-width: 480px) {
    .post-title {
        font-size: 18px;
    }
    
    .single-post .post-title {
        font-size: 20px;
    }
    
    .single-post .post-content {
        font-size: 16px;
    }
    
    .share-buttons a {
        display: block;
        margin-bottom: 10px;
        width: 100%;
        text-align: center;
    }
}