/*
Theme Name: 绿源农品主题
Theme URI: https://nong.ayjkly.love
Author: 绿源农品
Description: 农产品企业官网主题，绿色调，含产品中心/新闻/留言。
Version: 1.1.0
Requires PHP: 7.4
*/

/* 基础 */
:root {
  --ink: #22301f;
  --green: #2e6b2e;
  --green-d: #245424;
  --leaf: #4c8b45;
  --bg: #f6f7f2;
  --line: #e3e7dc;
  --dim: #75806e;
  --serif: Georgia, "Times New Roman", "Songti SC", "STSong", SimSun, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.ng-svg { width: 100%; height: 100%; }

/* 链接下划线，从左划进来 */
.u {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: background-size .25s;
}
.u:hover { background-size: 100% 1px; }

/* 按钮，hover 不拖泥带水 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--green);
  border-radius: 8px;
  font-size: 15px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--green-d); border-color: var(--green-d); }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }
.btn.plain { background: none; color: var(--green); }
.btn.plain:hover { background: #e9efe4; }

/* 小标 */
.kicker {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--leaf);
  margin-bottom: 12px;
}

/* 顶部 */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 242, .9);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow .25s;
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  transition: height .25s;
}
.top.tight { background: rgba(255, 255, 255, .95); box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(34, 48, 31, .06); }
.top.tight .top-in { height: 58px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 21px; color: var(--green); }
.logo svg { width: 34px; height: 34px; }
.nav ul { display: flex; gap: 6px; }
.nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 15px;
  transition: color .15s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.nav a:hover::after,
