/* ============================================================
 *  main.css — 西藏正道工程咨询有限公司 共享设计系统
 *  藏青蓝 · 藏金 · 唐卡红  前后台共用
 * ============================================================ */

:root {
  /* 品牌色 */
  --brand: #143A6B;          /* 藏青蓝（主） */
  --brand-600: #1E4F8C;
  --brand-500: #2C6CB0;
  --brand-100: #E7EEF7;
  --gold: #C9A24B;           /* 藏金（点缀） */
  --gold-600: #B0832F;
  --thangka: #9E2B25;        /* 唐卡红（强调，极少用） */

  /* 中性色 */
  --ink: #1B2430;
  --text: #2B3744;
  --muted: #6B7785;
  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --line: #E4E9F1;
  --line-strong: #CED7E3;

  /* 排版 */
  --font: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* 圆角 / 阴影 / 间距 */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --sh-sm: 0 2px 8px rgba(20, 58, 107, .06);
  --sh: 0 10px 30px rgba(20, 58, 107, .10);
  --sh-lg: 0 24px 60px rgba(20, 58, 107, .16);
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: 11px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: .2s; white-space: nowrap;
  font-family: inherit;
}
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--brand-600); transform: translateY(-2px); box-shadow: var(--sh); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-danger { background: #fff; color: var(--thangka); border-color: #ECC9C7; }
.btn-danger:hover { background: var(--thangka); color: #fff; border-color: var(--thangka); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: .25s;
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; color: var(--brand); letter-spacing: .5px; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  position: relative; padding: 8px 14px; font-size: 15px; font-weight: 500; color: var(--text); border-radius: 8px;
}
.nav-link:hover { color: var(--brand); background: var(--brand-100); }
.nav-link.is-active { color: var(--brand); font-weight: 700; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -2px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}
.header-actions { margin-left: 8px; }
.nav-cta {
  padding: 9px 18px; border-radius: 999px; background: var(--gold); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: var(--sh-sm); transition: .2s;
}
.nav-cta:hover { background: var(--gold-600); transform: translateY(-1px); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--brand); border-radius: 2px; }

/* ---------- Hero 轮播 ---------- */
.hero { position: relative; height: 560px; overflow: hidden; background: var(--brand); }
.hero-track { display: flex; height: 100%; transition: transform .6s ease; }
.hero-slide {
  position: relative; flex: 0 0 100%; height: 100%;
  background-size: cover; background-position: center;
  display: flex; align-items: center;
}
.hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(15,38,71,.92) 0%, rgba(20,58,107,.72) 42%, rgba(20,58,107,.25) 100%);
}
.hero-content { position: relative; max-width: 680px; color: #fff; }
.hero-title { color: #fff; font-size: clamp(28px, 4vw, 46px); font-weight: 800; letter-spacing: 1px; text-shadow: 0 2px 18px rgba(0,0,0,.3); }
.hero-sub { font-size: clamp(15px, 1.6vw, 19px); color: rgba(255,255,255,.92); margin: 16px 0 28px; }
.hero-dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.hero-dot { width: 10px; height: 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: .2s; }
.hero-dot.is-active { width: 28px; background: var(--gold); }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.18); color: #fff; font-size: 26px; line-height: 1; transition: .2s;
}
.hero-arrow:hover { background: rgba(255,255,255,.34); }
.hero-prev { left: 24px; } .hero-next { right: 24px; }

/* ---------- 区块通用 ---------- */
.section { padding: 80px 0; }
.section--tint { background: linear-gradient(180deg, #fff, var(--bg)); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: 2px; color: var(--gold-600); font-weight: 700; text-transform: uppercase; margin-bottom: 10px; }
.section-title { font-size: clamp(26px, 3vw, 34px); position: relative; display: inline-block; }
.section-title::after { content: ""; display: block; width: 56px; height: 4px; margin: 14px auto 0; border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--gold)); }
.section-lead { color: var(--muted); margin-top: 14px; font-size: 16px; }

/* ---------- 数据统计带 ---------- */
.stats-band { background: var(--brand); color: #fff; padding: 56px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.stat { text-align: center; padding: 12px; border-left: 1px solid rgba(255,255,255,.14); }
.stat:first-child { border-left: 0; }
.stat-value { font-size: clamp(34px, 4vw, 48px); font-weight: 800; color: #fff; line-height: 1; display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.stat-value i { font-style: normal; font-size: 18px; color: var(--gold); font-weight: 700; }
.stat-label { margin-top: 10px; font-size: 16px; color: rgba(255,255,255,.9); font-weight: 600; }
.stat-desc { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 4px; }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- 业务卡片 ---------- */
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 30px 26px;
  transition: .25s; box-shadow: var(--sh-sm); display: block;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--sh); border-color: var(--brand-100); }
