/* ========================================
   百安家房产官网 - 全局样式
   主色：#169BEE（百安家蓝）
   ======================================== */

/* ---------- 重置与基础 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #169BEE;
  --primary-dark: #0D7BC4;
  --primary-light: #E8F5FE;
  --text-main: #1A1A1A;
  --text-sub: #666666;
  --text-light: #999999;
  --bg-white: #FFFFFF;
  --bg-gray: #F7F9FC;
  --border: #E8ECF1;
  --shadow: 0 2px 12px rgba(22, 155, 238, 0.08);
  --shadow-hover: 0 8px 24px rgba(22, 155, 238, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --header-h: 70px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

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

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

.section {
  padding: 80px 0;
}

.section-gray {
  background: var(--bg-gray);
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.section-subtitle {
  text-align: center;
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 48px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(22, 155, 238, 0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 18px;
}

/* ---------- 头部导航 ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 8px 18px;
  font-size: 15px;
  color: var(--text-main);
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-phone {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 移动端汉堡菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero Banner ---------- */
.hero {
  margin-top: var(--header-h);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 100px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

.hero p {
  font-size: 20px;
  opacity: 0.92;
  margin-bottom: 40px;
  position: relative;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  position: relative;
  flex-wrap: wrap;
}

/* ---------- 页面Banner（子页面） ---------- */
.page-banner {
  margin-top: var(--header-h);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.page-banner h1 {
  font-size: 36px;
  font-weight: 700;
}

.page-banner p {
  font-size: 16px;
  opacity: 0.9;
  margin-top: 8px;
}

/* ---------- 服务卡片 ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.service-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text-main);
}

.service-card p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ---------- 为什么选择我们 ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-item {
  text-align: center;
  padding: 32px 20px;
}

.feature-item .feature-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 18px;
}

.feature-item h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 14px;
  color: var(--text-sub);
}

/* ---------- 数据展示 ---------- */
.stats-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 16px;
  opacity: 0.9;
}

/* ---------- 客户评价 ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.review-stars {
  color: #FFB800;
  font-size: 18px;
  margin-bottom: 16px;
}

.review-text {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 20px;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.review-name {
  font-weight: 600;
  font-size: 15px;
}

.review-area {
  font-size: 13px;
  color: var(--text-light);
}

/* ---------- CTA区域 ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 70px 0;
}

.cta-section h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 28px;
}

.cta-phone {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* ---------- 页脚 ---------- */
.footer {
  background: #1A2332;
  color: rgba(255, 255, 255, 0.75);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h4 {
  color: #fff;
  font-size: 17px;
  margin-bottom: 18px;
  font-weight: 600;
}

.footer-col p,
.footer-col li {
  font-size: 14px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.65);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-logo {
  height: 36px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- 关于我们页面 ---------- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 20px;
  line-height: 2;
}

/* 时间轴 */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 40px auto;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-light);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.timeline-date {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-sub);
}

/* 企业文化 */
.culture-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.culture-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.culture-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--primary);
}

.culture-card p {
  font-size: 15px;
  color: var(--text-sub);
}

/* 门店分布标签 */
.area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.area-tag {
  padding: 10px 28px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 30px;
  font-size: 15px;
  font-weight: 500;
}

/* 关联企业卡片 */
.partner-card {
  max-width: 700px;
  margin: 40px auto 0;
  background: var(--bg-white);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 32px;
}

.partner-card h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 12px;
}

.partner-card p {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
}

/* ---------- 服务页面 ---------- */
.service-block {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.service-block:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.service-block-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.service-block-icon {
  font-size: 40px;
}

.service-block h2 {
  font-size: 24px;
  color: var(--text-main);
}

.service-block h3 {
  font-size: 17px;
  color: var(--primary);
  margin: 20px 0 12px;
}

.service-block ul {
  padding-left: 0;
}

.service-block li {
  position: relative;
  padding: 8px 0 8px 24px;
  font-size: 15px;
  color: var(--text-sub);
}

.service-block li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.promise-list li::before {
  content: "🛡";
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.area-list span {
  padding: 6px 18px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 14px;
}

/* ---------- FAQ页面 ---------- */
.faq-category {
  margin-bottom: 40px;
}

.faq-category-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
}

.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
}

.faq-item:hover {
  border-color: var(--primary);
}

.faq-question {
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: transform 0.3s;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.9;
}

/* ---------- 联系我们页面 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 4px;
  font-weight: 500;
}

.contact-info-item p {
  font-size: 16px;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.6;
}

.contact-form-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.contact-form-card h3 {
  font-size: 22px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--bg-white);
  color: var(--text-main);
}

.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;
}

.form-success {
  display: none;
  background: #E8F8EF;
  color: #1F9254;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 20px;
}

.form-success.show {
  display: block;
}

/* 地图占位 */
.map-placeholder {
  margin-top: 40px;
  height: 360px;
  background: var(--bg-gray);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 15px;
  border: 2px dashed var(--border);
}

/* ---------- 回到顶部 ---------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(22, 155, 238, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .services-grid,
  .features-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .culture-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 26px;
  }

  .hero {
    padding: 70px 0 80px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    width: 260px;
  }

  .page-banner {
    padding: 40px 0;
  }

  .page-banner h1 {
    font-size: 28px;
  }

  /* 移动端导航 */
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    transition: transform 0.35s ease;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a {
    padding: 14px 18px;
    font-size: 16px;
  }

  .nav-phone {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .services-grid,
  .features-grid,
  .stats-grid,
  .reviews-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .services-grid .service-card,
  .features-grid .feature-item {
    padding: 28px 20px;
  }

  .stat-number {
    font-size: 36px;
  }

  .cta-phone {
    font-size: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .service-block {
    padding: 28px 20px;
  }

  .contact-info-card,
  .contact-form-card {
    padding: 28px 20px;
  }

  .faq-question {
    padding: 14px 18px;
    font-size: 15px;
  }

  .faq-answer-content {
    padding: 0 18px 16px;
    font-size: 14px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .section-title {
    font-size: 22px;
  }
}
