/*
Theme Name: 直乐医院脊柱侧弯矫正中心
Theme URI: https://scoliosis.zhileyiyuan.com
Author: DeepSeek + 直乐医院
Description: 专为脊柱侧弯矫正中心打造的响应式、SEO/GEO友好、全后台可编辑的WordPress主题。
Version: 2.7
License: GPL-2.0+
Text Domain: zhile
*/

/* 变量与基础重置 */
:root {
  --primary: #1e6f5c;
  --primary-dark: #145246;
  --primary-light: #e8f3f0;
  --accent: #f39c12;
  --text: #2c3e50;
  --text-light: #5a6c7d;
  --bg: #ffffff;
  --bg-alt: #f7faf9;
  --border: #dcdfe3;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: all 0.2s; }
a:hover { color: var(--primary-dark); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--primary-dark);
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 48px;
  font-size: 1.1rem;
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* 按钮 */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 10px rgba(30,111,92,0.3);
  transition: all 0.3s;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(30,111,92,0.4); color: #fff; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  box-shadow: none;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* 头部导航 */
.site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  padding: 12px 0;
}
.site-logo {
  flex-shrink: 0;
  margin-right: 20px;
}
.site-logo img { max-height: 50px; width: auto; }
.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.main-nav ul { list-style: none; display: flex; gap: 24px; justify-content: center; }
.main-nav a {
  font-weight: 500;
  color: var(--text);
  padding: 8px 0;
  position: relative;
  font-size: 0.9rem;  /* 缩小主菜单字号 */
}
.main-nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: var(--primary);
  transition: width 0.3s;
}
.main-nav a:hover::after,
.main-nav .current-menu-item a::after { width: 100%; }
.main-nav a:hover,
.main-nav .current-menu-item a { color: var(--primary); text-decoration: none; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
}

/* 头部联系方式（桌面一行 / 移动上下两行） */
.header-contact {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.9rem;  /* 缩小联系方式字号 */
  color: var(--text);
  white-space: nowrap;
  margin-left: auto;
  padding-left: 36px;
  border-left: 2px solid var(--primary-light);
}
.header-contact span {
  font-weight: 600;
}
.contact-phone {
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}

/* 移动端优化：竖排、缩小、无边框 */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .main-nav {
    justify-content: flex-start;
  }
  .menu-toggle {
    display: block;
    margin-left: auto;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .main-nav.active { display: block; }
  .main-nav ul { flex-direction: column; padding: 20px; gap: 12px; }
  .header-contact {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin: 8px 0 4px;
    padding: 8px 0 4px;
    border-left: none;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;  /* 移动端更小 */
  }
  .header-contact span {
    font-weight: 500;
  }
}

/* 轮播 */
.home-carousel {
  position: relative;
  overflow: hidden;
  max-height: 520px;
  background: var(--primary-dark);
}
.carousel-container { position: relative; }
.carousel-slide { display: none; position: relative; }
.carousel-slide.active { display: block; }
.carousel-slide img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
}
.carousel-caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 12px 36px;
  border-radius: 50px;
  font-size: 1.6rem;
  font-weight: 600;
}
.carousel-prev, .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  color: var(--primary-dark);
  border: none;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  opacity: 0.8;
}
.carousel-prev:hover, .carousel-next:hover { opacity: 1; background: #fff; }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* 静态 Hero */
.hero-section {
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 120px 0;
  text-align: center;
  position: relative;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1 { font-size: 3rem; margin-bottom: 16px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-content p { font-size: 1.25rem; margin-bottom: 32px; opacity: 0.9; }

/* 通用卡片 */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0,0,0,0.1); }
.card img { width: 100%; height: auto; display: block; }
.card-body { padding: 20px; }
.card-title { font-size: 1.25rem; margin-bottom: 10px; color: var(--primary-dark); }
.card-text { color: var(--text-light); margin-bottom: 15px; }

/* 服务网格 */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}
.service-card {
  background: var(--bg);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
}
.service-card .widget-title { font-size: 1.25rem; color: var(--primary-dark); margin-bottom: 12px; }

