/* ================= 平台门户首页 =================
   仅服务于 portal.html：首屏、功能板块、信息/商品/套餐/动态卡片与使用流程。
   颜色全部走 site.css + theme.css 的变量，深色模式与四套主题自动跟随。
   ================================================ */

/* ---------- 首屏 ---------- */
.pf-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background: var(--grad-soft);
}
.pf-hero::before,
.pf-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(0);
  opacity: .5;
  pointer-events: none;
}
.pf-hero::before {
  width: 420px; height: 420px; top: -160px; right: -80px;
  background: radial-gradient(circle at 30% 30%, rgba(242, 145, 0, .28), transparent 65%);
}
.pf-hero::after {
  width: 320px; height: 320px; bottom: -140px; left: -60px;
  background: radial-gradient(circle at 50% 50%, rgba(46, 124, 196, .18), transparent 65%);
}
.pf-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 48px;
  align-items: center;
}
.pf-hero__copy { min-width: 0; }
.pf-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--tag-orange-bg);
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
}
.pf-hero__title {
  margin: 18px 0 14px;
  font-size: 44px;
  line-height: 1.22;
  color: var(--ink);
}
.pf-hero__desc {
  max-width: 620px;
  color: var(--ink-sub);
  font-size: 17px;
  line-height: 1.8;
}

/* 搜索条 */
.pf-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 26px 0 18px;
  padding: 8px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pf-search select {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--bg-warm);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.pf-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.pf-search .btn { flex: 0 0 auto; min-height: 44px; padding: 0 22px; }

.pf-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.pf-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-sub);
  font-size: 13px;
  transition: .2s ease;
}
.pf-chip:hover { color: var(--red); border-color: var(--red); transform: translateY(-2px); }

/* 数据面板 */
.pf-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pf-metric {
  display: block;
  padding: 18px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
  text-align: center;
  transition: .2s ease;
}
.pf-metric:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pf-metric strong {
  display: block;
  font-size: 30px;
  line-height: 1.2;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pf-metric span { display: block; margin-top: 6px; color: var(--ink-sub); font-size: 13px; }
.pf-metrics__foot {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 功能板块 ---------- */
.pf-modules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.pf-module {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pf-module:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.pf-module__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--tag-orange-bg);
  color: var(--red);
}
.pf-module__icon svg { width: 24px; height: 24px; }
.pf-module__body { display: flex; flex-direction: column; gap: 6px; }
.pf-module__title { margin: 0; font-size: 17px; color: var(--ink); }
.pf-module__desc { margin: 0; color: var(--ink-sub); font-size: 13px; line-height: 1.7; }
.pf-module__tag {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--tag-green-bg);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}
.pf-module__more { margin-top: auto; color: var(--red); font-size: 13px; font-weight: 700; }

/* ---------- 区块标题（左文右按钮） ---------- */
.pf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.pf-head .section-title { margin-bottom: 6px; }
.pf-head__sub { margin: 0; color: var(--ink-sub); font-size: 14px; }
.pf-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 分类信息卡片 ---------- */
.pf-infos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.pf-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: .2s ease;
}
.pf-info:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.pf-info__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-info__top .badge { font-size: 12px; }
.pf-info__county { color: var(--muted); font-size: 12px; }
.pf-info__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-info__summary {
  margin: 0;
  color: var(--ink-sub);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-info__foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 商品卡片 ---------- */
.pf-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.pf-product {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: .2s ease;
}
.pf-product:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.pf-product__cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-warm);
  overflow: hidden;
}
.pf-product__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.pf-product:hover .pf-product__cover img { transform: scale(1.05); }
.pf-product__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(76, 175, 90, .92);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.pf-product__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.pf-product__name {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-product__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pf-product__price { color: var(--red); font-size: 18px; font-weight: 700; }
.pf-product__price em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--muted); }
.pf-product__supplier { color: var(--muted); font-size: 12px; }

