/* ==================== 全局重置 ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-primary: #4a7c59;
    --green-dark: #2d5a3d;
    --green-light: #6b9b76;
    --green-pale: #e8f0e8;
    --cream: #faf8f3;
    --cream-dark: #f3efe6;
    --terracotta: #c97b5e;
    --terracotta-light: #e8a988;
    --brown: #8b6f47;
    --brown-light: #b89972;
    --text-dark: #2c2420;
    --text-medium: #5c534d;
    --text-light: #8a7f76;
    --white: #ffffff;
    --border: #e5ddd0;
    --shadow: 0 2px 12px rgba(44, 36, 32, 0.08);
    --shadow-hover: 0 6px 24px rgba(44, 36, 32, 0.15);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: var(--cream);
    line-height: 1.7;
    font-size: 16px;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-family: inherit;
}

.btn-primary {
    background: var(--green-primary);
    color: var(--white);
    border-color: var(--green-primary);
}

.btn-primary:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--green-dark);
}

.btn-lg {
    padding: 14px 36px;
    font-size: 16px;
}

/* ==================== 顶部信息栏 ==================== */
.top-bar {
    background: var(--green-dark);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    padding: 8px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.top-bar-text {
    letter-spacing: 0.5px;
}

.top-bar-socials {
    display: flex;
    gap: 16px;
}

.top-bar-socials a {
    opacity: 0.8;
    transition: var(--transition);
}

.top-bar-socials a:hover {
    opacity: 1;
    color: var(--terracotta-light);
}

/* ==================== 头部导航 ==================== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Playfair Display', Georgia, serif;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--green-dark);
}

.main-nav {
    display: flex;
    gap: 28px;
}

.main-nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
    padding: 4px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--green-primary);
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--green-primary);
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--green-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==================== Hero 区域 ==================== */
.hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 40%, var(--green-light) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M40 40c0-11 9-20 20-20s20 9 20 20-9 20-20 20-20-9-20-20zm-40 0c0-11 9-20 20-20s20 9 20 20-9 20-20 20S0 51 0 40z'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    padding: 60px 24px;
}

.hero-tagline {
    font-size: 16px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 16px;
    font-weight: 500;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.hero-subtitle {
    font-size: 18px;
    max-width: 640px;
    margin: 0 auto 32px;
    opacity: 0.92;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== 分类卡片 ==================== */
.categories-section {
    padding: 64px 0;
    background: var(--cream);
}

.section-title {
    text-align: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--terracotta);
    margin: 12px auto 0;
    border-radius: 2px;
}

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

.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--green-light);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.category-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.category-card p {
    font-size: 14px;
    color: var(--text-light);
}

/* ==================== 电子书推广 ==================== */
.ebook-section {
    background: var(--green-pale);
    padding: 64px 0;
}

.ebook-inner {
    display: flex;
    align-items: center;
    gap: 60px;
}

.ebook-cover {
    flex: 0 0 300px;
    display: flex;
    justify-content: center;
}

.ebook-mockup {
    width: 260px;
    height: 340px;
    background: linear-gradient(145deg, var(--green-primary), var(--green-dark));
    border-radius: 8px;
    box-shadow: 8px 8px 0 var(--terracotta), 16px 16px 40px rgba(0,0,0,0.15);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    transform: rotate(-2deg);
    transition: var(--transition);
}

.ebook-mockup:hover {
    transform: rotate(0deg) scale(1.03);
}

