/* ============================================================
   www.xiaoye.com.cn — 小叶学堂 清新自然绿色主题
   与 hnrmb 和风朱红主题完全不同的现代自然风格
   ============================================================ */

:root {
    --leaf:        #52b788;
    --green:       #40916c;
    --green-dark:  #2d6a4f;
    --green-light: #95d5b2;
    --mint:        #d8f3dc;
    --cream:       #fffcf5;
    --gold:        #e9c46a;
    --gold-dark:   #d4a843;
    --charcoal:    #1b1f22;
    --soft-gray:   #6b7280;
    --light-gray:  #e5e7eb;
    --white:       #ffffff;
    --radius:      12px;
    --shadow:      0 2px 12px rgba(45, 109, 79, 0.08);
    --shadow-hov:  0 8px 24px rgba(45, 109, 79, 0.12);
    --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --radius-sm:   8px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.75;
    color: var(--charcoal);
    background: linear-gradient(180deg, #f7fdf9 0%, var(--cream) 100%);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--green-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--leaf); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--mint);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    max-width: 1160px; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-leaf svg { width: 32px; height: 32px; display: block; }
.brand-text { font-size: 20px; font-weight: 700; color: var(--green-dark); line-height: 1.2; }
.brand-text em { display: block; font-size: 11px; font-weight: 400; color: var(--soft-gray); font-style: normal; letter-spacing: .5px; }
.nav { display: flex; gap: 4px; }
.nav a {
    padding: 8px 16px; border-radius: var(--radius);
    font-size: 14px; font-weight: 500; color: var(--charcoal);
    transition: all .2s;
}
.nav a:hover, .nav a.active {
    background: var(--mint); color: var(--green-dark);
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #e8f5e9 0%, #d8f3dc 40%, #c8e6c9 100%);
    text-align: center; padding: 72px 20px 64px;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute;
    top: -60px; right: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(82,183,136,.25) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: ''; position: absolute;
    bottom: -40px; left: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(233,196,106,.2) 0%, transparent 70%);
    border-radius: 50%;
}
.eyebrow {
    display: inline-block; padding: 4px 16px;
    background: rgba(45,109,79,.1); color: var(--green-dark);
    border-radius: 20px; font-size: 13px; font-weight: 600;
    letter-spacing: 1px; margin-bottom: 20px;
}
.hero h1 { font-size: 42px; font-weight: 800; line-height: 1.3; color: var(--charcoal); margin-bottom: 16px; }
.hero h1 em { color: var(--green); font-style: normal; }
.lead { font-size: 17px; color: var(--soft-gray); max-width: 600px; margin: 0 auto 32px; line-height: 1.8; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }

.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 28px; border-radius: 30px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all .25s; border: none;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(64,145,108,.3); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(45,109,79,.35); }
.btn-outline { background: #fff; color: var(--green-dark); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--mint); border-color: var(--green-dark); }
.btn-white { background: #fff; color: var(--green-dark); box-shadow: var(--shadow); }
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow-hov); }

.stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat b { display: block; font-size: 36px; font-weight: 800; color: var(--green-dark); line-height: 1; }
.stat span { font-size: 13px; color: var(--soft-gray); margin-top: 4px; display: block; }

/* ===== Sections ===== */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 28px; font-weight: 700; color: var(--charcoal); margin-bottom: 8px; }
.section-head p { font-size: 15px; color: var(--soft-gray); }

/* ===== Category Cards ===== */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card {
    background: var(--white); border-radius: var(--radius);
    padding: 28px 24px; box-shadow: var(--shadow);
    transition: all .3s; display: block;
    border: 1px solid transparent;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hov); border-color: var(--green-light); }
.cat-stamp {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--mint); color: var(--green-dark);
    font-size: 18px; font-weight: 700; margin-bottom: 14px;
}
.cat-card h3 { font-size: 18px; font-weight: 600; color: var(--charcoal); margin-bottom: 8px; }
.cat-card p { font-size: 14px; color: var(--soft-gray); line-height: 1.6; margin-bottom: 12px; }
.cat-more { font-size: 13px; color: var(--green); font-weight: 600; }

