/* =====================================================
   农讯网 nongxun.net — 园艺风全新模板样式
   参考: rhs.org.uk / gardeningknowhow.com / gardenersworld.com
   ===================================================== */
:root {
  --nx-g900: #143d28;
  --nx-g800: #1d5c3f;
  --nx-g700: #2a7a55;
  --nx-g600: #3a8a5f;
  --nx-g100: #e4f1e7;
  --nx-g50:  #f2f8f3;
  --nx-bg:   #f7f9f6;
  --nx-text: #22312a;
  --nx-muted:#66756c;
  --nx-border:#e2e8e0;
  --nx-amber:#e8a13a;
  --nx-radius: 12px;
  --nx-shadow: 0 1px 3px rgba(20,61,40,.06), 0 4px 16px rgba(20,61,40,.06);
  --nx-shadow-hover: 0 6px 24px rgba(20,61,40,.14);
}
* { margin:0; padding:0; box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body {
  font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",sans-serif;
  background: var(--nx-bg); color: var(--nx-text);
  font-size: 15px; line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--nx-g700); }
img { max-width: 100%; display: block; }
ul,ol { list-style: none; }
.nx-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ================= 头部 ================= */
.nx-topbar { background:#fff; border-bottom:1px solid var(--nx-border); }
.nx-topbar-in { display:flex; align-items:center; gap:24px; height:72px; }
.nx-logo { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.nx-logo-leaf {
  width:44px; height:44px; border-radius:12px; background:var(--nx-g800);
  color:#fff; font-size:26px; line-height:44px; text-align:center;
  display:inline-block; font-style:normal;
}
.nx-logo-text b { display:block; font-size:22px; color:var(--nx-g900); letter-spacing:2px; line-height:1.2; }
.nx-logo-text i { display:block; font-style:normal; font-size:11px; color:var(--nx-muted); letter-spacing:1px; }
.nx-search { flex:1; max-width:440px; display:flex; margin-left:auto; }
.nx-search input[type=text] {
  flex:1; border:2px solid var(--nx-g100); border-right:0; border-radius:8px 0 0 8px;
  padding:0 14px; font-size:14px; outline:none; height:40px; background:#fff; color:var(--nx-text);
}
.nx-search input[type=text]:focus { border-color:var(--nx-g600); }
.nx-search button {
  border:0; background:var(--nx-g800); color:#fff; padding:0 22px; height:40px;
  border-radius:0 8px 8px 0; cursor:pointer; font-size:14px;
}
.nx-search button:hover { background:var(--nx-g700); }
.nx-menu-btn {
  display:none; border:1px solid var(--nx-border); background:#fff; border-radius:8px;
  width:42px; height:40px; font-size:20px; cursor:pointer; color:var(--nx-g800);
}
.nx-nav { background:var(--nx-g900); }
.nx-nav ul { display:flex; flex-wrap:wrap; }
.nx-nav li a {
  display:block; padding:0 22px; height:50px; line-height:50px;
  color:#dcefe2; font-size:15.5px; letter-spacing:1px; transition:background .2s;
}
.nx-nav li a:hover, .nx-nav li.active a { background:var(--nx-g800); color:#fff; }
.nx-nav li.active a { position:relative; }
.nx-nav li.active a:after {
  content:""; position:absolute; left:22px; right:22px; bottom:8px; height:2px;
  background:var(--nx-amber); border-radius:2px;
}

/* ================= 主体布局 ================= */
.nx-main { padding:26px 20px 40px; }
.nx-cols { display:grid; grid-template-columns: 1fr 300px; gap:28px; align-items:start; }
.nx-crumb { font-size:13px; color:var(--nx-muted); margin-bottom:18px; }
.nx-crumb a { color:var(--nx-g700); }

/* ================= 首页 Hero ================= */
.nx-home-cols { display:grid; grid-template-columns: 1fr 300px; gap:28px; align-items:start; }
.nx-hero { display:grid; grid-template-columns: 1.5fr 1fr; gap:16px; margin-bottom:34px; }
.nx-hero-main { position:relative; border-radius:var(--nx-radius); overflow:hidden; display:block; min-height:340px; background:var(--nx-g100); }
.nx-hero-main img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; transition:transform .5s; }
.nx-hero-main:hover img { transform:scale(1.04); }
.nx-hero-cap {
  position:absolute; left:0; right:0; bottom:0; padding:60px 24px 20px;
  background:linear-gradient(transparent, rgba(10,35,22,.88)); color:#fff;
}
.nx-hero-cap h2 { font-size:24px; line-height:1.4; margin:8px 0 6px; }
.nx-hero-cap p { font-size:13.5px; opacity:.85; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nx-badge {
  display:inline-block; background:var(--nx-amber); color:#fff; font-size:12px;
  padding:2px 10px; border-radius:20px; letter-spacing:1px;
}
.nx-hero-side { display:flex; gap:12px; background:#fff; border-radius:var(--nx-radius); padding:10px; box-shadow:var(--nx-shadow); transition:box-shadow .2s, transform .2s; }
.nx-hero-side:hover { box-shadow:var(--nx-shadow-hover); transform:translateY(-2px); color:inherit; }
.nx-hero-side img { width:120px; height:84px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.nx-hero-side h3 { font-size:14.5px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; color:var(--nx-text); }
.nx-hero-side time { font-size:12px; color:var(--nx-muted); }
.nx-hero-side > div { display:flex; flex-direction:column; justify-content:space-between; padding:4px 0; }

/* ================= 首页栏目分区 ================= */
.nx-cats { display:grid; grid-template-columns:1fr 1fr; gap:24px; }
.nx-cat-sec { background:#fff; border-radius:var(--nx-radius); padding:20px 22px; box-shadow:var(--nx-shadow); }
.nx-sec-head { display:flex; align-items:center; justify-content:space-between; border-bottom:2px solid var(--nx-g100); padding-bottom:10px; margin-bottom:14px; }
.nx-sec-head h2 { font-size:18px; color:var(--nx-g900); padding-left:12px; position:relative; }
.nx-sec-head h2:before { content:""; position:absolute; left:0; top:4px; bottom:4px; width:4px; border-radius:2px; background:var(--nx-g600); }
.nx-more { font-size:13px; color:var(--nx-g600); }
.nx-cat-item { display:flex; gap:12px; padding:10px 0; border-bottom:1px dashed var(--nx-border); }
.nx-cat-item:last-child { border-bottom:0; padding-bottom:0; }
.nx-cat-item img { width:96px; height:68px; object-fit:cover; border-radius:8px; flex-shrink:0; }
.nx-cat-item h3 { font-size:15px; line-height:1.5; font-weight:600; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nx-cat-item time { font-size:12px; color:var(--nx-muted); }

/* ================= 侧栏 ================= */
.nx-side { display:flex; flex-direction:column; gap:22px; }
.nx-widget { background:#fff; border-radius:var(--nx-radius); padding:18px 20px; box-shadow:var(--nx-shadow); }
.nx-widget h3 {
  font-size:16px; color:var(--nx-g900); padding-bottom:10px; margin-bottom:12px;
  border-bottom:2px solid var(--nx-g100); position:relative;
}
.nx-widget h3:after { content:""; position:absolute; left:0; bottom:-2px; width:48px; height:2px; background:var(--nx-g600); }
.nx-widget ol { counter-reset: hot; }
.nx-widget ol li { counter-increment: hot; padding:8px 0; border-bottom:1px dashed var(--nx-border); display:flex; align-items:baseline; gap:8px; }
.nx-widget ol li:last-child { border-bottom:0; }
.nx-widget ol li:before {
  content: counter(hot); flex-shrink:0; width:20px; height:20px; line-height:20px; text-align:center;
  background:var(--nx-g100); color:var(--nx-g800); font-size:12px; border-radius:4px; font-weight:700;
}
.nx-widget ol li:nth-child(-n+3):before { background:var(--nx-g800); color:#fff; }
.nx-widget ol li a, .nx-widget ul li a {
  font-size:14px; line-height:1.55;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.nx-widget ul li { padding:8px 0; border-bottom:1px dashed var(--nx-border); }
.nx-widget ul li:last-child { border-bottom:0; }
.nx-widget-cats ul { display:grid; grid-template-columns:1fr 1fr; gap:4px 12px; }
.nx-widget-cats ul li a { color:var(--nx-g800); font-weight:600; }

/* ================= 列表页 ================= */
.nx-page-title { font-size:24px; color:var(--nx-g900); margin-bottom:6px; padding-left:12px; border-left:5px solid var(--nx-g600); line-height:1.3; }
.nx-page-desc { color:var(--nx-muted); font-size:13.5px; margin-bottom:20px; padding-left:17px; }
.nx-arts { display:flex; flex-direction:column; gap:16px; }
.nx-art { display:flex; gap:18px; background:#fff; border-radius:var(--nx-radius); padding:16px; box-shadow:var(--nx-shadow); transition:box-shadow .2s, transform .2s; }
.nx-art:hover { box-shadow:var(--nx-shadow-hover); transform:translateY(-2px); }
.nx-art-img img { width:220px; height:150px; object-fit:cover; border-radius:8px; }
.nx-art.no-img { padding-left:24px; }
.nx-art-body h2 { font-size:18px; line-height:1.5; margin-bottom:8px; }
.nx-art-body h2 a:hover { color:var(--nx-g700); }
.nx-art-body p { font-size:13.5px; color:var(--nx-muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-bottom:10px; }
.nx-art-meta { display:flex; gap:16px; font-size:12.5px; color:var(--nx-muted); }
.nx-art-meta span:first-child { color:var(--nx-g700); font-weight:600; }
.nx-pages { margin-top:24px; text-align:center; }
.nx-pages a, .nx-pages span { display:inline-block; min-width:36px; height:36px; line-height:36px; padding:0 10px; margin:0 4px 6px 0; background:#fff; border:1px solid var(--nx-border); border-radius:8px; font-size:13px; }
.nx-pages span { background:var(--nx-g800); border-color:var(--nx-g800); color:#fff; }
.nx-pages a:hover { border-color:var(--nx-g600); color:var(--nx-g700); }

/* ================= 内容页 ================= */
.nx-show { background:#fff; border-radius:var(--nx-radius); padding:28px 32px; box-shadow:var(--nx-shadow); }
.nx-show h1 { font-size:26px; line-height:1.5; color:var(--nx-g900); margin-bottom:14px; }
.nx-show-meta { display:flex; flex-wrap:wrap; gap:16px; font-size:13px; color:var(--nx-muted); padding-bottom:16px; border-bottom:1px solid var(--nx-border); margin-bottom:20px; }
.nx-show-meta span:first-child { color:var(--nx-g700); font-weight:600; }
.nx-lead { background:var(--nx-g50); border-left:4px solid var(--nx-g600); padding:12px 16px; border-radius:0 8px 8px 0; font-size:14px; color:#3c4f44; margin-bottom:20px; }
.nx-show-thumb { margin-bottom:20px; }
.nx-show-thumb img { border-radius:var(--nx-radius); }
.nx-content { font-size:16px; line-height:1.9; word-break:break-word; }
.nx-content p { margin-bottom:16px; }
.nx-content img { border-radius:8px; margin:10px auto; }
.nx-content h2, .nx-content h3 { color:var(--nx-g900); margin:24px 0 12px; }
.nx-tags { margin-top:24px; }
.nx-tags a { display:inline-block; background:var(--nx-g50); color:var(--nx-g800); font-size:13px; padding:4px 14px; border-radius:20px; margin:0 8px 8px 0; }
.nx-tags a:hover { background:var(--nx-g100); }
.nx-rel { background:#fff; border-radius:var(--nx-radius); padding:20px 24px; box-shadow:var(--nx-shadow); margin-top:24px; }
.nx-rel h3 { font-size:17px; color:var(--nx-g900); margin-bottom:12px; padding-left:12px; border-left:4px solid var(--nx-g600); line-height:1.3; }
.nx-rel li { display:flex; justify-content:space-between; gap:14px; padding:9px 0; border-bottom:1px dashed var(--nx-border); }
.nx-rel li:last-child { border-bottom:0; }
.nx-rel li a { font-size:14.5px; flex:1; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.nx-rel li time { font-size:12px; color:var(--nx-muted); flex-shrink:0; }
.nx-news-list li a { -webkit-line-clamp:1; }

/* ================= 页脚 ================= */
.nx-footer { background:var(--nx-g900); color:#b9d4c2; margin-top:40px; }
.nx-footer-in { display:grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap:36px; padding:40px 20px 28px; max-width:1180px; margin:0 auto; }
.nx-footer h4 { color:#fff; font-size:16px; margin-bottom:14px; letter-spacing:1px; }
.nx-footer-about p { font-size:13px; line-height:1.9; opacity:.85; }
.nx-footer-nav a { display:inline-block; margin:0 16px 8px 0; font-size:13.5px; opacity:.9; }
.nx-footer-nav a:hover { opacity:1; color:#fff; }
.nx-footer-links a { display:inline-block; font-size:13px; margin:0 14px 8px 0; opacity:.75; }
.nx-footer-links a:hover { opacity:1; color:#fff; }
.nx-copy { border-top:1px solid rgba(255,255,255,.12); text-align:center; padding:16px 20px; font-size:12.5px; opacity:.7; }
.nx-backtop {
  position:fixed; right:24px; bottom:32px; width:44px; height:44px; border-radius:50%;
  background:var(--nx-g800); color:#fff; border:0; font-size:18px; cursor:pointer;
  box-shadow:var(--nx-shadow-hover); display:none; z-index:99;
}
.nx-backtop:hover { background:var(--nx-g700); }

/* ================= 响应式 ================= */
@media (max-width: 991px) {
  .nx-home-cols, .nx-cols { grid-template-columns:1fr; }
  .nx-side { order:2; }
  .nx-cats { grid-template-columns:1fr; }
  .nx-hero { grid-template-columns:1fr; }
  .nx-hero-main { min-height:240px; }
  .nx-footer-in { grid-template-columns:1fr; gap:24px; }
}
@media (max-width: 768px) {
  .nx-topbar-in { height:60px; gap:12px; }
  .nx-logo-leaf { width:36px; height:36px; line-height:36px; font-size:20px; border-radius:9px; }
  .nx-logo-text b { font-size:18px; }
  .nx-search { display:none; }
  .nx-menu-btn { display:block; margin-left:auto; }
  .nx-nav { display:none; }
  .nx-nav.open { display:block; }
  .nx-nav ul { flex-direction:column; }
  .nx-nav li a { height:44px; line-height:44px; padding:0 20px; border-bottom:1px solid rgba(255,255,255,.06); }
  .nx-nav li.active a:after { display:none; }
  .nx-art { flex-direction:column; }
  .nx-art-img img { width:100%; height:180px; }
  .nx-show { padding:20px 18px; }
  .nx-show h1 { font-size:21px; }
  .nx-content { font-size:15.5px; }
  .nx-main { padding:16px 14px 30px; }
}
