/* ============================================================
   theme-ads — Google Ads 落地页主题
   设计约束（docs/dfwbest_ads_plan.md）：
   - 响应式单套模板，移动端不切独立主题
   - 无弹窗 / 插页 / 遮罩，FAQ 用原生 details
   - 单一主 CTA，表单在首屏 CTA 的锚点落点
   - 高对比正文、可聚焦状态、reduced-motion 友好
   ============================================================ */

:root {
  --ads-ink: #14202e;
  --ads-ink-2: #46586b;
  --ads-line: #dce4ec;
  --ads-bg: #ffffff;
  --ads-bg-soft: #f5f8fb;
  --ads-brand: #0b5cab;
  --ads-brand-dark: #084580;
  --ads-accent: #e8590c;
  --ads-ok: #137a4d;
  --ads-danger: #a4262c;
  --ads-radius: 10px;
  --ads-shadow: 0 8px 28px rgba(20, 32, 46, .09);
  --ads-wrap: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.ads-page {
  margin: 0;
  background: var(--ads-bg);
  color: var(--ads-ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
a { color: var(--ads-brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

:focus-visible { outline: 3px solid var(--ads-accent); outline-offset: 2px; }

/* 只隐藏特定的空文案节点。绝不能写全局 :empty —— void 元素（input/img/br）
   同样匹配 :empty，会把整张表单的输入框全部隐藏掉。 */
.ads-eyebrow:empty, .ads-provider-ref:empty, .ads-form-msg:empty { display: none; }

.ads-wrap { width: min(100% - 40px, var(--ads-wrap)); margin-inline: auto; }
.ads-wrap-narrow { width: min(100% - 40px, 820px); margin-inline: auto; }

.ads-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ads-ink); color: #fff; padding: 10px 16px;
}
.ads-skip:focus { left: 12px; top: 12px; }

/* 上线前配置缺失提醒：宁可显眼，也不要带病投放 */
.ads-setup {
  background: #fff3cd; color: #6b4b00;
  border-bottom: 1px solid #f0d68a;
  padding: 10px 20px; text-align: center; font-size: 14px;
}

/* ---------- Header ---------- */
.ads-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--ads-line);
  backdrop-filter: blur(6px);
}
.ads-header-inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 72px; flex-wrap: wrap;
}
.ads-brand { display: flex; flex-direction: column; line-height: 1.2; color: var(--ads-ink); }
.ads-brand:hover { text-decoration: none; }
.ads-brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.ads-brand-tag { font-size: 11px; color: var(--ads-ink-2); letter-spacing: .04em; text-transform: uppercase; }
.ads-nav { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.ads-nav a { color: var(--ads-ink-2); font-size: 14px; font-weight: 600; }
.ads-nav a:hover { color: var(--ads-brand); }
.ads-header-actions { display: flex; align-items: center; gap: 14px; }
.ads-header-phone { font-weight: 700; font-size: 15px; white-space: nowrap; }

/* ---------- Buttons ---------- */
.ads-btn {
  display: inline-block; border: 1px solid transparent;
  border-radius: var(--ads-radius);
  background: var(--ads-accent); color: #fff;
  font-weight: 700; font-size: 16px; text-align: center;
  padding: 13px 24px; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.ads-btn:hover { background: #c8470a; color: #fff; text-decoration: none; }
.ads-btn:active { transform: translateY(1px); }
.ads-btn[disabled] { opacity: .6; cursor: wait; }
.ads-btn-sm { padding: 9px 18px; font-size: 14px; }
.ads-btn-lg { padding: 16px 30px; font-size: 17px; }
.ads-btn-block { width: 100%; }
.ads-btn-ghost {
  background: transparent; color: var(--ads-brand);
  border-color: var(--ads-line);
}
.ads-btn-ghost:hover { background: var(--ads-bg-soft); color: var(--ads-brand-dark); }

/* ---------- Hero ---------- */
.ads-hero {
  background: linear-gradient(160deg, #f2f7fd 0%, #ffffff 70%);
  border-bottom: 1px solid var(--ads-line);
  padding: 68px 0 72px;
}
.ads-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr);
  gap: 48px; align-items: start;
}
.ads-eyebrow {
  color: var(--ads-brand); font-size: 13px; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; margin-bottom: 12px;
}
.ads-hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -.035em; font-weight: 800; margin-bottom: 18px;
}
.ads-hero-sub { font-size: 19px; color: var(--ads-ink-2); max-width: 620px; }
.ads-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 24px; }
.ads-hero-points {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 10px 24px; flex-wrap: wrap;
  font-size: 14px; color: var(--ads-ink-2);
}
.ads-hero-points li::before { content: "\2713"; color: var(--ads-ok); font-weight: 800; margin-right: 7px; }

