/*
Theme Name: 方竹笋
Theme URI: https://www.fangzhusun.com
Author: FangZhuSun
Description: 方竹笋信息资讯站 - 自然清新的竹林风格主题
Version: 2.0.0
Text Domain: fangzhusun
License: GPL-2.0-or-later
*/

/* ==================== Reset & Base ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bamboo-dark: #2d5016;
    --bamboo-green: #4a8c1c;
    --bamboo-light: #6db33f;
    --bg-green: #f0f7e6;
    --bg-cream: #faf8f2;
    --warm-brown: #8B6914;
    --text-dark: #2c2c2c;
    --text-body: #444;
    --text-light: #777;
    --border-light: #e8e4dc;
    --white: #fff;
    --shadow-sm: 0 2px 8px rgba(45,80,22,0.08);
    --shadow-md: 0 4px 20px rgba(45,80,22,0.12);
    --shadow-hover: 0 8px 30px rgba(45,80,22,0.18);
    --radius: 12px;
    --max-width: 1200px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-body);
    background-color: var(--bg-cream);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--bamboo-green); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--bamboo-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ==================== Reading Progress Bar ==================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bamboo-green), var(--bamboo-light));
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ==================== Header ==================== */
.site-header {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease, background 0.3s;
}

.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(45,80,22,0.1);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--bamboo-dark);
    text-decoration: none;
    letter-spacing: 1px;
}

.site-logo .logo-icon { font-size: 1.6rem; }
.site-logo:hover { color: var(--bamboo-green); }

.main-nav ul { list-style: none; display: flex; gap: 8px; }

.main-nav a {
    color: var(--text-dark);
    font-size: 0.9rem;
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.3s;
    font-weight: 500;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
    background: var(--bg-green);
    color: var(--bamboo-green);
}

.header-actions { display: flex; align-items: center; gap: 4px; }

.search-toggle, .menu-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-body);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover { background: var(--bg-green); color: var(--bamboo-green); }
.menu-toggle { display: none; font-size: 1.3rem; }

/* Search Overlay */
.search-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(26,46,10,0.92);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.search-overlay.active { display: flex; }

.search-overlay form { width: 90%; max-width: 580px; position: relative; }

.search-overlay input[type="search"] {
    width: 100%;
    padding: 18px 56px 18px 24px;
    font-size: 1.15rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 60px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.search-overlay input[type="search"]::placeholder { color: rgba(255,255,255,0.5); }
.search-overlay input[type="search"]:focus { border-color: var(--bamboo-light); }

.search-overlay .search-hint {
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    margin-top: 16px;
}

.search-overlay .close-search {
    position: absolute;
    top: 24px; right: 24px;
    background: rgba(255,255,255,0.1);
    border: none;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
    transition: background 0.3s;
    display: flex; align-items: center; justify-content: center;
}

.search-overlay .close-search:hover { background: rgba(255,255,255,0.2); }

/* ==================== Hero Section (Homepage) ==================== */
.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #0f2a06 0%, #1a3a0a 25%, #2d5016 50%, #1a3a0a 75%, #0f2a06 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        linear-gradient(180deg, rgba(74,140,28,0.18) 0%, transparent 60%) no-repeat 6% 0 / 2px 100%,
        linear-gradient(180deg, rgba(74,140,28,0.14) 0%, transparent 70%) no-repeat 10% 0 / 3px 100%,
        linear-gradient(180deg, rgba(74,140,28,0.10) 0%, transparent 50%) no-repeat 14% 0 / 1.5px 100%,
        linear-gradient(180deg, rgba(74,140,28,0.12) 0%, transparent 65%) no-repeat 86% 0 / 3px 100%,
        linear-gradient(180deg, rgba(74,140,28,0.08) 0%, transparent 55%) no-repeat 90% 0 / 2px 100%,
        linear-gradient(180deg, rgba(74,140,28,0.06) 0%, transparent 45%) no-repeat 94% 0 / 1.5px 100%,
        radial-gradient(ellipse 50px 14px at 50% 50%, rgba(109,179,63,0.1) 50%, transparent 51%) no-repeat 4% 18%,
        radial-gradient(ellipse 40px 12px at 50% 50%, rgba(109,179,63,0.08) 50%, transparent 51%) no-repeat 12% 32%,
        radial-gradient(ellipse 55px 14px at 50% 50%, rgba(109,179,63,0.07) 50%, transparent 51%) no-repeat 83% 22%,
        radial-gradient(ellipse 45px 12px at 50% 50%, rgba(109,179,63,0.09) 50%, transparent 51%) no-repeat 91% 40%,
        radial-gradient(ellipse 35px 10px at 50% 50%, rgba(109,179,63,0.06) 50%, transparent 51%) no-repeat 7% 55%,
        radial-gradient(ellipse 48px 13px at 50% 50%, rgba(109,179,63,0.05) 50%, transparent 51%) no-repeat 88% 62%;
    pointer-events: none;
    animation: bambooSway 8s ease-in-out infinite alternate;
}

