/* ============================================================
   common.css — 全局公共样式
   说明：所有页面共享的基础样式，包括重置、排版、布局容器、
         顶部导航栏、搜索表单通用样式、页脚等。
   ============================================================ */

/* ---------- 重置与基础 ---------- */

/* 全局盒模型统一为 border-box，方便尺寸计算 */
* {
  box-sizing: border-box;
}

/* 平滑滚动 + 隐藏滚动条 */
html {
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* 页面基础：最小宽度1280px，隐藏滚动条，设置默认字体栈 */
body {
  margin: 0;
  min-width: 1200px;
  color: #333;
  background: #fff;
  font-family: Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* 链接继承父级颜色，去除下划线 */
a {
  color: inherit;
  text-decoration: none;
}

/* 通用隐藏工具类 */
.is-hidden {
  display: none !important;
}

/* 表单元素继承字体 */
button,
input {
  font-family: inherit;
}

/* ---------- 布局容器 ---------- */

/* 主内容区居中容器，宽度1200px */
.page-shell {
  max-width: 760px;
  margin: 0 auto;
}

/* 头部区域容器，宽度1710px，最大宽度留160px边距 */
.header-shell {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- 顶部链接栏 ---------- */

/* 顶部灰色条：移动客户端、品牌营销合作等 */
.top-links {
  height: 42px;
  border-bottom: 1px solid #e9e9e9;
  background: #fafafa;
  color: #666;
  font-size: 14px;
}

/* 顶部链接内容右对齐，间距32px */
.top-links .header-shell {
  display: flex;
  justify-content: flex-end;
  gap: 32px;
  height: 42px;
  align-items: center;
}

/* 第一个链接前的手机图标（纯CSS绘制） */
.top-links a:first-child::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 18px;
  margin-right: 5px;
  vertical-align: -3px;
  border: 2px solid #777;
  border-radius: 2px;
}

/* ---------- 主导航栏 ---------- */

/* 导航栏背景与底部分割线 */
.nav-wrap,
.simple-header-inner {
  background: #fff;
}

.simple-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #eeeeee;
}

/* 带logo+搜索+导航的头部内层 */
.header-inner {
  height: 134px;
  display: flex;
  align-items: center;
  gap: 42px;
}

/* Logo区域 */
.logo {
  display: block;
  flex: 0 0 auto;
  width: 186px;
  overflow: hidden;
}

.logo img {
  display: block;
  width: 186px;
  height: auto;
  margin: 0;
}

/* ---------- 导航栏内的小搜索框（搜索页header专用） ---------- */

.nav-search {
  position: relative;
  width: 268px;
  height: 56px;
  flex: 0 0 auto;
}

.nav-search input {
  width: 100%;
  height: 56px;
  padding: 0 62px 0 28px;
  border: 0;
  outline: 0;
  border-radius: 32px;
  background: #f0f0f2;
  color: #333;
  font-size: 18px;
}

.nav-search button {
  position: absolute;
  top: 11px;
  right: 18px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* 搜索图标（放大镜）：通过JS注入<img>渲染，CSS仅控制布局 */
.nav-search button::before,
.search-mark::before {
  content: none;
}

.search-mark img {
  display: block;
  width: 24px;
  height: 24px;
}

.nav-search button::after,
.search-mark::after {
  content: none;
}

/* 主导航链接组 */
.main-nav {
  display: flex;
  align-items: stretch;
  gap: 30px;
  height: 134px;
  font-size: 24px;
  color: #111;
  white-space: nowrap;
}

.main-nav a {
  display: flex;
  align-items: center;
  position: relative;
}

/* 当前激活的导航项：蓝色文字+底部蓝色条 */
.main-nav a.active {
  color: #0c7bf7;
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: #0c7bf7;
}

/* ---------- 搜索表单通用样式 ---------- */
/* entry-search（搜索页大搜索框）和 wide-search（结果/列表/详情页搜索框）共享 */

.entry-search,
.wide-search {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  border: 2px solid #3880e7;
  border-radius: 50px;
  background: #fff;
}

/* 搜索框内的放大镜图标 */
.entry-search .search-mark,
.wide-search .search-mark {
  width: 24px;
  height: 24px;
  margin-left: 20px;
  margin-right: 13px;
  flex: 0 0 auto;
}

/* 搜索输入框 */
.entry-search input,
.wide-search input {
  flex: 1;
  /* height: 70px; */
  border: 0;
  outline: 0;
  font-size: 16px;
  color: #000;
  min-width: 0;
}

/* 占位符颜色统一 */
.entry-search input::placeholder,
.wide-search input::placeholder,
.nav-search input::placeholder {
  color: #8f8f8f;
}

/* 清空按钮（叉号）：默认隐藏，有内容时显示 */
/* .clear-button {
  position: relative;
  width: 36px;
  height: 36px;
  position: relative;
  display: none;
  flex: 0 0 auto;
} */
.clear-button {
  position: relative;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 0;
  /* background: url("images/close_icon.svg") center / 32px 32px no-repeat; */
  color: transparent;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  display: none;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 50%;
  background: #fff;
}
.clear-button img {
  width: 16px;
  height: 16px;
}

/* 清空按钮的叉号线条（两条45度交叉线） */
.clear-button::before,
.clear-button::after {
  content: none;
}

.clear-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.clear-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* wide-search 内清空按钮尺寸略小 */
.wide-search .clear-button {
  width: 32px;
  height: 32px;
}

/* 蓝色搜索按钮 */
.blue-search-button {
  width: 80px;
  height: 44px;
  margin: 2px 2px 2px 12px;
  border: 0;
  border-radius: 34px;
  background: #347fee;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  line-height: 1px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.blue-search-button:hover {
  background: #1d6de4;
}

/* ---------- 搜索建议下拉面板 ---------- */

/* 绝对定位在搜索框下方，带阴影和圆角 */
.suggest-panel {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: 60px;
  max-height: 370px;
  overflow-y: auto;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 8px 4px rgba(0, 0, 0, 0.05);
}

.suggest-panel[hidden] {
  display: none;
}

/* wide-search 内建议面板位置微调 */
.wide-search .suggest-panel {
  top: 84px;
  left: 0;
  right: 0;
}

/* 搜索错误提示（红色文字） */
.search-tip {
  position: absolute;
  left: 42px;
  top: calc(100% + 10px);
  color: #ff5c5c;
  font-size: 14px;
  line-height: 1;
}

/* 搜索框错误状态：边框变红 */
.entry-search.is-error,
.wide-search.is-error {
  border-color: #ff5c5c;
}

/* 建议项按钮 */
.suggest-panel button {
  display: flex;
  align-items: center;
  width: 100%;
  height: 60px;
  padding: 0 20px;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  color: #111;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.suggest-panel button:hover {
  background: #f8fbff;
}

/* 建议项中匹配高亮文字 */
.suggest-panel strong {
  color: #087cf5;
  font-weight: 400;
}

/* 建议项内的搜索图标 */
.suggest-panel .search-mark {
  width: 32px;
  margin-right: 13px;
}

/* ---------- 简化头部（搜索结果/列表/详情页共用） ---------- */

.simple-header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}

/* 宽搜索框（简化头部内） */
.wide-search {
  flex: 1 1 auto;
  min-width: 0;
}

.simple-header .logo {
  width: 186px;
  margin-left: -206px;
  flex-shrink: 0;
}

/* ---------- 面包屑导航 ---------- */

.breadcrumb {
  margin: 0 0 20px;
  color: #666;
  font-size: 13px;
}

.breadcrumb a {
  color: #999;
}

.breadcrumb span {
  margin: 0 9px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: 56px;
  padding: 45px 0 34px;
  background: #f7f7f7;
}

/* 搜索页主区域后紧跟页脚时取消额外间距 */
.entry-main + .site-footer {
  margin-top: 0;
}

/* 友情链接区域 */
.friend-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 31px;
  color: #222;
  font-size: 16px;
  line-height: 1;
}