.ads-hero-card {
  background: #fff; border: 1px solid var(--ads-line);
  border-radius: 14px; box-shadow: var(--ads-shadow);
  padding: 26px 26px 22px;
}
.ads-hero-card h2 { font-size: 20px; }
.ads-hero-card > p { color: var(--ads-ink-2); font-size: 15px; }
.ads-hero-card ol { list-style: none; counter-reset: none; padding: 0; margin: 0 0 14px; }
.ads-hero-card li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-size: 15px; }
.ads-hero-card li span {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  background: var(--ads-bg-soft); color: var(--ads-brand);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.ads-hero-card-note { font-size: 13px !important; color: var(--ads-ink-2); border-top: 1px solid var(--ads-line); padding-top: 14px; margin: 0; }

/* ---------- Sections ---------- */
.ads-section-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 28px; }
.ads-trust, .ads-services, .ads-faq, .ads-variants { padding: 64px 0; }
.ads-trust { background: var(--ads-bg-soft); border-bottom: 1px solid var(--ads-line); }
.ads-trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ads-trust-item {
  background: #fff; border: 1px solid var(--ads-line);
  border-radius: var(--ads-radius); padding: 24px;
}
.ads-trust-item h3 { font-size: 18px; }
.ads-trust-item p { font-size: 15px; color: var(--ads-ink-2); }
.ads-fine { font-size: 13px !important; color: var(--ads-ink-2); border-top: 1px solid var(--ads-line); padding-top: 12px; margin-bottom: 0; }

/* ---------- Hero 真实视觉元素 ---------- */
/* 占满 hero grid 的第二行，不挤压正文与「How it works」卡片。
   固定宽高比 + 显式 width/height 属性，避免图片加载引起 CLS。 */
.ads-hero-media { grid-column: 1 / -1; margin: 8px 0 0; }
.ads-hero-media img, .ads-hero-media video {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 7; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--ads-line);
  background: var(--ads-bg-soft);
}
.ads-hero-media video { aspect-ratio: 16 / 9; }
.ads-hero-media figcaption {
  margin-top: 10px; font-size: 13px; color: var(--ads-ink-2); text-align: center;
}

/* ---------- 强相关服务商区块 ---------- */
.ads-providers-section { padding: 64px 0; border-bottom: 1px solid var(--ads-line); }
.ads-providers-lead { max-width: 760px; color: var(--ads-ink-2); margin-bottom: 28px; }
.ads-provider-grid {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.ads-provider-card {
  background: #fff; border: 1px solid var(--ads-line);
  border-left: 4px solid var(--ads-brand);
  border-radius: var(--ads-radius); padding: 20px 22px;
}
.ads-provider-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ads-provider-head strong { font-size: 17px; }
.ads-badge {
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ads-ok); background: #e8f6ef; border-radius: 999px; padding: 3px 9px;
}
.ads-provider-meta { font-size: 14px; color: var(--ads-ink-2); margin-bottom: 10px; }
.ads-provider-phone, .ads-provider-site { display: inline-block; font-size: 14px; font-weight: 700; margin-right: 14px; }
.ads-provider-card .ads-fine { margin-top: 12px; }
.ads-providers-empty {
  background: var(--ads-bg-soft); border: 1px dashed var(--ads-line);
  border-radius: var(--ads-radius); padding: 24px; max-width: 820px;
}
.ads-providers-empty p:last-child { margin-bottom: 0; color: var(--ads-ink-2); }
.ads-providers-disclaimer { margin-top: 24px; max-width: 900px; }
.ads-provider-ref { color: var(--ads-ink-2); font-size: 13px; }