/* ===== Post Cards ===== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card {
    background: var(--white); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
    transition: all .3s; display: block;
    border: 1px solid transparent;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hov); border-color: var(--green-light); }
.p-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.p-tag { font-size: 12px; padding: 3px 10px; border-radius: 12px; background: var(--mint); color: var(--green-dark); font-weight: 600; }
.p-tag.gold { background: #fef3c7; color: #b45309; }
.post-card h3 { font-size: 17px; font-weight: 600; color: var(--charcoal); margin-bottom: 8px; line-height: 1.4; }
.p-excerpt { font-size: 14px; color: var(--soft-gray); line-height: 1.6; margin-bottom: 14px; }
.p-meta { font-size: 12px; color: var(--soft-gray); }
.p-meta b { color: var(--green-dark); font-weight: 600; }
.post-empty { grid-column: 1 / -1; text-align: center; color: var(--soft-gray); padding: 40px 0; font-size: 15px; }

/* ===== Features ===== */
.features { background: var(--mint); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature { text-align: center; padding: 20px; }
.f-icon { width: 56px; height: 56px; margin: 0 auto 16px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(45,109,79,.1); }
.f-icon svg { width: 28px; height: 28px; color: var(--green); }
.feature h3 { font-size: 16px; font-weight: 600; color: var(--charcoal); margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--soft-gray); line-height: 1.6; }

/* ===== CTA Band ===== */
.cta-band .box {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
    border-radius: 20px; padding: 48px; text-align: center;
    box-shadow: 0 12px 40px rgba(45,109,79,.25);
}
.cta-band h2 { color: #fff; font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,.85); font-size: 15px; margin-bottom: 24px; }

/* ===== Breadcrumb ===== */
.breadcrumb { font-size: 13px; color: var(--soft-gray); padding: 18px 0; }
.breadcrumb a { color: var(--green-dark); }
.breadcrumb .sep { margin: 0 8px; color: var(--light-gray); }

/* ===== Category Banner ===== */
.cat-banner {
    background: var(--white); border-radius: var(--radius);
    padding: 36px; box-shadow: var(--shadow);
    margin-bottom: 24px; position: relative; overflow: hidden;
    border-left: 4px solid var(--green);
}
.cat-banner::after {
    content: ''; position: absolute; top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(82,183,136,.12) 0%, transparent 70%);
    border-radius: 50%;
}
.cat-name { font-size: 28px; font-weight: 700; color: var(--charcoal); margin-bottom: 6px; }
.en { font-size: 11px; color: var(--green-light); letter-spacing: 3px; text-transform: uppercase; display: block; margin-bottom: 10px; }
.cat-banner p { font-size: 14px; color: var(--soft-gray); }

/* ===== Container ===== */
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px 40px; display: flex; gap: 28px; }
.container main { flex: 1; min-width: 0; }
.container > main:first-child:last-child { max-width: 800px; margin: 0 auto; }
.card { background: var(--white); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }

/* ===== Post List ===== */
.post-list { }
.post-list li {
    display: flex; gap: 20px; padding: 20px 0;
    border-bottom: 1px solid var(--light-gray); align-items: flex-start;
}
.post-list li:last-child { border-bottom: none; }
.p-date { text-align: center; min-width: 56px; }
.p-date b { display: block; font-size: 28px; font-weight: 700; color: var(--green); line-height: 1; }
.p-date span { font-size: 12px; color: var(--soft-gray); }
.p-main { flex: 1; min-width: 0; }
.p-title { font-size: 18px; font-weight: 600; color: var(--charcoal); margin-bottom: 6px; line-height: 1.4; }
a:hover .p-title { color: var(--green); }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.pagination a, .pagination .current {
    min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
    border: 1px solid var(--light-gray); transition: all .2s;
}
.pagination a:hover { border-color: var(--green); color: var(--green-dark); }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== Article ===== */
.article-title { font-size: 30px; font-weight: 800; color: var(--charcoal); line-height: 1.4; margin-bottom: 14px; }
.article-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--soft-gray); margin-bottom: 28px; flex-wrap: wrap; }
.article-meta .sep { color: var(--light-gray); }
.author { display: flex; align-items: center; gap: 6px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--mint); color: var(--green-dark); font-size: 12px; font-weight: 700; }
.article-body { font-size: 16px; line-height: 1.9; color: var(--charcoal); }
.article-body h2 { font-size: 22px; font-weight: 700; margin: 32px 0 14px; color: var(--green-dark); padding-bottom: 8px; border-bottom: 2px solid var(--mint); }
.article-body h3 { font-size: 18px; font-weight: 600; margin: 24px 0 10px; color: var(--charcoal); }
.article-body p { margin-bottom: 16px; }
.article-body strong { color: var(--green-dark); }
.article-body img { margin: 20px auto; border-radius: var(--radius-sm); }
.article-footer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--light-gray); font-size: 13px; color: var(--soft-gray); }

/* ===== Sidebar ===== */
.sidebar { width: 300px; flex-shrink: 0; }
.widget {
    background: var(--white); border-radius: var(--radius);
    padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.widget h3 {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 700; color: var(--charcoal);
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 2px solid var(--mint);
}
.widget h3 svg { width: 18px; height: 18px; color: var(--green); }
.hot-list li { padding: 8px 0; border-bottom: 1px solid var(--mint); }
.hot-list li:last-child { border-bottom: none; }
.hot-list li a { font-size: 14px; color: var(--charcoal); line-height: 1.5; display: block; }
.hot-list li a:hover { color: var(--green); }
.side-cats li { padding: 6px 0; }
.side-cats li a { font-size: 14px; color: var(--charcoal); display: flex; align-items: center; gap: 6px; }
.side-cats li a::before { content: ''; width: 5px; height: 5px; background: var(--green-light); border-radius: 50%; flex-shrink: 0; }
.side-cats li a:hover { color: var(--green); }
.widget-empty { color: var(--soft-gray); font-size: 13px; }
.widget-tip p { font-size: 13px; color: var(--soft-gray); line-height: 1.7; }

/* ===== Footer ===== */
.site-footer {
    background: linear-gradient(180deg, #f7fdf9 0%, #e8f5e9 100%);
    border-top: 3px solid var(--green-light);
}
.footer-wave {
    height: 40px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40'%3E%3Cpath d='M0 20 Q75 0 150 20 Q225 40 300 20 Q375 0 450 20 Q525 40 600 20 Q675 0 750 20 Q825 40 900 20 Q975 0 1050 20 Q1125 40 1200 20 V40 H0 Z' fill='%23d8f3dc'/%3E%3C/svg%3E") repeat-x;
    background-size: 600px 40px;
}
.footer-inner {
    max-width: 1160px; margin: 0 auto; padding: 40px 20px 20px;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px;
}
.f-col { }
.f-brand { font-size: 17px; font-weight: 700; color: var(--green-dark); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.f-col p { font-size: 13px; color: var(--soft-gray); line-height: 1.7; }
.f-col h4 { font-size: 14px; font-weight: 600; color: var(--charcoal); margin-bottom: 10px; }
.f-col ul li { padding: 3px 0; }
.f-col ul li a { font-size: 13px; color: var(--soft-gray); }
.f-col ul li a:hover { color: var(--green); }
.copyright {
    text-align: center; padding: 16px 20px;
    border-top: 1px solid var(--mint); font-size: 12px; color: var(--soft-gray);
}
.copyright a { color: var(--green-dark); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .container { flex-direction: column; }
    .sidebar { width: 100%; }
    .cat-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 30px; }
    .header-inner { flex-wrap: wrap; height: auto; padding: 12px 20px; }
    .nav { overflow-x: auto; }
    .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .cat-grid, .post-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr; }
    .stats { gap: 20px; }
    .card { padding: 20px; }
    .article-title { font-size: 22px; }
}