.service-icon {
  width: 56px; height: 56px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-100); color: var(--brand); margin-bottom: 18px;
}
.service-icon svg { width: 28px; height: 28px; }
.service-icon--lg { width: 64px; height: 64px; }
.service-icon--lg svg { width: 32px; height: 32px; }
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---------- 业绩卡片 ---------- */
.project-card { background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh-sm); transition: .25s; display: block; border: 1px solid var(--line); }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--sh); }
.project-cover { height: 190px; background-size: cover; background-position: center; position: relative; }
.project-cover .tag { position: absolute; left: 14px; top: 14px; }
.project-body { padding: 20px 22px 24px; }
.project-body h3 { font-size: 17px; margin-bottom: 8px; }
.project-body p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.project-meta { display: flex; gap: 16px; font-size: 13px; color: var(--brand-500); font-weight: 600; }

.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.9); color: var(--brand); }
.tag--cat { background: var(--brand-100); color: var(--brand); }

/* ---------- 新闻 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.news-list { display: grid; gap: 18px; }
.news-item { display: flex; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: .2s; box-shadow: var(--sh-sm); }
.news-item:hover { transform: translateY(-3px); box-shadow: var(--sh); }
.news-cover { width: 200px; flex: 0 0 200px; background-size: cover; background-position: center; min-height: 140px; }
.news-body { padding: 18px 20px; }
.news-body h3 { font-size: 17px; margin: 8px 0; }
.news-body p { color: var(--muted); font-size: 14px; margin: 0; }
.news-list--side .news-item { flex-direction: column; gap: 0; }
.news-list--side .news-cover { width: 100%; flex: none; height: 140px; }
.news-list--side .news-body { padding: 14px 16px; }
.news-list--side .news-body h3 { font-size: 15px; margin: 6px 0 4px; line-height: 1.4; }
.news-list--side .news-body p { font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-list--side .news-body .news-meta { margin-bottom: 4px; }
.news-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.news-meta time { font-variant-numeric: tabular-nums; }
.news-meta--hero { margin-top: 12px; }

/* ---------- 筛选标签 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.filter-tab { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600; transition: .2s; }
.filter-tab:hover { border-color: var(--brand); color: var(--brand); }
.filter-tab.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- CTA 带 ---------- */
.cta-band { background: linear-gradient(120deg, var(--brand), var(--brand-600)); color: #fff; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; font-size: 26px; margin: 0; }
.cta-inner p { color: rgba(255,255,255,.85); margin: 6px 0 0; }

/* ---------- 页内页头 ---------- */
.page-hero { background: linear-gradient(120deg, var(--brand), var(--brand-600)); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,75,.35), transparent 70%); }
.page-hero--sm { padding: 44px 0; }
.page-hero h1 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); margin: 0; position: relative; }
.page-hero p { color: rgba(255,255,255,.88); margin: 10px 0 0; position: relative; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 10px; position: relative; }
.breadcrumb a:hover { color: var(--gold); }

/* ---------- 关于 ---------- */
.about-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
.prose { line-height: 1.8; }
.prose p { color: var(--text); margin-bottom: 1.1em; }
.prose h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 1.4em 0 0.5em; }
.prose h4 { font-size: 17px; font-weight: 700; color: var(--ink); margin: 1.2em 0 0.4em; }
.prose ul, .prose ol { margin: 0.8em 0; padding-left: 1.8em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 0.3em 0; color: var(--text); }
.prose a { color: var(--brand); text-decoration: underline; }
.prose a:hover { color: var(--gold); }
.prose img { max-width: 100%; border-radius: var(--r); margin: 1em 0; }
.prose blockquote { border-left: 3px solid var(--brand); margin: 1em 0; padding: 0.5em 1em; background: var(--surface); color: var(--muted); font-style: italic; }
.prose strong, .prose b { font-weight: 700; color: var(--ink); }
.prose--center { max-width: 760px; margin: 0 auto; text-align: left; white-space: pre-line; }
.fact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--sh-sm); }
.fact-card h4 { margin: 0 0 14px; }
.fact { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.fact:last-child { border-bottom: 0; }
.fact span { color: var(--muted); font-size: 14px; }
.fact strong { color: var(--brand); font-size: 16px; }
.qual-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.qual-list li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; padding: 14px 18px; font-weight: 500; box-shadow: var(--sh-sm); }