/* ---------- 真实客户评价 ---------- */
.ads-testimonials { padding: 64px 0; background: var(--ads-bg-soft); border-bottom: 1px solid var(--ads-line); }
.ads-review-grid {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.ads-review-card {
  background: #fff; border: 1px solid var(--ads-line);
  border-radius: var(--ads-radius); padding: 22px;
  display: flex; flex-direction: column;
}
.ads-review-card blockquote { margin: 0 0 18px; font-size: 15px; line-height: 1.7; flex: 1; }
.ads-review-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; font-size: 14px; margin-bottom: 10px; }
.ads-rating { color: #a05a00; font-weight: 800; font-size: 14px; }
.ads-review-evidence { margin-top: 14px; }
.ads-testimonials > .ads-wrap > .ads-fine { max-width: 900px; }

.ads-service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ads-service-card {
  border: 1px solid var(--ads-line); border-radius: var(--ads-radius);
  padding: 22px; display: flex; flex-direction: column; gap: 4px;
}
.ads-service-card h3 { font-size: 18px; margin-bottom: 4px; }
.ads-service-card p { flex: 1; color: var(--ads-ink-2); font-size: 14px; }
.ads-service-card a { font-weight: 700; font-size: 14px; }
.ads-empty { color: var(--ads-ink-2); }

/* ---------- Quote ---------- */
.ads-quote { background: var(--ads-bg-soft); border-block: 1px solid var(--ads-line); padding: 64px 0; }
.ads-quote-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); gap: 48px; align-items: start; }
.ads-quote-copy h2 { font-size: clamp(24px, 2.6vw, 32px); }
.ads-quote-copy > p { color: var(--ads-ink-2); }
.ads-check-list { list-style: none; padding: 0; margin: 24px 0; }
.ads-check-list li { margin-bottom: 10px; font-size: 15px; }
.ads-check-list li::before { content: "\2713"; color: var(--ads-ok); font-weight: 800; margin-right: 9px; }
.ads-quote-phone { font-weight: 600; }

