/* ==================== 基础重置 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.8;
    color: #3a3a3a;
    background: #f9f6f0;
}
a { text-decoration: none; color: #6b8e23; transition: color 0.3s; }
a:hover { color: #4a6e16; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ==================== 顶部栏 ==================== */
.top-bar {
    background: #5a7a2a;
    color: #fff;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    letter-spacing: 1px;
}
.top-bar span { margin: 0 15px; }
.top-bar a { color: #fff; text-decoration: underline; }

/* ==================== 头部 ==================== */
.header {
    background: linear-gradient(135deg, #f5f0e1 0%, #e8dcc8 100%);
    padding: 25px 0;
    text-align: center;
    border-bottom: 3px solid #8b6914;
}
.header h1 {
    font-size: 32px;
    color: #4a3520;
    margin-bottom: 8px;
    letter-spacing: 3px;
}
.header .subtitle {
    font-size: 14px;
    color: #8b7355;
    letter-spacing: 2px;
}

/* ==================== 导航栏 ==================== */
.nav {
    background: linear-gradient(to right, #5a7a2a, #7a9a3a, #5a7a2a);
    padding: 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav ul { display: flex; justify-content: center; flex-wrap: wrap; }
.nav ul li { position: relative; }
.nav ul li a {
    display: block;
    color: #fff;
    padding: 14px 22px;
    font-size: 15px;
    letter-spacing: 1px;
    transition: background 0.3s;
}
.nav ul li a:hover,
.nav ul li a.active {
    background: rgba(0,0,0,0.2);
}

/* ==================== 主体容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==================== 横幅区域 ==================== */
.banner {
    width: 100%;
    height: 360px;
    background: linear-gradient(135deg, #8b6914 0%, #c9a96e 40%, #8b6914 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}
.banner::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.banner h2 {
    font-size: 38px;
    letter-spacing: 5px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}
.banner p {
    font-size: 16px;
    margin-top: 15px;
    position: relative;
    z-index: 1;
    opacity: 0.9;
}

/* ==================== 栏目区块 ==================== */
.section-title {
    text-align: center;
    margin-bottom: 30px;
}
.section-title h2 {
    font-size: 26px;
    color: #4a3520;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}
.section-title h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #8b6914;
}
.section-title p {
    color: #8b7355;
    margin-top: 10px;
    font-size: 14px;
}

/* ==================== 栏目卡片列表 ==================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.category-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.category-card .card-img {
    width: 100%;
    height: 200px;
    display: block;
}
.category-card .card-img.img1 { background: linear-gradient(135deg, #a8c07a, #6b8e23); }
.category-card .card-img.img2 { background: linear-gradient(135deg, #c9a96e, #8b6914); }
.category-card .card-img.img3 { background: linear-gradient(135deg, #b8a088, #7a6248); }
.category-card .card-img.img4 { background: linear-gradient(135deg, #88b0a0, #4a7a5a); }
.category-card .card-img.img5 { background: linear-gradient(135deg, #c8a8c8, #8a6a8a); }
.category-card .card-body {
    padding: 20px;
}
.category-card .card-body h3 {
    font-size: 18px;
    color: #4a3520;
    margin-bottom: 10px;
}
.category-card .card-body h3 a { color: #4a3520; }
.category-card .card-body h3 a:hover { color: #8b6914; }
.category-card .card-body p {
    font-size: 14px;
    color: #777;
    line-height: 1.7;
}
.category-card .card-body .meta {
    margin-top: 12px;
    font-size: 12px;
    color: #aaa;
}

/* ==================== 文章列表页 ==================== */
.article-list { margin-bottom: 40px; }
.article-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}
.article-item:hover { transform: translateY(-3px); }
.article-item .item-img {
    width: 260px;
    min-height: 180px;
    flex-shrink: 0;
}
.article-item .item-img.img1 { background: linear-gradient(135deg, #a8c07a, #6b8e23); }
.article-item .item-img.img2 { background: linear-gradient(135deg, #c9a96e, #8b6914); }
.article-item .item-img.img3 { background: linear-gradient(135deg, #b8a088, #7a6248); }
.article-item .item-img.img4 { background: linear-gradient(135deg, #88b0a0, #4a7a5a); }
.article-item .item-img.img5 { background: linear-gradient(135deg, #c8a8c8, #8a6a8a); }
.article-item .item-body {
    padding: 20px;
    flex: 1;
}
.article-item .item-body h3 {
    font-size: 18px;
    color: #4a3520;
    margin-bottom: 8px;
}
.article-item .item-body h3 a { color: #4a3520; }
.article-item .item-body h3 a:hover { color: #8b6914; }
.article-item .item-body .excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-item .item-body .meta {
    margin-top: 10px;
    font-size: 12px;
    color: #aaa;
}

/* ==================== 文章详情页 ==================== */
.article-detail {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    margin-bottom: 30px;
}
.article-detail h1 {
    font-size: 28px;
    color: #4a3520;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.4;
}
.article-detail .article-meta {
    text-align: center;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.article-detail .article-meta span { margin: 0 10px; }
.article-detail .article-cover {
    width: 100%;
    height: 360px;
    border-radius: 8px;
    margin-bottom: 25px;
}
.article-detail .article-cover.img1 { background: linear-gradient(135deg, #a8c07a, #6b8e23); }
.article-detail .article-cover.img2 { background: linear-gradient(135deg, #c9a96e, #8b6914); }
.article-detail .article-cover.img3 { background: linear-gradient(135deg, #b8a088, #7a6248); }
.article-detail .article-cover.img4 { background: linear-gradient(135deg, #88b0a0, #4a7a5a); }
.article-detail .article-cover.img5 { background: linear-gradient(135deg, #c8a8c8, #8a6a8a); }
.article-detail .article-content {
    font-size: 16px;
    line-height: 2;
    color: #444;
    text-align: justify;
}
.article-detail .article-content p {
    text-indent: 2em;
    margin-bottom: 16px;
}
.article-detail .article-content h2 {
    font-size: 22px;
    color: #4a3520;
    margin: 30px 0 15px;
    padding-left: 12px;
    border-left: 4px solid #8b6914;
}
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.article-nav a {
    padding: 10px 20px;
    background: #f5f0e1;
    border-radius: 5px;
    font-size: 14px;
}

/* ==================== 关于我们 ==================== */
.about-section {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    margin-bottom: 30px;
}
.about-section h1 {
    font-size: 28px;
    color: #4a3520;
    text-align: center;
    margin-bottom: 25px;
}
.about-section .about-content {
    font-size: 16px;
    line-height: 2;
    color: #444;
}
.about-section .about-content p {
    text-indent: 2em;
    margin-bottom: 16px;
}
.about-section .about-cover {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    background: linear-gradient(135deg, #c9a96e, #8b6914);
    margin-bottom: 25px;
}

/* ==================== 联系我们 ==================== */
.contact-section {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    margin-bottom: 30px;
}
.contact-section h1 {
    font-size: 28px;
    color: #4a3520;
    text-align: center;
    margin-bottom: 30px;
}
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}
.contact-card {
    background: #f9f6f0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}
.contact-card .icon {
    font-size: 40px;
    margin-bottom: 15px;
}
.contact-card h3 {
    font-size: 18px;
    color: #4a3520;
    margin-bottom: 10px;
}
.contact-card p {
    font-size: 16px;
    color: #666;
}
.contact-card a {
    font-size: 20px;
    color: #8b6914;
    font-weight: bold;
}

/* ==================== 侧栏布局 ==================== */
.main-layout {
    display: flex;
    gap: 25px;
}
.main-content { flex: 1; }
.sidebar {
    width: 280px;
    flex-shrink: 0;
}
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.sidebar-widget h3 {
    font-size: 16px;
    color: #4a3520;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #8b6914;
}
.sidebar-widget ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { color: #666; }
.sidebar-widget ul li a:hover { color: #8b6914; }

/* ==================== 页脚 ==================== */
.footer {
    background: linear-gradient(to right, #4a3520, #5a4530);
    color: #ccc;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}
.footer p { font-size: 13px; margin: 5px 0; }
.footer a { color: #c9a96e; }

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .header h1 { font-size: 24px; }
    .banner { height: 220px; }
    .banner h2 { font-size: 24px; }
    .nav ul li a { padding: 10px 14px; font-size: 13px; }
    .category-grid { grid-template-columns: 1fr; }
    .article-item { flex-direction: column; }
    .article-item .item-img { width: 100%; min-height: 150px; }
    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .article-detail { padding: 20px; }
    .article-detail h1 { font-size: 22px; }
    .contact-info { grid-template-columns: 1fr; }
}
