/* ============================================================
   FlowPix — 花卉与植物内容站样式
   自然清新 · 园艺杂志风 · 响应式 · Core Web Vitals 友好
   ============================================================ */

/* === 设计令牌 === */
:root {
    --green:        #2f7d4f;   /* 主色 · 叶绿 */
    --green-deep:   #1f5c39;   /* 深绿 · 标题/页脚 */
    --green-soft:   #e8f3ec;   /* 浅绿底 */
    --bloom:        #e26d8a;   /* 点缀 · 花粉色 */
    --honey:        #d99a2b;   /* 点缀 · 花蜜黄 */
    --bg:           #f7f5ef;   /* 米白背景 */
    --bg-card:      #ffffff;
    --text:         #2b2b26;
    --text-muted:   #6f7268;
    --border:       #e6e2d6;
    --radius:       18px;
    --radius-sm:    12px;
    --shadow:       0 2px 10px rgba(47, 80, 50, 0.06);
    --shadow-lg:    0 14px 36px rgba(47, 80, 50, 0.14);
    --serif:        'Georgia', 'Songti SC', 'Noto Serif SC', serif;
}

/* === 主内容容器 === */
.main-content { padding-bottom: 8px; }
.main-content > .container { padding-top: 8px; }

/* === 导航 === */
.site-header {
    backdrop-filter: saturate(140%) blur(8px);
}
.main-nav {
    display: flex;
    gap: 2px;
    align-items: center;
}
.nav-link {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.nav-link:hover, .nav-link.active {
    background: var(--green-soft);
    color: var(--green-deep);
    text-decoration: none;
}

/* 社区入口按钮 */
.nav-tool {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(120deg, #2f7d4f 0%, #57a86f 55%, #d99a2b 130%);
    background-size: 200% 100%;
    box-shadow: 0 6px 16px rgba(47, 125, 79, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-position .5s ease;
}
.nav-tool svg { stroke: #fff !important; }
.nav-tool::after {
    content: "";
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-20deg);
    animation: navtool-shine 3.6s ease-in-out infinite;
}
.nav-tool:hover {
    color: #fff !important;
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(47, 125, 79, 0.45);
    text-decoration: none;
}
@keyframes navtool-shine {
    0% { left: -75%; }
    45%, 100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
    .nav-tool::after { animation: none; }
}

.lang-switcher { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
.lang-switcher .lang-link {
    font-size: 13px; padding: 4px 10px; border-radius: 999px;
    border: 1px solid var(--border); color: var(--text-muted); line-height: 1.2;
}
.lang-switcher .lang-link:hover { text-decoration: none; border-color: var(--green); color: var(--green); }
.lang-switcher .lang-link.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--green-deep); }

/* === 全宽沉浸式英雄横幅 === */
.hero-full {
    position: relative;
    min-height: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 90px 24px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(20,45,28,.55), rgba(20,45,28,.78)),
        url('/assets/images/flower-hero-bg.webp') center/cover no-repeat;
}
.hero-full-inner { position: relative; max-width: 760px; }
.hero-eyebrow {
    font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
    color: #f3dfe6; margin-bottom: 18px; font-weight: 600;
}
.hero-full h1 {
    font-family: var(--serif);
    font-size: clamp(38px, 7vw, 74px);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0,0,0,.35);
}
.hero-highlight {
    background: linear-gradient(115deg, #ffe7b3, var(--bloom));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 18px;
    color: #eef3ec;
    max-width: 560px;
    margin: 0 auto;
}
.hero-tags {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center;
    margin-top: 30px;
}
.hero-tag {
    padding: 9px 20px;
    border-radius: 999px;
    font-size: 14px; font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.4);
    backdrop-filter: blur(4px);
    transition: all .2s ease;
}
.hero-tag:hover {
    color: var(--green-deep);
    background: #fff;
    border-color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

/* === Bento 便当格栏目区 === */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 16px;
    margin: 32px 0 56px;
}
.bento-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--accent, var(--green)) 78%, #000) 0%, var(--accent, var(--green)) 100%);
    transition: all .25s ease;
    grid-column: span 1;
    grid-row: span 1;
}
.bento-cell.bento-lg { grid-column: span 2; grid-row: span 2; }
.bento-cell.bento-wide { grid-column: span 2; }
.bento-cell::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.12) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    opacity: .5;
}
.bento-cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.bento-icon {
    position: absolute; top: 22px; left: 22px;
    width: 48px; height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,.2);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.bento-text { position: relative; }
