/* =========================================================
   正脉教育 静态复刻站点 - 主样式表 (reconstructed design)
   说明：配色/字体/间距为基于原站风格的高保真重构，
   因运行环境无法访问原站图片 CDN，图片以风格占位图替代。
   ========================================================= */

:root {
  --primary: #1657c4;          /* 主蓝 */
  --primary-dark: #0d3a8a;     /* 深蓝 */
  --primary-light: #eaf1fc;    /* 浅蓝底 */
  --accent: #ff7a1a;           /* 橙强调色 */
  --accent-dark: #e26400;
  --text: #2b2f38;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f5f8fd;
  --border: #e6ebf2;
  --shadow: 0 8px 30px rgba(13, 58, 138, .08);
  --shadow-hover: 0 14px 40px rgba(13, 58, 138, .16);
  --radius: 10px;
  --maxw: 1200px;
  --nav-h: 72px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
    "Source Han Sans CN", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .25s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 通用区块标题 ---------- */
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.section-title {
  text-align: center;
  margin-bottom: 14px;
}
.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text);
}
.section-title .en {
  display: block;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--primary);
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 600;
}
.section-title .deco {
  width: 46px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 16px auto 0;
  border-radius: 3px;
}
.section-sub {
  text-align: center;
  color: var(--text-light);
  max-width: 760px;
  margin: 0 auto 48px;
  font-size: 15px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .3s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1px solid #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); }
.btn-ghost { background: var(--primary-light); color: var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }

/* ---------- 顶部信息条 ---------- */
.topbar {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar a:hover { color: #fff; }
.topbar .tb-left span { margin-right: 18px; }

/* ---------- 导航 ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, .06);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 40px; width: auto; }
.logo .logo-text { font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: 1px; }
.logo .logo-text small { display: block; font-size: 11px; font-weight: 500; color: var(--text-light); letter-spacing: 2px; }

.menu { display: flex; align-items: center; gap: 4px; }
.menu > li { position: relative; }
.menu > li > a {
  display: block;
  padding: 0 18px;
  height: var(--nav-h);
  line-height: var(--nav-h);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  position: relative;
}
.menu > li > a::after {
  content: "";
  position: absolute; left: 18px; right: 18px; bottom: 16px;
  height: 2px; background: var(--primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.menu > li:hover > a, .menu > li.active > a { color: var(--primary); }
.menu > li:hover > a::after { transform: scaleX(1); }

/* 下拉菜单 */
.dropdown {
  position: absolute; top: var(--nav-h); left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 220px;
  background: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-hover);
  opacity: 0; visibility: hidden;
  transition: all .28s var(--ease);
  padding: 8px 0;
  border-top: 3px solid var(--primary);
}
.menu > li:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown li a {
  display: block; padding: 11px 22px; font-size: 14px; color: var(--text-light);
  border-left: 3px solid transparent;
}
.dropdown li a:hover { color: var(--primary); background: var(--primary-light); border-left-color: var(--primary); }

.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-phone { font-size: 15px; font-weight: 700; color: var(--primary); }
.nav-phone i { color: var(--accent); font-style: normal; margin-right: 4px; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--text); transition: .3s; }

/* ---------- 轮播 Banner ---------- */
.hero { position: relative; height: 540px; overflow: hidden; background: var(--primary-dark); }
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1s var(--ease);
  display: flex; align-items: center;
}
.slide.active { opacity: 1; }
.slide .slide-bg { position: absolute; inset: 0; }
.slide .slide-bg img { width: 100%; height: 100%; object-fit: cover; }
.slide .slide-mask { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,58,138,.82), rgba(13,58,138,.35)); }
.slide .slide-content { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: 0 20px; color: #fff; }
.slide .slide-content .tag { display: inline-block; padding: 4px 14px; border: 1px solid rgba(255,255,255,.6); border-radius: 30px; font-size: 13px; margin-bottom: 18px; letter-spacing: 2px; }
.slide .slide-content h1 { font-size: 46px; font-weight: 800; line-height: 1.2; margin-bottom: 18px; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.slide .slide-content p { font-size: 18px; margin-bottom: 28px; max-width: 620px; opacity: .95; }
.slide .slide-content .btn { margin-right: 14px; }

.hero-dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.hero-dots button { width: 11px; height: 11px; border-radius: 50%; border: none; background: rgba(255,255,255,.5); cursor: pointer; transition: .3s; }
.hero-dots button.active { background: #fff; width: 26px; border-radius: 6px; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,.25); border: none; color: #fff; font-size: 22px; cursor: pointer; transition: .3s; display: flex; align-items: center; justify-content: center; }
.hero-arrow:hover { background: rgba(0,0,0,.5); }
.hero-arrow.prev { left: 24px; }
.hero-arrow.next { right: 24px; }

/* ---------- 产品服务 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all .35s var(--ease);
  border: 1px solid var(--border);
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.product-card .pc-icon {
  height: 150px; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
}
.product-card .pc-icon svg { width: 64px; height: 64px; fill: #fff; }
.product-card .pc-body { padding: 24px 22px; }
.product-card .pc-body h3 { font-size: 19px; margin-bottom: 10px; color: var(--text); }
.product-card .pc-body p { font-size: 14px; color: var(--text-light); min-height: 66px; }
.product-card .pc-body .more { margin-top: 14px; color: var(--primary); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.product-card:hover .pc-body .more { gap: 8px; }

/* ---------- 优势 ---------- */
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.adv-item {
  background: #fff; border-radius: var(--radius); padding: 34px 28px;
  box-shadow: var(--shadow); transition: all .35s var(--ease);
  border-bottom: 3px solid transparent;
}
.adv-item:hover { transform: translateY(-6px); border-bottom-color: var(--accent); box-shadow: var(--shadow-hover); }
.adv-item .adv-icon {
  width: 60px; height: 60px; border-radius: 14px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.adv-item .adv-icon svg { width: 32px; height: 32px; fill: var(--primary); }
.adv-item h3 { font-size: 19px; margin-bottom: 10px; }
.adv-item p { font-size: 14px; color: var(--text-light); }

/* ---------- 案例展示 ---------- */
.case-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.case-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  height: 86px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: var(--text); transition: all .3s;
  padding: 0 10px; text-align: center;
}
.case-item:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow); }

/* ---------- 数据统计 ---------- */
.stats { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.stats .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-item .num { font-size: 42px; font-weight: 800; line-height: 1.1; }
.stat-item .num small { font-size: 22px; font-weight: 700; }
.stat-item .label { font-size: 15px; opacity: .9; margin-top: 8px; }

/* ---------- 特色服务 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: #fff; border-radius: var(--radius); padding: 30px 26px;
  box-shadow: var(--shadow); display: flex; gap: 18px; transition: all .35s var(--ease);
  border: 1px solid var(--border);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.feature-card .fc-icon { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); display: flex; align-items: center; justify-content: center; }
.feature-card .fc-icon svg { width: 30px; height: 30px; fill: #fff; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-light); }

/* ---------- 联系地址 ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contact-info h3 { font-size: 24px; margin-bottom: 18px; }
.contact-info .ci-row { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.contact-info .ci-row .ic { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; }
.contact-info .ci-row .ic svg { width: 18px; height: 18px; fill: var(--primary); }
.contact-info .ci-row .txt { font-size: 15px; }
.contact-info .ci-row .txt b { color: var(--text); }
.contact-map { height: 320px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--text-light); }

/* ---------- 新闻资讯 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: all .35s var(--ease); border: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.news-card .nc-thumb { height: 190px; overflow: hidden; position: relative; }
.news-card .nc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .nc-thumb img { transform: scale(1.06); }
.news-card .nc-date { position: absolute; left: 0; bottom: 0; background: var(--primary); color: #fff; padding: 6px 14px; font-size: 13px; border-radius: 0 var(--radius) 0 0; }
.news-card .nc-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card .nc-body .cat { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.news-card .nc-body h3 { font-size: 17px; line-height: 1.5; transition: color .3s; flex: 1; }
.news-card:hover .nc-body h3 { color: var(--primary); }
.news-card .nc-body .more { margin-top: 14px; font-size: 13px; color: var(--text-light); }

/* ---------- 页脚 ---------- */
.footer { background: #0c1f3d; color: rgba(255,255,255,.7); padding: 56px 0 0; }
.footer .f-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; }
.footer h4 { color: #fff; font-size: 17px; margin-bottom: 18px; position: relative; padding-left: 12px; }
.footer h4::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; background: var(--accent); border-radius: 2px; }
.footer .f-about p { font-size: 14px; line-height: 1.9; margin-bottom: 14px; }
.footer .f-links li { margin-bottom: 10px; }
.footer .f-links li a:hover { color: #fff; padding-left: 4px; }
.footer .f-contact p { font-size: 14px; margin-bottom: 10px; display: flex; gap: 8px; align-items: flex-start; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding: 20px 0; text-align: center; font-size: 13px; color: rgba(255,255,255,.5); }
.footer-bottom a { color: rgba(255,255,255,.7); text-decoration: none; }
.footer-bottom a:hover { color: #fff; text-decoration: underline; }
.footer .f-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer .f-logo img { height: 36px; }
.footer .f-logo span { font-size: 20px; font-weight: 800; color: #fff; }

/* ---------- 面包屑 / 子页通用 ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 60px 0; text-align: center;
}
.page-banner h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; }
.page-banner .en { letter-spacing: 3px; font-size: 14px; opacity: .85; }
.breadcrumb { background: var(--bg-soft); padding: 14px 0; font-size: 13px; color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }

/* 子页内容 */
.content-section { padding: 64px 0; }
.prose h2 { font-size: 26px; color: var(--primary); margin: 36px 0 16px; padding-left: 14px; border-left: 4px solid var(--accent); }
.prose h3 { font-size: 20px; margin: 26px 0 12px; color: var(--text); }
.prose p { margin-bottom: 14px; font-size: 15px; color: #444; }
.prose ul.dot { padding-left: 22px; }
.prose ul.dot li { list-style: disc; margin-bottom: 10px; color: #444; }
.prose .highlight { background: var(--primary-light); padding: 4px 8px; border-radius: 4px; color: var(--primary-dark); font-weight: 600; }

/* 子页侧栏 */
.sub-layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; }
.sidebar { align-self: start; position: sticky; top: 90px; }
.sidebar .side-box { background: var(--bg-soft); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.sidebar .side-box h4 { font-size: 16px; margin-bottom: 12px; color: var(--primary); }
.sidebar .side-nav li a { display: block; padding: 11px 14px; border-radius: 6px; font-size: 14px; color: var(--text-light); margin-bottom: 4px; transition: .25s; }
.sidebar .side-nav li a:hover, .sidebar .side-nav li.active a { background: var(--primary); color: #fff; }

/* 联系表单 */
.contact-form { background: #fff; border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.contact-form .field { margin-bottom: 18px; }
.contact-form label { display: block; font-size: 14px; margin-bottom: 8px; font-weight: 600; }
.contact-form label .req { color: var(--accent); }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; transition: border .25s;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { border-color: var(--primary); outline: none; }
.contact-form textarea { min-height: 120px; resize: vertical; }

/* 新闻列表 */
.news-list { display: flex; flex-direction: column; gap: 22px; }
.news-list-item { display: grid; grid-template-columns: 220px 1fr; gap: 22px; background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: .3s; }
.news-list-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-list-item .nl-thumb { height: 140px; border-radius: 8px; overflow: hidden; }
.news-list-item .nl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-list-item .nl-body h3 { font-size: 19px; margin-bottom: 10px; }
.news-list-item:hover .nl-body h3 { color: var(--primary); }
.news-list-item .nl-body .meta { font-size: 13px; color: var(--text-light); margin-bottom: 10px; }
.news-list-item .nl-body p { font-size: 14px; color: #555; }

.tabs { display: flex; gap: 10px; margin-bottom: 28px; }
.tabs button { padding: 9px 22px; border: 1px solid var(--border); background: #fff; border-radius: 30px; cursor: pointer; font-size: 14px; transition: .25s; }
.tabs button.active, .tabs button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 返回顶部 */
.back-top { position: fixed; right: 24px; bottom: 28px; width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-hover); opacity: 0; visibility: hidden; transition: .3s; z-index: 99; font-size: 20px; }
.back-top.show { opacity: 1; visibility: visible; }

/* 入场动画 */
.reveal { opacity: 0; transform: translateY(30px); transition: all .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: repeat(4, 1fr); }
  .footer .f-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .adv-grid, .feature-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .contact-wrap { grid-template-columns: 1fr; }
  .sub-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .topbar { display: none; }
  .hamburger { display: flex; }
  .menu {
    position: fixed; top: calc(var(--nav-h) + 38px); left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
    box-shadow: 0 10px 20px rgba(0,0,0,.1);
  }
  .menu.open { max-height: 80vh; overflow-y: auto; }
  .menu > li > a { height: 52px; line-height: 52px; padding: 0 20px; border-bottom: 1px solid var(--border); }
  .menu > li > a::after { display: none; }
  .dropdown { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; min-width: 0; padding: 0 0 6px 20px; display: none; }
  .menu > li.open .dropdown { display: block; }
  .nav-phone { display: none; }
  .hero { height: 420px; }
  .slide .slide-content h1 { font-size: 30px; }
  .slide .slide-content p { font-size: 15px; }
  .section { padding: 50px 0; }
  .section-title h2 { font-size: 26px; }
  .product-grid, .adv-grid, .feature-grid, .news-grid, .case-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer .f-grid { grid-template-columns: 1fr; }
  .news-list-item { grid-template-columns: 1fr; }
  .news-list-item .nl-thumb { height: 180px; }
  .hero-arrow { display: none; }
}
@media (max-width: 480px) {
  .case-grid { grid-template-columns: 1fr; }
  .stat-item .num { font-size: 32px; }
}
