/* 全局样式 */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航栏 */
.sidebar {
    width: 200px;
    background-color: #2c2c2c;
    color: #fff;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    border-radius: 0 20px 20px 0;
    transition: background-color 0.3s ease;
}

.sidebar:hover {
    background-color: #333;
}

.sidebar .logo h1 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    text-align: center;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
}

.sidebar nav ul li {
    margin-bottom: 10px;
}

.sidebar nav ul li a {
    color: #999;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    padding: 8px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

.sidebar nav ul li a i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.sidebar nav ul li a.active,
.sidebar nav ul li a:hover {
    color: #ff6347;
    transform: translateX(5px);
}

.sidebar .categories {
    margin-top: 20px;
    border-top: 1px solid #444;
    padding-top: 15px;
}

.sidebar .categories h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #ccc;
}

.sidebar .categories ul {
    list-style: none;
    padding: 0;
}

.sidebar .categories ul li {
    margin-bottom: 10px;
}

.sidebar .categories ul li a {
    color: #999;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.sidebar .categories ul li a:hover {
    color: #ff6347;
}

/* 右侧内容区域 */
.content {
    flex: 1;
    padding: 30px;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.content:hover {
    transform: translateY(-5px);
}

/* Hero 区域 */
.hero {
    background: url('images/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    padding: 120px 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 40px;
    background-attachment: fixed;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 文章列表样式 */
.blog-posts {
    margin: 20px 0;
}

.post {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.post:hover {
    transform: translateY(-5px);
}

.post-image {
    flex: 1;
    margin-right: 20px;
    border-radius: 15px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post:hover .post-image img {
    transform: scale(1.1);
}

.post-content {
    flex: 3;
}

.post h2 {
    margin-top: 0;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.post h2 a {
    color: #333;
    transition: color 0.3s ease;
}

.post h2 a:hover {
    color: #ff6347;
}

.post .meta {
    color: #777;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.post .read-more {
    color: #ff6347;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.post .read-more:hover {
    color: #ff4500;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
    border-radius: 20px 20px 0 0;
    transition: background-color 0.3s ease;
}

footer:hover {
    background-color: #2c2c2c;
}

footer p {
    font-size: 0.9rem;
    margin: 0;
}

footer .social-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px; /* 使用 gap 替代 margin，使图标间距更均匀 */
}

footer .social-links a {
    color: #999;
    font-size: 1.3rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

footer .social-links a:hover {
    color: #ff6347;
    transform: translateY(-3px);
}