@keyframes bambooSway {
    0% { transform: translateX(0); }
    100% { transform: translateX(5px); }
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 150px;
    background: linear-gradient(to top, var(--bg-cream), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 80px 24px 60px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 20px;
    background: rgba(109,179,63,0.2);
    border: 1px solid rgba(109,179,63,0.3);
    border-radius: 30px;
    color: var(--bamboo-light);
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: 12px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
}

.bamboo-divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    margin: 20px auto;
}

.hero-content p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    max-width: 480px;
    margin: 0 auto 32px;
    letter-spacing: 3px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 8px;
}

.hero-stat {
    text-align: center;
    color: rgba(255,255,255,0.7);
}

.hero-stat .num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--bamboo-light);
    line-height: 1.2;
    font-family: "Georgia", serif;
}

.hero-stat .label {
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ==================== Category Nav Strip ==================== */
.cat-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 68px;
    z-index: 100;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cat-nav::-webkit-scrollbar { display: none; }

.cat-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 4px;
    align-items: center;
    height: 52px;
}

.cat-nav a {
    flex-shrink: 0;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.88rem;
    color: var(--text-body);
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 500;
}

.cat-nav a:hover,
.cat-nav a.active {
    background: var(--bamboo-green);
    color: var(--white);
}

.cat-nav a .cat-count {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-left: 4px;
}

/* ==================== Featured Post ==================== */
.featured-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 0;
}

.featured-post {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.4s, box-shadow 0.4s;
}

.featured-post:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.featured-post .feat-thumb {
    position: relative;
    min-height: 340px;
    overflow: hidden;
}

.featured-post .feat-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.featured-post:hover .feat-thumb img {
    transform: scale(1.04);
}

.featured-post .feat-thumb .feat-badge {
    position: absolute;
    top: 20px; left: 20px;
    padding: 5px 14px;
    background: var(--bamboo-green);
    color: var(--white);
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.featured-post .feat-body {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-post .feat-cat {
    font-size: 0.8rem;
    color: var(--bamboo-green);
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.featured-post h2 {
    font-size: 1.6rem;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 14px;
}

.featured-post h2 a { color: inherit; }
.featured-post h2 a:hover { color: var(--bamboo-green); }

.featured-post .feat-excerpt {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
}

.featured-post .feat-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.feat-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--bg-green);
    color: var(--bamboo-dark);
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 4px;
    width: fit-content;
}

.feat-read-btn:hover {
    background: var(--bamboo-green);
    color: var(--white);
}

/* ==================== Section Headers ==================== */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 1.6rem;
    color: var(--bamboo-dark);
    font-weight: 700;
    margin-bottom: 6px;
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}

.section-header .subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

.section-header .divider-line {
    width: 36px;
    height: 3px;
    background: var(--bamboo-green);
    margin: 14px auto 0;
    border-radius: 2px;
}

/* ==================== Posts Grid ==================== */
.posts-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 52px 24px 80px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ==================== Post Card ==================== */
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.post-card .card-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-green), #d4e8b8);
}

.post-card .card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .card-thumb img { transform: scale(1.06); }

.post-card .card-thumb.no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5d6, #c5e1a5, #aed581);
}

.post-card .card-thumb.no-thumb::before {
    content: '\7b0b';
    font-size: 3.5rem;
    color: rgba(45,80,22,0.12);
    font-weight: 700;
}

.post-card .card-thumb .card-cat-tag {
    position: absolute;
    top: 12px; left: 12px;
    padding: 3px 12px;
    background: rgba(45,80,22,0.85);
    color: var(--white);
    font-size: 0.7rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.post-card .card-body { padding: 18px 22px 22px; }

.post-card .card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.post-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card h3 a { color: inherit; }
.post-card h3 a:hover { color: var(--bamboo-green); }

.post-card .card-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--bamboo-green);
    font-weight: 500;
}

