/*
Theme Name: Chaoqi WP Service
Theme URI: https://www.chaoqi.cn
Author: 金华超企网络科技有限公司
Author URI: https://www.chaoqi.cn
Description: WordPress 外贸建站服务主题。首页各板块内容（服务、案例、套餐、教程、联系方式）全部存储于数据库，通过后台"主题设置"与文章/自定义内容类型管理。
Version: 1.0.0
Requires at least: 6.0
License: GNU General Public License v2 or later
Text Domain: chaoqi
*/

/* =========================================================
   基础变量与重置
   ========================================================= */
:root {
  --cq-primary: #2563eb;
  --cq-primary-dark: #1d4ed8;
  --cq-primary-light: #dbeafe;
  --cq-accent: #0ea5e9;
  --cq-dark: #0f172a;
  --cq-text: #1e293b;
  --cq-text-muted: #64748b;
  --cq-bg: #ffffff;
  --cq-bg-soft: #f8fafc;
  --cq-border: #e2e8f0;
  --cq-radius: 14px;
  --cq-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --cq-container: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--cq-text);
  background: var(--cq-bg);
  line-height: 1.7;
  font-size: 16px;
}

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

a { color: var(--cq-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cq-primary-dark); }

ul, ol { list-style: none; }

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

/* =========================================================
   顶部导航
   ========================================================= */
.cq-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cq-border);
}

.cq-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.cq-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--cq-dark);
}

.cq-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--cq-primary), var(--cq-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
}

.cq-logo small { font-weight: 400; font-size: 12px; color: var(--cq-text-muted); }

/* 图片 Logo（仅头部使用） */
.cq-logo-img {
  display: block;
  height: 46px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}

.cq-nav ul { display: flex; gap: 6px; align-items: center; }
.cq-nav a {
  display: block;
  padding: 8px 14px;
  color: var(--cq-text);
  font-size: 15px;
  border-radius: 8px;
}
.cq-nav a:hover,
.cq-nav .current-menu-item > a,
.cq-nav .current_page_item > a {
  color: var(--cq-primary);
  background: var(--cq-primary-light);
}

.cq-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--cq-border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  color: var(--cq-dark);
}

/* =========================================================
   Hero
   ========================================================= */
.cq-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 55%, #1d4ed8 100%);
  color: #fff;
  padding: 90px 0 100px;
  overflow: hidden;
  position: relative;
}

.cq-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.cq-hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.08);
}

.cq-hero h1 {
  font-size: 42px;
  line-height: 1.3;
  margin-bottom: 18px;
}
.cq-hero h1 em { font-style: normal; color: #7dd3fc; }

.cq-hero p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 30px;
  max-width: 480px;
}

.cq-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.cq-hero-img {
  border-radius: var(--cq-radius);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   按钮
   ========================================================= */
.cq-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.cq-btn:hover { transform: translateY(-2px); }
.cq-btn-primary { background: var(--cq-primary); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35); }
.cq-btn-primary:hover { background: var(--cq-primary-dark); color: #fff; }
.cq-btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.45); }
.cq-btn-ghost:hover { background: rgba(255,255,255,.22); color: #fff; }
.cq-btn-outline { background: #fff; color: var(--cq-primary); border: 1px solid var(--cq-primary); }
.cq-btn-outline:hover { background: var(--cq-primary-light); color: var(--cq-primary-dark); }

/* =========================================================
   数据条
   ========================================================= */
.cq-stats { background: #fff; margin-top: -50px; position: relative; z-index: 2; }
.cq-stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: #fff;
  border-radius: var(--cq-radius);
  box-shadow: var(--cq-shadow);
  padding: 28px 20px;
}
.cq-stat { text-align: center; }
.cq-stat b { display: block; font-size: 28px; color: var(--cq-primary); }
.cq-stat span { font-size: 14px; color: var(--cq-text-muted); }

/* =========================================================
   通用板块
   ========================================================= */
.cq-section { padding: 80px 0; }
.cq-section-soft { background: var(--cq-bg-soft); }

.cq-section-head { text-align: center; margin-bottom: 48px; }
.cq-section-head .cq-eyebrow {
  color: var(--cq-primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.cq-section-head h2 { font-size: 32px; color: var(--cq-dark); margin: 8px 0 12px; }
.cq-section-head h2 em { font-style: normal; color: var(--cq-primary); }
.cq-section-head p { color: var(--cq-text-muted); max-width: 640px; margin: 0 auto; }

/* =========================================================
   卡片网格（服务/优势/流程）
   ========================================================= */
.cq-grid { display: grid; gap: 24px; }
.cq-grid-4 { grid-template-columns: repeat(4, 1fr); }
.cq-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cq-grid-2 { grid-template-columns: repeat(2, 1fr); }

.cq-card {
  background: #fff;
  border: 1px solid var(--cq-border);
  border-radius: var(--cq-radius);
  padding: 30px 26px;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.cq-card:hover { transform: translateY(-4px); box-shadow: var(--cq-shadow); }

.cq-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--cq-primary-light);
  color: var(--cq-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 18px;
}

.cq-card h3 { font-size: 19px; color: var(--cq-dark); margin-bottom: 10px; }
.cq-card p { font-size: 14.5px; color: var(--cq-text-muted); margin-bottom: 14px; }
.cq-card .cq-price { color: var(--cq-primary); font-weight: 700; font-size: 16px; }
.cq-card-link { font-weight: 600; font-size: 14px; margin-top: auto; }
.cq-card .cq-check-list { margin-bottom: 16px; }

.cq-check-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--cq-text);
}
.cq-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 700;
}
.cq-check-list li.cq-no::before { content: "✕"; color: #94a3b8; }

/* 服务优势编号卡片 */
.cq-num-card .cq-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--cq-primary-light);
  -webkit-text-stroke: 1.5px var(--cq-primary);
  margin-bottom: 12px;
}

