/* ===================================================================
   英山平台 商业化设计系统 main.css
   设计基调：生态茶绿(主) + 暖橙(消费) + 中性灰白，卡片化、圆角、柔和阴影
   适配：手机优先，兼容 Chrome/Edge/Safari/Firefox，390视口必测，4K居中限宽
=================================================================== */
:root {
  --primary: #F56545;          /* 主色：赤茶橙 */
  --primary-dark: #E0492C;
  --primary-light: #FFEDE7;
  --accent: #ff7a45;           /* 辅助：暖橙（价格/促销/下单） */
  --accent-dark: #f0622c;
  --gold: #f5a623;
  --text-main: #1f2329;
  --text-sub: #646a73;
  --text-light: #9aa0a8;
  --bg-page: #f5f6f8;
  --bg-card: #ffffff;
  --line: #eceef1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(31, 35, 41, .06);
  --shadow-hover: 0 6px 20px rgba(245, 101, 69, .16);
  --header-h: 56px;
  --tabbar-h: 56px;
  --max-w: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: inherit; font-size: 15px; outline: none; }

/* 通用容器：PC限宽居中，4K不拉伸；手机全宽 */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 14px; }
.text-sub { color: var(--text-sub); }
.text-accent { color: var(--accent); }
.text-ellipsis { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.text-ellipsis-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px; font-size: 15px; font-weight: 500;
  transition: opacity .15s, transform .05s, background .15s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 顶部导航 ---------- */
.app-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: #fff; box-shadow: 0 1px 0 var(--line);
}
.header-inner { max-width: var(--max-w); margin: 0 auto; height: 100%; padding: 0 16px;
  display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.logo-badge { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), #FF8A3D);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 700; }
.logo-slogan { font-size: 11px; color: var(--text-light); font-weight: 400; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { padding: 7px 13px; border-radius: 999px; font-size: 15px; color: var(--text-sub); transition: .15s; }
.main-nav a:hover { color: var(--primary); background: var(--primary-light); }
.main-nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; width: 38px; height: 38px; border-radius: 9px; background: var(--bg-page);
  font-size: 20px; color: var(--text-main); align-items: center; justify-content: center; }

/* 手机下拉菜单 */
.mobile-menu { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.08); padding: 8px 14px 14px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 13px 8px; border-bottom: 1px solid var(--line); color: var(--text-main); }
.mobile-menu a:last-child { border-bottom: none; }

/* ---------- 搜索条 ---------- */
.search-bar { display: flex; align-items: center; gap: 8px; background: var(--bg-page);
  border-radius: 999px; padding: 9px 16px; flex: 1; max-width: 420px; }
.search-bar input { border: none; background: transparent; flex: 1; font-size: 14px; }
.search-bar .icon { color: var(--text-light); }