.post-card .read-more span {
    transition: transform 0.3s;
    display: inline-block;
}

.post-card:hover .read-more span { transform: translateX(4px); }

/* ==================== Category Section (Homepage) ==================== */
.cat-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 60px;
}

.cat-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-green);
}

.cat-section-header h2 {
    font-size: 1.3rem;
    color: var(--bamboo-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-section-header h2 .cat-icon {
    width: 4px;
    height: 22px;
    background: var(--bamboo-green);
    border-radius: 2px;
    display: inline-block;
}

.cat-section-header .more-link {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.cat-section-header .more-link:hover { color: var(--bamboo-green); }

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 52px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text-body);
    background: var(--white);
    border: 1px solid var(--border-light);
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--bg-green);
    border-color: var(--bamboo-green);
    color: var(--bamboo-green);
}

.pagination .current {
    background: var(--bamboo-green);
    color: var(--white);
    border-color: var(--bamboo-green);
}

/* ==================== Single Post ==================== */
.single-hero {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #0f2a06, #1a3a0a, #2d5016);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.single-hero img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.35;
    transition: transform 0.5s;
}

.single-hero .hero-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 40px 24px 52px;
    background: linear-gradient(to top, rgba(15,42,6,0.95) 0%, rgba(15,42,6,0.4) 60%, transparent 100%);
}

.single-hero .hero-overlay .inner {
    max-width: 800px;
    margin: 0 auto;
}

.single-hero .post-cat-link {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(74,140,28,0.4);
    border: 1px solid rgba(74,140,28,0.5);
    border-radius: 20px;
    color: var(--bamboo-light);
    font-size: 0.78rem;
    margin-bottom: 14px;
    backdrop-filter: blur(4px);
}

.single-hero h1 {
    font-size: 2.1rem;
    color: var(--white);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 14px;
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}

.single-hero .post-meta {
    display: flex;
    gap: 20px;
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
}

.single-hero .post-meta span { display: flex; align-items: center; gap: 5px; }

/* Single Post Content */
.single-content-wrap {
    max-width: 800px;
    margin: -48px auto 0;
    position: relative;
    z-index: 2;
    padding: 0 24px 80px;
}

.single-content {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 48px 52px;
}

.single-content p {
    margin-bottom: 1.4em;
    font-size: 1.02rem;
    line-height: 2;
    color: var(--text-body);
}

.single-content h2 {
    font-size: 1.4rem;
    color: var(--bamboo-dark);
    margin: 2em 0 0.8em;
    padding-left: 14px;
    border-left: 3px solid var(--bamboo-green);
    font-weight: 700;
}

.single-content h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin: 1.5em 0 0.6em;
}

.single-content img {
    border-radius: 8px;
    margin: 1.5em auto;
}

.single-content blockquote {
    border-left: 3px solid var(--bamboo-light);
    background: var(--bg-green);
    padding: 20px 24px;
    margin: 1.5em 0;
    border-radius: 0 8px 8px 0;
    color: var(--bamboo-dark);
    font-size: 0.98rem;
}

.single-content ul, .single-content ol { padding-left: 1.5em; margin-bottom: 1.5em; }
.single-content li { margin-bottom: 0.5em; }
.single-content a { color: var(--bamboo-green); border-bottom: 1px solid transparent; }
.single-content a:hover { border-bottom-color: var(--bamboo-green); }

