/* ===== 基础与变量 ===== */
:root {
  --primary: #c2402a;
  --primary-dark: #a33420;
  --text: #262626;
  --muted: #777;
  --bg: #ffffff;
  --bg-gray: #f7f7f8;
  --border: #e8e3df;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(40, 20, 16, .08);
  --header-h: 64px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted); }
.center { text-align: center; }
.img-fluid { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ===== 头部导航 ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo img { height: 40px; width: auto; }
.main-nav { margin: 0 auto; }
.main-nav ul { display: flex; list-style: none; gap: 2px; }
.main-nav a {
  display: block; padding: 8px 10px; color: var(--text);
  font-size: 15px; border-radius: 8px; transition: .2s; white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: rgba(194, 64, 42, .08); }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 8px;
  background: none; border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  padding: calc(var(--header-h) + 60px) 0 60px;
  background: linear-gradient(135deg, #7a1f10 0%, #a5341f 45%, #c2402a 100%);
  color: #fff;
}
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 48px; padding: 0; margin: 0; }
.hero-points li { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 500; margin-bottom: 0; white-space: nowrap; }
.hero-points img { width: 40px; height: 40px; object-fit: contain; }
.hero-badges {
  margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 12px;
}
.hero-badges span {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: 8px 18px; border-radius: 999px; font-size: 14px;
}
.hero-title {
  margin-top: 44px; font-size: 22px; font-weight: 500;
  letter-spacing: .08em; text-align: center; opacity: .96;
}

/* ===== 通用板块 ===== */
.section { padding: 72px 0; }

