/* ============ 锐思达生物官网 · VI 样式 ============ */
/* 主色 #264994 / 辅助灰 #717071 / 字体 阿里巴巴普惠体 85 Bold */

@font-face {
  font-family: 'AlibabaPuHuiTi';
  src: url('/assets/fonts/AlibabaPuHuiTi-3-85-Bold.woff2') format('woff2'),
       url('/assets/fonts/AlibabaPuHuiTi-3-85-Bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

:root {
  --brand: #264994;
  --brand-dark: #1c3870;
  --brand-light: #eaf0fa;
  --brand-tint: #f4f7fc;
  --gray: #717071;
  --ink: #1f2329;
  --muted: #6b7280;
  --line: #e6e9ef;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --shadow: 0 6px 24px rgba(38, 73, 148, 0.08);
  --shadow-lg: 0 12px 40px rgba(38, 73, 148, 0.14);
  --radius: 14px;
  --maxw: 1180px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-font {
  font-family: 'AlibabaPuHuiTi', "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section-soft { background: var(--bg-soft); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: center;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { height: 46px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 64px; }
.nav-links a {
  padding: 9px 16px; border-radius: 8px; font-size: 15px; color: var(--ink);
  transition: all .2s; position: relative;
}
.nav-links a:hover { color: var(--brand); background: var(--brand-light); }
.nav-links a.active { color: var(--brand); font-weight: 600; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px; background: var(--brand); border-radius: 2px;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(38,73,148,0.10), transparent 60%),
    linear-gradient(180deg, var(--brand-tint), #fff 70%);
  padding: 96px 0 88px;
  position: relative; overflow: hidden;
}
.hero-inner { max-width: 760px; }
.hero .eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 3px; color: var(--brand);
  background: #fff; border: 1px solid var(--brand-light); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: 46px; margin-bottom: 20px; }
.hero h1 .hl { color: var(--brand); }
.hero p.lead { font-size: 18px; color: var(--muted); margin-bottom: 32px; max-width: 640px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: all .2s; font-family: 'AlibabaPuHuiTi', sans-serif;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--brand-light); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 区块标题 ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head .tag { font-size: 13px; letter-spacing: 3px; color: var(--brand); font-weight: 600; }
.section-head h2 { font-size: 34px; margin: 12px 0 14px; }
.section-head p { color: var(--muted); font-size: 16px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: all .25s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--brand-light); }
.card .ic {
  width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-light); color: var(--brand); font-size: 22px; margin-bottom: 18px;
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }

/* 指标条 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .num { font-family: 'AlibabaPuHuiTi', sans-serif; font-size: 42px; color: var(--brand); line-height: 1; }
.stat .lbl { color: var(--muted); margin-top: 8px; font-size: 15px; }

/* ---------- 列表（新闻/案例） ---------- */
.list-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.pager .pg { min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; color: var(--ink); font-size: 14px; transition: all .2s; }
.pager .pg:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager .pg.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .pg:disabled { opacity: .45; cursor: not-allowed; }
.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: all .25s; cursor: pointer;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.post-card .thumb {
  height: 180px; background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center; color: #fff; font-family: 'AlibabaPuHuiTi', sans-serif; font-size: 20px;
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.post-card .cat { font-size: 12px; color: var(--brand); background: var(--brand-light); padding: 3px 10px; border-radius: 999px; align-self: flex-start; margin-bottom: 12px; }
.post-card h3 { font-size: 18px; margin-bottom: 10px; line-height: 1.4; }
.post-card p { color: var(--muted); font-size: 14px; flex: 1; }
.post-card .date { color: var(--gray); font-size: 13px; margin-top: 14px; }

/* 文章详情 */
.article { max-width: 820px; margin: 0 auto; }
.article .cat { color: var(--brand); font-size: 13px; font-weight: 600; }
.article h1 { font-size: 32px; margin: 10px 0 14px; }
.article .meta { color: var(--gray); font-size: 14px; margin-bottom: 28px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.article .content { font-size: 16px; color: var(--ink); }
.article .content p { margin-bottom: 18px; }
.article .content img { border-radius: 10px; margin: 18px 0; }

/* 前台详情弹窗内的正文图片（news/cases 使用 .content 而非 .article .content） */
.content { font-size: 16px; color: var(--ink); line-height: 1.8; }
.content p { margin-bottom: 16px; }
.content img { max-width: 100%; height: auto; border-radius: 10px; margin: 16px 0; display: block; }
.content h3 { font-size: 20px; margin: 22px 0 12px; color: var(--brand); }
.content ul, .content ol { margin: 0 0 16px; padding-left: 22px; }
.content li { margin-bottom: 8px; }

/* 后台富文本编辑器 */
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rte-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 6px 11px; font-size: 13px; cursor: pointer; line-height: 1.2;
}
.rte-btn:hover { border-color: var(--brand); color: var(--brand); }
.rte {
  border: 1px solid var(--line); border-radius: 10px; min-height: 240px; padding: 14px 16px;
  font-size: 15px; line-height: 1.7; background: #fff; overflow: auto;
}
.rte:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(38, 73, 148, .12); }
.rte:empty:before { content: attr(data-placeholder); color: var(--muted); }
.rte p { margin: 0 0 12px; }
.rte img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; }
.rte h3 { font-size: 19px; margin: 14px 0 8px; color: var(--brand); }
/* 后台编辑器与案例详情里的视频/嵌入：限制最大宽度并居中，避免在小窗或大屏上过度撑开 */
.rte video, .content video {
  display: block; width: auto; max-width: min(100%, 760px); height: auto;
  margin: 14px auto; border-radius: 12px; background: #000;
}
.rte iframe, .content iframe {
  display: block; width: 100%; max-width: 760px; aspect-ratio: 16 / 9;
  margin: 14px auto; border: 0; border-radius: 12px; background: #000;
}

/* 流程步骤 */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.step { text-align: center; position: relative; padding: 0 6px; }
.step .dot {
  width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-family: 'AlibabaPuHuiTi', sans-serif; font-size: 20px; margin: 0 auto 14px;
}
.step h4 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--muted); }