.bento-text h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 4px; color: #fff; }
.bento-cell.bento-lg .bento-text h3 { font-size: 30px; }
.bento-text p { font-size: 13px; color: rgba(255,255,255,.85); margin-bottom: 8px; }
.bento-count { font-size: 13px; font-weight: 600; color: #fff; }

/* === 文章瀑布流（masonry，CSS columns） === */
.masonry {
    column-count: 3;
    column-gap: 26px;
    margin-bottom: 44px;
}
.masonry .article-card {
    break-inside: avoid;
    margin-bottom: 26px;
    display: inline-block;
    width: 100%;
}

/* === 文章网格 === */
.section-title {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--green-deep);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::before {
    content: "";
    width: 22px; height: 3px; border-radius: 3px;
    background: var(--bloom);
}
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 26px;
    margin-bottom: 44px;
}
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.22s ease;
}
.article-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card-image { display: block; overflow: hidden; }
.card-image img {
    width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
    transition: transform .4s ease;
}
.article-card:hover .card-image img { transform: scale(1.05); }
.card-body { padding: 20px 22px; }
.card-category {
    font-size: 12px; font-weight: 700; letter-spacing: .4px;
    color: var(--accent, var(--green));
    display: inline-block; margin-bottom: 6px;
    padding: 3px 10px; border-radius: 999px;
    background: color-mix(in srgb, var(--accent, var(--green)) 10%, transparent);
}
.card-body h3 { font-size: 18px; margin: 8px 0; line-height: 1.45; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--green); text-decoration: none; }
.card-body p { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }
.card-footer { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); }

/* === 面包屑 === */
.breadcrumb ol {
    display: flex; flex-wrap: wrap; list-style: none; gap: 8px;
    font-size: 14px; color: var(--text-muted); padding: 20px 0;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb li + li::before { content: "❀"; margin-right: 8px; color: var(--bloom); font-size: 11px; }

/* === 文章页 === */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: start; }
.article-content { min-width: 0; }
.article-header { margin-bottom: 28px; }
.article-category {
    font-size: 13px; font-weight: 700; color: var(--accent, var(--green));
    letter-spacing: .4px; padding: 3px 12px; border-radius: 999px;
    background: color-mix(in srgb, var(--accent, var(--green)) 12%, transparent);
}
.article-header h1 {
    font-family: var(--serif);
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700; line-height: 1.3; margin: 14px 0;
    letter-spacing: -0.3px; color: var(--green-deep);
}
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--text-muted); }
.article-cover img { width: 100%; border-radius: var(--radius); margin-bottom: 32px; }

/* 正文排版 */
.article-body { font-size: 17px; line-height: 1.85; }
.article-body h2 {
    font-family: var(--serif);
    font-size: 25px; font-weight: 700; margin: 42px 0 16px; padding-left: 14px;
    border-left: 4px solid var(--green); color: var(--green-deep);
}
.article-body h3 { font-size: 20px; font-weight: 600; margin: 32px 0 12px; color: var(--green-deep); }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 16px 0; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--green); }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; border-radius: var(--radius-sm); overflow: hidden; }
.article-body th, .article-body td { padding: 12px 16px; border: 1px solid var(--border); text-align: left; }
.article-body th { background: var(--green-soft); font-weight: 600; color: var(--green-deep); }
.article-body tr:nth-child(even) td { background: #faf9f4; }
.article-body strong { font-weight: 700; color: var(--text); }
.article-body blockquote {
    border-left: 4px solid var(--bloom);
    padding: 16px 20px; margin: 24px 0;
    background: #fdf2f5; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body code { background: var(--green-soft); padding: 2px 6px; border-radius: 4px; font-size: 15px; color: var(--green-deep); }
.article-body pre { background: #1f2b22; color: #d7e9da; padding: 20px; border-radius: var(--radius-sm); overflow-x: auto; margin: 24px 0; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body img { border-radius: var(--radius); margin: 16px 0; }
.article-body a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--green) 40%, transparent); }
.article-body a:hover { text-decoration-color: var(--green); }
.ai-image { margin: 24px 0; text-align: center; }
.ai-image img { border-radius: var(--radius); }
.ai-image figcaption { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* 侧边栏 */
.article-sidebar { position: sticky; top: 88px; }
.article-banner { display: block; max-width: 1024px; margin: 0 auto 28px; overflow: hidden; line-height: 0; border-radius: var(--radius); transition: opacity .2s ease; }
.article-banner:hover { opacity: .94; }
.article-banner img { display: block; width: 100%; height: auto; }
.sidebar-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.sidebar-section h3 { font-family: var(--serif); font-size: 17px; font-weight: 700; margin-bottom: 16px; color: var(--green-deep); }
.related-list { list-style: none; }
.related-list li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.related-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.related-list a { display: block; color: var(--text); }
.related-list a:hover .related-title { color: var(--green); }
.related-title { font-size: 14px; font-weight: 500; display: block; margin-bottom: 4px; transition: color 0.2s; }
.related-list time { font-size: 12px; color: var(--text-muted); }

/* === 栏目页头 === */
.category-header {
    position: relative;
    padding: 48px 24px 40px;
    text-align: center;
    margin: 8px 0 36px;
    border-radius: 24px;
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent, var(--green)) 12%, #fffdf8), #fffdf8);
    overflow: hidden;
}
.category-header h1 { font-family: var(--serif); font-size: 34px; font-weight: 700; color: var(--accent, var(--green-deep)); }
.category-desc { font-size: 16px; color: var(--text-muted); max-width: 620px; margin: 12px auto 0; }