/* =========================================================
   建站流程
   ========================================================= */
.cq-process {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.cq-step {
  background: #fff;
  border: 1px solid var(--cq-border);
  border-radius: var(--cq-radius);
  padding: 28px 24px;
  position: relative;
}
.cq-step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cq-primary), var(--cq-accent));
  color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.cq-step h3 { font-size: 17px; margin-bottom: 10px; color: var(--cq-dark); }
.cq-step ul li { font-size: 13.5px; color: var(--cq-text-muted); margin-bottom: 6px; }

/* =========================================================
   案例
   ========================================================= */
.cq-case-card {
  background: #fff;
  border: 1px solid var(--cq-border);
  border-radius: var(--cq-radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.cq-case-card:hover { transform: translateY(-4px); box-shadow: var(--cq-shadow); }
.cq-case-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--cq-bg-soft); }
.cq-case-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cq-case-card:hover .cq-case-thumb img { transform: scale(1.04); }
.cq-case-body { padding: 20px 22px 24px; flex: 1; }
.cq-case-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--cq-primary);
  background: var(--cq-primary-light);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 10px;
}
.cq-case-body h3 { font-size: 17px; color: var(--cq-dark); margin-bottom: 6px; }
.cq-case-body p { font-size: 13.5px; color: var(--cq-text-muted); }

/* =========================================================
   维护套餐
   ========================================================= */
