/* ============================================================
   portal.css — 口腔垂直门户结构样式
   参考牙舒丽网 / 贝色网的信息架构：项目矩阵 + 城市墙 + 内容流
   独立文件，删除 index.ejs 中的引入即可整体回退，不污染 main.css
   ============================================================ */

/* ---------- 顶部城市快捷工具条 ---------- */
.utilbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}
.utilbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.utilbar-label {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.utilbar-label i { color: var(--primary); margin-right: 3px; }
.utilbar-cities {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}
.utilbar-cities a {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .15s ease;
}
.utilbar-cities a:hover { color: var(--primary); }
.utilbar-cities .utilbar-more { color: var(--primary); font-weight: 600; }

/* ---------- 门户首屏 ---------- */
.portal-hero { position: relative; overflow: hidden; }
.portal-hero-stats .stat-number { font-variant-numeric: tabular-nums; }
/* 仅保留「资讯/城市」两项，卡片做得更饱满醒目 */
.portal-hero-stats .stat-card { padding: 34px 16px; }
.portal-hero-stats .stat-number { font-size: 44px; }

/* ---------- 门户通用区块 ---------- */
.portal-section {
  padding: 44px 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}
.portal-section:nth-of-type(even) { background: var(--bg-gray-50); }
.portal-section-head { margin-bottom: 26px; }
.portal-section-head h2 {
  font-size: 23px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  line-height: 1.3;
}
.portal-section-head h2 i { color: var(--primary); font-size: 19px; }
.portal-section-head p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 0 18px;
  line-height: 1.7;
}
.portal-section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.portal-more-link {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--primary-lighter);
  transition: border-color .15s ease;
}
.portal-more-link:hover { border-color: var(--primary); }
.portal-more-link i { margin-left: 4px; }

/* ---------- ① 项目分类矩阵 ---------- */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.directory-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 15px 14px;
  display: flex;
  flex-direction: column;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.directory-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.directory-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.directory-icon {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 19px;
  line-height: 1;
  transition: color .18s ease;
}
.directory-card:hover .directory-icon { color: var(--primary-dark); }
.directory-card-head h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.3;
}
.directory-card-head h3 a { color: var(--text-primary); text-decoration: none; }
.directory-card-head h3 a:hover { color: var(--primary); }
.directory-count { font-size: 11px; color: var(--text-muted); }
.directory-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.6;
  min-height: 38px;
}
.directory-links {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  flex: 1 1 auto;
}
.directory-links li {
  position: relative;
  padding-left: 11px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.directory-links li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary-lighter);
}
.directory-links a {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.directory-links a:hover { color: var(--primary); }
.directory-more {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  padding-top: 9px;
  border-top: 1px solid var(--border-light);
}
.directory-more i { margin-left: 3px; transition: transform .15s ease; }
.directory-more:hover i { transform: translateX(3px); }

/* ---------- ② 城市墙 ---------- */
.citywall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
}
.citywall-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 6px 4px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.citywall-item:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
}
.citywall-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.citywall-item:hover .citywall-name { color: var(--primary); }
.citywall-count { font-size: 10px; color: var(--text-muted); }

/* ---------- ③ 三大内容流（资讯 / 优惠 / 报价） ---------- */
.main-content { padding: 44px 0; background: var(--bg-white); }
.main-content .block-header h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding-left: 13px;
  border-left: 4px solid var(--primary);
  line-height: 1.3;
}
.main-content .block-header h2 i { color: var(--primary); font-size: 17px; }
.main-content .content-block { margin-bottom: 0; }

/* 资讯流：来源与时间更醒目，强化 E-E-A-T 信号 */
.news-feature { margin-top: 20px; }
.news-feature .featured-title { font-size: 17px; line-height: 1.55; }
.news-feature .news-meta,
.news-feature .featured-meta { font-size: 12px; color: var(--text-muted); }
.news-feature .news-source,
.news-feature .featured-meta .news-source { color: var(--primary); font-weight: 600; }

/* ---------- ③-b 信息检索区：优惠 / 报价 / 门诊 / 医生 ----------
   覆盖 main.css 里的 2×2 挤压布局与深蓝渐变优惠卡，改为统一的浅色信息流 */
.info-quarter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 0;
}
.main-content > .container > .info-quarter { margin-bottom: 30px; }
.info-quarter .content-block {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 0;
}
.info-quarter .block-header { margin-bottom: 16px; }

/* 优惠卡：去掉深蓝渐变，改浅底+左侧色条的信息流条目 */
.info-quarter .promotions-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.info-quarter .promotion-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-gray-50);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text-primary);
  box-shadow: none;
  cursor: default;
}
.info-quarter .promotion-card::after { display: none; }
.info-quarter .promotion-card:nth-child(n) { background: var(--bg-gray-50); }
.info-quarter .promotion-card:hover { transform: none; box-shadow: var(--shadow-sm); border-left-color: var(--primary); }
.info-quarter .promotion-clinic { font-size: 12px; color: var(--primary); opacity: 1; margin-bottom: 4px; font-weight: 600; }
.info-quarter .promotion-title { font-size: 14px; font-weight: 600; margin: 0; line-height: 1.5; }
.info-quarter .promotion-price { flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 2px; }
.info-quarter .price-original { font-size: 11px; opacity: .6; }
.info-quarter .price-current { font-size: 20px; color: var(--primary-dark); }
.info-quarter .price-unit { font-size: 11px; opacity: .8; }