/* Tags */
.post-tags {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tags a {
    padding: 4px 14px;
    background: var(--bg-green);
    color: var(--bamboo-dark);
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.post-tags a:hover {
    background: var(--bamboo-green);
    color: var(--white);
}

/* Post Navigation */
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.post-nav a {
    display: block;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid var(--border-light);
}

.post-nav a:hover {
    border-color: var(--bamboo-green);
    box-shadow: var(--shadow-md);
}

.post-nav .nav-label {
    font-size: 0.72rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.post-nav .nav-title {
    font-size: 0.92rem;
    color: var(--text-dark);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.post-nav .next-post { text-align: right; }

/* Related Posts */
.related-posts {
    margin-top: 52px;
}

.related-posts h3 {
    font-size: 1.15rem;
    color: var(--bamboo-dark);
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-posts h3::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--bamboo-green);
    border-radius: 2px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.related-item {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.related-item .rel-thumb {
    height: 130px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-green), #d4e8b8);
}

.related-item .rel-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.related-item:hover .rel-thumb img { transform: scale(1.05); }

.related-item .rel-thumb.no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-item .rel-thumb.no-thumb::before {
    content: '\7b0b';
    font-size: 2rem;
    color: rgba(45,80,22,0.12);
}

.related-item h4 {
    padding: 12px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item h4 a { color: inherit; }
.related-item h4 a:hover { color: var(--bamboo-green); }

/* ==================== Comments ==================== */
.comments-section {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid var(--border-light);
}

.comments-section h3 {
    font-size: 1.15rem;
    color: var(--bamboo-dark);
    font-weight: 700;
    margin-bottom: 24px;
}

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

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.comment-author {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.comment-date {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.comment-body p {
    font-size: 0.92rem;
    line-height: 1.7;
}

/* Comment Form */
.comment-form-wrap {
    margin-top: 32px;
}

.comment-form-wrap h4 {
    font-size: 1.05rem;
    color: var(--bamboo-dark);
    margin-bottom: 16px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text-body);
    transition: border-color 0.3s;
    background: var(--bg-cream);
    margin-bottom: 12px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--bamboo-green);
    background: var(--white);
}

.comment-form textarea { min-height: 120px; resize: vertical; }

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.comment-form .submit-btn {
    padding: 12px 32px;
    background: var(--bamboo-green);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 500;
}

.comment-form .submit-btn:hover { background: var(--bamboo-dark); }

/* ==================== Archive Page ==================== */
.archive-header {
    background: linear-gradient(135deg, #0f2a06, #1a3a0a, #2d5016);
    padding: 72px 24px 56px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.archive-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 60px;
    background: linear-gradient(to top, var(--bg-cream), transparent);
}

.archive-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    letter-spacing: 4px;
}

.archive-header p {
    color: rgba(255,255,255,0.6);
    font-size: 0.92rem;
}

.archive-header .archive-count {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

/* ==================== Sidebar ==================== */
.sidebar { position: sticky; top: 96px; }

.widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.widget h3 {
    font-size: 0.95rem;
    color: var(--bamboo-dark);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-green);
    font-weight: 600;
}

.widget ul { list-style: none; }

.widget ul li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border-light);
}

.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-body); font-size: 0.88rem; }
.widget ul li a:hover { color: var(--bamboo-green); }

/* ==================== Search Results ==================== */
.search-results-header {
    background: linear-gradient(135deg, #0f2a06, #2d5016);
    padding: 72px 24px 56px;
    text-align: center;
    color: var(--white);
}

.search-results-header h1 { font-size: 1.6rem; }
.search-results-header span { color: var(--bamboo-light); }

/* ==================== 404 ==================== */
.page-404 {
    text-align: center;
    padding: 100px 24px 120px;
    max-width: 500px;
    margin: 0 auto;
}

.page-404 .big-404 {
    font-size: 7rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--bg-green), #c5e1a5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 16px;
}

.page-404 h1 { font-size: 1.4rem; color: var(--text-dark); margin-bottom: 10px; }
.page-404 p { color: var(--text-light); margin-bottom: 28px; font-size: 0.95rem; }

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: var(--bamboo-green);
    color: var(--white);
    border-radius: 8px;
    font-size: 0.92rem;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-home:hover { background: var(--bamboo-dark); color: var(--white); transform: translateY(-2px); }

/* ==================== Footer ==================== */
.site-footer {
    background: #0f1f06;
    color: rgba(255,255,255,0.5);
    position: relative;
}

.footer-top {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 52px 24px 40px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
}

.footer-brand-block h3 {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 12px;
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    letter-spacing: 2px;
}

.footer-brand-block p {
    font-size: 0.88rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.4);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-links ul { list-style: none; }

.footer-links li { margin-bottom: 8px; }

.footer-links a {
    color: rgba(255,255,255,0.45);
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--bamboo-light); }

.footer-contact p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 6px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 20px 24px;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.25);
}

/* Decorative gradient line */
.footer-gradient {
    height: 3px;
    background: linear-gradient(90deg, var(--bamboo-dark), var(--bamboo-green), var(--bamboo-light), var(--bamboo-green), var(--bamboo-dark));
}