.ads-form, .ads-form-offline {
  background: #fff; border: 1px solid var(--ads-line);
  border-radius: 14px; box-shadow: var(--ads-shadow); padding: 28px;
}
.ads-form-title { font-size: 22px; margin-bottom: 4px; }
.ads-form-lead { color: var(--ads-ink-2); font-size: 14px; margin-bottom: 22px; }
.ads-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ads-field { display: block; margin-bottom: 16px; }
.ads-field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.ads-field em { color: var(--ads-danger); font-style: normal; }
.ads-field input, .ads-field select, .ads-field textarea {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 15px;
  color: var(--ads-ink); background: #fff;
  border: 1px solid #c9d5e1; border-radius: 8px;
}
.ads-field textarea { resize: vertical; }
.ads-field input:focus, .ads-field select:focus, .ads-field textarea:focus {
  border-color: var(--ads-brand); outline: 2px solid rgba(11, 92, 171, .18); outline-offset: 1px;
}
.ads-form-locked { background: var(--ads-bg-soft); border: 1px solid var(--ads-line); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.ads-form-msg { margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.ads-form-msg.is-ok { color: var(--ads-ok); }
.ads-form-msg.is-error { color: var(--ads-danger); }
.ads-form-fine { font-size: 12px; color: var(--ads-ink-2); margin: 14px 0 0; }
.ads-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- FAQ ---------- */
.ads-faq-list { display: grid; gap: 12px; }
.ads-faq-item { border: 1px solid var(--ads-line); border-radius: var(--ads-radius); background: #fff; }
.ads-faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style-position: outside; }
.ads-faq-item[open] summary { border-bottom: 1px solid var(--ads-line); }
.ads-faq-item p { padding: 16px 20px 4px; color: var(--ads-ink-2); font-size: 15px; }

/* ---------- Variants / secondary CTA ---------- */
.ads-variants { background: var(--ads-bg-soft); border-top: 1px solid var(--ads-line); padding: 52px 0; }
.ads-variant-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ads-variant-list a {
  display: inline-block; padding: 8px 14px; background: #fff;
  border: 1px solid var(--ads-line); border-radius: 999px; font-size: 14px;
}
.ads-cta-secondary { padding: 66px 0; text-align: center; }
.ads-cta-secondary h2 { font-size: clamp(24px, 2.6vw, 32px); }
.ads-cta-secondary p { color: var(--ads-ink-2); margin-bottom: 24px; }

/* ---------- Compliance pages ---------- */
.ads-policy { padding: 48px 0 72px; }
.ads-crumb { font-size: 13px; color: var(--ads-ink-2); margin-bottom: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.ads-policy h1 { font-size: clamp(28px, 3.2vw, 40px); }
.ads-prose { font-size: 16px; }
.ads-prose p { margin-bottom: 18px; }
.ads-policy-contact { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--ads-line); }
.ads-policy-contact h2 { font-size: 20px; }
.ads-policy-contact address { font-style: normal; color: var(--ads-ink-2); }

/* ---------- Footer ---------- */
.ads-footer { background: #101c2b; color: #c9d6e3; padding: 56px 0 24px; }
.ads-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.ads-footer-brand { color: #fff; font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.ads-footer-note { font-size: 14px; line-height: 1.7; }
.ads-footer-title { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.ads-footer-address { font-style: normal; font-size: 14px; }
.ads-footer-address p { margin-bottom: 8px; }
.ads-footer a { color: #8fc4ff; }
.ads-footer-links { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.ads-footer-links li { margin-bottom: 8px; }
.ads-footer-bottom {
  margin: 36px 0 0; padding-top: 20px; border-top: 1px solid #2a3a4d;
  font-size: 13px; color: #91a5b9;
}
.ads-to-top { position: fixed; right: 16px; bottom: 16px; background: var(--ads-ink); color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 12px; z-index: 30; }

/* 旧主题内容页在被 theme-ads 外壳包裹时的最小可读性兜底 */
.channel-body, .list-body, .show-body, .wrap { max-width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .ads-hero-grid, .ads-quote-grid { grid-template-columns: 1fr; gap: 32px; }
  .ads-trust-grid, .ads-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ads-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ads-footer-grid { grid-template-columns: 1fr 1fr; }
  .ads-nav { order: 3; width: 100%; margin-left: 0; }
  .ads-hero-media img { aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .ads-wrap, .ads-wrap-narrow { width: min(100% - 28px, var(--ads-wrap)); }
  .ads-hero { padding: 44px 0 48px; }
  .ads-trust, .ads-services, .ads-faq, .ads-quote, .ads-variants,
  .ads-providers-section, .ads-testimonials { padding: 44px 0; }
  .ads-trust-grid, .ads-service-grid, .ads-footer-grid, .ads-field-row,
  .ads-provider-grid, .ads-review-grid { grid-template-columns: 1fr; }
  .ads-hero-media img { aspect-ratio: 4 / 3; }
  .ads-header-inner { gap: 14px; padding-block: 12px; }
  .ads-header-actions { margin-left: auto; }
  .ads-header-phone { display: none; }
  .ads-btn-lg { width: 100%; }
  .ads-form, .ads-form-offline { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ads-btn { transition: none; }
}
