/* ============================================================
   门户宽屏页样式 · 课程公示 / 商单大厅（courses.html / orders.html）
   依赖 base.css（组件）与 login.css（卡片复用），此处只做宽屏布局
   ============================================================ */

/* ---------- 页头（sticky 导航） ---------- */
.portal-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--ptop-rgb),  .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-2);
}
.portal-bar {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.portal-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.portal-brand .seal { width: 40px; height: 40px; font-size: 13px; }
.portal-brand .pb-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-brand .pb-sub { font-size: 10.5px; color: var(--ink-soft); letter-spacing: .14em; }
.portal-nav { display: flex; align-items: center; gap: 6px; flex: none; }
.portal-nav a {
  padding: 7px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-2); text-decoration: none; transition: all .15s;
}
.portal-nav a:hover { background: rgba(var(--acc-rgb),  .12); color: var(--gold-deep); }
.portal-nav a.on { background: var(--gold); color: var(--btn-ink); }
.portal-nav a.nav-login {
  /* 默认：描边幽灵按钮，与普通菜单区分但不显「选中」 */
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  background: transparent;
  transition: all .15s;
}
.portal-nav a.nav-login:hover {
  background: var(--gold); color: var(--btn-ink); /* 悬停才填充 */
  filter: none; transform: none; box-shadow: none;
}
.portal-nav a.nav-login:active { background: var(--gold-deep); border-color: var(--gold-deep); color: #FFFFFF; }

html { scroll-behavior: smooth; } /* 首页「登录」菜单平滑滚动到登录卡 */

/* ---------- 主体容器 ---------- */
.portal-main { max-width: 1180px; margin: 0 auto; padding: 30px 24px 56px; }

.portal-hero { margin-bottom: 22px; }
.portal-hero h1 { font-family: var(--font-display); font-size: 26px; font-weight: 900; margin: 0 0 8px; letter-spacing: .02em; }
.portal-hero h1 em { font-style: normal; color: var(--gold-deep); }
.portal-hero p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; margin: 0; max-width: 760px; }
.portal-hero .ph-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- 工具栏（搜索 + 类目筛选） ---------- */
.portal-tools {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.portal-tools .input { width: 320px; max-width: 100%; }
.portal-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.portal-tools .chip { cursor: pointer; }

/* ---------- 宽屏网格：放开登录卡片内的滚动限制 ---------- */
.portal .pub-grid { max-height: none; overflow: visible; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.portal .od-list { max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.portal .pcard { display: flex; flex-direction: column; }
.portal .pbody { display: flex; flex-direction: column; flex: 1; }
.portal .pdesc { -webkit-line-clamp: 3; }
.portal .od-card { display: flex; flex-direction: column; }
.portal .od-card .od-foot { margin-top: auto; }
.portal .od-desc { -webkit-line-clamp: 4; }

/* ---------- 底部查询区（我的交样进度） ---------- */
.portal-panel {
  margin-top: 30px; border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--input-bg); padding: 20px 22px;
}
.portal-panel h3 {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  margin: 0 0 4px; display: flex; align-items: center; gap: 8px;
}
.portal-panel .pp-sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 14px; }
.portal-panel .od-my-form { flex-wrap: wrap; }
.portal-panel .od-my-form .input { width: 220px; }

.portal-foot {
  max-width: 1180px; margin: 0 auto; padding: 18px 24px 30px;
  font-size: 12px; color: var(--ink-soft); text-align: center;
  border-top: 1px dashed var(--line-2);
}

/* ---------- 首页 Hero（深色横幅全宽 · 内容与下方展示区同容器对齐） ---------- */
.home-hero-band { padding: 0; }
.home-hero-inner {
  /* 与 .portal-main 完全一致：1180px + 24px 内边距 → 左右边缘对齐课程/商单网格 */
  max-width: 1180px; margin: 0 auto; padding: 54px 24px 50px;
  display: grid; grid-template-columns: minmax(0, 1fr) 408px;
  gap: 44px; align-items: center;
  position: relative; z-index: 2;
}
.home-hero-band .vquote { display: none; }
.home-hero-band .hh-card {
  justify-self: end; width: 100%;
  background: rgba(var(--ptop-rgb),  .97); color: var(--ink);
  border: 1px solid rgba(var(--acc-rgb),  .4); border-radius: 14px;
  padding: 24px 26px 22px; box-shadow: 0 20px 48px rgba(0, 0, 0, .3);
}
.home-hero-band .hero { margin: 0; }

/* ---------- 首页已登录用户信息卡 ---------- */
.hh-logged-in {
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0;
}
.hh-user-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff; font-family: var(--font-display); font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 4px 14px rgba(var(--acc-rgb), .35);
}
.hh-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hh-user-info { text-align: center; }
.hh-user-name { font-size: 17px; font-weight: 700; color: var(--ink); }
.hh-user-phone { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.hh-user-actions { width: 100%; margin-top: 4px; }

/* ---------- 首页分栏标题 ---------- */
.hs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 16px; }
.hs-head h2 {
  font-family: var(--font-display); font-size: 21px; font-weight: 900;
  letter-spacing: .06em; margin: 0; display: flex; align-items: center; gap: 10px;
}
.hs-head h2::before { content: ''; width: 8px; height: 8px; background: var(--gold-deep); transform: rotate(45deg); }
.hs-head h2 em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-soft); letter-spacing: .12em; }
.hs-head a { color: var(--gold-deep); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hs-head a:hover { text-decoration: underline; }

/* ---------- 首页赛事展示卡片 ---------- */
.ct-home-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ct-home-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: box-shadow .2s, transform .15s; text-decoration: none; color: inherit;
}
.ct-home-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.ct-hc-cover { width: 100%; height: 140px; object-fit: cover; background: linear-gradient(135deg, var(--cover-1) 0%, var(--cover-2) 100%); display: flex; align-items: center; justify-content: center; color: var(--sb-t1); font-family: var(--font-display); font-size: 28px; font-weight: 900; }
.ct-hc-cover img { width: 100%; height: 100%; object-fit: cover; }
.ct-hc-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.ct-hc-body h4 { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.ct-hc-body .ct-hc-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 8px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-hc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ct-hc-meta .badge { font-size: 11px; }
.ct-hc-phase-reg { background: #E8F5E9; color: #2E7D32; }
.ct-hc-phase-vote { background: #FFF3E0; color: #E65100; }
.ct-hc-phase-rank { background: #F3E5F5; color: #7B1FA2; }
.ct-hc-phase-ended { background: #ECEFF1; color: #607D8B; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .portal .pub-grid { grid-template-columns: repeat(2, 1fr); }
  .portal .od-list { grid-template-columns: 1fr; }
  .ct-home-list { grid-template-columns: repeat(2, 1fr); }
  .portal-bar { padding: 12px 16px; }
  .portal-main { padding: 22px 16px 40px; }
  .portal-hero h1 { font-size: 22px; }
  .portal-tools .input { width: 100%; }
  .portal-brand .pb-sub { display: none; }
  .home-hero-inner { grid-template-columns: 1fr; gap: 28px; padding: 34px 16px 30px; }
  .home-hero-band .hh-card { justify-self: stretch; max-width: none; } /* 通栏拉伸，左右边缘与下方课程/商单网格对齐 */
}
@media (max-width: 620px) {
  .portal .pub-grid { grid-template-columns: 1fr; }
  .ct-home-list { grid-template-columns: 1fr; }
  .portal-nav a { padding: 6px 9px; font-size: 12.5px; }
  .portal-panel .od-my-form .input { width: 100%; }
  .home-hero-inner { padding: 26px 16px 24px; }
  .home-hero-band .feat { gap: 7px; }
  .home-hero-band .feat li { padding: 5px 12px; font-size: 12px; }
}
