/* =========================================
   银发财经 — 门户页专属样式
   用途：仅 portal.html 引用
   隔离说明：所有类名以 portal- 为前缀或具有页面特异性
   ========================================= */

/* ===== 页面级样式（仅 portal.html 使用） ===== */

/* Hero区 - 紧凑垂直居中 */
.hero{background:var(--brand-gradient);color:white;padding:32px 28px;display:flex;justify-content:center;align-items:center;text-align:center;}
.hero .hero-center{max-width:800px;animation:fadeInUp 0.6s ease forwards;}
.hero h1{font-size:36px;font-weight:700;margin-bottom:8px;letter-spacing:6px;line-height:1.2;}

/* 品牌口号 - 单行 */
.hero-slogan{margin-top:4px;animation:fadeInUp 0.6s ease 0.15s both;}
.hero-slogan .slogan-line{font-size:16px;opacity:0.85;line-height:1.5;font-weight:400;}

/* Hero 搜索框（居中布局） */
.hero-search-box{position:relative;z-index:100;max-width:500px;margin:14px auto 0;}
.hero-search-wrap{display:flex;align-items:stretch;background:#fff;border-radius:28px;box-shadow:0 6px 24px rgba(0,0,0,0.18);overflow:hidden;}
.hero-search-input{flex:1;border:none;outline:none;padding:14px 22px;font-size:15px;background:transparent;color:#222;}
.hero-search-input::placeholder{color:#9ca3af;}
.hero-search-btn{border:none;background:var(--brand-primary);color:#fff;padding:0 22px;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background 0.2s;}
.hero-search-btn:hover{background:var(--brand-dark);}
.hero-search-hint{font-size:12px;color:rgba(255,255,255,0.8);margin-top:8px;line-height:1.5;}
.hero-search-hint .tag{display:inline-block;background:rgba(255,255,255,0.2);padding:1px 8px;border-radius:10px;margin:0 3px;cursor:pointer;transition:background 0.2s;}
.hero-search-hint .tag:hover{background:rgba(255,255,255,0.35);}
/* 搜索下拉 */
.hero-search-dropdown{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border-radius:12px;box-shadow:0 10px 32px rgba(0,0,0,0.25);max-height:420px;overflow-y:auto;z-index:99999;display:none;text-align:left;border:0.5px solid rgba(0,0,0,0.08);}
.hero-search-dropdown.show{display:block;}
.hero-search-group{padding:4px 0;}
.hero-search-group-title{font-size:11px;color:#9ca3af;font-weight:700;padding:8px 16px 4px;text-transform:uppercase;letter-spacing:0.5px;}
.hero-search-item{display:flex;align-items:center;gap:10px;padding:9px 16px;cursor:pointer;text-decoration:none;color:#374151;transition:background 0.12s;}
.hero-search-item:hover,.hero-search-item.active{background:#f0fdf4;}
.hero-search-item .tag-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:4px;font-size:10px;font-weight:700;flex-shrink:0;color:#fff;line-height:1;}
.tag-icon-county{background:#3B6D11;}
.tag-icon-city{background:#185FA5;}
.tag-icon-article{background:#854F0B;}
.hero-search-item .label{flex:1;font-size:13px;line-height:1.4;}
.hero-search-item .label .hl{color:var(--brand-primary);font-weight:600;}
.hero-search-item .meta{font-size:11px;color:#9ca3af;flex-shrink:0;}
.hero-search-empty{padding:24px 16px;text-align:center;color:#9ca3af;font-size:13px;}
.hero-search-empty .hot-tags{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-top:10px;}
.hero-search-empty .hot-tags .tag{display:inline-block;background:#f3f4f6;color:#374151;padding:3px 10px;border-radius:12px;font-size:12px;cursor:pointer;transition:background 0.15s;}
.hero-search-empty .hot-tags .tag:hover{background:#e5e7eb;}
.hero-search-foot{padding:8px 16px;font-size:11px;color:#9ca3af;border-top:1px solid #f3f4f6;display:flex;justify-content:space-between;}
.hero-search-foot kbd{background:#f3f4f6;border-radius:3px;padding:0 4px;font-family:monospace;font-size:10px;}

/* 数据动态更新栏 */
.update-bar{background:linear-gradient(135deg,#f0fdf4,#ecfdf5);border-top:1px solid #d1fae5;border-bottom:1px solid #d1fae5;padding:12px 28px;}
.update-bar-inner{max-width:1200px;margin:0 auto;display:flex;align-items:center;gap:20px;}
.update-bar-label{flex-shrink:0;background:var(--brand-primary);color:#fff;font-size:12px;font-weight:700;padding:4px 12px;border-radius:20px;letter-spacing:1px;}
.update-bar-items{display:flex;align-items:center;gap:0;flex-wrap:wrap;flex:1;}
.update-bar-item{display:flex;align-items:center;gap:6px;text-decoration:none;color:#444;font-size:13px;padding:6px 16px;border-right:1px solid #d1fae5;transition:all 0.2s;white-space:nowrap;}
.update-bar-item:last-child{border-right:none;}
.update-bar-item:hover{color:var(--brand-primary);text-decoration:none;}
.update-bar-dot{width:6px;height:6px;border-radius:50%;background:#ccc;flex-shrink:0;}
.update-bar-dot.new{background:#ef4444;box-shadow:0 0 0 2px rgba(239,68,68,0.2);}
.update-bar-text{font-weight:500;}
.update-bar-text strong{color:var(--brand-primary);font-weight:700;}

/* ===== 数据洞察区 ===== */
.portal-insights-section {
  padding: 40px 28px;
  background: #f8f9fa;
}
.portal-section-header {
  text-align: center;
  margin-bottom: 28px;
}
.portal-section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 6px;
}
.portal-section-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.portal-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.portal-insight-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.2s;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.portal-insight-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* 卡片左边框颜色 */
.portal-insight-card[data-type="data"] {
  border-left: 4px solid var(--brand-primary);
}
.portal-insight-card[data-type="policy"] {
  border-left: 4px solid #7c3aed;
}
.portal-insight-card[data-type="case"] {
  border-left: 4px solid #d97706;
}
.portal-insight-card[data-type="ltc"] {
  border-left: 4px solid #0e7490;
}

.portal-insight-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.portal-insight-header .icon {
  font-size: 18px;
}
.portal-insight-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.portal-insight-body {
  padding: 12px 16px;
  flex: 1;
  overflow: hidden;
}

.portal-insight-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
  text-align: right;
}
.portal-insight-footer a {
  font-size: 12px;
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
}
.portal-insight-footer a:hover {
  text-decoration: underline;
}

/* TOP5 表格 */
.portal-top5-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}
.portal-top5-table th {
  text-align: left;
  padding: 4px 6px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 11px;
  border-bottom: 1px solid #eee;
}
.portal-top5-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #f5f5f5;
}
.portal-top5-table tr:hover td {
  background: var(--bg-highlight);
}
.portal-top5-table .rank {
  font-weight: 700;
  color: var(--brand-primary);
  width: 20px;
}
.portal-top5-table .grade {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
}

/* 省份分布条形图容器 */
.portal-chart-container {
  height: 180px;
  position: relative;
}

/* 四维冠军 */
.portal-champion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.portal-champion-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.portal-champion-card:hover {
  background: #f0fdf4;
}
.portal-champion-card .dim {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.portal-champion-card .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.portal-champion-card .prov {
  font-size: 10px;
  color: var(--text-muted);
}
.portal-champion-card .score {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-primary);
  margin-top: 4px;
}

/* 案例迷你卡片 */
.portal-case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.portal-case-mini {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.2s;
}
.portal-case-mini:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.portal-case-mini-header {
  padding: 8px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.portal-case-mini-body {
  padding: 8px 10px;
}
.portal-case-mini-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 4px;
}
.portal-case-mini-stats {
  display: flex;
  gap: 6px;
}
.portal-case-mini-stat {
  flex: 1;
  text-align: center;
  background: #f8f9fa;
  border-radius: 4px;
  padding: 3px;
}
.portal-case-mini-stat .num {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-primary);
}
.portal-case-mini-stat .lbl {
  font-size: 9px;
  color: var(--text-muted);
}

/* 政策活跃城市 */
.portal-policy-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.portal-policy-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #f8f9fa;
  border-radius: 6px;
}
.portal-policy-item .rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
  width: 20px;
  text-align: center;
}
.portal-policy-item .city {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
}
.portal-policy-item .count {
  font-size: 11px;
  color: var(--text-muted);
}

/* LTC 卡片列表（照护费用、供给密度、覆盖率） */
.portal-ltc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.portal-ltc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #f8f9fa;
  border-radius: 6px;
}
.portal-ltc-item .rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-primary);
  width: 20px;
  text-align: center;
}
.portal-ltc-item .name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
}
.portal-ltc-item .count {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* 长护险 */
.portal-ltc-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.portal-ltc-stat {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.portal-ltc-stat .num {
  font-size: 20px;
  font-weight: 800;
  color: #0e7490;
}
.portal-ltc-stat .lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.portal-ltc-dims {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.portal-ltc-dim {
  background: #ecfeff;
  color: #0e7490;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

/* ===== 旅居项目案例卡片 ===== */
.portal-case-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.portal-case-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.portal-case-stat {
  background: #f0fdf4;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.portal-case-stat .num {
  font-size: 22px;
  font-weight: 800;
  color: #059669;
  display: block;
}
.portal-case-stat .lbl {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.portal-case-chart {
  height: 200px;
  position: relative;
}

/* ===== 产品路径引导区 ===== */
.portal-product-section {
  padding: 48px 28px;
  background: #fff;
}
.portal-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.portal-product-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.portal-product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.portal-product-card.pro {
  border-color: var(--brand-primary);
  box-shadow: 0 4px 20px rgba(5,150,105,0.15);
  transform: scale(1.02);
}
.portal-product-card.pro:hover {
  box-shadow: 0 8px 28px rgba(5,150,105,0.2);
}
.portal-product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
}
.portal-product-name {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.portal-product-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.portal-product-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 4px;
}
.portal-product-price .unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}
.portal-product-price .old {
  font-size: 16px;
  color: #bbb;
  text-decoration: line-through;
  margin-right: 6px;
}
.portal-product-card.pro .portal-product-price {
  color: #c0392b;
}
.portal-product-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.portal-product-features {
  text-align: left;
  margin-bottom: 20px;
  flex: 1;
}
.portal-product-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
  line-height: 1.5;
}
.portal-product-feature .check {
  color: var(--brand-primary);
  font-weight: 700;
  flex-shrink: 0;
}
.portal-product-feature .cross {
  color: #ccc;
  flex-shrink: 0;
}
.portal-product-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: center;
}
.portal-product-btn.free {
  background: #f0f2f5;
  color: #555;
}
.portal-product-btn.free:hover {
  background: #e5e7eb;
}
.portal-product-btn.pro {
  background: var(--brand-primary);
  color: #fff;
}
.portal-product-btn.pro:hover {
  background: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(5,150,105,0.3);
}
.portal-product-btn.expert {
  background: #1e3c72;
  color: #fff;
}
.portal-product-btn.expert:hover {
  background: #15294d;
}
.portal-product-qr {
  margin-top: 12px;
  text-align: center;
}
.portal-product-qr img {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  border: 1px solid #eee;
}
.portal-product-qr-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== 银发洞察区 ===== */
.portal-article-section {
  padding: 40px 28px;
  background: #f8f9fa;
}
.portal-article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.portal-article-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: box-shadow 0.25s;
}
.portal-article-card:hover {
  box-shadow: var(--shadow-hover);
}
.portal-article-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}
.portal-article-header.new-elderly {
  background: #fce7f3;
  color: #be185d;
}
.portal-article-header.silver-tourism {
  background: #e0f2fe;
  color: #0369a1;
}
.portal-article-body {
  padding: 6px 0;
}
.portal-article-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  border-bottom: 1px solid #f5f5f5;
}
.portal-article-item:last-child {
  border-bottom: none;
}
.portal-article-item:hover {
  background: var(--bg-highlight);
}
.portal-article-item .num {
  width: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-primary);
  text-align: right;
  padding-top: 1px;
  flex-shrink: 0;
}
.portal-article-item .body {
  flex: 1;
  min-width: 0;
}
.portal-article-item .title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.portal-article-item:hover .title {
  color: var(--brand-primary);
}
.portal-article-item .date {
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
}
.portal-article-toggle {
  display: block;
  width: 100%;
  padding: 6px;
  text-align: center;
  font-size: 11px;
  color: var(--brand-light);
  cursor: pointer;
  background: none;
  border: none;
  border-top: 1px solid var(--border-light);
  transition: background 0.15s;
}
.portal-article-toggle:hover {
  background: var(--bg-highlight);
  color: var(--brand-primary);
}

/* ===== 响应式 ===== */
@media(max-width:1024px){
  .portal-insights-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-product-grid { grid-template-columns: 1fr; max-width: 500px; }
  .portal-product-card.pro { transform: none; }
  .portal-article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:768px){
  .portal-insights-grid { grid-template-columns: 1fr; }
  .portal-article-grid { grid-template-columns: 1fr; }
  .portal-insights-section { padding: 28px 16px; }
  .portal-product-section { padding: 32px 16px; }
  .portal-article-section { padding: 28px 16px; }
  .portal-section-header h2 { font-size: 18px; }
  .hero{padding:28px 16px;}
  .hero h1{font-size:24px;}
  .update-bar{padding:10px 16px;}
  .update-bar-inner{flex-direction:column;gap:8px;align-items:flex-start;}
  .update-bar-items{width:100%;}
  .update-bar-item{padding:4px 12px 4px 0;font-size:12px;border-right:none;}
}
@media(max-width:480px){
  .hero{padding:20px 14px;}
  .hero h1{font-size:20px;}
  .hero .tagline{font-size:13px;}
}

/* 返回顶部按钮响应式 */
@media(max-width:768px){
  #backToTop{bottom:20px;right:20px;width:40px;height:40px;font-size:18px;}
}

/* 导航滚动阴影（由 header-scrolled 类控制） */
.unified-header.header-scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.15); position: sticky; top: 0; z-index: 99; }
