/* ========================================
   啄木鸟家庭维修 - 统一样式表
   ======================================== */

/* 变量 */
:root {
  --primary: #0066cc;
  --primary-dark: #004a99;
  --primary-light: #e8f2ff;
  --secondary: #ff6600;
  --secondary-dark: #cc5200;
  --text-dark: #1a1a2e;
  --text-body: #444;
  --text-light: #888;
  --border: #e5e7eb;
  --bg-light: #f8f9fb;
  --bg-gray: #f0f2f5;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-w: 1200px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text-body); background: #fff; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

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

/* ========================================
   顶部栏
   ======================================== */
.topbar { background: #1a1a2e; color: #ccc; font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar strong { color: var(--secondary); font-weight: 600; }
.topbar-links a { color: #ccc; margin-left: 20px; transition: color .2s; }
.topbar-links a:hover { color: #fff; }

/* ========================================
   导航
   ======================================== */
.site-header { background: #fff; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; height: 64px; gap: 24px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { height: 40px; }
.logo-icon { font-size: 1.8rem; line-height: 1; }
.logo-text { font-size: 1.2rem; font-weight: 700; color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a { display: block; padding: 8px 16px; color: var(--text-dark); font-size: .95rem; border-radius: var(--radius-sm); transition: all .2s; white-space: nowrap; }
.main-nav a:hover { background: var(--primary-light); color: var(--primary); }
.main-nav a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

.nav-toggle { display: none; font-size: 1.5rem; padding: 4px 8px; color: var(--text-dark); }

/* 电话 */
.header-tel { font-size: .88rem; color: var(--primary); font-weight: 600; white-space: nowrap; flex-shrink: 0; padding: 6px 12px; border: 1px solid var(--primary); border-radius: 50px; transition: all .2s; }
.header-tel:hover { background: var(--primary); color: #fff; }

/* ========================================
   Hero 横幅
   ======================================== */
.hero {
  background: linear-gradient(135deg, #0066cc 0%, #004a99 60%, #003366 100%);
  min-height: 480px;
  display: flex;
  align-items: center;
  padding: 60px 0;
}
.hero > .container { color: #fff; width: 100%; }
.hero h1 { font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1.3; margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.hero h1 span { font-size: 1.3rem; font-weight: 400; opacity: .9; display: block; margin-top: 8px; }
.hero-sub { font-size: 1.1rem; margin-bottom: 24px; opacity: .9; }
.hero-search { margin-top: 20px; }
.hero-search form { display: flex; gap: 0; max-width: 560px; }
.hero-search input {
  flex: 1; padding: 12px 18px; border: none; border-radius: 50px 0 0 50px;
  font-size: .95rem; outline: none; color: #333;
}
.hero-search button {
  padding: 12px 28px; background: #ff6600; color: #fff; border: none;
  border-radius: 0 50px 50px 0; font-size: .95rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background .2s;
}
.hero-search button:hover { background: #cc5200; }

/* ========================================
   按钮
   ======================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 24px; border-radius: var(--radius-sm); font-size: .95rem; font-weight: 600; transition: all .2s; white-space: nowrap; cursor: pointer; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,102,204,.35); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-dark); color: #fff; }
.btn-tel { background: var(--secondary); color: #fff; padding: 12px 28px; font-size: 1rem; border-radius: var(--radius-md); display: inline-flex; align-items: center; gap: 8px; }
.btn-tel:hover { background: var(--secondary-dark); color: #fff; transform: translateY(-1px); }
.btn-submit { background: var(--primary); color: #fff; padding: 12px 32px; border-radius: var(--radius-md); font-size: 1rem; font-weight: 600; width: 100%; cursor: pointer; border: none; transition: background .2s; }
.btn-submit:hover { background: var(--primary-dark); }

/* ========================================
   通用区块
   ======================================== */
.section { padding: 72px 0; }
.section-gray { background: var(--bg-light); }
.section-blue { background: linear-gradient(135deg, #0066cc 0%, #004a99 100%); color: #fff; }
.section-title { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); margin-bottom: 32px; text-align: center; }
.section-title.left { text-align: left; }

/* ========================================
   服务分类（cat-grid / cat-card）
   ======================================== */
.service-cats { background: var(--bg-light); }
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px 12px; text-align: center; transition: all .25s; display: block; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); text-decoration: none; }
.cat-icon { font-size: 2.2rem; margin-bottom: 10px; display: block; }
.cat-card h3 { font-size: .95rem; font-weight: 600; color: var(--text-dark); }

/* ========================================
   文章列表（首页卡片 grid + 列表页 list）
   ======================================== */
.articles { background: #fff; }
.article-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.article-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: all .2s; display: block; }
.article-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); text-decoration: none; }
.article-card h3 { font-size: .95rem; font-weight: 600; color: var(--text-dark); padding: 14px 16px 8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card:hover h3 { color: var(--primary); }
.article-card p { font-size: .8rem; color: var(--text-light); padding: 0 16px 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { display: flex; gap: 12px; font-size: .78rem; color: var(--text-light); padding: 0 16px 14px; }

/* 列表页样式 */
.article-list { display: flex; flex-direction: column; gap: 16px; }
.list-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; transition: all .2s; display: block; }
.list-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); text-decoration: none; }
.list-item-body h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; }
.list-item:hover .list-item-body h3 { color: var(--primary); }
.list-meta { font-size: .82rem; color: var(--text-light); margin-top: 8px; }
.article-subtitle { font-size: .88rem; color: var(--text-light); margin-top: 6px; }

/* ========================================
   问答
   ======================================== */
.qa-section { background: linear-gradient(135deg, #0066cc, #004a99); color: #fff; }
.qa-list { display: flex; flex-direction: column; gap: 12px; }
.qa-item { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-md); padding: 20px 24px; transition: background .2s; }
.qa-item:hover { background: rgba(255,255,255,.25); }
.qa-item h3 { font-weight: 600; color: #fff; margin-bottom: 8px; font-size: 1rem; }
.qa-item p { font-size: .88rem; color: rgba(255,255,255,.8); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qa-link { display: inline-block; margin-top: 10px; color: #fff; font-size: .85rem; text-decoration: underline; }
.qa-link:hover { color: rgba(255,255,255,.7); }

/* ========================================
   Hero 扩展
   ======================================== */
.hero-content { max-width: 600px; }
.hero-subtitle { font-size: 1.25rem !important; font-weight: 400 !important; opacity: .9; margin-top: 8px; }
.hero-desc { font-size: 1rem; margin-bottom: 24px; opacity: .85; }

.hero-stats { display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-unit { font-size: 1rem; color: rgba(255,255,255,.8); font-weight: 600; margin-top: 2px; }
.stat-label { font-size: .8rem; color: rgba(255,255,255,.7); margin-top: 4px; }

/* ========================================
   为什么选择我们
   ======================================== */
.why-us { background: var(--bg-light); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 24px; text-align: center; transition: all .25s; }
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.why-icon { font-size: 2.8rem; margin-bottom: 16px; }
.why-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-dark); margin-bottom: 10px; }
.why-card p { font-size: .88rem; color: var(--text-light); line-height: 1.7; }

/* ========================================
   城市标签
   ======================================== */
.cities-section { background: #fff; }
.city-tags { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.city-tag { padding: 8px 20px; border: 1px solid var(--border); border-radius: 50px; font-size: .9rem; color: var(--text-body); transition: all .2s; }
.city-tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); text-decoration: none; }

/* ========================================
   CTA 横幅
   ======================================== */
.cta-section { background: var(--bg-light); }
.cta-box { background: linear-gradient(135deg, #ff6600, #cc4400); border-radius: var(--radius-lg); padding: 48px; text-align: center; color: #fff; }
.cta-box h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.cta-box p { opacity: .85; margin-bottom: 24px; font-size: 1rem; }
.btn-tel { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; background: #fff; color: #ff6600; border-radius: 50px; font-size: 1.1rem; font-weight: 700; transition: all .2s; }
.btn-tel:hover { background: #fff5ee; color: #cc4400; transform: translateY(-2px); text-decoration: none; }

/* ========================================
   按钮扩展
   ======================================== */
.btn-outline-light { display: inline-flex; align-items: center; justify-content: center; padding: 10px 28px; border: 2px solid rgba(255,255,255,.6); color: #fff; border-radius: 50px; font-size: .95rem; font-weight: 600; transition: all .2s; }
.btn-outline-light:hover { background: rgba(255,255,255,.2); border-color: #fff; color: #fff; text-decoration: none; }

/* ========================================
   页脚扩展
   ======================================== */
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand p { font-size: .88rem; color: #aaa; line-height: 1.7; margin-top: 12px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }

/* ========================================
   文章卡片体
   ======================================== */
.article-card-body { padding: 16px 16px 8px; flex: 1; }
.article-card-body h3 { font-size: .95rem; font-weight: 600; color: var(--text-dark); line-height: 1.5; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card:hover .article-card-body h3 { color: var(--primary); }
.article-card-body p { font-size: .8rem; color: var(--text-light); line-height: 1.5; }

/* 问答列表页 */
.qa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.qa-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; transition: all .2s; display: block; }
.qa-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); text-decoration: none; }
.qa-card h3 { font-size: .95rem; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; line-height: 1.4; }
.qa-card:hover h3 { color: var(--primary); }
.qa-card p { font-size: .82rem; color: var(--text-light); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qa-meta { font-size: .78rem; color: var(--text-light); margin-top: 10px; display: flex; gap: 12px; }
.qa-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.qa-filter a { padding: 6px 16px; border: 1px solid var(--border); border-radius: 50px; font-size: .85rem; color: var(--text-body); transition: all .2s; }
.qa-filter a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.qa-filter a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.qa-read { font-size: .82rem; color: var(--text-light); margin-top: 6px; }
.qa-category { font-size: .78rem; color: var(--primary); background: var(--primary-light); padding: 2px 8px; border-radius: 50px; }

/* 问答详情页 */
.qa-detail { max-width: 800px; margin: 0 auto; padding: 48px 0; }
.qa-detail-header { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; margin-bottom: 24px; }
.qa-detail-cat { font-size: .78rem; color: var(--primary); background: var(--primary-light); padding: 2px 10px; border-radius: 50px; display: inline-block; margin-bottom: 12px; }
.qa-detail h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); line-height: 1.4; margin-bottom: 12px; }
.qa-answer { background: var(--bg-light); border-radius: var(--radius-md); padding: 24px; }
.qa-answer h2 { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.answer-content { font-size: .95rem; color: var(--text-body); line-height: 1.8; }
.article-cta { background: linear-gradient(135deg, #ff6600, #cc5200); border-radius: var(--radius-lg); padding: 36px; text-align: center; color: #fff; margin-top: 32px; }
.article-cta h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.article-cta p { opacity: .85; margin-bottom: 16px; }

/* ========================================
   分页
   ======================================== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; color: var(--text-body); transition: all .2s; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.prev, .next { display: inline-flex; align-items: center; gap: 4px; }

/* ========================================
   面包屑
   ======================================== */
.breadcrumb { padding: 12px 0; font-size: .85rem; color: var(--text-light); margin-bottom: 24px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ========================================
   主内容区
   ======================================== */
.main-content { padding: 48px 0; min-height: 60vh; }
.content-wrap { max-width: 800px; margin: 0 auto; }
.page-title { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.page-title.center { text-align: center; }

/* ========================================
   文章详情页
   ======================================== */
.article-detail { max-width: 800px; margin: 0 auto; padding: 40px 0; }
.article-title { font-size: 1.8rem; font-weight: 700; color: var(--text-dark); line-height: 1.4; margin-bottom: 16px; }
.article-body { font-size: 1rem; line-height: 1.9; color: var(--text-body); margin-top: 24px; }
.article-body h2 { font-size: 1.4rem; font-weight: 700; color: var(--text-dark); margin: 32px 0 16px; padding-left: 12px; border-left: 4px solid var(--primary); }
.article-body h3 { font-size: 1.2rem; font-weight: 600; color: var(--text-dark); margin: 24px 0 12px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 16px 0; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body img { max-width: 100%; border-radius: var(--radius-md); margin: 16px 0; box-shadow: var(--shadow-sm); }

/* ========================================
   联系页面
   ======================================== */
.contact-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.contact-body { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.form-group label em { color: var(--danger); font-style: normal; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; transition: border-color .2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 100px; }

.contact-cards { display: flex; flex-direction: column; gap: 16px; }
.contact-card { background: linear-gradient(135deg, #0066cc, #004a99); color: #fff; border-radius: var(--radius-lg); padding: 28px; }
.contact-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.contact-card p { font-size: .9rem; opacity: .85; line-height: 1.7; }
.tel-large { font-size: 1.6rem; font-weight: 800; margin: 8px 0; }

/* ========================================
   页脚
   ======================================== */
.site-footer { background: #1a1a2e; color: #aaa; padding-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #aaa; font-size: .88rem; transition: color .2s; }
.footer-col a:hover { color: var(--primary); }
.footer-col p { color: #aaa; font-size: .88rem; margin-bottom: 6px; }
.footer-copy { border-top: 1px solid #333; padding: 16px 0; text-align: center; font-size: .82rem; color: #666; }
.footer-copy a { color: #666; }
.footer-copy a:hover { color: #aaa; }
.footer-brand p { font-size: .88rem; color: #aaa; line-height: 1.7; margin-top: 12px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }

/* ========================================
   空状态 / 暂无内容
   ======================================== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }

/* ========================================
   响应式
   ======================================== */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .qa-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .topbar { display: none; }
  .header-inner { height: 56px; }
  .main-nav { display: none; }
  .hero { min-height: 360px; padding: 40px 0; }
  .hero h1 { font-size: 1.8rem; }
  .section { padding: 48px 0; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .article-grid { grid-template-columns: 1fr; }
  .qa-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .article-detail { padding: 24px 0; }
  .article-title { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-search form { flex-direction: column; gap: 8px; }
  .hero-search input, .hero-search button { border-radius: var(--radius-md); }
}
