/* style.css — 技能蓉城 全站样式（移动优先） */
:root {
  --primary: #0c447c;        /* 主色：深蓝 */
  --primary-dark: #072f57;
  --primary-light: #e6f1fb;
  --accent: #f28c28;         /* 强调色：橙 */
  --accent-dark: #d9741a;
  --accent-light: #fdf1e3;
  --text: #1f2933;
  --text-muted: #6b7280;
  --bg: #f7f8fa;
  --card: #ffffff;
  --border: 1px solid #e5e7eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  border-bottom: var(--border);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
}
.logo span { color: var(--accent); }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.main-nav a:hover,
.main-nav a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ---------- 通用容器 ---------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.section-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--primary-dark);
  color: #fff;
  padding: 48px 16px 56px;
  text-align: center;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--accent);
}
.hero h1 { font-size: 1.7rem; font-weight: 600; margin-bottom: 10px; }
.hero p {
  max-width: 560px;
  margin: 0 auto 22px;
  color: #b5d4f4;
  font-size: 0.95rem;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); opacity: 1; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn-block { width: 100%; }

/* ---------- 统计条 ---------- */
.stats {
  max-width: 720px;
  margin: -28px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 10px;
  text-align: center;
}
.stat-num { font-size: 1.2rem; font-weight: 600; color: var(--accent-dark); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- 考证日历 ---------- */
.calendar-list { display: grid; gap: 10px; }
.calendar-item {
  display: flex;
  gap: 12px;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  align-items: center;
}
.cal-month {
  flex-shrink: 0;
  min-width: 64px;
  text-align: center;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 8px;
  padding: 6px 4px;
  font-size: 0.82rem;
  font-weight: 600;
}
.cal-body h3 { font-size: 0.95rem; font-weight: 600; }
.cal-body p { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- 课程卡片 ---------- */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.course-card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.course-card .tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fcebeb;
  color: #a32d2d;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
}
.course-card h3 { font-size: 1rem; font-weight: 600; padding-right: 44px; }
.course-org { font-size: 0.8rem; color: var(--text-muted); }
.course-desc { font-size: 0.85rem; color: var(--text); flex: 1; }
.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: var(--border);
  padding-top: 10px;
}
.course-price { color: var(--accent-dark); font-weight: 600; }
.course-price small { font-weight: 400; color: var(--text-muted); }
.course-cycle { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- 分类筛选 ---------- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: var(--card);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- 流程 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.step { text-align: center; padding: 14px 6px; background: var(--card); border-radius: var(--radius); border: var(--border); }
.step-num {
  width: 30px; height: 30px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 600;
}
.step h3 { font-size: 0.9rem; margin-bottom: 4px; }
.step p { font-size: 0.76rem; color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq-item { background: var(--card); border: var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.faq-item h3 { font-size: 0.95rem; margin-bottom: 6px; }
.faq-item p { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- 表单 ---------- */
.form-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-group .required { color: #a32d2d; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.form-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 0.8rem; color: var(--text-muted); }
.form-agree input { width: auto; margin-top: 4px; }
.form-tip { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; }

.form-success {
  display: none;
  text-align: center;
  padding: 32px 16px;
}
.form-success .icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
}
.form-error { display: none; background: #fcebeb; color: #a32d2d; border-radius: 8px; padding: 10px 12px; font-size: 0.85rem; margin-bottom: 14px; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--primary-dark);
  color: #b5d4f4;
  margin-top: 48px;
  padding: 32px 16px 76px;
  font-size: 0.82rem;
}
.footer-inner { max-width: 1080px; margin: 0 auto; display: grid; gap: 14px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a:hover { color: #fff; }
.footer-note { opacity: 0.75; line-height: 1.8; }

/* ---------- 管理后台 ---------- */
.lead-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.lead-table th, .lead-table td { padding: 10px 12px; border-bottom: 1px solid #eef0f2; text-align: left; font-size: 0.85rem; }
.lead-table th { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.badge-new { background: var(--accent-light); color: var(--accent-dark); padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; }
.badge-paid { background: #eaf3de; color: #3b6d11; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; }

/* ---------- 首页快捷入口（仿技能成都） ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 720px;
  margin: -26px auto 0;
  padding: 0 16px;
}
.quick-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 6px;
  text-align: center;
  display: block;
}
.quick-icon {
  width: 44px; height: 44px;
  margin: 0 auto 6px;
  border-radius: 12px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.quick-card:nth-child(even) .quick-icon { background: var(--primary-light); }
.quick-card h3 { font-size: 0.88rem; font-weight: 600; color: var(--primary); }

/* ---------- 大搜索框 ---------- */
.search-box {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 8px;
}
.search-inner {
  display: flex;
  background: var(--card);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--accent);
}
.search-inner input {
  flex: 1;
  border: none;
  padding: 12px 18px;
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
}
.search-inner button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 0 24px;
  font-size: 0.95rem;
  cursor: pointer;
}

/* ---------- 政策动态 ---------- */
.news-list { display: grid; gap: 10px; }
.news-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.news-badge {
  flex-shrink: 0;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 2px;
}
.news-item p { font-size: 0.88rem; line-height: 1.5; }
.news-item time { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ---------- 学校卡价格区间 ---------- */
.school-price { font-size: 0.85rem; color: var(--accent-dark); font-weight: 600; }

/* ---------- 订单卡 ---------- */
.order-card {
  max-width: 520px;
  margin: 0 auto 16px;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.order-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #eef0f2; font-size: 0.9rem; }
.order-row .k { color: var(--text-muted); }
.order-amount { font-size: 1.4rem; font-weight: 600; color: var(--accent-dark); }
.pay-note { background: var(--primary-light); border-radius: 8px; padding: 12px 14px; font-size: 0.82rem; color: var(--primary-dark); line-height: 1.7; }

/* ---------- 底部 Tab 栏（仿小程序） ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--card);
  border-top: 1px solid #e5e7eb;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 4px 0;
}
.tabbar a .tab-icon { display: block; font-size: 1.15rem; line-height: 1.4; }
.tabbar a.active { color: var(--accent-dark); font-weight: 600; }
body.has-tabbar main { padding-bottom: 24px; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .course-grid { grid-template-columns: 1fr; }
  .main-nav a { padding: 6px 7px; font-size: 0.82rem; }
  .hero h1 { font-size: 1.4rem; }
}
@media (max-width: 400px) {
  .main-nav a:nth-child(n+3) { display: none; } /* 极窄屏收起次要导航 */
}

/* ---------- 备案号链接 ---------- */
.icp-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; opacity: 0.85; }
.icp-link:hover { opacity: 1; color: #fff; }