.site-footer .friend-links {
  width: 1375px;
  max-width: calc(100vw - 160px);
}

/* "友情链接"标签 */
.friend-links span {
  min-width: 150px;
  height: 50px;
  line-height: 50px;
  border-radius: 4px;
  background: #8996ad;
  color: #fff;
  text-align: center;
  font-size: 22px;
}

/* 备案信息 */
.footer-record {
  margin-top: 42px;
  color: #8f96a3;
  text-align: center;
  font-size: 14px;
  line-height: 1.9;
}

.footer-record p {
  margin: 0;
}

/* ---------- 搜索结果/说明书列表共享：说明书卡片行 ---------- */

/* 说明书卡片容器 */
.result-card {
  overflow: hidden;
  margin-bottom: 27px;
  padding: 16px 24px;
  border: 1px solid #eaeaea;
  border-radius: 16px;
  background: #fff;
}

/* .manual-card {
  min-height: 467px;
} */

.manual-list,
.article-list {
  background: #fff;
}

/* 单条说明书行 */
.manual-row {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid #e8e8e8;
}
.manual-row:last-child {
  padding-bottom: 4px !important;
}

.manual-row:last-child,
.article-row:last-child {
  border-bottom: 0;
}

.manual-row h2,
.article-row h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 25px;
  color: #333;
}

/* 搜索关键词高亮 */
.manual-row h2 span,
.article-row h2 span {
  color: #087cf5;
}

.manual-row strong,
.article-row strong,
.suggest-panel strong {
  color: #087cf5;
  font-weight: inherit;
}

.manual-row p,
.article-row p {
  overflow: hidden;
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  color: #999;
  text-align: justify;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 悬停时标题变蓝 */
.manual-row:hover h2,
.article-row:hover h2 {
  color: #0c7bf7;
}

/* ---------- 搜索结果共享：科普文章行 ---------- */

.article-row {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 22px;
  padding: 16px 0 24px;
  border-bottom: 1px solid #e8e8e8;
}

.article-row:last-child {
  padding-bottom: 4px !important;
}

.article-row img {
  display: block;
  width: 44px;
  height: 44px;
  margin-top: 3px;
  border-radius: 50%;
}

.article-body {
  min-width: 0;
}

.article-row h2 {
  margin-top: 0;
  margin-bottom: 6px;
}

.article-row p {
  margin-bottom: 12px;
}

/* 医生信息行 */
.doctor-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.doctor-info span {
  display: inline-block;
  margin-top: 16px;
}

.doctor-line {
  display: flex;
  align-items: center;
  gap: 17px;
  color: #999;
  font-size: 15px;
}

/* "三甲名医"徽章 */
.doctor-badge {
  display: inline-block;
  background: #f9a821;
  color: white;
  padding: 2px;
  border-radius: 5px;
  font-size: 12px;
}

/* 医院信息行 */
.hospital-line {
  margin-top: 5px;
  color: #999;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 文章日期 */
.article-row time {
  align-self: end;
  justify-self: end;
  margin-bottom: 9px;
  color: #999;
  font-size: 15px;
  line-height: 1;
}

/* ---------- 搜索结果/说明书列表共享：区域标题行 ---------- */

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title-row h1 {
  font-size: 20px;
  line-height: 28px;
  color: #333;
  font-weight: 600;
}

.section-title-row a,
.result-count {
  color: #999;
  font-size: 14px;
  line-height: 1;
}

/* 禁用态链接（如"查看全部"不可用时） */
.disabled-link {
  color: #999 !important;
  cursor: default;
}
