/*
Theme Name: Organic Farm Produce Journal
Theme URI: https://organicfarmproduce.garden
Description: Gallery-style layout with a duotone (blue-purple) image treatment, flat rounded image cards, and a two-column article page for organic gardening content.
Style ID: c8a7c5
Version: 1.0.0
Text Domain: organic-farm-produce
*/

:root {
  --bg: #f6f6f8;
  --bg-alt: #ebebef;
  --bg-deep: #e0e1e5;
  --text: #1d1d26;
  --text-muted: #6b6b7b;
  --accent: #1d22b9;
  --border: #dddde4;
  /* 视觉密度：标准 —— 均衡间距 */
  --spacing: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--text); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ===== Duotone 双色调：图片去色 + accent 色叠加，统一全站色相 ===== */
.c8a7c5-duotone {
  position: relative;
  overflow: hidden;
}
.c8a7c5-duotone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.02);
}
.c8a7c5-duotone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  mix-blend-mode: multiply;
  opacity: 0.45;
  pointer-events: none;
}

/* ===== 布局容器 ===== */
.c8a7c5-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header（现代极简：Logo | 分类导航 | 搜索 + 暗黑切换） ===== */
.c8a7c5-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246,246,248,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.c8a7c5-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}
.c8a7c5-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.c8a7c5-logo a:hover { color: var(--accent); }
.c8a7c5-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}
.c8a7c5-nav li a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.c8a7c5-nav li a:hover,
.c8a7c5-nav li.current-menu-item a { color: var(--accent); }

.c8a7c5-header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}
.c8a7c5-dark-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
}
.c8a7c5-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  background: #fff;
}
.c8a7c5-header-search input {
  border: none;
  outline: none;
  font-size: 13px;
  width: 130px;
  background: transparent;
  color: var(--text);
}

/* ===== 卡片 B（无阴影纯扁平，图片带大圆角） ===== */
.c8a7c5-card {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
}
.c8a7c5-card-media {
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  display: block;
  margin-bottom: 14px;
}
.c8a7c5-card-body { padding: 0 2px; }
.c8a7c5-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}
.c8a7c5-card-title a:hover { color: var(--accent); }
.c8a7c5-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.c8a7c5-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.c8a7c5-card-author { font-weight: 600; color: var(--text); }
.c8a7c5-card-dot { color: var(--text-muted); }

/* ===== 归档 / 列表页 ===== */
.c8a7c5-archive-head { padding: 44px 0 28px; }
.c8a7c5-archive-head h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.c8a7c5-archive-head p { color: var(--text-muted); margin-top: 8px; }

.c8a7c5-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 60px;
}

/* ===== 文章页：带右侧栏（正文 70% + 右侧相关文章/目录 30%） ===== */
.c8a7c5-single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 52px;
  padding: 44px 0 68px;
  align-items: start;
}
.c8a7c5-single-main { min-width: 0; }
.c8a7c5-single-cat {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.c8a7c5-single-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin-bottom: 16px;
}
.c8a7c5-single-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.c8a7c5-single-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.c8a7c5-single-meta-text { line-height: 1.4; }
.c8a7c5-single-author { font-weight: 600; font-size: 14.5px; }
.c8a7c5-single-time { color: var(--text-muted); font-size: 13px; }

.c8a7c5-single-thumb {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 28px;
  aspect-ratio: 16 / 9;
}

.c8a7c5-content {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--text);
}
.c8a7c5-content p { margin-bottom: 20px; }
.c8a7c5-content h2 {
  font-size: 23px;
  font-weight: 700;
  margin: 34px 0 14px;
  letter-spacing: -0.01em;
}
.c8a7c5-content h3 { font-size: 19px; margin: 26px 0 10px; }
.c8a7c5-content ul, .c8a7c5-content ol { margin: 0 0 20px 24px; }
.c8a7c5-content li { margin-bottom: 8px; }
.c8a7c5-content a { color: var(--accent); border-bottom: 1px solid rgba(29,34,185,0.3); }
.c8a7c5-content a:hover { border-bottom-color: var(--accent); }

/* 右侧栏 */
.c8a7c5-single-side {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.c8a7c5-side-widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.c8a7c5-side-widget h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.c8a7c5-side-widget ul { list-style: none; }
.c8a7c5-side-widget ul li {
  margin-bottom: 12px;
  padding-left: 14px;
  position: relative;
}
.c8a7c5-side-widget ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.c8a7c5-side-widget ul li a {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}
.c8a7c5-side-widget ul li a:hover { color: var(--accent); }

/* ===== 通用页面 ===== */
.c8a7c5-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 24px 68px;
}
.c8a7c5-page h1 { font-size: 32px; font-weight: 800; margin-bottom: 22px; }

/* ===== 404 ===== */
.c8a7c5-404 { text-align: center; padding: 110px 24px; }
.c8a7c5-404 h1 { font-size: 88px; font-weight: 800; color: var(--accent); }
.c8a7c5-404 p { color: var(--text-muted); margin: 16px 0 26px; }
.c8a7c5-404 a {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
}
.c8a7c5-404 a:hover { opacity: 0.9; color: #fff; }

/* ===== 搜索表单 ===== */
.c8a7c5-searchform { display: flex; gap: 8px; }
.c8a7c5-searchform input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: var(--text);
}
.c8a7c5-searchform button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Footer（居中极简：Logo + 一行链接 + 版权） ===== */
.c8a7c5-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  margin-top: 48px;
  text-align: center;
  padding: 44px 24px 36px;
}
.c8a7c5-footer-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.c8a7c5-footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.c8a7c5-footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}
.c8a7c5-footer-links a:hover { color: var(--accent); }
.c8a7c5-footer-copy { color: var(--text-muted); font-size: 12.5px; }

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .c8a7c5-grid { grid-template-columns: repeat(2, 1fr); }
  .c8a7c5-single-layout { grid-template-columns: 1fr; gap: 40px; }
  .c8a7c5-single-side { position: static; }
  .c8a7c5-header-inner { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .c8a7c5-grid { grid-template-columns: 1fr; }
  .c8a7c5-single-title { font-size: 27px; }
  .c8a7c5-logo { font-size: 19px; }
}
