/* style.css */

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background: #50a3a2;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

nav {
    background: #333;
    color: #fff;
    padding: 0.5rem 0;
}

nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
    margin: 0;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    text-decoration: underline;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
}

.article-list .article-item {
    background: #fff;
    padding: 15px; /* 内边距 */
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* 元素按块级默认方式垂直排列 */
}

/* 修改文章列表项中图片的样式 */
.article-list .article-item img {
    /* 设置图片的最大宽度 */
    max-width: 100%; /* 确保图片不会超出父容器 */
    width: 400px; /* 设置一个期望的固定宽度，可以根据实际效果调整这个值 */
    height: auto; /* 保持纵横比 */
    display: block; /* 将图片设置为块级元素，去除图片底部的小间隙 */
    margin-bottom: 15px; /* 图片下方留白 */
    border-radius: 3px; /* 轻微圆角 */
    /* 居中图片（如果图片宽度小于容器） */
    margin-left: auto;
    margin-right: auto;
}

/* 包裹文字内容的 div 不再需要 flex 样式 */
.article-item .text-content {
    /* flex-grow: 1; */
}

.article-date {
  font-size: 0.8em; /* 较小的字体 */
  color: #777;       /* 灰色 */
  margin-top: 5px;    /* 增加一点间距 */
}

.article-list .article-item h2 {
    margin-top: 0; /* 确保标题顶部没有多余空间 */
    color: #50a3a2;
    font-size: 1.5rem;
    margin-bottom: 5px; /* 标题下留白 */
}

.article-list .article-item h2 a {
    text-decoration: none;
    color: #50a3a2;
}

.article-list .article-item h2 a:hover {
    text-decoration: underline;
}

.article-list .article-item p {
    margin-bottom: 0; /* 段落最后一个不需要底部留白 */
    color: #555;
    font-size: 0.9rem; /* 摘要字体可以小一点 */
    /* 以下属性用于限制显示行数和添加省略号 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 限制显示行数，可以根据需要调整，这里设置为3行 */
    -webkit-box-orient: vertical;
}

.article-detail h1 {
    color: #50a3a2;
    margin-bottom: 20px;
    font-size: 2rem;
}

.article-detail p {
    margin-bottom: 15px;
    color: #333;
    text-indent: 2em; /* 段落缩进 */
}

.about h1, .recent-activity h1 {
    color: #50a3a2;
    margin-bottom: 20px;
}

footer {
    text-align: center;
    padding: 1rem 0;
    margin-top: 20px;
    background: #333;
    color: #fff; /* 设置 footer 内所有默认文字颜色为白色 */
    font-size: 0.9rem; /* footer 字体可以小一点 */
}

/* 为 footer 中的链接设置颜色和去除下划线 */
footer a {
    color: #fff; /* 备案号链接颜色为白色 */
    text-decoration: none; /* 去除备案号链接下划线 */
    margin: 0 10px; /* 链接之间或与文字之间留白 */
}

footer a:hover {
    text-decoration: underline; /* 鼠标悬停时显示下划线 */
}

/* 为 footer 中的段落设置样式 */
footer p {
    margin: 5px 0 0 0; /* 调整 copyright 段落的间距 */
}