.cq-plan {
  background: #fff;
  border: 1px solid var(--cq-border);
  border-radius: var(--cq-radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.cq-plan-featured {
  border: 2px solid var(--cq-primary);
  box-shadow: var(--cq-shadow);
}
.cq-plan-flag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cq-primary);
  color: #fff;
  font-size: 12px;
  padding: 4px 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.cq-plan h3 { font-size: 20px; color: var(--cq-dark); }
.cq-plan .cq-plan-desc { font-size: 13.5px; color: var(--cq-text-muted); margin: 6px 0 16px; }
.cq-plan-price { font-size: 34px; font-weight: 800; color: var(--cq-primary); margin-bottom: 4px; }
.cq-plan-price small { font-size: 14px; color: var(--cq-text-muted); font-weight: 400; }
.cq-plan .cq-check-list { margin: 18px 0 24px; flex: 1; }
.cq-plan .cq-btn { text-align: center; }

/* =========================================================
   教程列表
   ========================================================= */
.cq-post-card {
  background: #fff;
  border: 1px solid var(--cq-border);
  border-radius: var(--cq-radius);
  padding: 26px 24px;
  transition: transform .2s, box-shadow .2s;
}
.cq-post-card:hover { transform: translateY(-4px); box-shadow: var(--cq-shadow); }
.cq-post-meta { font-size: 12.5px; color: var(--cq-text-muted); margin-bottom: 8px; }
.cq-post-card h3 { font-size: 17px; margin-bottom: 8px; }
.cq-post-card h3 a { color: var(--cq-dark); }
.cq-post-card h3 a:hover { color: var(--cq-primary); }
.cq-post-card p { font-size: 14px; color: var(--cq-text-muted); }

/* =========================================================
   CTA
   ========================================================= */
.cq-cta {
  background: linear-gradient(135deg, var(--cq-primary) 0%, var(--cq-accent) 100%);
  color: #fff;
  text-align: center;
  padding: 70px 0;
}
.cq-cta h2 { font-size: 30px; margin-bottom: 12px; }
.cq-cta p { color: rgba(255,255,255,.85); margin-bottom: 28px; }
.cq-cta .cq-btn { background: #fff; color: var(--cq-primary); }
.cq-cta .cq-btn:hover { background: var(--cq-primary-light); color: var(--cq-primary-dark); }

/* =========================================================
   页脚
   ========================================================= */
.cq-footer { background: var(--cq-dark); color: #94a3b8; padding: 60px 0 30px; font-size: 14px; }
.cq-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.cq-footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.cq-footer a { color: #94a3b8; }
.cq-footer a:hover { color: #fff; }
.cq-footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.cq-footer-brand .cq-logo-mark { width: 32px; height: 32px; font-size: 15px; }
.cq-footer ul li { margin-bottom: 10px; }
.cq-footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
}

/* =========================================================
   内页通用
   ========================================================= */
.cq-page-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.cq-page-hero h1 { font-size: 32px; margin-bottom: 8px; }
.cq-page-hero p { color: rgba(255,255,255,.8); }

.cq-content {
  background: #fff;
  padding: 56px 0;
}
.cq-content article { max-width: 820px; margin: 0 auto; }
.cq-content h2 { font-size: 26px; color: var(--cq-dark); margin: 34px 0 14px; }
.cq-content h3 { font-size: 20px; color: var(--cq-dark); margin: 28px 0 12px; }
.cq-content p { margin-bottom: 16px; color: var(--cq-text); }
.cq-content ul { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.cq-content ol { list-style: decimal; padding-left: 24px; margin-bottom: 16px; }
.cq-content li { margin-bottom: 6px; }
.cq-content blockquote {
  border-left: 4px solid var(--cq-primary);
  background: var(--cq-bg-soft);
  padding: 14px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 16px;
  color: var(--cq-text-muted);
}
.cq-content img { border-radius: 10px; margin: 16px 0; }
.cq-content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.cq-content th, .cq-content td { border: 1px solid var(--cq-border); padding: 10px 14px; text-align: left; }
.cq-content th { background: var(--cq-bg-soft); }

/* 联系页 */
.cq-content article:has(.cq-contact-grid) { max-width: 1060px; }
.cq-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* 在线留言表单 */
.cq-form-wrap { max-width: 780px; margin: 0 auto 12px; }
.cq-form {
  background: #fff;
  border: 1px solid var(--cq-border);
  border-radius: var(--cq-radius);
  padding: 30px;
  box-shadow: var(--cq-shadow);
}
.cq-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cq-field { display: block; margin-bottom: 18px; }
.cq-field > span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--cq-dark);
  margin-bottom: 7px;
}
.cq-field > span i { color: #dc2626; font-style: normal; }
.cq-field input,
.cq-field textarea,
.cq-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 15px;
  font-family: inherit;
  color: var(--cq-text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.cq-field input:focus,
.cq-field textarea:focus,
.cq-field select:focus {
  outline: none;
  border-color: var(--cq-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.cq-field textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.cq-form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cq-form-tip { font-size: 13px; color: var(--cq-text-muted); }
.cq-form-notice {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}
.cq-notice-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.cq-notice-err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* 蜜罐字段：对正常访客不可见、不可聚焦 */
.cq-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}
.cq-contact-item {
  background: var(--cq-bg-soft);
  border: 1px solid var(--cq-border);
  border-radius: var(--cq-radius);
  padding: 28px 24px;
  text-align: center;
}
.cq-contact-item .cq-card-icon { margin: 0 auto 14px; }
.cq-contact-item b { display: block; font-size: 16px; color: var(--cq-dark); margin-bottom: 4px; }
.cq-contact-item span { color: var(--cq-text-muted); font-size: 14px; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 992px) {
  .cq-hero-inner { grid-template-columns: 1fr; }
  .cq-hero-img { max-width: 560px; margin: 0 auto; }
  .cq-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cq-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cq-process { grid-template-columns: repeat(2, 1fr); }
  .cq-footer-grid { grid-template-columns: 1fr 1fr; }
  .cq-hero h1 { font-size: 34px; }
}

@media (max-width: 768px) {
  .cq-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--cq-border);
    display: none;
    box-shadow: 0 12px 24px rgba(15,23,42,.08);
  }
  .cq-nav.cq-open { display: block; }
  .cq-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 0; }
  .cq-nav a { padding: 12px 24px; }
  .cq-nav-toggle { display: flex; align-items: center; justify-content: center; }

  .cq-logo { font-size: 17px; gap: 8px; }
  .cq-logo small { display: none; }
  .cq-logo-mark { width: 32px; height: 32px; font-size: 15px; border-radius: 8px; }
  .cq-logo-img { height: 36px; max-width: 190px; }

  .cq-hero { padding: 60px 0 80px; }
  .cq-hero h1 { font-size: 28px; }
  .cq-section { padding: 56px 0; }
  .cq-section-head h2 { font-size: 25px; }
  .cq-stats-inner { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .cq-grid-4, .cq-grid-3, .cq-grid-2, .cq-process, .cq-contact-grid { grid-template-columns: 1fr; }
  .cq-form-row { grid-template-columns: 1fr; }
  .cq-form { padding: 22px 20px; }
  .cq-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cq-cta h2 { font-size: 24px; }
}
