/*
Theme Name: Green Breeze
Theme URI: https://example.com/green-breeze
Author: Codex
Author URI: https://openai.com/
Description: 一款绿色清新的响应式 WordPress 内容主题，适合资讯、生活方式与知识博客。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: green-breeze
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, one-column, two-columns, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --gb-green-950: #123e2a;
  --gb-green-800: #1d6342;
  --gb-green-700: #267a50;
  --gb-green-600: #329866;
  --gb-green-100: #e8f7ef;
  --gb-green-50: #f4fbf7;
  --gb-cream: #fbfdf8;
  --gb-ink: #193227;
  --gb-muted: #68776f;
  --gb-line: #dbe9e0;
  --gb-white: #fff;
  --gb-radius: 18px;
  --gb-shadow: 0 14px 38px rgba(22, 89, 57, .08);
  --gb-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--gb-ink);
  background: var(--gb-cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0 0 auto;
  height: 320px;
  content: "";
  background:
    radial-gradient(circle at 10% 5%, rgba(130, 210, 161, .2), transparent 35%),
    linear-gradient(180deg, #edf9f1 0%, rgba(251, 253, 248, 0) 100%);
}
a { color: var(--gb-green-700); text-decoration: none; }
a:hover { color: var(--gb-green-950); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
.screen-reader-text {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  white-space: nowrap;
}
.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  clip: auto !important;
  width: auto;
  height: auto;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--gb-white);
}
.gb-container { width: min(calc(100% - 40px), var(--gb-width)); margin-inline: auto; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgba(219, 233, 224, .85);
  background: rgba(251, 253, 248, .9);
  backdrop-filter: blur(16px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  min-height: 76px;
  gap: 28px;
}
.site-branding { display: flex; align-items: center; margin-right: auto; gap: 11px; }
.custom-logo-link img { width: auto; max-height: 44px; }
.site-branding__mark {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 14px 14px 14px 4px;
  color: var(--gb-white);
  background: linear-gradient(135deg, var(--gb-green-600), var(--gb-green-800));
  box-shadow: 0 8px 18px rgba(38, 122, 80, .2);
  place-items: center;
}
.site-branding__mark::before { font-size: 21px; content: "✦"; }
.site-title { display: block; color: var(--gb-green-950); font-size: 21px; font-weight: 800; line-height: 1.2; }
.site-description { margin: 2px 0 0; color: var(--gb-muted); font-size: 12px; line-height: 1.2; }
.primary-menu, .primary-menu ul { margin: 0; padding: 0; list-style: none; }
.primary-menu { display: flex; align-items: center; gap: 8px; }
.primary-menu a {
  display: block;
  padding: 9px 13px;
  border-radius: 10px;
  color: #375146;
  font-size: 14px;
  font-weight: 650;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a { color: var(--gb-green-800); background: var(--gb-green-100); }
.menu-toggle {
  display: none;
  padding: 8px;
  border: 0;
  color: var(--gb-green-950);
  background: transparent;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px; background: currentColor; transition: .2s; }

.site-main { min-height: 65vh; padding: 48px 0 72px; }
.archive-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 34px 38px;
  border: 1px solid rgba(180, 219, 195, .7);
  border-radius: 26px;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .7), transparent 25%),
    linear-gradient(135deg, #ddf4e6, #f4fbef);
}
.archive-hero__eyebrow { margin: 0 0 5px; color: var(--gb-green-700); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.archive-hero h1 { margin: 0; color: var(--gb-green-950); font-size: clamp(29px, 5vw, 46px); line-height: 1.2; }
.archive-description { max-width: 620px; margin: 9px 0 0; color: #587066; }
.archive-description p { margin: 0; }
.archive-hero__leaf { color: rgba(38, 122, 80, .15); font-size: 68px; line-height: 1; transform: rotate(-12deg); }

.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card {
  overflow: hidden;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-radius);
  background: var(--gb-white);
  box-shadow: 0 2px 0 rgba(22, 89, 57, .02);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card:hover { border-color: #bedcca; box-shadow: var(--gb-shadow); transform: translateY(-5px); }
.post-card__thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #d9f0e2, #edf7d8);
}
.post-card__thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.post-card:hover .post-card__thumbnail img { transform: scale(1.045); }
.post-card__placeholder { display: grid; width: 100%; height: 100%; color: rgba(29, 99, 66, .65); place-items: center; }
.post-card__placeholder span { font-size: 42px; transform: rotate(-12deg); }
.post-card__category {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  color: var(--gb-white);
  background: rgba(18, 62, 42, .82);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  backdrop-filter: blur(8px);
}
.post-card__body { padding: 20px 21px 22px; }
.post-card__title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 11px;
  color: var(--gb-green-950);
  font-size: 19px;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.post-card__title a { color: inherit; }
.post-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 17px;
  color: var(--gb-muted);
  font-size: 14px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.post-card__meta, .entry-meta { display: flex; flex-wrap: wrap; align-items: center; color: var(--gb-muted); font-size: 12px; gap: 8px; }
.post-card__meta span + span::before, .entry-meta span + span::before { margin-right: 8px; color: #b5c5bd; content: "•"; }
.post-card__meta a, .entry-meta a { color: inherit; }

.pagination { margin-top: 42px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-numbers {
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--gb-line);
  border-radius: 12px;
  color: #456056;
  background: var(--gb-white);
  font-size: 14px;
  font-weight: 700;
  place-items: center;
}
.page-numbers:hover, .page-numbers.current { border-color: var(--gb-green-700); color: var(--gb-white); background: var(--gb-green-700); }
.page-numbers.dots { border: 0; background: transparent; }

.single-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; }
.article-shell, .sidebar-card {
  border: 1px solid var(--gb-line);
  border-radius: 24px;
  background: var(--gb-white);
  box-shadow: 0 10px 30px rgba(22, 89, 57, .045);
}
.article-header { padding: 42px 48px 28px; }
.article-header .post-card__category { position: static; display: inline-block; margin-bottom: 15px; background: var(--gb-green-100); color: var(--gb-green-800); }
.entry-title { margin: 0 0 18px; color: var(--gb-green-950); font-size: clamp(30px, 5vw, 46px); line-height: 1.3; letter-spacing: -.025em; }
.article-cover { overflow: hidden; margin: 0 48px; border-radius: 18px; }
.article-cover img { width: 100%; max-height: 520px; object-fit: cover; }
.entry-content { padding: 34px 48px 42px; color: #2f443b; font-size: 17px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.5em; }
.entry-content h2, .entry-content h3 { margin: 1.8em 0 .7em; color: var(--gb-green-950); line-height: 1.4; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { margin: 1.8em 0; padding: 20px 24px; border-left: 4px solid var(--gb-green-600); border-radius: 0 12px 12px 0; background: var(--gb-green-50); }
.entry-content figure { margin: 2em 0; }
.entry-content pre { overflow-x: auto; padding: 18px; border-radius: 12px; background: #14251d; color: #eaf6ef; }
.entry-content table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--gb-line); }
.entry-tags { display: flex; flex-wrap: wrap; padding: 0 48px 28px; gap: 8px; }
.entry-tags a { padding: 5px 11px; border-radius: 999px; color: var(--gb-green-700); background: var(--gb-green-50); font-size: 12px; }

.post-navigation { display: grid; margin-top: 22px; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-navigation a {
  display: flex;
  flex-direction: column;
  min-height: 106px;
  padding: 18px 20px;
  border: 1px solid var(--gb-line);
  border-radius: 16px;
  color: var(--gb-green-950);
  background: var(--gb-white);
  font-weight: 700;
  justify-content: center;
}
.post-navigation a:hover { border-color: #a8d1b7; box-shadow: var(--gb-shadow); }
.post-navigation__next { text-align: right; }
.post-navigation__label { margin-bottom: 5px; color: var(--gb-muted); font-size: 12px; font-weight: 500; }
.sidebar-card { position: sticky; top: 100px; padding: 25px; }
.sidebar-card__title { display: flex; align-items: center; margin: 0 0 18px; color: var(--gb-green-950); font-size: 20px; gap: 9px; }
.sidebar-card__title::before { width: 5px; height: 20px; border-radius: 4px; background: var(--gb-green-600); content: ""; }
.recommend-list { margin: 0; padding: 0; list-style: none; }
.recommend-item + .recommend-item { margin-top: 17px; padding-top: 17px; border-top: 1px solid var(--gb-line); }
.recommend-item a { display: grid; color: var(--gb-green-950); grid-template-columns: 72px 1fr; gap: 12px; }
.recommend-item__thumb { overflow: hidden; aspect-ratio: 1; border-radius: 12px; background: linear-gradient(135deg, #d9f0e2, #edf7d8); }
.recommend-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.recommend-item__title { display: -webkit-box; overflow: hidden; margin: 2px 0 6px; font-size: 14px; font-weight: 700; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.recommend-item time { color: var(--gb-muted); font-size: 11px; }
.recommend-empty { color: var(--gb-muted); font-size: 14px; }

.empty-state { padding: 70px 30px; text-align: center; border: 1px solid var(--gb-line); border-radius: 22px; background: var(--gb-white); }
.empty-state h2 { margin: 0 0 8px; color: var(--gb-green-950); }
.search-form { display: flex; max-width: 520px; margin: 22px auto 0; gap: 8px; }
.search-field { min-width: 0; flex: 1; padding: 11px 14px; border: 1px solid var(--gb-line); border-radius: 10px; outline: none; }
.search-field:focus { border-color: var(--gb-green-600); box-shadow: 0 0 0 3px rgba(50, 152, 102, .12); }
.search-submit { padding: 10px 18px; border: 0; border-radius: 10px; color: var(--gb-white); background: var(--gb-green-700); cursor: pointer; }

.site-footer { padding: 44px 0; color: #bdd2c7; background: var(--gb-green-950); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer__title { margin: 0 0 3px; color: var(--gb-white); font-size: 18px; }
.site-footer p { margin: 0; font-size: 13px; }
.footer-menu { display: flex; margin: 0; padding: 0; list-style: none; gap: 18px; }
.footer-menu a { color: #d7e7de; font-size: 13px; }

@media (max-width: 960px) {
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .single-layout { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .recommend-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .recommend-item + .recommend-item { margin: 0; padding: 0; border: 0; }
}

@media (max-width: 760px) {
  .gb-container { width: min(calc(100% - 28px), var(--gb-width)); }
  .site-header__inner { min-height: 66px; }
  .site-description { display: none; }
  .menu-toggle { display: block; }
  .main-navigation {
    position: absolute;
    visibility: hidden;
    opacity: 0;
    top: calc(100% + 1px);
    right: 14px;
    left: 14px;
    padding: 10px;
    border: 1px solid var(--gb-line);
    border-radius: 14px;
    background: var(--gb-white);
    box-shadow: var(--gb-shadow);
    transform: translateY(-8px);
    transition: .2s;
  }
  .main-navigation.is-open { visibility: visible; opacity: 1; transform: translateY(0); }
  .primary-menu { display: block; }
  .primary-menu a { padding: 11px 12px; }
  .site-main { padding: 28px 0 50px; }
  .archive-hero { align-items: flex-start; margin-bottom: 22px; padding: 25px 23px; }
  .archive-hero__leaf { display: none; }
  .posts-grid { grid-template-columns: 1fr; gap: 17px; }
  .post-card { display: grid; grid-template-columns: 38% 1fr; }
  .post-card__thumbnail { height: 100%; min-height: 172px; aspect-ratio: auto; }
  .post-card__category { bottom: 9px; left: 9px; padding: 3px 7px; }
  .post-card__body { min-width: 0; padding: 15px 14px; }
  .post-card__title { margin-bottom: 8px; font-size: 16px; line-height: 1.45; }
  .post-card__excerpt { display: none; }
  .post-card__meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .post-card__meta span + span::before { display: none; }
  .article-header { padding: 28px 22px 22px; }
  .article-cover { margin: 0 22px; border-radius: 13px; }
  .entry-content { padding: 26px 22px 32px; font-size: 16px; }
  .entry-tags { padding: 0 22px 22px; }
  .post-navigation { grid-template-columns: 1fr; }
  .post-navigation__next { text-align: left; }
  .recommend-list { grid-template-columns: 1fr; }
  .site-footer__inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .post-card { grid-template-columns: 34% 1fr; }
  .post-card__thumbnail { min-height: 148px; }
  .post-card__category { max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .entry-title { font-size: 28px; }
}