/* 价值观 */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.value .idx { font-family: 'AlibabaPuHuiTi', sans-serif; font-size: 30px; color: var(--brand-light); }
.value h3 { font-size: 18px; margin: 6px 0 8px; color: var(--brand); }
.value p { font-size: 14px; color: var(--muted); }

/* 平台列表 */
.platform-block { margin-bottom: 36px; }
.platform-block h3 { font-size: 22px; color: var(--brand); margin-bottom: 6px; }
.platform-block .sub { color: var(--gray); font-size: 14px; margin-bottom: 14px; }
.platform-block ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.platform-block li {
  background: var(--brand-tint); border: 1px solid var(--brand-light); color: var(--ink);
  padding: 8px 16px; border-radius: 999px; font-size: 14px;
}

/* 技术平台 · 2x3 悬浮卡片 */
.pf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 640px) { .pf-grid { grid-template-columns: 1fr; } }
.pf-card {
  position: relative; height: 320px; border-radius: 16px; overflow: hidden; cursor: pointer;
  background: linear-gradient(135deg, #264994 0%, #3a6bc4 100%);
  box-shadow: 0 10px 30px rgba(15, 30, 70, .12); outline: none;
  transition: box-shadow .25s, transform .25s;
}
.pf-card:hover { box-shadow: 0 16px 40px rgba(15, 30, 70, .22); transform: translateY(-3px); }
.pf-card:focus-visible { box-shadow: 0 0 0 3px rgba(38, 73, 148, .45); }
.pf-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.pf-mask { position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(15, 30, 70, 0) 26%, rgba(15, 30, 70, .88) 100%); }
.pf-face {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 24px; color: #fff; transition: opacity .3s;
}
.pf-face h3 { font-family: 'AlibabaPuHuiTi', sans-serif; font-size: 23px; margin: 0 0 10px; letter-spacing: .5px; color: #fff; }
.pf-face .pf-sub { font-size: 14px; line-height: 1.7; margin: 0; color: rgba(255, 255, 255, .92); }
.pf-detail {
  position: absolute; inset: 0; z-index: 4; padding: 22px 24px; overflow: auto;
  background: rgba(255, 255, 255, .82); color: var(--ink);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .3s, transform .3s, visibility .3s;
}
.pf-detail h4 { font-size: 15px; margin: 0 0 12px; color: var(--brand); font-weight: 600; }
.pf-detail ul { margin: 0; padding-left: 18px; }
.pf-detail li { font-size: 13px; line-height: 1.55; margin-bottom: 8px; color: var(--ink); }
.pf-card:hover .pf-detail { opacity: 1; visibility: visible; transform: translateY(0); }
.pf-card:hover .pf-face { opacity: 0; }
.pf-hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 28px; }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.contact-info { min-width: 0; }
.contact-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
.contact-cards .contact-card { margin-bottom: 0; }
.contact-aside { display: flex; flex-direction: column; gap: 20px; }
.contact-aside .map-box { margin-bottom: 0; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; margin-bottom: 20px;
  display: flex; gap: 16px; align-items: flex-start;
}
.contact-card .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-light); color: var(--brand); display: grid; place-items: center; font-size: 20px; flex: none; }
.contact-card h4 { font-size: 16px; margin-bottom: 4px; }
.contact-card p { color: var(--muted); font-size: 15px; }
.map-box {
  position: relative; background: linear-gradient(135deg, var(--brand-tint), #fff); border: 1px solid var(--brand-light);
  border-radius: var(--radius); overflow: hidden; height: 240px;
}
.map-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--gray); padding: 20px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--brand-dark); color: #cdd8ee; padding: 56px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer .f-brand b { font-family: 'AlibabaPuHuiTi', sans-serif; font-size: 20px; color: #fff; }
.site-footer .f-brand p { margin-top: 12px; font-size: 14px; line-height: 1.9; }
.site-footer h5 { color: #fff; font-size: 15px; margin-bottom: 16px; font-family: 'AlibabaPuHuiTi', sans-serif; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 10px; font-size: 14px; }
.site-footer ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 36px; padding-top: 20px; font-size: 13px; color: #9fb0d4; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: #9fb0d4; text-decoration: none; }
.footer-bottom a:hover { color: #fff; text-decoration: underline; }

/* ---------- 后台 ---------- */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.admin-login { max-width: 380px; margin: 80px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.admin-login h2 { font-size: 24px; margin-bottom: 6px; }
.admin-login p { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px;
  font-family: inherit; color: var(--ink); background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); }
.admin-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-bar h2 { font-size: 22px; }
.admin-nav { display: flex; gap: 8px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.admin-nav button { background: none; border: none; padding: 12px 16px; cursor: pointer; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; font-family: inherit; }
.admin-nav button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { padding: 13px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--bg-soft); color: var(--muted); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
.badge { font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.badge.pub { background: #e7f6ec; color: #1f9254; }
.badge.draft { background: #fff3e0; color: #c77700; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.row-actions { display: flex; gap: 8px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 14px; opacity: 0; transition: .3s; pointer-events: none; z-index: 999; }
.toast.show { opacity: 1; }
.empty-hint { text-align: center; color: var(--gray); padding: 50px; }
.edit-meta-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 18px; align-items: start; }
@media (max-width: 640px) { .edit-meta-grid { grid-template-columns: 1fr; } }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-4, .list-grid, .values, .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { justify-content: space-between; }
  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; flex-direction: column;
    gap: 0; border-bottom: 1px solid var(--line); padding: 8px 0; display: none; box-shadow: var(--shadow);
    margin-left: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 24px; border-radius: 0; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 34px; }
  .section { padding: 56px 0; }
  .section-head h2 { font-size: 26px; }
  .grid-2, .grid-3, .grid-4, .list-grid, .values, .stats, .steps, .footer-top { grid-template-columns: 1fr; }
}

/* ---------- 首页：六大技术平台（图片背景 16:9 横卡） ---------- */
.home-pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.home-pf {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  text-decoration: none; box-shadow: var(--shadow);
  background: linear-gradient(135deg, #264994 0%, #3a6bc4 100%);
  transition: transform .25s, box-shadow .25s;
}
.home-pf:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 30, 70, .22); }
.home-pf img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.home-pf-mask {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(15, 30, 70, 0) 28%, rgba(15, 30, 70, .86) 100%);
}
.home-pf-txt { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 18px 20px; }
.home-pf-txt h3 { color: #fff; margin: 0 0 6px; font-size: 20px; font-family: 'AlibabaPuHuiTi', sans-serif; }
.home-pf-txt p { color: rgba(255, 255, 255, .92); margin: 0; font-size: 13px; line-height: 1.55; }
@media (max-width: 900px) { .home-pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-pf-grid { grid-template-columns: 1fr; } }

/* ---------- 联系：二维码 ---------- */
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; }
.qr-img {
  position: relative; width: 150px; height: 150px; margin: 0 auto 8px; border-radius: 12px; overflow: hidden;
  background: var(--brand-tint); display: grid; place-items: center;
}
.qr-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.qr-img .qr-ph { color: var(--muted); font-size: 13px; }
.qr-cap { font-size: 14px; color: var(--ink); margin: 0; }
@media (max-width: 560px) { .contact-cards { grid-template-columns: 1fr; } }
