/* 吾老吾幼·到家 全局样式（第6批：体验重做，向演示版靠拢） */
:root {
  --brand: #d02020;          /* 主色：品牌红（与学校官网一致） */
  --brand-2: #a81414;        /* 深红 hover */
  --red-soft: #fdeeee;       /* 浅红底：标签/胶囊 */
  --ink: #1a1a1a;            /* 正文近黑 */
  --muted: #6b6b6b;          /* 次要灰字 */
  --line: #ececec;           /* 浅边框 */
  --bg: #fafafa;             /* 页面画布（官网用 #fafafa 作浅灰区） */
  --card: #ffffff;
  --radius: 14px;
  --fs-body: 14px;
  /* 关键：把 Bootstrap 5.3 的 primary 重定向成红色，
     这样全站约 15 处用到 bg-primary/text-primary/border-primary/progress-bar bg-primary 的徽章/卡片/进度条全部自动变红，无需逐模板改 */
  --bs-primary: #d02020;
  --bs-primary-rgb: 208, 32, 32;
}
* { box-sizing: border-box; }
html, body { font-size: var(--fs-body); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); text-decoration: underline; }

/* 顶部导航：浅色玻璃风，与学校官网一致（白底 + 模糊 + 底边框；深字、红 hover） */
.navbar.site-nav {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  padding: .5rem 1rem;
}
.navbar.site-nav .navbar-brand { color: var(--ink); font-weight: 800; font-size: 1.1rem; letter-spacing: .5px; }
.navbar.site-nav .nav-link { color: var(--muted); font-size: .86rem; padding: .4rem .65rem; font-weight: 500; }
.navbar.site-nav .nav-link:hover { color: var(--brand); }
.navbar.site-nav .nav-link.active { color: var(--brand); font-weight: 700; }

