/* ============================================
   Dental Clinic - Custom Styles
   口腔诊所官网自定义样式
   ============================================ */

/* --- 基础重置 --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: #1e293b;
  line-height: 1.7;
}

/* --- 导航栏 --- */
.nav-link {
  position: relative;
  transition: color 0.2s;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2563eb;
  transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --- Hero 区域 --- */
.hero-section {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.06);
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.04);
}

/* --- 卡片悬浮效果 --- */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* --- 统计数字 --- */
.stat-number {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- CTA 按钮 --- */
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-outline {
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
}

/* --- 时间线 --- */
.timeline-item {
  position: relative;
  padding-left: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #2563eb;
  border: 2px solid #dbeafe;
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5rem;
  width: 2px;
  height: calc(100% - 0.5rem);
  background-color: #dbeafe;
}

.timeline-item:last-child::after {
  display: none;
}

/* --- FAQ 手风琴 --- */
.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.3s;
}

.faq-item:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.faq-question {
  cursor: pointer;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  transition: background 0.2s;
  user-select: none;
}

.faq-question:hover {
  background: #f1f5f9;
}

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

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 1rem 1.25rem;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
}

.faq-arrow {
  transition: transform 0.3s;
  flex-shrink: 0;
}

/* --- 案例卡片 --- */
.case-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.case-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.case-before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.case-before-after > div {
  background: #f1f5f9;
  padding: 2rem 1rem;
  text-align: center;
}

/* --- 页脚 --- */
.footer-link {
  transition: color 0.2s;
}

.footer-link:hover {
  color: #2563eb;
}

/* --- 移动端菜单 --- */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  max-height: 400px;
}

/* --- 信任徽章 --- */
.trust-badge {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
}

/* --- 分割线标题 --- */
.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border-radius: 2px;
}

/* --- 地图占位 --- */
.map-placeholder {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

/* --- 动画 --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* --- 页内锚点偏移（固定导航栏） --- */
[id] {
  scroll-margin-top: 80px;
}

/* --- 响应式微调 --- */
@media (max-width: 768px) {
  .hero-section::before,
  .hero-section::after {
    display: none;
  }
}
