/* 圭記水果知識庫。文章內文有大量寫死的淺色底（Hermes 範本），所以只做淺色版面 */
:root {
  color-scheme: light;
  --bg: #fffdf8;
  --surface: #ffffff;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --line: #ece6da;
  --accent: #2e7d32;
  --accent-soft: #eef6ee;
  --warm: #e65100;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* 頁首、頁尾 */
.site-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { font-weight: 700; font-size: 1.15em; color: var(--accent); text-decoration: none; }
.site-head nav a { margin-left: 16px; color: var(--text); text-decoration: none; }
.site-head nav a:hover { color: var(--accent); }
.site-foot { margin-top: 48px; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9em; }
.site-foot a { color: var(--muted); }

/* 首頁、標籤頁 */
.intro { padding: 32px 0 8px; }
.intro h1 { margin: 0 0 4px; font-size: 1.8em; }
.intro p { margin: 0; color: var(--muted); }
main > h1 { margin: 32px 0 16px; font-size: 1.5em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin: 24px 0; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.card-img { aspect-ratio: 16 / 9; background: var(--accent-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-text { padding: 12px 16px 16px; }
.card-text h2 { margin: 0 0 6px; font-size: 1.05em; line-height: 1.45; }
.card-text p { margin: 0 0 8px; color: var(--muted); font-size: 0.9em; line-height: 1.55; }
.card-text time, .meta time { color: var(--muted); font-size: 0.85em; }
.tag { display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 0.85em; text-decoration: none; }
.tag small { color: var(--muted); }
.tag-cloud { line-height: 2.2; }
.draft { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 6px; background: #fff3cd;
  color: #8a5300; font-size: 0.7em; vertical-align: middle; }

/* 文章頁 */
.post { padding-top: 24px; }
.post-cover { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; }
.post h1 { margin: 20px 0 6px; font-size: 1.7em; line-height: 1.35; }
.post .subtitle { margin: 0 0 8px; color: var(--muted); font-size: 1.05em; }
.post .meta { margin: 0 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.post .meta time { margin-right: 12px; }
.post-body h2, .post-body h3, .post-body h4 { line-height: 1.4; scroll-margin-top: 16px; }
.post-body blockquote { margin: 12px 0; padding: 8px 16px; border-left: 4px solid #ffcc80; background: #fffaf0; border-radius: 0 8px 8px 0; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.back { margin-top: 32px; }

/* Odoo（Bootstrap）留下的 class */
.post-body .table { width: 100%; margin: 12px 0 20px; border-collapse: collapse; background: var(--surface); }
.post-body .table th, .post-body .table td { padding: 8px 10px; border-top: 1px solid #dee2e6; vertical-align: top; text-align: left; }
.post-body .table thead th { border-bottom: 2px solid #dee2e6; background: #faf7f0; }
.post-body .table-bordered, .post-body .table-bordered th, .post-body .table-bordered td { border: 1px solid #dee2e6; }
.post-body .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.post-body .row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.post-body .row > [class*="col-"] { width: 100%; padding: 0 10px; }
@media (min-width: 768px) {
  .post-body .col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .post-body .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}
.post-body .img-fluid { max-width: 100%; height: auto; }
.post-body .rounded { border-radius: 8px; }

@media (max-width: 600px) {
  .post h1 { font-size: 1.4em; }
  .intro h1 { font-size: 1.5em; }
  .post-body .table th, .post-body .table td { padding: 6px; }
  /* 12 個月的產季表沒有包 table-responsive，手機上改成表格自己左右捲 */
  .post-body table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
