/* 安欣口腔 · 站点样式（仿 yayile.top 布局） */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #3897ea;
  --primary-dark: #2a7fd4;
  --text: #333;
  --muted: #777;
  --bg-light: #f5f9fd;
}
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
}
img { max-width: 100%; }
a { text-decoration: none; color: inherit; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 15px; }

/* ── 顶部黑条 ─────────────────────── */
.topbar {
  background: #000;
  color: #a3a3a3;
  height: 36px;
  line-height: 36px;
  font-size: 14px;
}

/* ── 导航 ─────────────────────────── */
.header { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 100; }
.navbar { display: flex; align-items: center; justify-content: space-between; height: 90px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 52px; }
.logo .name { font-size: 26px; font-weight: 700; color: var(--primary); letter-spacing: 2px; }
.logo .sub { display: block; font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.nav-links { display: flex; list-style: none; gap: 8px; }
.nav-links a {
  display: block; padding: 10px 22px; font-size: 16px; color: var(--text);
  border-radius: 4px; transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: var(--primary); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--primary); margin: 5px 0; border-radius: 2px; }

/* ── 轮播 ─────────────────────────── */
.carousel { position: relative; overflow: hidden; }
.carousel .track { display: flex; transition: transform .6s ease; }
.carousel .slide { min-width: 100%; }
.carousel .slide img { width: 100%; display: block; }
.carousel .indicators {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; list-style: none;
}
.carousel .indicators li {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.5); cursor: pointer; transition: background .2s;
}
.carousel .indicators li.on { background: #fff; }
.carousel .ctrl {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.25); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; user-select: none; transition: background .2s;
}
.carousel .ctrl:hover { background: rgba(0,0,0,.45); }
.carousel .prev { left: 20px; }
.carousel .next { right: 20px; }

/* ── 区块标题 ─────────────────────── */
.section { padding: 60px 0; }
.section.alt { background: var(--bg-light); }
.block-title { text-align: center; margin-bottom: 46px; }
.block-title h3 { font-size: 32px; font-weight: 700; color: var(--text); }
.block-title h3::after {
  content: ""; display: block; width: 56px; height: 4px;
  background: var(--primary); margin: 14px auto 0; border-radius: 2px;
}
.block-title .sub-title { color: var(--muted); font-size: 16px; margin-top: 12px; }

/* ── 诊所简介 ─────────────────────── */
.about { display: flex; gap: 50px; align-items: center; }
.about .pic { flex: 0 0 44%; }
.about .pic img { border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.about .txt h4 { font-size: 22px; color: var(--primary); margin-bottom: 16px; }
.about .txt p { color: #555; text-indent: 2em; margin-bottom: 12px; }
.about .facts { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.about .facts div {
  background: var(--bg-light); border: 1px solid #e3eefb; border-radius: 8px;
  padding: 12px 20px; font-size: 15px; color: var(--primary-dark); font-weight: 600;
}

/* ── 诊疗项目 ─────────────────────── */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc {
  background: #fff; border-radius: 10px; padding: 34px 26px; text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s;
}
.svc:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(56,151,234,.18); }
.svc .ico {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6db7f5);
  display: flex; align-items: center; justify-content: center;
}
.svc .ico svg { width: 36px; height: 36px; fill: #fff; }
.svc h4 { font-size: 19px; margin-bottom: 10px; }
.svc p { color: var(--muted); font-size: 14px; }

/* ── 联系我们 ─────────────────────── */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
.contact-cards .card {
  background: #fff; border-radius: 10px; padding: 30px 24px;
  display: flex; gap: 18px; align-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.contact-cards .card .ico {
  flex: 0 0 62px; width: 62px; height: 62px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6db7f5);
  display: flex; align-items: center; justify-content: center;
}
.contact-cards .card .ico svg { width: 30px; height: 30px; fill: #fff; }
.contact-cards .card h3 { font-size: 17px; color: var(--primary-dark); margin-bottom: 6px; }
.contact-cards .card p { font-size: 14.5px; color: #555; line-height: 1.5; }

/* ── 留言表单 ─────────────────────── */
.message { max-width: 860px; margin: 30px auto 0; }
.message .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.message input, .message textarea {
  width: 100%; border: 1px solid #d7e3f1; border-radius: 6px;
  padding: 13px 16px; font-size: 15px; font-family: inherit; color: var(--text);
  background: #fff; outline: none; transition: border .2s, box-shadow .2s;
}
.message input:focus, .message textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56,151,234,.15);
}
.message textarea { height: 150px; resize: vertical; margin-bottom: 16px; }
.message button {
  display: block; width: 140px; height: 46px; margin: 0 auto;
  background: var(--primary); color: #fff; border: none; border-radius: 6px;
  font-size: 16px; cursor: pointer; transition: background .2s;
}
.message button:hover { background: var(--primary-dark); }
.message button:disabled { background: #9ecdf3; cursor: not-allowed; }

/* ── 页脚 ─────────────────────────── */
.footer { background: #000; padding: 18px 0 0; margin-top: 60px; }
.ft-nav ul { display: flex; justify-content: center; gap: 30px; list-style: none; padding: 10px 0; }
.ft-nav a { color: #cfcfcf; font-size: 15px; transition: color .2s; }
.ft-nav a:hover { color: #fff; }
.ft-copy { text-align: center; color: #fff; line-height: 54px; font-size: 14px; border-top: 1px solid #222; margin-top: 8px; }
.ft-copy a { color: #fff; }

/* ── 提示条 ───────────────────────── */
.toast {
  position: fixed; top: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 12px 28px;
  border-radius: 6px; font-size: 15px; z-index: 999; display: none;
}

/* ── 响应式 ───────────────────────── */
@media (max-width: 900px) {
  .about { flex-direction: column; }
  .about .pic { flex: none; width: 100%; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 90px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 10px 0;
    box-shadow: 0 8px 16px rgba(0,0,0,.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 24px; }
  .services { grid-template-columns: 1fr; }
  .message .row { grid-template-columns: 1fr; }
  .logo .name { font-size: 20px; }
  .block-title h3 { font-size: 26px; }
}