.ebook-mockup-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.ebook-mockup-subtitle {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.ebook-mockup-subtitle2 {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 20px;
}

.ebook-mockup-icon {
    font-size: 60px;
}

.ebook-text {
    flex: 1;
}

.ebook-label {
    color: var(--terracotta);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.ebook-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.4;
}

.ebook-desc {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.8;
}

.ebook-features {
    margin-bottom: 28px;
}

.ebook-features li {
    padding: 6px 0;
    font-size: 15px;
    color: var(--text-dark);
}

/* ==================== 文章卡片通用 ==================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
}

.section-header .section-title {
    margin-bottom: 0;
    text-align: left;
}

.section-header .section-title::after {
    margin: 12px 0 0;
}

.see-all {
    font-size: 14px;
    font-weight: 500;
    color: var(--terracotta);
    transition: var(--transition);
    white-space: nowrap;
}

.see-all:hover {
    color: var(--green-primary);
}

.posts-section,
.favorites-section,
.canning-section,
.gardening-section,
.trending-section {
    padding: 64px 0;
}

.posts-section {
    background: var(--cream);
}

.favorites-section {
    background: var(--white);
}

.canning-section {
    background: var(--cream-dark);
}

.gardening-section {
    background: var(--cream);
}

.trending-section {
    background: var(--white);
}

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

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

.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

.post-image {
    display: block;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.posts-grid-4 .post-image {
    height: 160px;
}

.post-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
}

.post-body {
    padding: 20px;
}

.posts-grid-4 .post-body {
    padding: 16px;
}

.post-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.posts-grid-4 .post-title {
    font-size: 16px;
}

.post-title a {
    color: var(--text-dark);
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--green-primary);
}

.post-excerpt {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light);
}

/* 文章配图渐变背景 */
.post-image-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.post-image-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.post-image-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.post-image-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.post-image-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.post-image-6 { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }
.post-image-7 { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.post-image-8 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.post-image-9 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.post-image-10 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.post-image-11 { background: linear-gradient(135deg, #c471f5 0%, #fa71cd 100%); }
.post-image-12 { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }

/* 在每张配图上加装饰图案 */
.post-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 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.1'%3E%3Cpath d='M30 30c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ==================== 食谱卡片网格 ==================== */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.recipe-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

.recipe-image {
    height: 160px;
    position: relative;
    overflow: hidden;
}

.recipe-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--terracotta);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
}

.recipe-body {
    padding: 16px;
}

.recipe-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    transition: var(--transition);
}

.recipe-card:hover .recipe-body h3 {
    color: var(--green-primary);
}

.recipe-body p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

.recipe-img-1 { background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%); }
.recipe-img-2 { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.recipe-img-3 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.recipe-img-4 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.recipe-img-5 { background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%); }
.recipe-img-6 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.recipe-img-7 { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.recipe-img-8 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }

/* ==================== 热门食谱横向卡片 ==================== */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.trending-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: var(--white);
    border: 1px solid var(--border);
}

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

.trending-image {
    height: 180px;
    overflow: hidden;
}

.trending-img-1 { background: linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%); }
.trending-img-2 { background: linear-gradient(135deg, #f3e7e9 0%, #c7c0c8 100%); }
.trending-img-3 { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.trending-img-4 { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }

.trending-info {
    padding: 16px;
}

.trending-info h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    transition: var(--transition);
}

.trending-card:hover .trending-info h3 {
    color: var(--green-primary);
}

.trending-info p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ==================== 订阅邮件 ==================== */
.newsletter-section {
    background: var(--green-dark);
    padding: 56px 0;
    color: var(--white);
}

.newsletter-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.newsletter-text h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.newsletter-text p {
    font-size: 15px;
    opacity: 0.85;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 500px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: var(--white);
    color: var(--text-dark);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--terracotta-light);
}

/* ==================== 关于我们 ==================== */
.about-section {
    padding: 72px 0;
    background: var(--cream);
}

.about-inner {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image {
    flex: 0 0 280px;
    display: flex;
    justify-content: center;
}

.about-avatar {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-pale), var(--green-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    box-shadow: var(--shadow-hover);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 16px;
}

.about-text p {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 14px;
    line-height: 1.8;
}

.about-text .btn-outline {
    color: var(--green-primary);
    border-color: var(--green-primary);
    margin-top: 8px;
}

.about-text .btn-outline:hover {
    background: var(--green-primary);
    color: var(--white);
}

/* ==================== 页脚 ==================== */
.site-footer {
    background: #1a2e22;
    color: rgba(255,255,255,0.7);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 0 40px;
}

.footer-brand h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    color: var(--white);
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.7;
    max-width: 320px;
    opacity: 0.65;
}

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    font-family: 'Playfair Display', Georgia, serif;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    font-size: 14px;
    transition: var(--transition);
    opacity: 0.7;
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--terracotta-light);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    opacity: 0.5;
}

/* ==================== 返回顶部 ==================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 99;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--green-dark);
    transform: translateY(-4px);
}

/* ==================== 响应式 ==================== */
@media (max-width: 968px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px 24px;
        gap: 0;
        box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    .menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

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

    .ebook-inner {
        flex-direction: column;
        text-align: center;
    }

    .ebook-cover {
        flex: none;
    }

    .ebook-features {
        text-align: left;
        max-width: 400px;
        margin: 0 auto 28px;
    }

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

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

    .about-inner {
        flex-direction: column;
        text-align: center;
    }

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

    .newsletter-inner {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 28px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .posts-grid,
    .posts-grid-4,
    .recipe-grid,
    .trending-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 24px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .top-bar-socials {
        display: none;
    }
}
