/* ==========================================================
   环博365 · 公用样式
   含：变量 / 基础重置 / 顶部（服务条 + 导航）/ 底部 / 侧边工具 / 轻提示
   页面私有样式见 index.css、search.css
   ========================================================== */

:root {
  --green: #a7e52e;
  --green-strong: #8ecb18;
  --green-dark: #0c3b2e;
  --green-deep: #072c23;
  --green-mid: #176148;
  --ink: #17231f;
  --text: #26332e;
  --muted: #77827d;
  --line: #e7ebe8;
  --surface: #ffffff;
  --page: #f5f7f6;
  --orange: #ef8b4d;
  --shadow: 0 16px 45px rgba(18, 48, 37, .08);
  --radius: 14px;
  --width: 1240px;
}

/* ---------- 基础重置 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body, button, input, select { font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
.container { width: min(var(--width), calc(100% - 64px)); margin: 0 auto; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- 顶部：服务条 ---------- */
.utility { height: 34px; color: #75817b; background: #f7f9f8; border-bottom: 1px solid #edf0ee; font-size: 12px; }
.utility .container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.utility-links { display: flex; align-items: center; gap: 22px; }
.utility-links a { transition: color .2s; }
.utility-links a:hover { color: var(--green-mid); }
.utility-links .divider { width: 1px; height: 11px; background: #dfe5e1; }

/* ---------- 顶部：主导航 ---------- */
.site-header { height: 82px; }
.site-header .container { height: 100%; display: flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 12px 12px 12px 3px; color: var(--green-dark); background: var(--green); transform: rotate(-3deg); }
.logo-mark svg { width: 29px; height: 29px; transform: rotate(3deg); }
.logo-name { color: var(--green-dark); font-size: 25px; line-height: 1; font-weight: 800; letter-spacing: -.8px; white-space: nowrap; }
.logo-name b { color: var(--green-strong); font-weight: 800; }
.logo-sub { display: block; margin-top: 7px; color: #88938e; font-size: 9px; letter-spacing: 2.2px; white-space: nowrap; }
.main-nav { display: flex; align-items: stretch; height: 100%; gap: 32px; margin-left: auto; margin-right: 34px; }
.main-nav a { position: relative; display: flex; align-items: center; color: #3c4843; font-size: 15px; white-space: nowrap; transition: color .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--green-dark); font-weight: 600; }
.main-nav a.active::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 24px; height: 3px; border-radius: 3px; background: var(--green-strong); transform: translateX(-50%); }
.header-action { display: flex; align-items: center; gap: 10px; }
.publish-btn { height: 40px; padding: 0 18px; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 6px; color: #18300e; background: var(--green); font-weight: 600; transition: transform .2s, background .2s; }
.publish-btn:hover { background: #b5ef45; transform: translateY(-1px); }
.publish-btn .icon { width: 17px; height: 17px; }
.menu-toggle { display: none; margin-left: auto; border: 0; background: transparent; color: var(--green-dark); }

/* ---------- 底部 ---------- */
.site-footer { padding: 54px 0 22px; color: rgba(255,255,255,.6); background: #08261e; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.15fr; gap: 60px; }
.footer-brand .logo-name { color: white; }
.footer-brand .logo-sub { color: rgba(255,255,255,.4); }
.footer-brand > p { max-width: 315px; margin-top: 21px; font-size: 12px; line-height: 1.9; }
.footer-title { margin-bottom: 20px; color: white; font-size: 14px; font-weight: 550; }
.footer-links { display: grid; gap: 13px; font-size: 12px; }
.footer-links a:hover { color: var(--green); }
.footer-contact { display: grid; gap: 13px; font-size: 12px; }
.footer-contact span { display: flex; align-items: center; gap: 9px; }
.footer-contact .icon { width: 15px; height: 15px; color: var(--green); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 42px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.09); font-size: 11px; }

/* ---------- 侧边工具 & 轻提示 ---------- */
.side-tools { position: fixed; z-index: 30; right: 20px; bottom: 90px; display: grid; gap: 8px; }
.side-tool { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #e2e8e3; border-radius: 7px; color: #66736c; background: rgba(255,255,255,.95); box-shadow: 0 5px 18px rgba(23,48,37,.06); }
.side-tool:hover { color: var(--green-dark); background: var(--green); }
.side-tool .icon { width: 19px; height: 19px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 38px; padding: 12px 20px; border-radius: 7px; color: white; background: rgba(8,38,30,.92); box-shadow: 0 8px 30px rgba(0,0,0,.15); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 公用响应式 ---------- */
@media (max-width: 1180px) {
  .main-nav { gap: 21px; margin-right: 22px; }
  .main-nav a { font-size: 14px; }
  .header-action .publish-btn { display: none; }
}
@media (max-width: 900px) {
  .container { width: min(100% - 36px, var(--width)); }
  .utility { display: none; }
  .site-header { height: 70px; }
  .menu-toggle { display: block; margin-left: auto; }
  .main-nav { display: none; position: absolute; left: 18px; right: 18px; top: 65px; height: auto; margin: 0; padding: 16px; flex-direction: column; gap: 0; border-radius: 9px; background: white; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { height: 42px; }
  .main-nav a.active::after { display: none; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 35px; }
  .footer-grid > div:last-child { display: none; }
}
@media (max-width: 650px) {
  .container { width: calc(100% - 28px); }
  .logo-mark { width: 39px; height: 39px; }
  .logo-name { font-size: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; gap: 8px; flex-direction: column; }
  .side-tools { display: none; }
}
