/* ===== 全局样式 ===== */
:root {
  --primary: #1a6fa8;
  --primary-dark: #145a8a;
  --primary-light: #e8f4fd;
  --secondary: #2ecc71;
  --accent: #e74c3c;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --bg: #f8fafb;
  --white: #ffffff;
  --border: #dde4ea;
  --shadow: 0 2px 12px rgba(26,111,168,0.1);
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

/* ===== 顶部联系栏 ===== */
.top-bar {
  background: var(--primary-dark);
  color: #c8e6f5;
  padding: 7px 0;
  font-size: 13px;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.top-bar a { color: #c8e6f5; }
.top-bar a:hover { color: #fff; }
.top-bar .contact-item { display: inline-flex; align-items: center; gap: 5px; margin-right: 18px; }
.top-bar .icon { font-size: 14px; }

/* ===== 头部导航 ===== */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  flex-wrap: wrap;
  gap: 10px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: white;
}
.logo-text h1 { font-size: 20px; color: var(--primary-dark); font-weight: 700; }
.logo-text span { font-size: 12px; color: var(--text-light); }

nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  flex-wrap: wrap;
}
nav ul li a {
  display: block;
  padding: 8px 15px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
nav ul li a:hover, nav ul li a.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* ===== Container ===== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== Hero Banner ===== */
.hero {
  background: linear-gradient(135deg, #1a6fa8 0%, #0d4f7c 60%, #072d47 100%);
  color: white;
  padding: 70px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero h2 { font-size: 38px; font-weight: 700; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,0.2); position: relative; }
.hero p { font-size: 17px; opacity: 0.9; max-width: 600px; margin: 0 auto 30px; position: relative; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  text-align: center;
}
.btn-primary { background: white; color: var(--primary); }
.btn-primary:hover { background: #e8f4fd; color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #c0392b; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(231,76,60,0.4); }

/* ===== 快速入口 ===== */
.quick-links {
  background: white;
  padding: 30px 0;
  box-shadow: 0 3px 15px rgba(0,0,0,0.06);
}
.quick-links .grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.quick-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 10px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  transition: all 0.25s;
  cursor: pointer;
  text-align: center;
}
.quick-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.quick-card .qc-icon { font-size: 30px; margin-bottom: 8px; }
.quick-card .qc-label { font-size: 13px; font-weight: 600; color: var(--text); }
.quick-card .qc-sub { font-size: 11px; color: var(--text-light); margin-top: 3px; }

/* ===== 区块标题 ===== */
.section { padding: 55px 0; }
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h3 {
  font-size: 28px;
  color: var(--primary-dark);
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.section-title h3::after {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 55px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}
.section-title p { margin-top: 12px; color: var(--text-light); font-size: 15px; }

/* ===== 文章卡片 ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.article-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s;
  border: 1px solid var(--border);
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(26,111,168,0.18);
}
.article-card-img {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 55px;
}
.article-card-body { padding: 18px; }
.article-card-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.article-card-body h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.5;
}
.article-card-body p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.article-card-footer a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}

/* ===== 统计数字 ===== */
.stats-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 50px 0;
  color: white;
  text-align: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.stat-item .num { font-size: 42px; font-weight: 700; }
.stat-item .unit { font-size: 18px; font-weight: 300; }
.stat-item .label { font-size: 14px; opacity: 0.85; margin-top: 5px; }

/* ===== 侧边栏 ===== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
}
.sidebar-widget {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}
.sidebar-widget h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.sidebar-list { list-style: none; }
.sidebar-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list li a { color: var(--text); flex: 1; }
.sidebar-list li a:hover { color: var(--primary); }
.sidebar-list li .badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== 联系卡片 ===== */
.contact-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.contact-card h4 { font-size: 16px; margin-bottom: 14px; }
.contact-card .tel { font-size: 22px; font-weight: 700; margin: 10px 0; }
.contact-card .wechat { font-size: 14px; opacity: 0.9; }
.contact-card .btn { margin-top: 14px; width: 100%; display: block; }

/* ===== 告示卡片 ===== */
.notice-box {
  background: #fff8e1;
  border-left: 4px solid #f39c12;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #7d5a00;
}
.notice-box strong { display: block; margin-bottom: 5px; color: #b7790a; }

/* ===== 论坛 ===== */
.forum-list { list-style: none; }
.forum-item {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex; gap: 16px;
}
.forum-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.forum-content { flex: 1; min-width: 0; }
.forum-content .forum-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.forum-content .forum-name { font-weight: 600; font-size: 15px; color: var(--primary); }
.forum-content .forum-time { font-size: 12px; color: var(--text-light); }
.forum-content .forum-title { font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.forum-content .forum-text { font-size: 13px; color: var(--text-light); line-height: 1.6; margin-bottom: 10px; }
.forum-content .forum-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.forum-content .tag {
  padding: 2px 10px; border-radius: 20px; font-size: 11px;
  background: var(--primary-light); color: var(--primary);
}
.forum-content .tag.red { background: #fdecea; color: var(--accent); }
.forum-content .tag.green { background: #e8f8ef; color: #27ae60; }
.forum-actions { display: flex; gap: 14px; }
.forum-action-btn {
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 4px;
}
.forum-action-btn:hover { color: var(--primary); }

/* ===== 留言表单 ===== */
.form-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.form-card h3 { font-size: 20px; color: var(--primary-dark); margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 14px; font-weight: 600;
  color: var(--text); margin-bottom: 7px;
}
.form-group label .required { color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafa;
  color: var(--text);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,111,168,0.1);
  background: white;
}
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }
.form-submit {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 12px 32px;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,111,168,0.4); }

/* ===== 文章详情 ===== */
.article-detail {
  background: white;
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.article-detail h1 { font-size: 26px; color: var(--text); margin-bottom: 12px; line-height: 1.4; }
.article-meta { display: flex; gap: 16px; color: var(--text-light); font-size: 13px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-body h2 { font-size: 20px; color: var(--primary-dark); margin: 28px 0 14px; padding-left: 12px; border-left: 4px solid var(--primary); }
.article-body h3 { font-size: 17px; color: var(--text); margin: 22px 0 12px; }
.article-body p { margin-bottom: 14px; line-height: 1.8; color: #444; }
.article-body ul, .article-body ol { padding-left: 22px; margin-bottom: 14px; }
.article-body li { margin-bottom: 7px; line-height: 1.7; }
.article-body .tip-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
}
.article-body .warning-box {
  background: #fdecea;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  color: #7d2c2c;
}
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.article-body th { background: var(--primary); color: white; padding: 10px 14px; text-align: left; }
.article-body td { padding: 9px 14px; border-bottom: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: var(--primary-light); }

/* ===== 页脚 ===== */
footer {
  background: #1a2535;
  color: #9fb3c8;
  padding: 50px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-col h4 {
  color: white;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2d3f54;
}
.footer-col p { font-size: 13px; line-height: 1.8; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #9fb3c8; font-size: 13px; }
.footer-col ul li a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid #2d3f54;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #6b849e;
}
.footer-contact { font-size: 13px; line-height: 2; }
.footer-contact .tel { font-size: 20px; color: #58a6d4; font-weight: 700; }

/* ===== 标签页 ===== */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab-btn {
  padding: 10px 22px; border: none; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text-light);
  border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap;
  font-family: inherit; transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 14px 0;
  font-size: 13px;
  color: var(--text-light);
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); }

/* ===== 分类标题Banner ===== */
.page-banner {
  background: linear-gradient(135deg, #1a6fa8, #0d4f7c);
  padding: 40px 0;
  color: white;
}
.page-banner h2 { font-size: 30px; font-weight: 700; margin-bottom: 6px; }
.page-banner p { opacity: 0.85; font-size: 15px; }

/* ===== 文章列表页 ===== */
.article-list-item {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  display: flex; gap: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  transition: all 0.2s;
}
.article-list-item:hover { transform: translateX(4px); box-shadow: 0 6px 24px rgba(26,111,168,0.14); }
.article-list-icon {
  width: 80px; height: 80px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; flex-shrink: 0;
}
.article-list-body { flex: 1; }
.article-list-body h4 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.article-list-body h4 a { color: var(--text); }
.article-list-body h4 a:hover { color: var(--primary); }
.article-list-body p { font-size: 13px; color: var(--text-light); margin-bottom: 8px; line-height: 1.6; }
.article-list-meta { font-size: 12px; color: var(--text-light); display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== 分页 ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; }
.page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 8px; background: white; cursor: pointer;
  font-size: 14px; color: var(--text); transition: all 0.2s;
}
.page-btn.active, .page-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== 医生团队 ===== */
.doctor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.doctor-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  text-align: center; transition: all 0.25s;
}
.doctor-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(26,111,168,0.18); }
.doctor-avatar {
  width: 90px; height: 90px; border-radius: 50%; margin: 22px auto 14px;
  background: linear-gradient(135deg, var(--primary-light), #c0dff5);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.doctor-card h4 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.doctor-card .title { font-size: 13px; color: var(--primary); font-weight: 500; }
.doctor-card p { font-size: 12px; color: var(--text-light); padding: 10px 16px 20px; line-height: 1.6; }

/* ===== 警告条幅 ===== */
.alert {
  padding: 12px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-info { background: #e8f4fd; border: 1px solid #b6d8f5; color: #1a5276; }
.alert-warn { background: #fef9e7; border: 1px solid #f9e79f; color: #7d6608; }
.alert-danger { background: #fdecea; border: 1px solid #f5b7b1; color: #7b241c; }
.alert-success { background: #eafaf1; border: 1px solid #a9dfbf; color: #1e8449; }

/* ===== 成功提示 ===== */
.success-msg {
  display: none;
  background: #eafaf1; border: 1px solid #a9dfbf; color: #1e8449;
  padding: 14px 20px; border-radius: 8px; margin-top: 14px;
  font-size: 14px; font-weight: 500;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .doctor-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-links .grid { grid-template-columns: repeat(3, 1fr); }
  .content-with-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .article-grid { grid-template-columns: 1fr; }
  .hero h2 { font-size: 26px; }
  .quick-links .grid { grid-template-columns: repeat(2, 1fr); }
  .doctor-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; }
}