/* ==================== Page Template ==================== */
.page-hero {
    background: linear-gradient(135deg, #0f2a06, #2d5016);
    padding: 72px 24px 56px;
    text-align: center;
    color: var(--white);
    position: relative;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 60px;
    background: linear-gradient(to top, var(--bg-cream), transparent);
}

.page-hero h1 {
    font-size: 2rem;
    font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
    letter-spacing: 4px;
}

.page-content-wrap {
    max-width: 800px;
    margin: -20px auto 80px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.page-content {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 44px 52px;
}

.page-content h2 {
    font-size: 1.4rem;
    color: var(--bamboo-dark);
    margin: 1.5em 0 0.8em;
    font-weight: 700;
}

.page-content p {
    margin-bottom: 1.3em;
    line-height: 2;
    font-size: 1rem;
}

/* About page specific */
.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 32px 0;
}

.about-feature {
    padding: 24px;
    background: var(--bg-green);
    border-radius: 10px;
    text-align: center;
}

.about-feature .af-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.about-feature h3 {
    font-size: 1rem;
    color: var(--bamboo-dark);
    margin-bottom: 6px;
}

.about-feature p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ==================== Back to Top ==================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--bamboo-green);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(45,80,22,0.3);
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--bamboo-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(45,80,22,0.4);
}

/* ==================== Scroll Animations ==================== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.15s; }
.fade-up:nth-child(5) { transition-delay: 0.2s; }
.fade-up:nth-child(6) { transition-delay: 0.25s; }

/* ==================== Responsive ==================== */
@media (max-width: 900px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .hero-content h1 { font-size: 2.6rem; letter-spacing: 6px; }
    .hero-stats { gap: 32px; }
    .featured-post { grid-template-columns: 1fr; }
    .featured-post .feat-thumb { min-height: 240px; }
    .featured-post .feat-body { padding: 28px 24px; }
    .single-content { padding: 36px 28px; }
    .single-hero h1 { font-size: 1.7rem; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr; gap: 28px; }
    .about-features { grid-template-columns: 1fr; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav .next-post { text-align: left; }
}

@media (max-width: 640px) {
    .header-inner { height: 56px; }
    .site-logo { font-size: 1.2rem; }
    .site-logo .logo-icon { font-size: 1.3rem; }

    .main-nav {
        display: none;
        position: fixed;
        top: 56px; left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: var(--shadow-md);
        padding: 8px 0;
        z-index: 999;
        border-top: 1px solid var(--border-light);
    }

    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav a { display: block; padding: 12px 24px; border-radius: 0; }

    .menu-toggle { display: flex; }

    .cat-nav { top: 56px; }
    .cat-nav-inner { height: 44px; }

    .posts-grid { grid-template-columns: 1fr; gap: 16px; }

    .hero-section { min-height: 400px; }
    .hero-content { padding: 60px 20px 48px; }
    .hero-content h1 { font-size: 2.2rem; letter-spacing: 4px; }
    .hero-content p { font-size: 0.95rem; letter-spacing: 1px; }
    .hero-badge { font-size: 0.72rem; padding: 5px 14px; }
    .hero-stats { gap: 24px; }
    .hero-stat .num { font-size: 1.5rem; }

    .featured-section { padding-top: 32px; }

    .single-hero { height: 300px; }
    .single-hero h1 { font-size: 1.4rem; }
    .single-content { padding: 24px 18px; }
    .single-content p { font-size: 0.95rem; }

    .related-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .related-item .rel-thumb { height: 100px; }

    .comment-form .form-row { grid-template-columns: 1fr; }

    .page-content { padding: 28px 20px; }

    .page-404 .big-404 { font-size: 5rem; }

    .post-card .card-thumb { height: 180px; }

    .section-header h2 { font-size: 1.35rem; }

    .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 1rem; }
}

/* ==================== Utility ==================== */
.screen-reader-text {
    clip: rect(1px,1px,1px,1px);
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
}

.alignwide { max-width: 1100px; }
.alignfull { max-width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }

.wp-caption { max-width: 100%; margin-bottom: 1.5em; }
.wp-caption img { border-radius: 8px; }
.wp-caption-text { font-size: 0.82rem; color: var(--text-light); text-align: center; padding-top: 8px; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 1.5em;
}

.gallery img { border-radius: 4px; }

/* Fix wxsync content images */
.single-content .wxsyncmain img,
.single-content section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