/* === 分页 === */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 20px 0 40px; }
.page-link {
    min-width: 42px; height: 42px; padding: 0 12px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 999px; border: 1px solid var(--border); color: var(--text); font-weight: 500;
}
.page-link.active, .page-link:hover { background: var(--green); color: #fff; border-color: var(--green); text-decoration: none; }

/* === 404 === */
.error-page { text-align: center; padding: 90px 0; }
.error-page h1 { font-family: var(--serif); font-size: 110px; font-weight: 700; color: var(--green); line-height: 1; }
.error-page p { font-size: 18px; color: var(--text-muted); margin: 12px 0; }
.btn {
    display: inline-block; padding: 13px 28px;
    background: var(--green); color: #fff; border-radius: 999px; font-weight: 600; margin-top: 20px;
    transition: all .2s ease;
}
.btn:hover { background: var(--green-deep); text-decoration: none; color: #fff; transform: translateY(-2px); }
.empty-state { text-align: center; padding: 60px 0; color: var(--text-muted); grid-column: 1/-1; }

/* === Footer === */
.site-footer { background: var(--green-deep); color: #cde0d2; padding: 56px 0 26px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-brand .logo { color: #fff; font-family: var(--serif); font-size: 22px; display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; text-decoration: none; }
.footer-brand .logo:hover { text-decoration: none; }
.footer-brand .logo .logo-text { color: #fff; }
.footer-brand .logo .logo-text span { color: #f0aab9; }
.footer-brand p { font-size: 14px; max-width: 320px; }
.footer-nav h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 14px; letter-spacing: .5px; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 9px; }
.footer-nav a { color: #cde0d2; font-size: 14px; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; font-size: 13px; text-align: center; }

/* === About === */
.about-page { max-width: 820px; margin: 0 auto; }
.about-tagline { font-size: 1.15em; color: var(--text-muted); margin-top: 8px; }
.about-page .article-header h1 { font-family: var(--serif); color: var(--green-deep); }

/* === 响应式 === */
@media (max-width: 768px) {
    .main-nav {
        display: none; position: absolute; top: 64px; left: 0; right: 0;
        background: #fff; flex-direction: column; padding: 16px;
        border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); align-items: stretch;
    }
    .main-nav.open { display: flex; }
    .menu-toggle { display: block; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .article-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .hero-full { min-height: 420px; padding: 64px 20px; }
    /* Bento 改两列 */
    .bento-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
    .bento-cell.bento-lg { grid-column: span 2; grid-row: span 1; }
    .bento-cell.bento-wide { grid-column: span 2; }
    /* 瀑布流改两列 */
    .masonry { column-count: 2; column-gap: 18px; }
    .masonry .article-card { margin-bottom: 18px; }
}
@media (max-width: 480px) {
    .bento-grid { grid-template-columns: 1fr; }
    .bento-cell, .bento-cell.bento-lg, .bento-cell.bento-wide { grid-column: span 1; }
    .masonry { column-count: 1; }
}
