/* 基础样式与变量定义 */
:root {
--dark-green: #1e3c32;
--medium-green: #2d4f43;
--light-green: #3c6154;
--accent-green: #4a7c65;
--text-light: #f1f8f5;
--text-gray: #c8d5d1;
--shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
--transition: all 0.3s ease;
--gray-bg: #f5f5f5;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

a {
text-decoration: none;
color: inherit;
}

/* 通用容器 */
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}

/* 导航栏样式 */
header {
background-color: var(--dark-green);
color: var(--text-light);
position: sticky;
top: 0;
z-index: 1000;
box-shadow: var(--shadow);
}

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

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

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

.nav-item {
margin-left: 30px;
}

.nav-link {
position: relative;
padding: 5px 0;
transition: var(--transition);
}

.nav-link::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background-color: var(--text-light);
transition: var(--transition);
}

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

.hamburger {
display: none;
cursor: pointer;
background: none;
border: none;
color: var(--text-light);
font-size: 1.5rem;
}

/* 面包屑导航 */
.breadcrumb {
padding: 20px 0;
font-size: 0.9rem;
color: var(--medium-green);
}

.breadcrumb a {
color: var(--accent-green);
transition: var(--transition);
}

.breadcrumb a:hover {
color: var(--dark-green);
text-decoration: underline;
}

.breadcrumb span {
margin: 0 8px;
color: var(--text-gray);
}

/* 主内容区布局 */
.main-content {
display: grid;
grid-template-columns: 3fr 1fr;
gap: 30px;
margin: 20px 0 40px;
}

/* 文章详情样式 */
.article-detail {
background: white;
border-radius: 8px;
box-shadow: var(--shadow);
padding: 30px;
}

/* 文章头部 */
.article-header {
display: flex;
margin-bottom: 25px;
align-items: flex-start;
}

.article-thumb {
width: 100px;
height: 100px;
border-radius: 6px;
overflow: hidden;
margin-right: 20px;
flex-shrink: 0;
}

.article-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}

.article-title-info {
flex: 1;
}

.article-title {
font-size: 1.8rem;
margin-bottom: 15px;
color: var(--dark-green);
line-height: 1.3;
}

.article-meta {
display: flex;
color: #777;
font-size: 0.9rem;
flex-wrap: wrap;
}

.meta-item {
margin-right: 20px;
display: flex;
align-items: center;
}

.author::before {
content: "👤";
margin-right: 5px;
}

.date::before {
content: "📅";
margin-right: 5px;
}

.views::before {
content: "👀";
margin-right: 5px;
}

/* 文章导读 */
.article-guide {
background-color: var(--gray-bg);
padding: 20px;
border-radius: 6px;
margin-bottom: 25px;
border-left: 4px solid var(--accent-green);
}

.guide-title {
font-size: 1.1rem;
margin-bottom: 10px;
color: var(--dark-green);
}

.guide-content {
color: #555;
line-height: 1.6;
}

/* 文章内容 */
.article-content {
margin-bottom: 30px;
}

.article-content p {
margin-bottom: 20px;
line-height: 1.8;
color: #444;
}

.article-content h2 {
font-size: 1.5rem;
margin: 30px 0 15px;
color: var(--dark-green);
padding-bottom: 8px;
border-bottom: 1px solid #eee;
}

.article-content h3 {
font-size: 1.2rem;
margin: 25px 0 12px;
color: var(--medium-green);
}

.article-content img {
display: block;
max-width: 100%;
height: auto;
margin: 0 auto;
}

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

.nav-previous, .nav-next {
flex: 1;
padding: 15px;
border-radius: 6px;
transition: var(--transition);
}

.nav-previous {
margin-right: 15px;
text-align: left;
}

.nav-next {
margin-left: 15px;
text-align: right;
}

.nav-previous:hover, .nav-next:hover {
background-color: var(--gray-bg);
}

.nav-label {
font-size: 0.9rem;
color: #777;
margin-bottom: 8px;
}

.nav-title {
font-weight: 500;
color: var(--accent-green);
}

/* 侧边栏样式 */
.sidebar {
display: flex;
flex-direction: column;
gap: 30px;
}

.sidebar-widget {
background: white;
border-radius: 8px;
box-shadow: var(--shadow);
padding: 20px;
}

.sidebar-widget h3 {
color: var(--dark-green);
margin-bottom: 15px;
font-size: 1.3rem;
position: relative;
padding-bottom: 10px;
}

.sidebar-widget h3::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 40px;
height: 2px;
background-color: var(--accent-green);
}

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

.sidebar-item {
padding: 10px 0;
border-bottom: 1px solid #f0f0f0;
}

.sidebar-item:last-child {
border-bottom: none;
}

.sidebar-item a {
transition: var(--transition);
display: block;
}

.sidebar-item a:hover {
color: var(--accent-green);
padding-left: 5px;
}

/* 页脚样式 */
footer {
background-color: var(--dark-green);
color: var(--text-light);
text-align: center;
padding: 20px 0;
margin-top: 40px;
}

/* 响应式设计 */
@media screen and (max-width: 1024px) {
/* 平板样式 */
.nav-menu {
position: fixed;
left: -100%;
top: 70px;
flex-direction: column;
background-color: var(--dark-green);
width: 100%;
text-align: center;
transition: 0.3s;
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
padding: 20px 0;
}

.nav-menu.active {
left: 0;
}

.nav-item {
margin: 15px 0;
}

.hamburger {
display: block;
}

.main-content {
grid-template-columns: 1fr;
gap: 20px;
}

.copyright{
display: none;
}
}

@media screen and (max-width: 768px) {
/* 平板和小屏手机样式 */
.article-header {
flex-direction: column;
}

.article-thumb {
width: 100%;
height: 200px;
margin-right: 0;
margin-bottom: 20px;
}

.article-title {
font-size: 1.5rem;
}

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

.meta-item {
margin-bottom: 8px;
}

.article-navigation {
flex-direction: column;
}

.nav-previous, .nav-next {
margin: 0 0 15px;
text-align: left;
}

.nav-next {
margin-bottom: 0;
}
}

@media screen and (max-width: 500px) {
/* 手机样式 */
.article-thumb {
height: 160px;
}

.article-title {
font-size: 1.3rem;
}

.article-detail {
padding: 20px;
}
}