/* 基础样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f9f9f9;
}

a {
text-decoration: none;
color: #019858;
transition: all 0.3s ease;
}

a:hover {
color: #016e3f;
}

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

section {
margin: 40px 0;
padding: 30px;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

h2 {
color: #019858;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #eaeaea;
}

/* 导航样式 - 修改悬停特效 */
nav {
background-color: #019858;
padding: 15px 0;
position: sticky;
top: 0;
z-index: 1000;
}

.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
}

.logo {
color: white;
font-size: 1.5rem;
font-weight: bold;
}

.logo a {
color: white;
}

.nav-menu {
display: flex;
list-style: none;
}

.nav-menu li {
margin-left: 25px;
position: relative;
}

.nav-menu a {
color: white;
font-weight: 500;
padding: 5px 0;
position: relative;
}

/* 新的导航悬停特效 */
.nav-menu a::after {
content: '';
position: absolute;
width: 0;
height: 3px;
bottom: 0;
left: 0;
background-color: white;
transition: width 0.3s ease;
border-radius: 3px;
}

.nav-menu a:hover::after {
width: 100%;
}

.menu-toggle {
display: none;
color: white;
font-size: 1.5rem;
cursor: pointer;
}

/* 最新文章列表样式 */
.latest-articles {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 30px;
}

.article-card {
padding: 20px;
border-radius: 8px;
background: #fff;
transition: transform 0.3s ease, box-shadow 0.3s ease;
overflow: hidden;
}

.article-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(1, 152, 88, 0.1);
}

.article-title {
font-size: 1.2rem;
margin-bottom: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.article-meta {
color: #777;
font-size: 0.9rem;
margin-bottom: 10px;
}

.article-meta::before {
content: "📅 ";
}

.article-desc {
color: #555;
line-height: 1.6;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}

/* 推荐文章图片列表样式 */
.featured-articles {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
}

.featured-card {
height: 250px;
border-radius: 8px;
overflow: hidden;
position: relative;
background-size: cover;
background-position: center;
transition: transform 0.3s ease;
}

.featured-card:hover {
transform: scale(1.03);
}

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

.featured-title {
font-size: 1.1rem;
margin-bottom: 8px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.featured-desc {
font-size: 0.9rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

/* 热门文章列表样式 */
.popular-articles {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 30px;
}

.popular-card {
padding: 20px;
border-radius: 8px;
background: #fff;
transition: transform 0.3s ease, box-shadow 0.3s ease;
overflow: hidden;
}

.popular-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(1, 152, 88, 0.1);
}

.popular-title {
font-size: 1.2rem;
margin-bottom: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.popular-meta {
display: flex;
justify-content: space-between;
color: #777;
font-size: 0.9rem;
margin-bottom: 10px;
}

.popular-date::before {
content: "📅 ";
}

.popular-views::before {
content: "👀 ";
}

.popular-desc {
color: #555;
line-height: 1.6;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}

/* 文字介绍样式 */
.intro-content {
line-height: 1.8;
color: #555;
}

/* 友情链接样式 */
.friend-links {
display: flex;
flex-wrap: wrap;
gap: 15px;
}

.friend-links a {
padding: 8px 15px;
background: #f0f9f5;
border-radius: 4px;
font-size: 0.9rem;
white-space: nowrap;
transition: background 0.3s ease;
}

.friend-links a:hover {
background: #e0f3eb;
}

/* 页脚样式 */
footer {
background-color: #019858;
color: white;
text-align: center;
padding: 20px 0;
margin-top: 40px;
}

footer a {
color: white;
}

/* 响应式设计 */
@media (max-width: 1024px) {
.nav-menu {
display: none;
flex-direction: column;
width: 100%;
position: absolute;
top: 100%;
left: 0;
background-color: #019858;
padding: 15px;
}

.nav-menu.active {
display: flex;
}

.nav-menu li {
margin: 10px 0;
}

.menu-toggle {
display: block;
}

.latest-articles,
.popular-articles {
grid-template-columns: 1fr;
}

.featured-articles {
grid-template-columns: repeat(2, 1fr);
}

.intro-content,
.friend-links-section,
.copyright {
display: none;
}
}

@media (max-width: 768px) {
/* 修改推荐文章布局 - 屏幕宽度大于500px时每行2篇 */
.featured-articles {
grid-template-columns: repeat(2, 1fr);
}

.popular-meta {
flex-direction: column;
}

.popular-views {
margin-top: 5px;
}
}

/* 新增媒体查询 - 屏幕宽度小于500px时每行1篇 */
@media (max-width: 500px) {
.featured-articles {
grid-template-columns: 1fr;
}
}