/* ==========================================================================
   WinMerge 中文推广站 - 全局样式
   配色取自 Logo：文档蓝 #2F6FB2 / 深夜蓝 #1B3A5B / 金黄 #F5B301 / 橙红 #E8601C
   ========================================================================== */

:root {
  --blue: #2f6fb2;
  --blue-dark: #1b3a5b;
  --blue-light: #eaf2fa;
  --gold: #f5b301;
  --orange: #e8601c;
  --text: #26313d;
  --text-light: #5c6b7a;
  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --border: #e3eaf2;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(27, 58, 91, 0.08);
  --shadow-hover: 0 8px 24px rgba(27, 58, 91, 0.14);
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--orange); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { color: var(--blue-dark); line-height: 1.35; font-weight: 700; }

.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { font-size: 32px; margin-bottom: 12px; }
.section-head p { color: var(--text-light); font-size: 17px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 13px 34px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 4px 14px rgba(232, 96, 28, .35); }
.btn-primary:hover { background: #d1541a; color: #fff; box-shadow: 0 6px 18px rgba(232, 96, 28, .45); }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.85); }
.btn-outline:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-ghost { background: var(--blue-light); color: var(--blue-dark); }
.btn-ghost:hover { background: #dce9f6; color: var(--blue-dark); }
.btn-lg { padding: 16px 44px; font-size: 18px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; color: var(--blue-dark); }
.brand:hover { color: var(--blue-dark); }
.brand img { width: 36px; height: 36px; }
.brand span em { font-style: normal; color: var(--orange); }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 500;
}
.main-nav a:hover { background: var(--blue-light); color: var(--blue); }
.main-nav a.active { color: var(--blue); background: var(--blue-light); font-weight: 600; }
.main-nav .nav-cta { margin-left: 10px; }
.main-nav .nav-cta a {
  background: var(--orange); color: #fff; padding: 9px 20px;
}
.main-nav .nav-cta a:hover { background: #d1541a; color: #fff; }
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; padding: 8px;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--blue-dark);
  margin: 6px 0; border-radius: 2px; transition: .25s;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 62%, #4a8cc9 100%);
  color: #fff;
  padding: 96px 0 110px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; right: -140px; top: -140px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(245,179,1,.28), transparent 65%);
  pointer-events: none;
}
.hero-inner { display: flex; align-items: center; gap: 56px; position: relative; z-index: 1; }
.hero-text { flex: 1.2; }
.hero-badge {
  display: inline-block;
  background: rgba(245, 179, 1, .16);
  color: var(--gold);
  border: 1px solid rgba(245, 179, 1, .5);
  padding: 5px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { color: #fff; font-size: 44px; margin-bottom: 18px; letter-spacing: .5px; }
.hero p.lead { font-size: 18.5px; color: rgba(255,255,255,.88); margin-bottom: 34px; max-width: 560px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-meta { margin-top: 30px; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-meta div strong { display: block; font-size: 26px; color: var(--gold); }
.hero-meta div span { font-size: 13.5px; color: rgba(255,255,255,.75); }
.hero-visual { flex: 1; display: flex; justify-content: center; }
.hero-visual .mock {
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
  width: 100%; max-width: 460px; overflow: hidden;
}
.mock-bar { background: var(--blue-dark); padding: 10px 14px; display: flex; gap: 6px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.mock-bar i:nth-child(1){ background:#e8601c; } .mock-bar i:nth-child(2){ background:#f5b301; } .mock-bar i:nth-child(3){ background:#3fae6a; }
.mock-body { padding: 16px 18px 20px; font-family: "Consolas","Courier New",monospace; font-size: 13px; }
.mock-line { display: flex; gap: 10px; padding: 4px 8px; border-radius: 4px; white-space: nowrap; }
.mock-line .ln { color: #9db1c4; width: 26px; text-align: right; flex: none; }
.mock-line.same { color: #7a8b9c; }
.mock-line.diff { background: #fdf3e0; color: #8a5a00; }
.mock-line.add { background: #e7f6ec; color: #1d7a44; }
.mock-line.del { background: #fdeceb; color: #b3352c; }

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

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.card .icon {
  width: 54px; height: 54px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; font-size: 26px;
  background: var(--blue-light);
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--text-light); font-size: 15px; }

/* ---------- 使用场景 ---------- */
.scene-card { border-top: 4px solid var(--blue); }
.scene-card:nth-child(2) { border-top-color: var(--gold); }
.scene-card:nth-child(3) { border-top-color: var(--orange); }
.scene-card:nth-child(4) { border-top-color: #3fae6a; }
.scene-card ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-light); font-size: 14.5px; }
.scene-card ul li { margin-bottom: 6px; }

/* ---------- 用户评价 ---------- */
.quote-card { display: flex; flex-direction: column; }
.quote-card .stars { color: var(--gold); font-size: 17px; letter-spacing: 3px; margin-bottom: 12px; }
.quote-card blockquote { color: var(--text); font-size: 15.5px; flex: 1; margin-bottom: 18px; }
.quote-card .who { display: flex; align-items: center; gap: 12px; }
.quote-card .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; flex: none;
}
.quote-card .who strong { display: block; font-size: 15px; color: var(--blue-dark); }
.quote-card .who span { font-size: 13px; color: #fff; }

/* ---------- 步骤 ---------- */
.steps { counter-reset: step; }
.step-item { position: relative; padding-left: 64px; margin-bottom: 34px; }
.step-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700;
}
.step-item:nth-child(even)::before { background: var(--orange); }
.step-item h3 { font-size: 19px; margin-bottom: 6px; }
.step-item p { color: var(--text-light); font-size: 15px; }

/* ---------- 页首横幅（内页） ---------- */
.page-banner {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue));
  color: #fff; padding: 64px 0;
}
.page-banner h1 { color: #fff; font-size: 36px; margin-bottom: 10px; }
.page-banner p { color: rgba(255,255,255,.85); max-width: 720px; font-size: 17px; }
.breadcrumb { font-size: 13.5px; color: rgba(255,255,255,.7); margin-bottom: 18px; }
.breadcrumb a { color: var(--gold); }

/* ---------- 下载中心 ---------- */
.dl-panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 32px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.dl-panel .dl-info { flex: 1; min-width: 260px; }
.dl-panel h2 { font-size: 26px; margin-bottom: 8px; }
.dl-ver { display: inline-block; background: var(--blue-light); color: var(--blue); font-weight: 600; padding: 3px 14px; border-radius: 999px; font-size: 14px; margin-bottom: 12px; }
.dl-panel p { color: var(--text-light); font-size: 15px; }
.dl-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.dl-table th { background: var(--blue-dark); color: #fff; text-align: left; padding: 14px 18px; font-size: 14.5px; }
.dl-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 14.5px; color: var(--text); }
.dl-table tr:last-child td { border-bottom: none; }
.dl-table tr:hover td { background: var(--bg-soft); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12.5px; font-weight: 600; }
.tag-rec { background: #e7f6ec; color: #1d7a44; }
.tag-plain { background: var(--blue-light); color: var(--blue); }
.checksum { font-family: Consolas, monospace; font-size: 12.5px; color: var(--text-light); word-break: break-all; background: var(--bg-soft); padding: 14px 18px; border-radius: 8px; border: 1px dashed var(--border); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 32, 51, .55);
  z-index: 200;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-mask.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px;
  max-width: 560px; width: 100%;
  padding: 38px 36px 32px;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
  animation: pop .22s ease;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: var(--bg-soft); color: var(--text-light);
  font-size: 18px; cursor: pointer; line-height: 1;
}
.modal-close:hover { background: var(--blue-light); color: var(--blue-dark); }
.modal h3 { font-size: 23px; margin-bottom: 6px; }
.modal .modal-sub { color: var(--text-light); font-size: 14.5px; margin-bottom: 26px; }
.qr-row { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.qr-item { flex: 1; min-width: 170px; max-width: 210px; }
.qr-item img {
  width: 170px; height: 170px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px;
  background: #fff;
}
.qr-item strong { display: block; margin-top: 12px; color: var(--blue-dark); font-size: 15.5px; }
.qr-item span { display: block; color: var(--text-light); font-size: 13px; margin-top: 4px; }
.modal-tip { margin-top: 24px; font-size: 13px; color: var(--text-light); background: var(--bg-soft); border-radius: 8px; padding: 10px 14px; }

/* ---------- FAQ ---------- */
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 18px 24px;
  font-weight: 600; color: var(--blue-dark); font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--orange); font-size: 22px; font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body { padding: 0 24px 20px; color: var(--text-light); font-size: 15px; }

/* ---------- 教程文章 ---------- */
.article h2 { font-size: 24px; margin: 40px 0 16px; padding-left: 14px; border-left: 4px solid var(--orange); }
.article h3 { font-size: 18.5px; margin: 26px 0 10px; }
.article p, .article li { color: var(--text-light); font-size: 15.5px; }
.article ul, .article ol { padding-left: 24px; margin: 10px 0 16px; }
.article li { margin-bottom: 7px; }
.article code {
  background: var(--blue-light); color: var(--blue-dark);
  padding: 2px 8px; border-radius: 4px;
  font-family: Consolas, "Courier New", monospace; font-size: 14px;
}
.article pre {
  background: var(--blue-dark); color: #d9e6f5;
  padding: 18px 22px; border-radius: 8px;
  overflow-x: auto; margin: 14px 0 20px;
  font-size: 14px; line-height: 1.6;
}
.article pre code { background: none; color: inherit; padding: 0; }
.article table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; }
.article th { background: var(--blue-dark); color: #fff; padding: 11px 14px; text-align: left; font-size: 14px; }
.article td { padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 14.5px; color: var(--text-light); }
.tip-box {
  background: #fdf7e6; border: 1px solid #f2dd9f; border-radius: 8px;
  padding: 14px 18px; margin: 16px 0 22px; font-size: 14.5px; color: #7a5c00;
}

/* ---------- CTA 通栏 ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--blue-dark), var(--blue));
  color: #fff; text-align: center; padding: 64px 0;
}
.cta-band h2 { color: #fff; font-size: 30px; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,.85); margin-bottom: 28px; font-size: 16.5px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #12283f; color: rgba(255,255,255,.72); padding: 54px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; font-size: 14.5px; }
.footer-grid a { color: rgba(255,255,255,.72); }
.footer-grid a:hover { color: var(--gold); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.footer-brand img { width: 32px; height: 32px; }
.footer-brand + p { font-size: 14px; max-width: 300px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0; font-size: 13px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed; right: 26px; bottom: 26px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue); color: #fff; border: none;
  font-size: 20px; cursor: pointer; display: none;
  box-shadow: var(--shadow-hover); z-index: 90;
}
.to-top.show { display: block; }
.to-top:hover { background: var(--blue-dark); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { flex-direction: column; }
  .hero-visual { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 26px; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 12px 18px 20px; gap: 4px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav .nav-cta { margin: 8px 0 0; }
  .main-nav .nav-cta a { display: block; text-align: center; }
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 29px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .dl-table { display: block; overflow-x: auto; }
}