/* ---------- 会员套餐 ---------- */
.pf-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.pf-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pf-plan--hot { border-color: var(--orange); box-shadow: var(--shadow-hover); }
.pf-plan__badge {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tag-orange-bg);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}
.pf-plan__name { margin: 0; font-size: 19px; color: var(--ink); }
.pf-plan__price { display: flex; align-items: baseline; gap: 8px; }
.pf-plan__price strong {
  font-size: 34px;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pf-plan__price span { color: var(--muted); font-size: 13px; }
.pf-plan__price del { color: var(--muted); font-size: 13px; }
.pf-plan__days { color: var(--ink-sub); font-size: 13px; }
.pf-plan__benefits { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pf-plan__benefits li { position: relative; padding-left: 20px; color: var(--ink-sub); font-size: 13px; line-height: 1.6; }
.pf-plan__benefits li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad-main);
}
.pf-plan__cta {
  margin-top: auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 42px;
  border-radius: 999px;
  background: var(--grad-main);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.pf-plan__cta:hover { color: #fff; opacity: .92; }
.pf-plans__foot {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 新闻卡片 ---------- */
.pf-news {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.pf-news-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: .2s ease;
}
.pf-news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.pf-news-card__cover { aspect-ratio: 16 / 9; background: var(--bg-warm); overflow: hidden; }
.pf-news-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.pf-news-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; }
.pf-news-card__date { color: var(--muted); font-size: 12px; }
.pf-news-card__title {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pf-news-card__summary {
  margin: 0;
  color: var(--ink-sub);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 使用流程 ---------- */
.pf-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: pf-step;
}
.pf-step {
  position: relative;
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pf-step__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--grad-main);
  color: #fff;
  font-weight: 700;
}
.pf-step h3 { margin: 0 0 8px; font-size: 17px; color: var(--ink); }
.pf-step p { margin: 0; color: var(--ink-sub); font-size: 13px; line-height: 1.7; }

/* ---------- 底部 CTA ---------- */
.pf-cta {
  padding: 46px 32px;
  border-radius: var(--radius);
  background: var(--grad-main);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-hover);
}
.pf-cta h2 { margin: 0 0 12px; font-size: 30px; color: #fff; }
.pf-cta p { margin: 0 0 24px; color: rgba(255, 255, 255, .92); }
.pf-cta__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.pf-cta__actions .btn--primary { background: var(--card); color: var(--red); box-shadow: none; }
.pf-cta__actions .btn--primary:hover { background: var(--bg-warm); color: var(--red); }
.pf-cta__actions .btn--outline { background: transparent; border-color: rgba(255, 255, 255, .85); color: #fff; }
.pf-cta__actions .btn--outline:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.pf-cta__contact { margin: 26px 0 0; font-size: 14px; color: rgba(255, 255, 255, .9); }
.pf-cta__contact strong { color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .pf-hero { padding: 56px 0 48px; }
  .pf-hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .pf-hero__title { font-size: 34px; }
  .pf-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-infos, .pf-plans, .pf-news, .pf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .pf-hero { padding: 40px 0 36px; }
  .pf-hero__title { font-size: 27px; }
  .pf-hero__desc { font-size: 15px; }
  .pf-search { flex-wrap: wrap; border-radius: var(--radius-sm); }
  .pf-search select { flex: 1 1 100%; }
  .pf-search input { flex: 1 1 100%; padding: 0 12px; }
  .pf-search .btn { flex: 1 1 100%; }
  .pf-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
  .pf-metric strong { font-size: 24px; }
  .pf-modules { grid-template-columns: 1fr; }
  .pf-infos, .pf-plans, .pf-news, .pf-steps { grid-template-columns: 1fr; }
  .pf-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .pf-product__body { padding: 10px 12px 14px; }
  .pf-product__price { font-size: 16px; }
  .pf-cta { padding: 32px 18px; }
  .pf-cta h2 { font-size: 22px; }
  .pf-steps { counter-reset: none; }
}