.nav .current-menu-item a::after,
.nav .current_page_item a::after { transform: scaleX(1); }
.nav a:hover, .nav .current-menu-item a, .nav .current_page_item a { color: var(--green); }
.top-tel { font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.top-tel b { font-family: var(--serif); font-size: 17px; }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger svg { width: 26px; height: 26px; stroke: var(--green); }

/* 首屏，浅色大字 */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(175deg, #eef2e6 0%, var(--bg) 70%);
}
.hero-in { position: relative; padding: 108px 0 128px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 52px;
  line-height: 1.3;
  max-width: 620px;
}
.hero h1 em { font-style: normal; color: var(--green); }
.hero .sub { margin-top: 22px; font-size: 17px; color: var(--dim); max-width: 480px; }
.hero .cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .hill { position: absolute; right: -60px; bottom: -30px; width: 560px; opacity: .5; pointer-events: none; }
.hero .hill svg { width: 100%; height: auto; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero h1 { animation: rise .7s .05s both; }
.hero .sub { animation: rise .7s .18s both; }
.hero .cta { animation: rise .7s .3s both; }

/* 区块 */
.sec { padding: 88px 0; }
.sec.white { background: #fff; }
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 44px;
}
.sec-head h2 { font-family: var(--serif); font-size: 32px; font-weight: 600; }
.sec-head .kicker { margin-bottom: 10px; }
.sec-head .more { font-size: 14px; color: var(--dim); white-space: nowrap; padding-bottom: 6px; }
.sec-head .more:hover { color: var(--green); }
.sec-head .more .arr { display: inline-block; transition: transform .2s; }
.sec-head .more:hover .arr { transform: translateX(3px); }

/* 我们是谁 */
.who { display: grid; grid-template-columns: 1fr 1.35fr; gap: 60px; }
.who-left .kicker { margin-top: 6px; }
.who-left h2 { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1.4; }
.who-left h2 em { font-style: normal; color: var(--green); }
.who-right p { color: #4a5443; margin-bottom: 16px; }
.nums {
  display: flex;
  gap: 56px;
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.nums b { display: block; font-family: var(--serif); font-size: 34px; color: var(--green); line-height: 1.2; }
.nums b i { font-style: normal; font-size: 16px; margin-left: 2px; }
.nums span { font-size: 13px; color: var(--dim); }

/* 产品卡 */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-3px); border-color: transparent; box-shadow: 0 16px 34px rgba(34, 48, 31, .1); }
.card .pic { aspect-ratio: 4 / 3; overflow: hidden; background: #e9efe4; }
.card .pic img, .card .pic svg { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .pic img, .card:hover .pic svg { transform: scale(1.045); }
.card .txt { padding: 16px 18px 20px; }
.card .tag { font-size: 12px; color: var(--leaf); }
.card h3 { font-size: 17px; margin-top: 4px; }
.card h3 a { transition: color .15s; }
.card h3 a:hover { color: var(--green); }
.card p { font-size: 14px; color: var(--dim); margin-top: 6px; }

/* 为什么选我们，编号行 */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 90px 1fr 1.6fr;
  gap: 24px;
  padding: 30px 10px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.row .no { font-family: var(--serif); font-size: 26px; color: #b6c2ae; transition: color .2s; }
.row h3 { font-size: 19px; transition: color .15s; }
.row p { color: var(--dim); font-size: 15px; }
.row:hover .no { color: var(--green); }
.row:hover h3 { color: var(--green); }

/* 新闻列表 */
.news-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 24px;
  padding: 26px 10px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.news-item time { font-size: 14px; color: var(--dim); font-family: var(--serif); }
.news-item h3 { font-size: 18px; font-weight: 500; }
.news-item h3 a { transition: color .15s; }
.news-item h3 a:hover { color: var(--green); }
.news-item .arr { color: #b6c2ae; transition: transform .2s, color .2s; }
.news-item:hover .arr { transform: translateX(4px); color: var(--green); }
.news-more { text-align: center; margin-top: 40px; }

/* 邀请条 */
.invite {
  background: var(--green-d);
  border-radius: 18px;
  color: #fff;
  padding: 52px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.invite h2 { font-family: var(--serif); font-size: 27px; font-weight: 600; }
.invite p { margin-top: 8px; color: #c8d7c2; font-size: 15px; }
.invite .tel { font-family: var(--serif); font-size: 34px; letter-spacing: 1px; transition: color .15s; }
.invite .tel:hover { color: #a9d29f; }
.invite .tel small { display: block; font-family: inherit; font-size: 13px; color: #c8d7c2; letter-spacing: 2px; margin-bottom: 4px; }

/* 滚动显现 */
[data-r] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
[data-r].on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-r] { opacity: 1; transform: none; transition: none; }
  .hero h1, .hero .sub, .hero .cta { animation: none; }
}

/* 内页标题区 */
.page-head { padding: 72px 0 56px; }
.page-head h1 { font-family: var(--serif); font-size: 38px; font-weight: 600; }
.page-head .crumb { margin-top: 10px; font-size: 14px; color: var(--dim); }
.page-head .crumb a:hover { color: var(--green); }
.page-body { background: #fff; padding: 64px 0 80px; }

/* 关于页 */
.ab { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.ab + .ab { margin-top: 72px; }
.ab h2 { font-family: var(--serif); font-size: 26px; margin-bottom: 16px; }
.ab p { color: #4a5443; margin-bottom: 12px; font-size: 15px; }
.ab .pic { border-radius: 12px; overflow: hidden; }
.ab .pic svg, .ab .pic img { width: 100%; height: auto; }
.years { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 64px; }
.year { border-top: 2px solid var(--green); padding-top: 14px; }
.year b { font-family: var(--serif); font-size: 24px; color: var(--green); }
.year span { display: block; font-size: 14px; color: var(--dim); margin-top: 4px; }

/* 正文 */
.prose { max-width: 760px; margin: 0 auto; }
.prose p { margin-bottom: 16px; color: #3d463a; }
.prose h2, .prose h3 { margin: 28px 0 12px; }

/* 联系页 */
.ct-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 32px; }
.ct-info h3, .ct-form h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 22px; }
.ct-info li { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.ct-info li:last-child { border: 0; }
.ct-info b { display: block; font-size: 15px; }
.ct-info span { font-size: 14px; color: var(--dim); }
.ct-form { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fg { margin-bottom: 14px; }
.fg label { display: block; font-size: 14px; margin-bottom: 6px; color: #4a5443; }
.fg input, .fg textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: var(--bg);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.fg input:focus, .fg textarea:focus {
  border-color: var(--leaf);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(76, 139, 69, .12);
}
.fg-ok { background: #e9efe4; color: var(--green); padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }

/* 详情页 */
.article { max-width: 780px; margin: 0 auto; }
.article h1 { font-family: var(--serif); font-size: 30px; line-height: 1.45; font-weight: 600; }
.article .meta { display: flex; gap: 18px; margin: 14px 0 28px; font-size: 14px; color: var(--dim); }
.article .content p { margin-bottom: 16px; color: #3d463a; }
.article .content img { border-radius: 10px; margin: 18px 0; }
.article .thumb { margin: 0 0 28px; }
.article .thumb img { border-radius: 12px; width: 100%; }
.back { margin-top: 40px; }

/* 产品详情 */
.pd { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: start; }
.pd .pic { border-radius: 12px; overflow: hidden; background: #e9efe4; }
.pd .pic svg, .pd .pic img { width: 100%; height: auto; }
.pd h1 { font-family: var(--serif); font-size: 28px; }
.pd .tag { color: var(--leaf); font-size: 13px; margin-bottom: 10px; }
.pd .desc { color: var(--dim); margin-top: 10px; }
.pd .body { margin-top: 22px; color: #3d463a; }

/* 404/分页 */
.pagenum, .page-numbers {
  display: flex;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin-top: 44px;
}
.pagenum a, .pagenum span,
.page-numbers li a, .page-numbers li span {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  transition: color .15s, border-color .15s, background .15s;
}
.pagenum a:hover, .page-numbers li a:hover { color: var(--green); border-color: var(--leaf); }
.pagenum .current, .page-numbers li span.current { background: var(--green); border-color: var(--green); color: #fff; }

/* 页脚 */
.foot { background: #1c2918; color: #93a08c; margin-top: 96px; font-size: 14px; }
.foot-in { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 40px; padding: 56px 0 44px; }
.foot .logo { color: #fff; margin-bottom: 14px; }
.foot h4 { color: #fff; font-size: 15px; margin-bottom: 14px; font-weight: 500; }
.foot li { padding: 4px 0; }
.foot a:hover { color: #fff; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 0; text-align: center; font-size: 12px; color: #5c6b55; }

/* 响应式 */
@media (max-width: 900px) {
  .hero h1 { font-size: 38px; }
  .who, .ab, .ct-grid, .pd { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .years { grid-template-columns: repeat(2, 1fr); }
  .foot-in { grid-template-columns: 1fr; gap: 28px; }
  .row { grid-template-columns: 50px 1fr; }
  .row p { grid-column: 2; }
}
@media (max-width: 620px) {
  .sec { padding: 60px 0; }
  .hero-in { padding: 76px 0 90px; }
  .hero h1 { font-size: 30px; }
  .cards, .form-row { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
  .news-item .arr { display: none; }
  .invite { padding: 36px 28px; }
  .nums { flex-wrap: wrap; gap: 24px; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 6px; }

  .burger { display: block; }
  .top-tel { display: none; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 14px 30px rgba(34, 48, 31, .1);
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 10px 18px; }
  .nav a { display: block; padding: 12px 6px; }
  .nav a::after { display: none; }
}