/* ---------- 荣誉奖项 ---------- */
.honor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.honor-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 32px 20px; text-align: center; box-shadow: var(--sh-sm); transition: .25s; position: relative; overflow: hidden; }
.honor-item::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--gold)); }
.honor-item:hover { transform: translateY(-6px); box-shadow: var(--sh); }
.honor-value { font-size: clamp(32px, 4vw, 44px); font-weight: 800; color: var(--gold-600); line-height: 1; }
.honor-label { margin-top: 12px; font-size: 15px; color: var(--text); font-weight: 600; }

/* ---------- 业务详情列表 ---------- */
.svc-list { display: grid; gap: 18px; }
.svc-detail { display: flex; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; box-shadow: var(--sh-sm); scroll-margin-top: 90px; }
.svc-detail h3 { font-size: 20px; margin-bottom: 6px; }
.svc-summary { color: var(--brand-500); font-weight: 600; margin-bottom: 8px; }
.svc-detail p:not(.svc-summary) { color: var(--muted); margin: 0; }

/* ---------- 详情页布局 ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.detail-cover { height: 320px; border-radius: var(--r); background-size: cover; background-position: center; margin-bottom: 24px; box-shadow: var(--sh); }
.detail-side { position: sticky; top: 90px; }

/* ---------- 联系我们 ---------- */
.contact-layout { display: grid; grid-template-columns: 360px 1fr; gap: 40px; align-items: start; }
.info-card, .contact-form-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; box-shadow: var(--sh-sm); }
.info-card h3, .contact-form-wrap h3 { margin-bottom: 18px; }
.info-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: var(--muted); flex: 0 0 64px; }
.contact-form .field { margin-bottom: 16px; }
.contact-form .field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.contact-form-msg { margin-top: 12px; padding: 10px 14px; border-radius: var(--r); font-size: 14px; display: none; }
.contact-form-msg.is-success { display: block; background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.contact-form-msg.is-error { display: block; background: #fbe9e7; color: #c62828; border: 1px solid #ffab91; }

/* ---------- 表单字段（前台复用）---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea, .admin-section input, .admin-section textarea, .admin-section select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 15px; font-family: inherit; color: var(--text); background: #fff; transition: .15s;
}
.field input:focus, .field textarea:focus, .admin-section input:focus, .admin-section textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.field textarea, .admin-section textarea { resize: vertical; line-height: 1.6; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0F2746; color: #C7D3E3; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 36px; padding: 56px 24px 40px; }
.footer-brand { font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-slogan { color: var(--gold); font-weight: 600; margin-bottom: 16px; }
.footer-about p { font-size: 14px; margin: 4px 0; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; position: relative; padding-left: 12px; }
.footer-col h4::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 4px; background: var(--gold); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: #C7D3E3; font-size: 14px; transition: .15s; }
.footer-col ul a:hover { color: var(--gold); padding-left: 4px; }
.footer-contact p { font-size: 14px; margin: 4px 0 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: #8FA3BD; }
.footer-link { color: #8FA3BD; text-decoration: none; transition: color .2s; }
.footer-link:hover { color: #D4A858; text-decoration: underline; }

.page-main { min-height: 60vh; }

/* ---------- 动画 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.section, .hero-content { animation: fadeUp .5s ease both; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid-3, .news-grid, .qual-list { grid-template-columns: repeat(2, 1fr); }
  .honor-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { gap: 16px; }
  .stat { border-left: 0; }
  .about-layout, .detail-layout, .contact-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 12px; border-bottom: 1px solid var(--line); display: none; box-shadow: var(--sh); }
  .nav.is-open { display: flex; }
  .nav-toggle { display: flex; margin-left: auto; }
  .header-actions { display: none; }
}
@media (max-width: 600px) {
  .grid-3, .news-grid, .qual-list, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0; }
  .hero { height: 460px; }
  .news-item { flex-direction: column; }
  .news-cover { width: 100%; flex: none; height: 160px; }
  .svc-detail { flex-direction: column; gap: 14px; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