/* ===== 竖向滚动吸附：仅靠近模块边界时轻微吸附，不劫持滚轮 ===== */
html { scroll-snap-type: y proximity; }
.hero, .section {
  scroll-snap-align: start;
  scroll-margin-top: var(--header-h);
}
.section-gray { background: var(--bg-gray); }
.section-title {
  font-size: 30px; font-weight: 700; text-align: center; margin-bottom: 10px;
}
.section-title small {
  display: block; font-size: 13px; font-weight: 400; color: var(--muted);
  letter-spacing: .25em; margin-top: 4px; text-transform: uppercase;
}
.section-sub { text-align: center; font-size: 17px; color: var(--muted); margin-bottom: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card {
  background: #fff; border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(40, 20, 16, .13); }

/* 服务卡片 */
.service-card h3 { color: var(--primary); font-size: 21px; margin-bottom: 16px; }
.check-list { list-style: none; }
.check-list li { padding: 8px 0 8px 28px; position: relative; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 8px;
  width: 20px; height: 20px; line-height: 20px; text-align: center;
  color: #fff; background: var(--primary); border-radius: 50%; font-size: 12px;
}

/* 荣誉 */
.honor-grid { margin-top: 36px; }
.honor-grid img { max-height: 260px; margin: 0 auto 14px; object-fit: contain; }
.honor-name { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.benchmark { display: grid; gap: 28px; margin-top: 48px; }
.benchmark .card img { margin-top: 18px; }
.benchmark-title { font-size: 21px; }
.benchmark-text { max-width: 860px; margin: 10px auto 0; color: #444; }

/* 红娘团队 */
.team-cards { margin-bottom: 36px; }
.team-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--primary); }
.team-card p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.team-shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-shots img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* 红娘团队（四张一行） */
.team-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-photos img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* 成功案例：自动循环滚动 + 手动上一张/下一张 */
.cases-carousel { position: relative; margin-top: 10px; }
.cases-viewport {
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cases-viewport:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.cases-viewport::-webkit-scrollbar { display: none; }
.cases-track { display: flex; gap: 24px; }
.cases-hint { margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; }
.cases-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92); color: var(--primary);
  font-size: 26px; line-height: 1; box-shadow: 0 4px 16px rgba(0, 0, 0, .16);
  transition: background .2s, color .2s;
}
.cases-nav:hover { background: var(--primary); color: #fff; }
.cases-nav.prev { left: 10px; }
.cases-nav.next { right: 10px; }
.case-card {
  flex: 0 0 calc((100% - 72px) / 4);
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 3 / 4; background: #ddd;
}
.case-card img { width: 100%; height: 100%; object-fit: cover; }
.case-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 12px;
  color: #fff; font-size: 14px; line-height: 1.5;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}

/* 服务流程 */
.process-steps {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; margin-top: 20px;
}
.step {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 8px; text-align: center; transition: .25s;
}
.step:hover { border-color: var(--primary); transform: translateY(-3px); }
.step-num {
  width: 44px; height: 44px; margin: 0 auto 12px; line-height: 44px;
  border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 19px; font-weight: 700;
}
.step p { font-size: 15px; font-weight: 500; }

/* 恋爱宝典（首页） */
.love-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px; flex-wrap: wrap; gap: 12px;
}
.love-head .section-title { margin-bottom: 0; text-align: left; }
.btn-outline {
  display: inline-block; padding: 8px 20px; border: 1px solid var(--primary);
  color: var(--primary); border-radius: 999px; font-size: 14px; transition: .2s;
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.article-list { border-top: 1px solid var(--border); }
.article-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 18px 4px; border-bottom: 1px solid var(--border); transition: .2s;
}
.article-row:hover { background: var(--bg-gray); }
.article-row-title { color: var(--primary); font-size: 18px; font-weight: 600; }
.article-row:hover .article-row-title { color: var(--primary-dark); }
.article-row-date { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ===== 内页 ===== */
.page-main { padding: calc(var(--header-h) + 44px) 0 70px; min-height: 60vh; }
.page-head { text-align: center; margin-bottom: 44px; }
.page-head h1 { font-size: 32px; }
.page-head p { color: var(--muted); margin-top: 8px; letter-spacing: .12em; font-size: 14px; }

/* 宝典列表 */
.baodian-list { display: grid; gap: 22px; }
.baodian-card {
  display: block; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px; transition: .22s;
}
.baodian-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #e3c9c4; }
.baodian-card h2 { font-size: 19px; color: var(--text); margin-bottom: 10px; }
.baodian-card:hover h2 { color: var(--primary); }
.baodian-summary {
  color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.baodian-meta { color: #aaa; font-size: 13px; }

/* 分页 */
.pagination {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 44px;
}
.pagination a, .pagination span {
  min-width: 38px; height: 38px; line-height: 38px; text-align: center;
  padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-size: 14px; background: #fff;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 文章页 */
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.article-title { font-size: 26px; line-height: 1.5; margin-bottom: 14px; }
.article-meta { color: var(--muted); font-size: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.article-body { font-size: 16px; line-height: 1.9; overflow-wrap: break-word; }
.article-body p { margin-bottom: 16px; }
.article-body h2 {
  font-size: 20px; line-height: 1.5; font-weight: 700; color: var(--text);
  margin: 30px 0 14px; padding-left: 12px; border-left: 4px solid var(--primary);
}
.article-body h2:first-child { margin-top: 4px; }
.article-body strong { color: var(--text); }
.article-body table {
  width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: 14px;
  display: block; overflow-x: auto;
}
.article-body td, .article-body th { border: 1px solid var(--border); padding: 10px 12px; min-width: 90px; }
.article-body tr:first-child td { background: var(--primary); color: #fff; font-weight: 600; }
.article-body img { height: auto; margin: 10px auto; }
.article-rel {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px;
}
.article-related {
  margin-top: 40px; padding: 22px 24px; background: var(--bg-gray);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.article-related h2 {
  font-size: 18px; font-weight: 700; margin-bottom: 14px;
  padding-left: 10px; border-left: 4px solid var(--primary);
}
.article-related ul { list-style: none; }
.article-related li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 15px; }
.article-related li:last-child { border-bottom: 0; padding-bottom: 0; }
.article-related a { color: var(--text); }
.article-related a:hover { color: var(--primary); }
.article-rel a { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.article-side { position: sticky; top: calc(var(--header-h) + 20px); }
.side-box { background: var(--bg-gray); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.side-box h3 { font-size: 17px; color: var(--primary); margin-bottom: 14px; }
.side-box ul { list-style: none; }
.side-box li { padding: 6px 0; }
.side-box li a { color: var(--text); font-size: 14px; }
.side-box li a:hover { color: var(--primary); }
.side-box p { color: var(--muted); font-size: 14px; }

/* ===== 悬浮微信二维码 ===== */
.float-qr {
  position: fixed; right: 26px; bottom: 110px; z-index: 200;
  width: 118px; padding: 10px 10px 8px;
  background: var(--primary); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(194, 64, 42, .4);
  text-align: center; cursor: grab; user-select: none; touch-action: none;
}
.float-qr:active { cursor: grabbing; }
.float-qr img { width: 100%; border-radius: 8px; pointer-events: none; background: #fff; }
.float-qr p { color: #fff; font-size: 12px; margin-top: 6px; }

/* 返回顶部 */
.back-top {
  position: fixed; right: 26px; bottom: 44px; z-index: 199;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: #fff; color: var(--primary);
  box-shadow: var(--shadow); font-size: 20px; cursor: pointer;
  opacity: 0; visibility: hidden; transition: .25s;
}
.back-top.show { opacity: 1; visibility: visible; }

/* ===== 联系我们 ===== */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: stretch; }
.contact-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 720px; margin: 0 auto; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 220px;
}
.contact-card h3 { color: var(--primary); font-size: 18px; margin-bottom: 10px; }
.contact-card p { color: var(--muted); font-size: 15px; }
.contact-phone { font-size: 22px; font-weight: 700; }
.contact-page-grid { margin-bottom: 40px; }
.contact-intro p { max-width: 860px; margin: 0 auto 14px; color: #444; }
.contact-intro .section-title { margin-bottom: 24px; }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); }

/* 页脚导航 */
.footer-nav { margin-bottom: 14px; }
.footer-nav a { color: #cbbdb6; margin: 0 12px; font-size: 13px; }
.footer-nav a:hover { color: #fff; }
.beian-link { color: #cbbdb6; }
.beian-link:hover { color: #fff; }

/* 侧栏二维码 */
.side-qr { width: 150px; margin: 0 auto; border-radius: 8px; }

/* 门店位置/交通指引 */
.contact-transit { font-size: 13px; margin-top: 6px; color: var(--primary); }
.store-map-block { margin-bottom: 40px; }
.store-map-block .section-title { margin-bottom: 24px; }
.store-map-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.store-map-img img { border-radius: var(--radius); box-shadow: var(--shadow); }
.store-map-info h3 { color: var(--primary); font-size: 19px; margin-bottom: 12px; }
.store-map-info p { font-size: 14px; color: #555; margin-bottom: 10px; line-height: 1.8; }

/* ===== 页脚 ===== */
.site-footer { background: #2b2320; color: #cbbdb6; padding: 30px 0; text-align: center; }
.site-footer p { font-size: 13px; margin-bottom: 6px; }
.site-footer p:last-child { margin-bottom: 0; }

/* ===== 响应式：窄桌面/平板，导航折叠为汉堡菜单 ===== */
@media (max-width: 1100px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: #fff; box-shadow: 0 12px 24px rgba(0, 0, 0, .1);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 70vh; overflow-y: auto; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .main-nav a { padding: 12px 10px; border-bottom: 1px solid var(--bg-gray); border-radius: 0; }
}

/* ===== 响应式：平板 ===== */
@media (max-width: 992px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .team-shots { grid-template-columns: repeat(4, 1fr); }
  .process-steps { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-side { position: static; }
}

/* ===== 响应式：手机 H5 ===== */
@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .logo img { height: 32px; }

  /* 手机端模块普遍高于一屏，关闭竖向吸附，保持自由滚动 */
  html { scroll-snap-type: none; }

  .hero { padding: calc(var(--header-h) + 34px) 0 44px; }
  .hero-inner { gap: 26px; }
  .hero-points { gap: 14px; }
  .hero-points li { font-size: 14px; white-space: normal; }
  .hero-points img { width: 28px; height: 28px; }
  .hero-title { font-size: 16px; margin-top: 30px; line-height: 1.6; }
  .hero-badges { gap: 8px; }
  .hero-badges span { font-size: 12px; padding: 6px 12px; }

  .section { padding: 48px 0; }
  .section-title { font-size: 24px; }
  .section-sub { font-size: 15px; margin-bottom: 28px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .store-map-inner { grid-template-columns: 1fr; gap: 18px; }
  .card { padding: 22px; }

  .team-shots { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .team-photos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cases-track { gap: 12px; }
  .case-card { flex-basis: calc((100% - 12px) / 2); }
  .cases-nav { width: 36px; height: 36px; font-size: 21px; }
  .process-steps { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .love-head { flex-direction: column; align-items: flex-start; }
  .article-row { flex-direction: column; gap: 4px; align-items: flex-start; }
  .article-row-title { font-size: 16px; }

  .page-head h1 { font-size: 24px; }
  .baodian-card { padding: 18px; }
  .baodian-card h2 { font-size: 17px; }

  .article-title { font-size: 21px; }
  .article-body { font-size: 15px; }
  .article-body h2 { font-size: 17px; margin: 24px 0 12px; }

  /* 悬浮二维码在手机上放小一些 */
  .float-qr { width: 84px; right: 12px; bottom: 90px; padding: 7px 7px 5px; border-radius: 10px; }
  .float-qr p { font-size: 10px; margin-top: 4px; }
  .back-top { right: 14px; bottom: 32px; width: 38px; height: 38px; font-size: 17px; }
}

@media (max-width: 380px) {
  .case-card { flex-basis: 80%; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}

/* 尊重系统“减少动效”偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; scroll-behavior: auto; }
}