/* ---------- 首页轮播 ---------- */
.banner { border-radius: var(--radius); overflow: hidden; position: relative; margin: 14px 0;
  background: linear-gradient(120deg, #F56545, #FF8A3D); }
.banner-slide { height: 300px; display: flex; align-items: center; padding: 0 46px; color: #fff; }
.banner-slide h2 { font-size: 32px; margin-bottom: 10px; }
.banner-slide p { font-size: 16px; opacity: .92; max-width: 520px; }
.banner-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.banner-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); }
.banner-dots i.on { width: 18px; border-radius: 4px; background: #fff; }

/* ---------- 金刚区（九宫格入口） ---------- */
.jingang { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; margin-bottom: 14px; }
.jg-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 2px;
  border-radius: var(--radius-sm); transition: background .15s; }
.jg-item:active { background: var(--primary-light); }
.jg-icon { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 22px; }
.jg-label { font-size: 13px; color: var(--text-main); }

/* ---------- 板块标题 ---------- */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 12px; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.sec-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--primary); }
.sec-more { font-size: 13px; color: var(--text-sub); }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 12px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card-media { position: relative; width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg,#FFF0EA,#FFEDE7);
  display: flex; align-items: center; justify-content: center; font-size: 40px; color: #9cc7b4; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 11px 12px 13px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card-desc { font-size: 13px; color: var(--text-sub); min-height: 40px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { color: var(--accent); font-weight: 700; }
.price small { font-size: 12px; font-weight: 400; }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: var(--primary-light); color: var(--primary); margin-right: 4px; }
.tag-accent { background: #fff0e9; color: var(--accent); }
.tag-gold { background: #fdf4e1; color: #c8860a; }

/* 横向列表条目（岗位/资讯） */
.list-item { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 10px; display: block; }
.list-item:hover { box-shadow: var(--shadow-hover); }
.li-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.li-row > div:first-child { flex: 1; min-width: 0; }
.li-title { font-size: 16px; font-weight: 600; }
.li-meta { font-size: 13px; color: var(--text-sub); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 14px; }
.li-salary { color: var(--accent); font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* ---------- 筛选条 ---------- */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 6px 16px; border-radius: 999px; background: #fff; color: var(--text-sub);
  font-size: 13px; border: 1px solid var(--line); }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 详情页 ---------- */
.detail-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 16px; margin: 14px 0; }
.detail-main { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.detail-side { display: flex; flex-direction: column; gap: 12px; }
.side-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.detail-hero { aspect-ratio: 16/8; border-radius: var(--radius); overflow: hidden; background: #e8f4ee;
  display: flex; align-items: center; justify-content: center; font-size: 64px; color: #9cc7b4; margin-bottom: 16px; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.info-line { display: flex; gap: 8px; color: var(--text-sub); font-size: 14px; margin: 6px 0; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; color: var(--text-sub); margin-bottom: 6px; }
.form-control { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; transition: border .15s; }
.form-control:focus { border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 90px; }
.auth-card { max-width: 420px; margin: 30px auto; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 24px; }
.auth-card h2 { text-align: center; margin-bottom: 22px; color: var(--primary); }

/* ---------- 底部Tab（手机） ---------- */
.tab-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: var(--tabbar-h);
  background: #fff; border-top: 1px solid var(--line); z-index: 100;
  grid-template-columns: repeat(5, 1fr); }
.tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; color: var(--text-light); }
.tab-item .ti { font-size: 20px; }
.tab-item.active { color: var(--primary); }

/* ---------- 页脚 ---------- */
.app-footer { background: #2A2623; color: #cdc6c0; margin-top: 40px; padding: 30px 0 20px; font-size: 13px; }
.app-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.app-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.app-footer a { display: block; padding: 3px 0; color: #b7c2bc; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,.08); margin-top: 22px; padding-top: 16px; }

/* 空状态/加载 */
.empty { text-align: center; color: var(--text-light); padding: 60px 20px; }
.empty .ei { font-size: 48px; margin-bottom: 10px; }
.loading { text-align: center; color: var(--text-light); padding: 30px; }

/* 提示条（二期功能预留说明） */
.notice-strip { background: var(--primary-light); color: var(--primary-dark); font-size: 13px;
  padding: 9px 16px; border-radius: var(--radius-sm); margin: 10px 0; display: flex; gap: 8px; align-items: center; }

/* ===================================================================
   响应式断点
=================================================================== */
/* 平板 */
@media (max-width: 900px) {
  .jingang { grid-template-columns: repeat(4, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .detail-wrap { grid-template-columns: 1fr; }
  .detail-side { order: -1; }
  .app-footer .container { grid-template-columns: 1fr 1fr; }
}
/* 手机 */
@media (max-width: 768px) {
  body { font-size: 14px; padding-bottom: var(--tabbar-h); }
  .main-nav, .header-right .nav-hide { display: none; }
  .hamburger { display: flex; }
  .search-bar { max-width: none; }
  .header-inner { gap: 10px; }
  .banner-slide { height: 180px; padding: 0 24px; }
  .banner-slide h2 { font-size: 21px; }
  .banner-slide p { font-size: 13px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .tab-bar { display: grid; }
  .app-footer .container { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .jingang { grid-template-columns: repeat(4, 1fr); padding: 14px 4px; }
  .jg-icon { width: 42px; height: 42px; font-size: 20px; }
}
/* 390 视口精修（iPhone 12/13/14 标准宽度，必测） */
@media (max-width: 420px) {
  .container { padding: 0 10px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .card-body { padding: 9px 10px 11px; }
  .card-title { font-size: 14px; }
  .banner-slide { height: 158px; }
  .detail-title { font-size: 19px; }
}
/* 大屏/4K：限宽居中，避免拉得过宽 */
@media (min-width: 1600px) { :root { --max-w: 1280px; } }