/* 专家团队 */
.specialists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}
.specialist-card {
  text-align: center;
  padding: 24px;
}
.specialist-photo {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 15px;
}
.specialist-card img {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 15px;
}
.specialist-title {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 5px;
}
.specialist-expertise {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

/* 案例网格 */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.case-card .case-images {
  display: flex;
  gap: 4px;
}
.case-images img {
  width: 50%;
  height: 200px;
  object-fit: cover;
}

/* 设备网格 */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.equipment-card img {
  height: 200px;
  object-fit: contain;
  background: var(--bg-alt);
  padding: 10px;
}

/* 科普网格 */
.science-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.science-card .meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

/* 博客网格 */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* 页脚 */
.site-footer {
  background: #0b2b26;
  color: #b0c4c1;
  padding: 60px 0 0;
}
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-widgets .widget-title { color: #fff; margin-bottom: 16px; font-size: 1.2rem; }
.footer-bottom {
  border-top: 1px solid #1e4a43;
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
  color: #7a9b96;
}

/* 面包屑 */
.breadcrumbs { margin-bottom: 24px; color: var(--text-light); font-size: 0.9rem; }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }

/* 文章/页面内容区 */
.content-area { padding: 60px 0; min-height: 400px; }
.entry-title { font-size: 2.2rem; margin-bottom: 16px; color: var(--primary-dark); }
.entry-meta { color: var(--text-light); margin-bottom: 32px; }
.post-thumbnail { margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; }

/* FAQ */
.faq-section h3 { font-size: 1.2rem; color: var(--primary-dark); margin: 20px 0 10px; }
.faq-section p { margin-bottom: 15px; }

/* 预约表单 */
.appointment-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-alt);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 知识库页面 */
.kb-description { font-size: 1.1rem; color: var(--text-light); margin-bottom: 40px; text-align: center; }
.kb-grid { display: flex; flex-direction: column; gap: 40px; }
.kb-section {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid var(--border);
}
.kb-section-title { font-size: 1.6rem; color: var(--primary); margin-bottom: 20px; }
.kb-subsection { margin-bottom: 20px; }
.kb-subtitle { font-size: 1.2rem; margin-bottom: 10px; }
.kb-post-list { list-style: disc; padding-left: 20px; }
.kb-post-list li { margin-bottom: 6px; }
.kb-view-all { display: inline-block; margin-top: 10px; font-weight: 500; }

/* 网站地图 */
.sitemap h2 { font-size: 1.5rem; margin: 30px 0 15px; border-bottom: 2px solid var(--primary); padding-bottom: 5px; }
.sitemap ul { list-style: square; padding-left: 20px; }
.sitemap li { margin-bottom: 8px; }

/* 联系我们页面美化 */
.contact-page-header { text-align: center; margin-bottom: 50px; }
.contact-subtitle { font-size: 1.15rem; color: var(--text-light); margin-top: 5px; }
.contact-wrapper { display: flex; flex-wrap: wrap; gap: 40px; align-items: stretch; }
.contact-info-card {
  flex: 1 1 360px; background: #fff; border-radius: 16px; padding: 40px 32px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06); border: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center;
}
.contact-item { display: flex; gap: 18px; margin-bottom: 32px; align-items: flex-start; }
.contact-item:last-child { margin-bottom: 0; }
.contact-icon { font-size: 2rem; line-height: 1.2; width: 40px; text-align: center; flex-shrink: 0; color: var(--primary); }
.contact-item strong { display: block; font-size: 1.15rem; color: var(--primary-dark); margin-bottom: 6px; font-weight: 600; }
.contact-item p { margin: 0; color: var(--text-light); line-height: 1.7; font-size: 1rem; }
.contact-item a { color: var(--primary); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--primary-light); }
.contact-item a:hover { border-bottom-color: var(--primary); }
.contact-map { flex: 1 1 480px; min-width: 300px; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,0.06); border: 1px solid var(--border); }
#baidu-map { width: 100%; height: 100%; min-height: 420px; }

/* 医院环境网格 */
.env-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; margin-top: 40px; }
.env-item { text-align: center; }
.env-img-link { display: block; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); transition: transform 0.3s; }
.env-img-link:hover { transform: scale(1.02); }
.env-thumb { width: 100%; height: 200px; object-fit: cover; }
.env-item h3 { margin-top: 12px; font-size: 1.1rem; }
.env-featured-img { margin-bottom: 30px; border-radius: var(--radius); overflow: hidden; }
.env-featured-img img { width: 100%; height: auto; }

/* 专家详情页排版 */
.specialist-detail { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; }
.specialist-detail-img { flex: 0 0 300px; max-width: 100%; }
.specialist-detail-img .specialist-photo { width: 100%; height: auto; max-height: 400px; object-fit: contain; border-radius: 8px; }
.specialist-detail-body { flex: 1; min-width: 280px; }

/* 响应式 */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 2.4rem; }
  .section { padding: 60px 0; }
}
@media (max-width: 768px) {
  .hero-section { padding: 80px 0; }
  .hero-content h1 { font-size: 2rem; }
  .section-title { font-size: 1.8rem; }
  .contact-wrapper { flex-direction: column; gap: 30px; }
  .contact-info-card, .contact-map { flex: auto; width: 100%; }
  .contact-map { min-height: 350px; }
  #baidu-map { min-height: 350px; }
  .specialist-detail { flex-direction: column; align-items: center; }
  .specialist-detail-img { flex: auto; width: 100%; max-width: 300px; }
  .specialist-detail-body { text-align: center; }
}

/* 院内新闻 */
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
.news-thumb {
  transition: transform 0.3s;
}
.news-card:hover .news-thumb {
  transform: scale(1.03);
}

/* 知识库中当前分类的文章列表 */
.kb-term-posts {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.kb-term-posts-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
}