/* 报价条目 */
.info-quarter .pricing-table { gap: 4px; }
.info-quarter .pricing-card { padding: 10px; border-radius: var(--radius-sm); }
/* 门诊 / 医生条目 */
.info-quarter .recommend-clinics-list,
.info-quarter .recommend-doctors-list { display: flex; flex-direction: column; gap: 2px; }
.info-quarter .clinic-name-small,
.info-quarter .doctor-name-small { font-weight: 700; }

@media (max-width: 900px) {
  .info-quarter { grid-template-columns: 1fr; }
}

/* ---------- ④ 服务流程（贝色式 How It Works） ---------- */
.flow-section { padding: 46px 0; background: var(--bg-gray-50); }
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
  counter-reset: flow;
}
.flow-step {
  position: relative;
  padding: 22px 18px 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.flow-step::before {
  counter-increment: flow;
  content: "0" counter(flow);
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-lighter);
  line-height: 1;
  margin-bottom: 12px;
}
.flow-step h3 { font-size: 15px; font-weight: 700; margin: 0 0 7px; color: var(--text-primary); }
.flow-step p { font-size: 12px; color: var(--text-secondary); line-height: 1.7; margin: 0; }
.flow-step:not(:last-child)::after {
  content: "\f105";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-lighter);
  font-size: 18px;
  z-index: 1;
}

/* ---------- ⑤ 信任背书 / 内容依据 ---------- */
.trust-section { padding: 44px 0; background: var(--bg-white); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.trust-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-gray-50);
}
.trust-item .trust-icon {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 20px;
  line-height: 1;
  margin-top: 1px;
}
.trust-item h3 { font-size: 14px; font-weight: 700; margin: 0 0 5px; color: var(--text-primary); }
.trust-item p { font-size: 12px; color: var(--text-secondary); line-height: 1.7; margin: 0; }

/* ---------- 列表页搜索结果提示 ---------- */
.search-hint {
  margin: 0 0 16px;
  padding: 11px 15px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-lighter);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}
.search-hint strong { color: var(--primary); }
.search-hint a { color: var(--primary); margin-left: 10px; text-decoration: none; font-weight: 600; }
.search-hint a:hover { text-decoration: underline; }

/* ========== 排版收敛：去嵌套卡片 / 头像兜底 / 城市墙轻量化 ========== */

/* 1) Hero 统计：去掉"白卡套蓝框"的嵌套感，改为直接悬浮在蓝色背景上的透明数据条 */
.portal-hero .hero-panel.portal-hero-stats {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  gap: 12px;
}
.portal-hero .portal-hero-stats .stat-card {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 16px;
  padding: 26px 12px;
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.portal-hero .portal-hero-stats .stat-card::before { display: none; }
.portal-hero .portal-hero-stats .stat-card:hover {
  background: rgba(255, 255, 255, .16);
  transform: none;
  box-shadow: none;
}
.portal-hero .portal-hero-stats .stat-number {
  color: #fff;
  font-size: 42px;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #fff;
}
.portal-hero .portal-hero-stats .stat-label { color: rgba(255, 255, 255, .85); }

/* 2) 城市墙：轻量文字块，去掉"1 篇攻略"这类暴露数据量的堆叠，改箭头收尾 */
.citywall { gap: 6px; }
.citywall-item {
  flex-direction: row;
  justify-content: space-between;
  gap: 4px;
  min-height: 42px;
  padding: 8px 10px;
  background: var(--bg-white);
}
.citywall-name { font-size: 13px; }
.citywall-arrow {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
}
.citywall-item:hover .citywall-arrow { opacity: 1; color: var(--primary); transform: translateX(2px); }

/* 3) 医生头像：加载失败时用姓名首字圆形头像兜底，避免灰色方块 */
.doctor-avatar-wrap { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.doctor-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-lighter), var(--primary-soft));
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  z-index: 0;
}
.recommend-doctor-item .doctor-thumb {
  position: relative;
  z-index: 1;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}
.recommend-doctor-item { align-items: center; }
.doctor-title-small, .doctor-clinic-small { margin-top: 2px; }
.doctor-intro { margin-top: 5px; }

/* 4) 资讯区去卡片化：去掉浅灰底，让内容直接呼吸 */
.news-section { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .directory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .citywall { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .citywall { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .flow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-step:not(:last-child)::after { display: none; }
  .trust-grid { grid-template-columns: 1fr; }
  .portal-section-head-row { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 600px) {
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .citywall { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .flow-grid { grid-template-columns: 1fr; }
  .utilbar-cities { gap: 4px 10px; }
}