/* 标题层级收敛，不再巨大 */
h1 { font-size: 1.4rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
h4 { font-size: 1rem; } h5 { font-size: .95rem; } h6 { font-size: .9rem; }
.card-title { font-size: 1rem; font-weight: 600; }

/* 卡片更柔和 */
.card { border: 1px solid var(--line); border-radius: var(--radius);
        box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fafbfc; border-bottom: 1px solid var(--line);
               font-size: .9rem; font-weight: 600; }

/* 表单控件缩小、统一 */
.form-label { font-size: .8rem; color: #55606b; margin-bottom: .15rem; font-weight: 500; }
.form-control, .form-select { font-size: .9rem; padding: .35rem .6rem;
        border-radius: 8px; border-color: #d3d9e0; }
.form-control:focus, .form-select:focus { border-color: var(--brand);
        box-shadow: 0 0 0 .15rem rgba(208,32,32,.15); }
.form-text, small, .small { font-size: .78rem; }
textarea.form-control { font-size: .9rem; }

/* 表格更紧凑 */
table, .table { font-size: .84rem; }
.table > :not(caption) > * > * { padding: .45rem .6rem; }
.table thead th { background: #f7f8fa; font-weight: 600; color: #4a5560;
        border-bottom: 1px solid var(--line); white-space: nowrap; }

/* 按钮：胶囊形，红主色（与官网一致） */
.btn { font-size: .85rem; padding: .4rem .95rem; border-radius: 999px; font-weight: 600; }
.btn-sm { font-size: .78rem; padding: .28rem .7rem; border-radius: 999px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
/* 退出/登录等次要按钮：ink 边框胶囊（对应官网 .btn-staff） */
.btn-staff { border: 1.5px solid var(--ink); color: var(--ink); border-radius: 999px; font-weight: 600; }
.btn-staff:hover { border-color: var(--brand); color: var(--brand); }

/* 徽章 */
.badge { font-weight: 500; font-size: .74rem; padding: .28em .55em; border-radius: 6px; }

/* 页面主体留白 */
.container-fluid { max-width: 1240px; }

/* ===== 公开站点：首页 ===== */
.pub-hero { text-align: center; padding: 4.2rem 1rem 2.6rem; }
.pub-hero .kicker { display: inline-block; font-size: .78rem; letter-spacing: .12em; color: var(--brand);
        background: var(--red-soft); padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.1rem; }
.pub-hero h1 { font-size: 2.15rem; font-weight: 800; letter-spacing: .5px; margin: 0; }
.pub-hero h1 .dot { color: var(--brand); }
.pub-hero .lead { color: var(--muted); max-width: 640px; margin: .9rem auto 0; font-size: .95rem; line-height: 1.75; }
.pub-hero .actions { margin-top: 1.7rem; display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

.pub-stats { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 620px; margin: 2.4rem auto 0;
        border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.pub-stats .item { padding: 1.05rem .6rem; text-align: center; border-right: 1px solid var(--line); }
.pub-stats .item:last-child { border-right: none; }
.pub-stats .num { font-size: 1.5rem; font-weight: 800; color: var(--brand); line-height: 1.15; }
.pub-stats .lbl { font-size: .78rem; color: var(--muted); margin-top: .25rem; }

.entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem;
        max-width: 980px; margin: 2.8rem auto 0; }
.entry-card { display: block; background: var(--card); border: 1px solid var(--line);
        border-radius: var(--radius); padding: 1.7rem 1.4rem; text-align: left;
        transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.entry-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(16, 24, 40, .09);
        border-color: #e6d9d9; text-decoration: none; }
.entry-card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--red-soft);
        color: var(--brand); display: flex; align-items: center; justify-content: center;
        font-size: 1.15rem; font-weight: 800; margin-bottom: .95rem; }
.entry-card h5 { font-size: 1.06rem; font-weight: 700; margin: 0 0 .35rem; color: var(--ink); }
.entry-card p { color: var(--muted); font-size: .84rem; margin: 0; line-height: 1.6; }
.entry-card .go { margin-top: .95rem; font-size: .8rem; color: var(--brand); font-weight: 600; }

.pub-flow { display: flex; justify-content: center; flex-wrap: wrap; gap: .55rem 1.3rem;
        margin: 2.9rem auto 1.2rem; color: var(--muted); font-size: .82rem; }
.pub-flow .step { display: flex; align-items: center; gap: .4rem; }
.pub-flow .idx { width: 18px; height: 18px; border-radius: 50%; background: var(--red-soft);
        color: var(--brand); font-size: .68rem; display: flex; align-items: center;
        justify-content: center; font-weight: 700; }

/* ===== 公开榜单（招贤榜 / 居家榜 / 求职榜） ===== */
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
        padding: 1.7rem 0 1.1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; flex-wrap: wrap; }
.board-head h1 { font-size: 1.35rem; font-weight: 800; margin: 0; color: var(--ink); letter-spacing: .3px; }
.board-head .sub { color: var(--muted); font-size: .84rem; margin-top: .4rem; }
.board-head .count { color: var(--brand); font-weight: 700; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1rem; }

.p-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        padding: 1.1rem 1.2rem 1.15rem; transition: box-shadow .14s ease, transform .14s ease; }
.p-card:hover { box-shadow: 0 10px 24px rgba(16, 24, 40, .08); transform: translateY(-2px); }
.p-card .top { display: flex; align-items: center; gap: .75rem; }
.p-card .av { width: 42px; height: 42px; border-radius: 50%; background: var(--red-soft); color: var(--brand);
        display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.02rem; flex: 0 0 auto; }
.p-card .who { min-width: 0; }
.p-card .nm { font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.p-card .sub { font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.p-card .star { margin-left: auto; font-size: .78rem; color: #b26a00; background: #fff6e5;
        border-radius: 999px; padding: .15rem .55rem; white-space: nowrap; }
.p-card .facts { display: grid; grid-template-columns: auto 1fr; gap: .32rem .8rem; margin-top: .95rem; font-size: .84rem; }
.p-card .facts .k { color: var(--muted); white-space: nowrap; }
.p-card .facts .v { color: var(--ink); }
.p-card .money { color: var(--brand); font-weight: 700; }
.p-card .tags { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.p-card .tag { background: #f4f4f5; color: #545456; border-radius: 6px; padding: .15rem .5rem; font-size: .75rem; }
.p-card .tag.hot { background: var(--red-soft); color: var(--brand); }

.row-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.row-item { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 1.05rem 1.25rem;
        border-bottom: 1px solid var(--line); align-items: center; }
.row-item > div { min-width: 0; }
.row-item .meta, .row-item .title { overflow-wrap: anywhere; word-break: break-word; }
.p-card { min-width: 0; }
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: #fcfafa; }
.row-item .title { font-size: .98rem; font-weight: 700; color: var(--ink);
        display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.row-item .chip { font-size: .74rem; font-weight: 600; color: var(--brand); background: var(--red-soft);
        border-radius: 6px; padding: .13rem .45rem; }
.row-item .meta { font-size: .82rem; color: var(--muted); margin-top: .38rem; }
.row-item .meta em { font-style: normal; color: #c9c9c9; margin: 0 .35rem; }
.row-item .right { text-align: right; }
.row-item .budget { font-size: 1rem; font-weight: 800; color: var(--brand); white-space: nowrap; }
.row-item .rsub { font-size: .76rem; color: var(--muted); margin-top: .2rem; }

.p-empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 3.2rem 1rem;
        text-align: center; color: var(--muted); background: var(--card); }

.pub-cta { text-align: center; margin: 2.4rem 0 1rem; }
.pub-cta .note { color: var(--muted); font-size: .78rem; margin-top: .7rem; }

@media (max-width: 992px) { .entry-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .pub-hero { padding: 2.6rem 1rem 1.6rem; }
  .pub-hero h1 { font-size: 1.62rem; }
  .card-grid { grid-template-columns: 1fr; }
  .row-item { grid-template-columns: 1fr; }
  .row-item .right { text-align: left; }
  .pub-stats { grid-template-columns: 1fr; }
  .pub-stats .item { border-right: none; border-bottom: 1px solid var(--line); }
  .pub-stats .item:last-child { border-bottom: none; }
}

/* 页脚 */
.site-foot { text-align: center; color: var(--muted); font-size: .78rem;
        padding: 2rem 1rem 1.5rem; }
