/* 童心儿童医院 - 彩色气球风 */
:root {
  --red: #ff6b6b;
  --yellow: #ffd93d;
  --green: #6bcb77;
  --blue: #4d96ff;
  --pink: #ff9ff3;
  --white: #ffffff;
  --cream: #fffdf5;
  --text: #445566;
  --text-light: #7a8ba3;
  --radius: 22px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 漂浮彩色气球背景 ===== */
.balloons {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.balloon {
  position: absolute;
  bottom: -160px;
  opacity: 0.5;
  animation: floatUp linear infinite;
}
.balloon .ball {
  width: 46px;
  height: 56px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
}
.balloon .string {
  width: 2px;
  height: 42px;
  margin: 0 auto;
  background: rgba(120, 140, 160, 0.5);
  position: relative;
}
.balloon .string::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(120, 140, 160, 0.6);
}
.balloon.b1 .ball { background: var(--red); }
.balloon.b2 .ball { background: var(--yellow); }
.balloon.b3 .ball { background: var(--green); }
.balloon.b4 .ball { background: var(--blue); }
.balloon.b5 .ball { background: var(--pink); }
.balloon.b6 .ball { background: var(--red); opacity: 0.7; }
@keyframes floatUp {
  0% { transform: translateY(0) translateX(0) rotate(-4deg); }
  50% { transform: translateY(-45vh) translateX(24px) rotate(5deg); }
  100% { transform: translateY(-110vh) translateX(-18px) rotate(-4deg); }
}

/* ===== 顶部彩虹条 ===== */
.rainbow-bar {
  height: 8px;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green), var(--blue), var(--pink));
}
.topbar {
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  padding: 7px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: #eaf3ff; margin-left: 14px; }
.topbar a:hover { color: #fff; }

/* ===== 导航 - 糖果色块 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 14px rgba(77, 150, 255, 0.15);
  border-bottom: 3px solid var(--pink);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo .candy {
  width: 50px; height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  color: #fff;
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-6deg);
  box-shadow: 0 4px 10px rgba(255, 159, 243, 0.5);
}
.logo h1 { font-size: 22px; color: var(--blue); }
.logo small { display: block; font-size: 12px; color: var(--text-light); font-weight: normal; }
.nav { display: flex; gap: 10px; }
.nav a {
  display: inline-block;
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 4px 10px rgba(77, 150, 255, 0.3);
  transition: all 0.3s;
}
.nav a:nth-child(1) { background: var(--red); }
.nav a:nth-child(2) { background: var(--yellow); color: #8a6d00; }
.nav a:nth-child(3) { background: var(--green); }
.nav a:nth-child(4) { background: var(--blue); }
.nav a:nth-child(5) { background: var(--pink); }
.nav a:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 8px 18px rgba(0,0,0,0.15); }
.nav a.active { outline: 3px dashed #fff; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: none;
  border-radius: 14px;
  background: var(--pink);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  padding: 60px 0;
  background: linear-gradient(180deg, #e6f3ff 0%, #fffdf5 100%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
  align-items: center;
}
.cloud {
  position: absolute;
  width: 110px; height: 46px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(77, 150, 255, 0.15);
  animation: drift 8s ease-in-out infinite;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
.cloud::before { width: 46px; height: 46px; top: -22px; left: 18px; }
.cloud::after { width: 32px; height: 32px; top: -12px; right: 16px; }
.cloud.c1 { top: 20px; left: 8%; }
.cloud.c2 { top: 120px; right: 6%; width: 80px; height: 34px; animation-delay: -3s; }
.cloud.c2::before { width: 34px; height: 34px; top: -16px; left: 12px; }
.cloud.c2::after { width: 24px; height: 24px; top: -10px; right: 10px; }
.cloud.c3 { top: 240px; left: 55%; animation-delay: -5s; }
@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(26px); }
}
.hero-text h2 {
  font-size: 46px;
  color: var(--red);
  margin-bottom: 10px;
  text-shadow: 2px 2px 0 #fff;
}
.hero-text h2 em { color: var(--blue); font-style: normal; }
.hero-text p { color: var(--text-light); font-size: 17px; margin: 16px 0 26px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-red { background: var(--red); color: #fff; box-shadow: 0 5px 14px rgba(255, 107, 107, 0.4); }
.btn-red:hover { transform: translateY(-3px); }
.btn-yellow { background: var(--yellow); color: #8a6d00; box-shadow: 0 5px 14px rgba(255, 217, 61, 0.5); }
.btn-yellow:hover { transform: translateY(-3px); }
.hero-img {
  border-radius: 42% 42% 26px 26px;
  overflow: hidden;
  border: 6px solid var(--yellow);
  box-shadow: 0 14px 30px rgba(77, 150, 255, 0.2);
  position: relative;
  transform: rotate(1deg);
}
.hero-img img { width: 100%; height: 420px; object-fit: cover; }
.hero-img .smile {
  position: absolute;
  bottom: -18px; right: -10px;
  width: 90px; height: 90px;
  background: var(--green);
  border-radius: 50%;
  border: 6px solid #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== 通用板块 ===== */
.section { position: relative; z-index: 1; padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 46px; }
.section-head .ico {
  font-size: 34px;
  display: block;
  margin-bottom: 8px;
  animation: bounce 2s ease-in-out infinite;
}
.section-head h2 { font-size: 34px; color: var(--blue); }
.section-head p { color: var(--text-light); margin-top: 8px; }

/* ===== 医院介绍 ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.about-img { border-radius: var(--radius); overflow: hidden; border: 5px solid var(--green); box-shadow: 0 10px 24px rgba(107, 203, 119, 0.25); }
.about-img img { height: 400px; width: 100%; object-fit: cover; }
.about-text h3 { font-size: 28px; color: var(--green); margin-bottom: 16px; }
.about-text p { color: var(--text-light); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.chip.c1 { background: var(--red); }
.chip.c2 { background: var(--yellow); color: #8a6d00; }
.chip.c3 { background: var(--green); }
.chip.c4 { background: var(--blue); }
.chip.c5 { background: var(--pink); }

/* ===== 卡通科室 - 彩色积木块 ===== */
.blocks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.block {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(80, 120, 160, 0.1);
  border-top: 8px solid var(--red);
  transition: all 0.35s;
  position: relative;
}
.block:nth-child(2) { border-top-color: var(--yellow); transform: translateY(14px); }
.block:nth-child(3) { border-top-color: var(--green); }
.block:nth-child(4) { border-top-color: var(--blue); transform: translateY(14px); }
.block:nth-child(5) { border-top-color: var(--pink); }
.block:nth-child(6) { border-top-color: var(--red); transform: translateY(14px); }
.block:nth-child(7) { border-top-color: var(--green); }
.block:nth-child(8) { border-top-color: var(--yellow); transform: translateY(14px); }
.block:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 14px 30px rgba(80, 120, 160, 0.2); }
.block .emoji { font-size: 42px; display: block; margin-bottom: 10px; }
.block h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.block p { font-size: 14px; color: var(--text-light); }
.block .go {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
}

/* ===== 医生介绍 ===== */
.docs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.doc {
  background: #fff;
  border-radius: 26px;
  text-align: center;
  padding: 26px 18px;
  box-shadow: 0 8px 20px rgba(80, 120, 160, 0.1);
  transition: all 0.35s;
  border: 3px solid transparent;
}
.doc:nth-child(1) { border-color: var(--pink); }
.doc:nth-child(2) { border-color: var(--green); }
.doc:nth-child(3) { border-color: var(--yellow); }
.doc:nth-child(4) { border-color: var(--blue); }
.doc:hover { transform: translateY(-6px) rotate(-1deg); }
.doc img { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 14px; object-fit: cover; border: 5px solid var(--pink); }
.doc:nth-child(2) img { border-color: var(--green); }
.doc:nth-child(3) img { border-color: var(--yellow); }
.doc:nth-child(4) img { border-color: var(--blue); }
.doc h3 { font-size: 18px; }
.doc .post { font-size: 13px; color: var(--blue); margin: 6px 0; font-weight: 600; }
.doc p { font-size: 13px; color: var(--text-light); }

/* ===== 家长须知 - 问答 ===== */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border-radius: 18px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(80, 120, 160, 0.08);
}
.faq-q {
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-q::after { content: "＋"; font-size: 22px; color: var(--pink); transition: transform 0.3s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { padding: 0 24px; max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-a p { padding: 0 0 18px; color: var(--text-light); font-size: 15px; }
.faq-item.open .faq-a { max-height: 200px; }

/* ===== 联系 ===== */
.contact-wrap {
  background: #fff;
  border-radius: 30px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(80, 120, 160, 0.12);
  border: 4px solid var(--yellow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.contact-info h3 { font-size: 24px; color: var(--red); margin-bottom: 16px; }
.contact-info li { padding: 10px 0; border-bottom: 2px dashed #e8eef6; font-size: 15px; }
.contact-info li b { color: var(--blue); }
.contact-form h3 { font-size: 20px; color: var(--green); margin-bottom: 16px; }
.form-row { margin-bottom: 14px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2ecf8;
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fbfdff;
  outline: none;
  transition: border-color 0.3s;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--blue); }
.form-row textarea { min-height: 100px; resize: vertical; }
.form-row small { color: var(--red); font-size: 12px; display: none; }
.form-row.error small { display: block; }
.form-row.error input, .form-row.error textarea, .form-row.error select { border-color: var(--red); }
.form-msg { padding: 12px; border-radius: 14px; margin-top: 8px; display: none; font-size: 14px; }
.form-msg.ok { display: block; background: #d6f5e0; color: #1d7a44; }
.form-msg.bad { display: block; background: #ffe3e3; color: #b02a2a; }

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 60px;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  color: #fff;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding: 46px 0 26px; }
.footer-grid h3 { font-size: 17px; margin-bottom: 14px; }
.footer-grid p, .footer-grid li { font-size: 14px; margin-bottom: 8px; }
.footer-grid li a:hover { color: var(--yellow); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.3); padding: 16px 0; text-align: center; font-size: 13px; }

/* ===== 动画 ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

/* ===== 页面头部 ===== */
.page-hero {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--red), var(--yellow), var(--green));
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.page-hero h2 { font-size: 40px; margin-bottom: 8px; }
.page-hero p { font-size: 16px; }
.breadcrumb { margin-top: 10px; font-size: 14px; }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== 产品/科室页 ===== */
.block-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.block-list .block img { height: 180px; width: 100%; object-fit: cover; border-radius: 14px; margin-bottom: 12px; }

/* ===== 新闻页 ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-card {
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(80, 120, 160, 0.1);
  border-top: 8px solid var(--green);
  transition: all 0.35s;
}
.news-card:nth-child(2) { border-top-color: var(--pink); }
.news-card:nth-child(3) { border-top-color: var(--yellow); }
.news-card:nth-child(4) { border-top-color: var(--blue); }
.news-card:nth-child(5) { border-top-color: var(--red); }
.news-card:nth-child(6) { border-top-color: var(--green); }
.news-card:hover { transform: translateY(-6px); }
.news-card img { height: 190px; width: 100%; object-fit: cover; }
.news-body { padding: 20px; }
.news-body .date { font-size: 13px; color: var(--blue); font-weight: 600; }
.news-body h3 { font-size: 18px; margin: 8px 0; }
.news-body p { font-size: 14px; color: var(--text-light); }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-img img { height: 320px; }
  .about-grid { grid-template-columns: 1fr; }
  .blocks, .docs, .news-grid, .block-list { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 3px solid var(--pink);
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; text-align: center; }
  .blocks, .docs, .news-grid, .block-list { grid-template-columns: 1fr; }
  .block:nth-child(2n) { transform: none; }
  .hero-text h2 { font-size: 34px; }
  .section { padding: 56px 0; }
  .topbar .container { flex-direction: column; gap: 4px; }
}

/* ============================================
   CMS 通用适配（追加，保持源站样式不变）
   ============================================ */
:root { --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif; }
body { font-family: var(--font); }

/* 滚动显示动画（兼容 fade-in，与源站 .reveal 效果一致） */
.fade-in { opacity: 0; transform: translateY(40px); transition: all 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== 统计数字带 ===== */
.stats-band { position: relative; z-index: 1; background: linear-gradient(135deg, var(--blue), var(--pink)); color: #fff; padding: 54px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat b { display: block; font-size: 42px; font-weight: 800; line-height: 1.2; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
.stat em { display: block; font-style: normal; font-size: 16px; font-weight: 600; margin-top: 6px; }
.stat small { display: block; font-size: 13px; opacity: 0.92; margin-top: 2px; }

/* ===== 发展历程 ===== */
.milestone-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.milestone { background: #fff; border-radius: var(--radius); padding: 26px 20px; text-align: center; box-shadow: 0 8px 20px rgba(80, 120, 160, 0.1); border-bottom: 8px solid var(--blue); }
.milestone b { display: inline-block; background: var(--blue); color: #fff; font-size: 16px; font-weight: 800; padding: 4px 14px; border-radius: 999px; margin-bottom: 10px; }
.milestone h4 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.milestone p { font-size: 14px; color: var(--text-light); }

/* ===== 科室筛选 ===== */
.cat-tabs { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.cat-tab { padding: 10px 24px; border-radius: 999px; border: 2px solid var(--blue); background: #fff; color: var(--blue); cursor: pointer; font-size: 15px; font-weight: 600; transition: all 0.3s; font-family: inherit; }
.cat-tab.active, .cat-tab:hover { background: var(--blue); color: #fff; }

/* ===== 卡片链接配色 ===== */
.news-body h3 a, .block-list .block h3 a { color: var(--text); text-decoration: none; }
.news-body h3 a:hover, .block-list .block h3 a:hover { color: var(--blue); }

/* ===== 团队占位图 ===== */
.team-placeholder { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--blue); color: #fff; font-size: 2.5rem; font-weight: 800; margin: 0 auto 14px; }

/* ===== CMS 适配 ===== */
.cms-section { padding: 80px 0; }
.cms-detail { max-width: 900px; margin: 0 auto; }
.cms-detail > img { border-radius: var(--radius); margin: 0 auto 12px; max-width: 100%; }
.cms-detail h1 { font-size: 2rem; margin: 18px 0; color: var(--text); }
.cms-detail .lead { color: var(--text-light); margin-bottom: 20px; font-size: 1.05rem; }
.cms-detail .news-date-label { display: inline-block; background: var(--blue); color: #fff; font-size: 0.82rem; font-weight: 800; padding: 4px 14px; border-radius: 20px; }
.cms-content h2 { font-size: 1.5rem; margin: 24px 0 12px; color: var(--text); }
.cms-content h3 { font-size: 1.25rem; margin: 20px 0 10px; color: var(--text); }
.cms-content p, .cms-content ul, .cms-content li { color: var(--text-light); margin-bottom: 15px; line-height: 1.9; }
.cms-content ul { padding-left: 18px; list-style: disc; }
.cms-content img { border-radius: var(--radius); }
.cms-back { display: inline-block; color: var(--blue); font-size: 0.9rem; font-weight: 700; margin-bottom: 20px; }
.cms-back:hover { text-decoration: underline; }
.spec-list { list-style: none; padding: 0; margin: 0; }
.spec-list li { color: var(--text-light); padding: 10px 0; border-bottom: 2px dashed #dce6f2; font-size: 0.9rem; }
.spec-list li b { color: var(--blue); }
.cms-pager { padding: 30px 0; text-align: center; }
.cms-pager .pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.cms-pager .page-link { padding: 9px 14px; border: 1px solid #cfe2fb; border-radius: 999px; background: #fff; color: var(--blue); font-size: 14px; transition: 0.3s; display: inline-block; }
.cms-pager .page-link:hover { border-color: var(--blue); }
.cms-pager .page-item.active .page-link { background: var(--blue); border-color: var(--blue); color: #fff; }
.cms-pager .page-item.disabled .page-link { opacity: 0.5; pointer-events: none; }
.cms-grid { display: grid; gap: 20px; margin-bottom: 20px; }
.cms-card { display: block; background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: 0 8px 20px rgba(80, 120, 160, 0.1); transition: all 0.3s; }
.cms-card:hover { transform: translateY(-4px); }
.cms-card h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 6px; }
.cms-card p { font-size: 0.9rem; color: var(--text-light); }
.form-alert-err { background: #ffe3e3; border: 1px solid #f3c6c0; color: #b02a2a; padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; }
.form-alert-err li { color: #b02a2a; }
.error-text { display: none; color: var(--blue); font-size: 0.8rem; margin-top: 6px; }

/* ===== 追加响应式 ===== */
@media (max-width: 992px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .milestone-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .milestone-row { grid-template-columns: 1fr; }
}

