/* ============================================================
   寰宇教育 Orbis Education - 简约白风格
   ============================================================ */
:root {
  --ink: #1c2333;
  --ink-2: #4a5568;
  --ink-3: #8a94a6;
  --line: #e8ecf3;
  --accent: #2f6bff;
  --accent-dark: #1f52d8;
  --accent-soft: #eef4ff;
  --bg-alt: #f7f9fc;
  --white: #ffffff;
  --ok: #17a673;
  --warn: #e08a1e;
  --danger: #e0493f;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 35, 51, 0.07);
  --shadow-lg: 0 18px 50px rgba(28, 35, 51, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* hidden 属性必须始终生效（防止 display:flex 等规则覆盖导致弹窗无法隐藏） */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: 0.5px; }
.brand small { display: block; font-size: 10px; font-weight: 500; color: var(--ink-3); letter-spacing: 1.6px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--ink-2); }
.nav-links a:hover { color: var(--accent); }
.nav-admin { font-size: 13px; color: var(--ink-3); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; }
.nav-admin:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg svg { width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 1; padding: 84px 24px 60px; text-align: center; }
.hero-badge {
  display: inline-block; font-size: 13px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid #d8e5ff;
  padding: 6px 16px; border-radius: 999px; margin-bottom: 22px; letter-spacing: 1px;
}
.hero h1 { font-size: 46px; line-height: 1.25; letter-spacing: 1px; margin-bottom: 18px; }
.hero-sub { max-width: 640px; margin: 0 auto 30px; color: var(--ink-2); font-size: 16.5px; }
.hero-sub span { color: var(--accent); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat b { display: block; font-size: 26px; color: var(--accent); }
.stat span { font-size: 13px; color: var(--ink-3); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: none; cursor: pointer;
  transition: all 0.18s ease; text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(47, 107, 255, 0.28); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid #d5dbe6; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-warn { background: var(--warn); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-line { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 通用段落 ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head.left { text-align: left; }
.section-head h2 { font-size: 30px; letter-spacing: 0.5px; margin-bottom: 10px; }
.section-head p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- 服务卡片 ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #d4e0ff; }
.service-card .sc-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.service-card .sc-cat { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: 0.5px; margin-bottom: 6px; }
.service-card h3 { font-size: 19px; margin-bottom: 8px; }
.service-card .sc-summary { color: var(--ink-2); font-size: 14px; flex: 1; margin-bottom: 16px; }
.service-card .sc-foot { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px dashed var(--line); padding-top: 14px; }
.service-card .sc-price { font-size: 22px; font-weight: 700; color: var(--accent); }
.service-card .sc-price small { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.service-card .sc-dur { font-size: 12.5px; color: var(--ink-3); }
.service-card .sc-free { color: var(--ok); }
.service-card .sc-buy { margin-top: 14px; }
.service-card .sc-buy .btn { width: 100%; padding: 9px 16px; }

/* ============ 服务详情页 & 支付页 ============ */
.page-main { padding: 36px 0 64px; min-height: 60vh; }
.crumb { font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; }
.crumb a { color: var(--ink-2); }
.crumb a:hover { color: var(--accent); }
.crumb span { margin: 0 6px; }
.detail-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.detail-main { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.detail-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.detail-head .di { width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.detail-head h1 { font-size: 24px; line-height: 1.35; }
.detail-head .dc { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.sub-title { font-size: 16px; margin: 22px 0 12px; }
.detail-feats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-feats li { font-size: 13.5px; color: var(--ink-2); padding-left: 22px; position: relative; }
.detail-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* 购买卡片 */
.buy-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: sticky; top: 84px; }
.buy-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.bp-label { font-size: 13px; color: var(--ink-3); }
.bp-value { font-size: 32px; font-weight: 700; color: var(--accent); }
.bp-value small { font-size: 14px; font-weight: 400; color: var(--ink-3); }
.bp-free { color: var(--ok); }
.buy-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.buy-label { font-size: 14px; color: var(--ink-2); }
.buy-total { border-top: 1px dashed var(--line); padding-top: 14px; margin-bottom: 18px; }
.buy-total-value { font-size: 24px; font-weight: 700; color: var(--accent); }
.btn-lg { padding: 14px 20px; font-size: 16px; }
.order-form-wrap { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 8px; }
.buy-total-line { font-size: 14.5px; margin-bottom: 12px; }
.buy-total-line b { color: var(--accent); font-size: 19px; }

/* 支付页 */
.pay-wrap { max-width: 780px; }
.pay-head { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.pay-step { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
.pay-step.active { color: var(--accent); font-weight: 600; }
.pay-step-line { flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.pay-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.pay-order-no { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.pay-order-no b { color: var(--ink); letter-spacing: 0.5px; }
.pay-items { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; overflow: hidden; }
.pay-item { display: flex; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.pay-item:last-child { border-bottom: none; }
.pay-total { text-align: right; font-size: 14.5px; margin-bottom: 6px; }
.pay-total b { color: var(--accent); font-size: 24px; margin-left: 4px; }
.pay-status { text-align: right; margin-bottom: 22px; }
.badge { display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.badge.pending { background: #fdf3e3; color: var(--warn); }
.badge.paid { background: #e7f8f1; color: var(--ok); }
.badge.completed { background: #eef4ff; color: var(--accent); }
.badge.cancelled { background: #f3f4f7; color: var(--ink-3); }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.pay-method { flex: 1; border: 1.5px solid var(--line); border-radius: 12px; padding: 15px 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: all 0.15s; font-size: 14.5px; font-weight: 600; }
.pay-method:hover { border-color: #c9d8ff; }
.pay-method.selected { border-color: var(--accent); background: var(--accent-soft); }
.pm-badge { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.pm-badge.alipay { background: #1677ff; }
.pm-badge.wechat { background: #07c160; }
.pm-badge.card { background: #f97316; }
.pm-badge.other { background: #8a94a6; }
.pm-check { margin-left: auto; color: var(--accent); font-weight: 700; visibility: hidden; }
.pay-method.selected .pm-check { visibility: visible; }
.pay-success { text-align: center; padding: 16px 0 8px; }
.pay-success .result-icon { margin-bottom: 14px; }
.pay-success h3 { font-size: 20px; margin-bottom: 8px; }
.pay-success .form-tip { margin: 10px 0 22px; }
.muted { color: var(--ink-3); font-size: 13px; }

/* ---------- 为什么选择我们 ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; text-align: center; }
.why-item img { margin: 0 auto 14px; }
.why-item h3 { font-size: 16.5px; margin-bottom: 8px; }
.why-item p { font-size: 13.5px; color: var(--ink-2); }

/* ---------- 关于我们 ---------- */
.about-wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; align-items: center; }
.about-text p { color: var(--ink-2); font-size: 15.5px; margin-bottom: 14px; }
.about-text strong { color: var(--ink); }
.about-list { list-style: none; margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.about-list li { position: relative; padding-left: 24px; font-size: 14.5px; color: var(--ink); }
.about-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.about-card { text-align: center; background: var(--accent-soft); border-radius: var(--radius); padding: 34px 26px; }
.about-quote { margin-top: 16px; font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.about-quote span { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; margin-top: 4px; }

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contact-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 22px; text-align: center; transition: all 0.2s ease;
}
a.contact-item:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.contact-item img { margin: 0 auto 12px; }
.contact-item h3 { font-size: 16px; margin-bottom: 4px; }
.contact-item p { color: var(--ink-2); font-size: 15px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; background: #fbfcfe; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.footer p { font-size: 13px; color: var(--ink-3); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 26, 40, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--white); border-radius: 18px; width: 100%; max-width: 560px;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  position: relative; animation: pop 0.22s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--bg-alt); color: var(--ink-2); font-size: 20px; line-height: 1;
}
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal-body { padding: 34px 34px 30px; }
.modal-title { font-size: 21px; margin-bottom: 18px; }

/* 详情弹窗 */
.detail-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.detail-head .di { width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.detail-head h3 { font-size: 21px; }
.detail-head .dc { font-size: 12.5px; color: var(--accent); font-weight: 600; }
.detail-desc { color: var(--ink-2); font-size: 14.5px; margin-bottom: 18px; }
.detail-meta { display: flex; gap: 22px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 18px; }
.detail-meta b { color: var(--ink); }
.detail-feats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.detail-feats li { font-size: 13.5px; color: var(--ink-2); padding-left: 22px; position: relative; }
.detail-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.detail-price { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 18px; }
.detail-price .dp { font-size: 26px; font-weight: 700; color: var(--accent); }
.detail-price .dp small { font-size: 13px; color: var(--ink-3); font-weight: 400; }
.detail-price .dp-free { color: var(--ok); }

/* 下单表单 */
.price-note {
  background: var(--accent-soft); border: 1px solid #d8e5ff; border-radius: 10px;
  padding: 10px 14px; font-size: 13px; color: var(--ink-2); margin-bottom: 16px;
}
.price-note b { color: var(--accent); }
.qty-row { display: flex; align-items: center; gap: 0; margin-top: 6px; }
.qty-btn {
  width: 38px; height: 38px; border: 1.5px solid var(--line); background: var(--white);
  font-size: 17px; color: var(--ink-2); cursor: pointer; line-height: 1;
  transition: all 0.15s;
}
.qty-btn:first-of-type { border-radius: 10px 0 0 10px; }
.qty-btn:last-of-type { border-radius: 0 10px 10px 0; }
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
#qtyInput {
  width: 76px; text-align: center; border-radius: 0; margin-top: 0;
  border-left: none; border-right: none; -moz-appearance: textfield;
}
#qtyInput::-webkit-outer-spin-button, #qtyInput::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-total { display: block; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.qty-total b { color: var(--accent); font-size: 15px; }
.order-svc { background: var(--bg-alt); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.order-svc b { font-size: 15px; }
.order-svc span { color: var(--accent); font-weight: 700; }
form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
form input, form textarea {
  width: 100%; margin-top: 5px; padding: 11px 14px; font-size: 14.5px;
  border: 1.5px solid var(--line); border-radius: 10px; outline: none;
  font-family: inherit; color: var(--ink); background: var(--white);
  transition: border-color 0.15s;
}
form input:focus, form textarea:focus { border-color: var(--accent); }
form textarea { resize: vertical; }
.form-tip { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; text-align: center; }

/* 下单结果 */
.result-icon {
  width: 60px; height: 60px; border-radius: 50%; background: #e7f8f1; color: var(--ok);
  font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.result-order, .result-amount { text-align: center; font-size: 15px; color: var(--ink-2); margin-bottom: 6px; }
.result-order b { color: var(--ink); letter-spacing: 0.5px; }
.result-amount b { color: var(--accent); }
.result-status { text-align: center; font-size: 14px; color: var(--ink-2); margin: 10px 0; }
.result-status .badge.pending {
  display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 12.5px;
  font-weight: 600; background: #fdf3e3; color: var(--warn);
}
.result-tip { background: var(--accent-soft); border-radius: 10px; padding: 12px 16px; font-size: 13.5px; color: var(--ink-2); margin: 14px 0 20px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 14px; padding: 11px 22px;
  border-radius: 999px; z-index: 200; box-shadow: var(--shadow-lg);
  animation: pop 0.2s ease;
}
.toast.err { background: var(--danger); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .about-wrap { grid-template-columns: 1fr; gap: 32px; }
  .contact-grid { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .buy-card { position: static; }
  .pay-methods { flex-direction: column; }
}
@media (max-width: 620px) {
  .hero h1 { font-size: 32px; }
  .hero-content { padding-top: 56px; }
  .services-grid, .why-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; font-size: 14px; }
  .hero-stats { gap: 30px; }
  .detail-feats { grid-template-columns: 1fr; }
  .modal-body { padding: 28px 22px 24px; }
}
