/* ============================================================
   海口中旗红知识产权代理有限公司 官网样式
   配色系统：藏蓝(信任/专业) + 金色(品质) + 中性灰
   ============================================================ */
:root {
  --primary: #14335F;
  --primary-dark: #0E2547;
  --primary-light: #1E4A8A;
  --accent: #C79A4B;
  --accent-dark: #A97F35;
  --text: #1F2937;
  --text-secondary: #4B5563;
  --text-light: #6B7280;
  --bg: #FFFFFF;
  --bg-light: #F6F8FB;
  --bg-dark: #0E2547;
  --border: #E5E9F0;
  --white: #FFFFFF;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(20, 51, 95, 0.08);
  --shadow-lg: 0 8px 30px rgba(20, 51, 95, 0.12);
  --max-w: 1200px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }
ul, ol { list-style: none; }

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

.icon { width: 1.25em; height: 1.25em; fill: currentColor; vertical-align: -0.25em; }
.icon-lg { width: 2em; height: 2em; }

/* ========== 顶部第一行：信息栏 ========== */
.topbar {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.92);
  padding: 10px 0;
  font-size: 14px;
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-brand img, .topbar-brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.topbar-name { font-weight: 600; font-size: 15px; color: #fff; white-space: nowrap; }
.topbar-slogan { color: rgba(255, 255, 255, 0.65); font-size: 13px; }
.topbar-phone {
  display: flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 700; font-size: 18px;
  white-space: nowrap;
}
.topbar-phone:hover { color: #E2BE75; }
.topbar-phone .icon { width: 20px; height: 20px; }

/* ========== 顶部第二行：主导航（独立通栏） ========== */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 6px rgba(20, 51, 95, 0.06);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px;
}
.nav-menu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-menu > li { position: relative; }
.nav-menu a {
  display: block; padding: 18px 16px; color: var(--text);
  font-size: 15px; font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--primary); border-bottom-color: var(--accent);
}
.nav-menu .has-sub > a::after {
  content: ""; display: inline-block; margin-left: 6px;
  border: 5px solid transparent; border-top-color: var(--text-light);
  vertical-align: middle; transform: translateY(2px);
}
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 200px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg); display: none; z-index: 101;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu { display: block; }
.submenu a { padding: 12px 18px; border-bottom: none; font-size: 14px; }
.submenu a:hover { background: var(--bg-light); border-bottom: none; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 12px; color: var(--primary);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius); font-size: 16px;
  font-weight: 600; cursor: pointer; border: 2px solid transparent;
  transition: all 0.2s ease; min-height: 48px;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-outline-dark { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: #fff; }
.btn-block { width: 100%; }

/* ========== 首屏 Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff; padding: 88px 0 80px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: rgba(199, 154, 75, 0.12);
}
.hero::before {
  content: ""; position: absolute; left: -80px; bottom: -160px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(199, 154, 75, 0.18); border: 1px solid rgba(199, 154, 75, 0.5);
  color: #E2BE75; padding: 6px 16px; border-radius: 999px;
  font-size: 14px; margin-bottom: 24px;
}
.hero h1 { font-size: 42px; line-height: 1.3; margin-bottom: 20px; font-weight: 700; }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,0.85); margin-bottom: 36px; max-width: 640px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-note { margin-top: 28px; font-size: 14px; color: rgba(255,255,255,0.65); display: flex; gap: 24px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note .icon { color: var(--accent); }

/* ========== 数据信任区 ========== */
.stats { background: var(--white); padding: 0; margin-top: -1px; }
.stats-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
.stat-item {
  padding: 36px 20px; text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 34px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat-num small { font-size: 16px; font-weight: 600; }
.stat-label { color: var(--text-secondary); font-size: 14px; margin-top: 6px; }

/* ========== 通用区块 ========== */
.section { padding: 80px 0; }
.section-light { background: var(--bg-light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-tag {
  display: inline-block; color: var(--accent-dark); font-weight: 600;
  font-size: 14px; letter-spacing: 2px; margin-bottom: 12px;
}
.section-head h2 { font-size: 32px; color: var(--primary-dark); margin-bottom: 14px; }
.section-head p { color: var(--text-secondary); 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: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px;
  transition: all 0.25s ease; height: 100%;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: #CBD6E8; }
.card-icon {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; margin-bottom: 20px; flex-shrink: 0;
}
.card-icon .icon { width: 28px; height: 28px; }
.card h3 { font-size: 19px; color: var(--primary-dark); margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 15px; flex-grow: 1; }
.card .card-link {
  margin-top: 16px; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.card .card-link .icon { width: 14px; height: 14px; transition: transform 0.2s; }
.card:hover .card-link .icon { transform: translateX(4px); }
.card-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tag {
  font-size: 12px; color: var(--primary); background: #EDF2FA;
  padding: 3px 10px; border-radius: 999px;
}

/* ========== 优势/步骤列表 ========== */
.feature-list { display: grid; gap: 20px; }
.feature-item { display: flex; gap: 16px; align-items: flex-start; }
.feature-item .f-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: #EDF2FA; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.feature-item h4 { font-size: 17px; color: var(--primary-dark); margin-bottom: 4px; }
.feature-item p { color: var(--text-secondary); font-size: 15px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px; position: relative;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: inline-block; width: fit-content;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  color: var(--accent-dark); background: #f8f5ec;
  border: 1px solid #eadfc8; border-radius: 6px;
  padding: 3px 9px; margin-bottom: 12px;
}
.step h4 { color: var(--primary-dark); font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 14px; }

/* ========== FAQ ========== */
.faq-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 24px; font-size: 16px; font-weight: 600; color: var(--primary-dark);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q .icon { flex-shrink: 0; transition: transform 0.25s; color: var(--accent-dark); }
.faq-item.open .faq-q .icon { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a-inner { padding: 0 24px 22px; color: var(--text-secondary); font-size: 15px; }
.faq-item.open .faq-a { max-height: 600px; }

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-light); color: var(--primary-dark); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td { color: var(--text-secondary); }

/* ========== CTA 强转化区 ========== */
.cta-band {
  background: linear-gradient(120deg, var(--bg-dark) 0%, var(--primary) 100%);
  color: #fff; padding: 64px 0; text-align: center;
}
.cta-band h2 { font-size: 28px; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.8); margin-bottom: 30px; font-size: 16px; }
.cta-band .hero-cta { justify-content: center; }
.cta-band .cta-phone { margin-top: 22px; font-size: 15px; color: rgba(255,255,255,0.75); }
.cta-band .cta-phone a { color: var(--accent); font-weight: 700; font-size: 22px; margin-left: 6px; }
.cta-band .cta-phone a:hover { color: #E2BE75; }

/* ========== 面包屑 ========== */
.breadcrumb { background: var(--bg-light); padding: 14px 0; font-size: 14px; color: var(--text-light); border-bottom: 1px solid var(--border); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb span { margin: 0 8px; color: #C3CCD9; }
.breadcrumb strong { color: var(--primary-dark); font-weight: 600; }

/* ========== 页头横幅（内页） ========== */
.page-hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
  color: #fff; padding: 56px 0;
}
.page-hero h1 { font-size: 32px; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.8); max-width: 680px; }

/* ========== 文章排版 ========== */
.article { max-width: 800px; margin: 0 auto; }
.article h2 { font-size: 24px; color: var(--primary-dark); margin: 40px 0 16px; padding-left: 14px; border-left: 4px solid var(--accent); }
.article h3 { font-size: 19px; color: var(--primary-dark); margin: 28px 0 12px; }
.article p { margin-bottom: 16px; color: var(--text-secondary); }
.article ul.list, .article ol.list { margin: 0 0 16px 0; padding-left: 0; }
.article ul.list li, .article ol.list li { padding: 6px 0 6px 26px; position: relative; color: var(--text-secondary); }
.article ul.list li::before {
  content: ""; position: absolute; left: 6px; top: 16px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.article ol.list { counter-reset: ol; }
.article ol.list li { counter-increment: ol; }
.article ol.list li::before {
  content: counter(ol); position: absolute; left: 0; top: 8px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--primary);
  color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.article-meta { color: var(--text-light); font-size: 14px; margin-bottom: 24px; display: flex; gap: 18px; flex-wrap: wrap; }
.callout {
  background: #FBF7EE; border: 1px solid #EADFC6; border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 18px 22px; margin: 24px 0;
  color: var(--text-secondary); font-size: 15px;
}
.callout strong { color: var(--accent-dark); }

/* ========== 表单 ========== */
.form-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--primary-dark); font-size: 15px; }
.form-group label .req { color: #C0453E; margin-left: 2px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #D3DAE6;
  border-radius: var(--radius); font-size: 15px; font-family: inherit;
  color: var(--text); background: #fff; min-height: 46px;
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(30, 74, 138, 0.12);
}
.form-note { font-size: 13px; color: var(--text-light); margin-top: 12px; }
.form-success {
  display: none; background: #EEF7EF; border: 1px solid #BFE3C4;
  color: #256B32; padding: 14px 18px; border-radius: var(--radius);
  margin-bottom: 18px; font-size: 15px;
}

/* ========== 联系信息块 ========== */
.contact-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-item .c-icon {
  width: 46px; height: 46px; border-radius: var(--radius); flex-shrink: 0;
  background: #EDF2FA; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.contact-item h4 { font-size: 15px; color: var(--primary-dark); margin-bottom: 2px; }
.contact-item p { color: var(--text-secondary); font-size: 15px; }
.contact-item a.big { font-size: 20px; font-weight: 700; color: var(--primary); }
.map-box {
  background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-lg);
  min-height: 280px; display: flex; align-items: center; justify-content: center;
  color: var(--text-light); text-align: center; padding: 30px; font-size: 15px;
}

/* ========== 资质证书 ========== */
.cert-card { text-align: center; }
.cert-badge {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.cert-badge .icon { width: 34px; height: 34px; }
.cert-verify { font-size: 13px; color: var(--text-light); margin-top: 12px; }

/* ========== 相关推荐 ========== */
.related { border-top: 1px solid var(--border); margin-top: 56px; padding-top: 40px; }

/* ========== 页脚 ========== */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.72); padding: 56px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer-brand p { margin: 12px 0; line-height: 1.8; }
.footer ul li { margin-bottom: 10px; }
.footer a { color: rgba(255,255,255,0.72); }
.footer a:hover { color: var(--accent); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.footer-contact .icon { color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 0;
  text-align: center; font-size: 13px; color: rgba(255,255,255,0.5);
}
.footer-bottom p { margin-bottom: 4px; }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--accent); }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    padding: 8px 0; max-height: 70vh; overflow-y: auto;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 14px 20px; border-bottom: none; }
  .submenu { position: static; box-shadow: none; border: none; border-left: 3px solid var(--border); margin-left: 20px; border-radius: 0; }
  .has-sub:hover .submenu { display: none; }
  .has-sub.sub-open .submenu { display: block; }
  .topbar-slogan { display: none; }
  .topbar-name { font-size: 13px; white-space: normal; }
  .topbar-phone { font-size: 16px; }
  .hero { padding: 60px 0 56px; }
  .hero h1 { font-size: 28px; }
  .hero p.lead { font-size: 16px; }
  .page-hero h1 { font-size: 26px; }
  .section-head h2 { font-size: 26px; }
  .form-card { padding: 24px 20px; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .footer { padding-top: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; padding-bottom: 28px; }
  .footer-brand, .footer-grid > div:last-child { grid-column: 1 / -1; }
  .footer h4 { margin-bottom: 12px; font-size: 15px; }
  .footer ul li { margin-bottom: 8px; }
  .footer-brand p { margin: 8px 0; }
  .hero-cta .btn { width: 100%; }
}

/* 锚点跳转避开 sticky 导航 */
[id] { scroll-margin-top: 84px; }

/* ========== 无障碍 ========== */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ========== 移动端返回上一页按钮 ========== */
.back-btn {
  display: none;
  position: fixed; left: 16px; bottom: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--primary);
  border: 1px solid #e5e7eb; box-shadow: var(--shadow-lg);
  align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.back-btn:active { background: #f3f4f6; }
.back-btn svg { width: 22px; height: 22px; }
@media (max-width: 768px) {
  .back-btn { display: flex; }
}

/* ========== 移动端卡片：图标与标题同行 ========== */
@media (max-width: 768px) {
  .card:has(> .card-icon) { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .card:has(> .card-icon) > .card-icon { width: 44px; height: 44px; margin-bottom: 0; margin-right: 14px; flex-shrink: 0; }
  .card:has(> .card-icon) > h3 { flex: 1; margin-bottom: 0; min-width: 0; }
  .card:has(> .card-icon) > p,
  .card:has(> .card-icon) > .card-link,
  .card:has(> .card-icon) > .card-tags { flex-basis: 100%; }
  .card:has(> .card-icon) > p { margin-top: 12px; }
}
