/* ============================================
   南方农业工程学院 科技创新与创业联合会（科联）
   官方网站样式 · 官方蓝白严肃风
   ============================================ */
:root {
  --blue: #1f4d7a;      /* 主蓝 */
  --blue-2: #2e6ba6;    /* 中蓝 */
  --blue-3: #4a8cc9;    /* 亮蓝 */
  --bg: #f2f5f9;        /* 页面底色 */
  --card: #ffffff;      /* 卡片 */
  --line: #dce3ec;      /* 描边 */
  --ink: #26313b;       /* 正文 */
  --muted: #6b7a88;     /* 次要文字 */
  --red: #c0392b;       /* 警示红 */
  --gold: #f0c75e;      /* 强调金 */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

.page-shell { max-width: 1160px; margin: 0 auto; background: var(--bg); }

a { color: var(--blue-2); }
a:hover { color: var(--blue); }

/* ===== 顶部校名栏 ===== */
.site-top { background: #16354f; color: #cfe0ee; }
.site-top-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 42px 7px 24px;
  font-size: 12px;
  letter-spacing: .08em;
}
.site-top-inner b { color: #5f8db3; font-weight: 400; }

/* ===== 站头 ===== */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px 42px 18px 24px;
  background: var(--card);
  border-bottom: 3px solid var(--blue);
}
.brand { display: flex; gap: 12px; align-items: center; justify-self: start; color: inherit; text-decoration: none; }
.brand-mark { flex: none; }
.brand strong { display: block; font-size: 20px; letter-spacing: .06em; color: var(--blue); }
.brand small { display: block; margin-top: 3px; font-size: 10px; letter-spacing: .14em; color: var(--muted); }

/* ===== 仿 Chrome 地址栏搜索 ===== */
.omnibox { width: 470px; justify-self: center; }
.omnibox-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f6f8fb;
  border: 1px solid #c8d2dc;
  border-radius: 26px;
  padding: 11px 18px;
  box-shadow: inset 0 1px 2px #1f2c3a12;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.omnibox-form:focus-within {
  background: #ffffff;
  border-color: var(--blue-3);
  box-shadow: 0 0 0 3px #4a8cc933;
}
.omnibox-icon { width: 17px; height: 17px; color: #8a97a5; flex: none; }
.omnibox-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 14px 'Microsoft YaHei', sans-serif;
}
.omnibox-enter {
  border: 0;
  background: transparent;
  color: #8a97a5;
  font-size: 17px;
  cursor: pointer;
  padding: 0 2px;
}
.omnibox-enter:hover { color: var(--blue-2); }

/* ===== 主导航 ===== */
.main-nav { display: flex; gap: 4px; padding: 0 42px; background: var(--card); border-bottom: 1px solid var(--line); }
.main-nav a {
  padding: 12px 18px;
  color: #3f5570;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.main-nav a:hover { color: var(--blue); background: #eef4fa; }
.main-nav a.active { color: var(--blue); border-bottom-color: var(--blue); }

/* ===== 页标题条 ===== */
.page-band { padding: 30px 54px 26px; background: var(--card); border-bottom: 1px solid var(--line); }
.page-band .crumb { margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.page-band h1 { margin: 0; font-size: 26px; color: var(--blue); letter-spacing: .04em; }
.page-band p { margin: 8px 0 0; max-width: 720px; color: var(--muted); }

/* ===== 通用卡片与栅格 ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 34px 54px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 34px 54px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding: 34px 54px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 20px;
  box-shadow: 0 2px 0 #1f2c3a0d;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px #1f2c3a1f; }
.card h3 { margin: 0 0 8px; font-size: 16px; color: var(--blue); }
.card .role { display: block; margin-bottom: 8px; font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.card p { margin: 0; font-size: 13px; color: #45576a; }
.card a.more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--blue-2); }
.card a.more:hover { color: var(--blue); }

/* ===== 首页横幅 ===== */
.banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 64px 54px;
  background: linear-gradient(120deg, #1a3f63 0%, #2e6ba6 60%, #4a8cc9 100%);
  color: #fff;
}
.banner .banner-copy { max-width: 560px; }
.banner .photo { width: 38%; flex: none; box-shadow: 0 10px 30px #0e243344; }
.banner .photo figcaption { background: transparent; color: #fff; padding: 8px 0 0; text-align: center; opacity: .85; }
.banner .photo.empty { min-height: 200px; border-color: #ffffff55; background: #ffffff1a; color: #ffffff88; }
.banner:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, #ffffff12 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, #ffffff12 0 1px, transparent 1px 34px);
  z-index: 0;
}
.banner > * { position: relative; z-index: 1; }
.banner .eyebrow { margin: 0 0 10px; font-size: 12px; letter-spacing: .2em; color: #bcd8ee; }
.banner h1 { margin: 0 0 14px; font-size: 34px; letter-spacing: .06em; }
.banner p { margin: 0 0 6px; max-width: 560px; color: #dce9f5; font-size: 14px; }
.banner .button {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 22px;
  background: #fff;
  color: var(--blue);
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px #0e243333;
}
.banner .button:hover { background: #eef4fa; }

/* ===== 数据条 ===== */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-bottom: 1px solid var(--line); }
.stat { padding: 26px 20px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: 28px; color: var(--blue); }
.stat span { display: block; margin-top: 4px; font-size: 12px; letter-spacing: .1em; color: var(--muted); }

/* ===== 公告条 ===== */
.notice-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 34px 54px 0;
  padding: 18px 24px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
}
.notice-strip .kicker { margin: 0; font-size: 11px; letter-spacing: .14em; color: #bcd8ee; }
.notice-strip h2 { margin: 4px 0 0; font-size: 17px; }
.notice-strip a { color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.notice-strip a:hover { text-decoration: underline; }

/* ===== 区块标题 ===== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 40px 54px 0;
}
.section-head h2 { margin: 0; font-size: 21px; color: var(--blue); position: relative; padding-left: 12px; }
.section-head h2:before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--blue-3);
  border-radius: 2px;
}
.section-head .text-link { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--blue-2); }
.section-head .text-link:hover { color: var(--blue); }

/* ===== 正文排版 ===== */
.prose { max-width: 860px; }
.prose p { margin: 0 0 14px; color: #37485a; }
.prose h3 { margin: 26px 0 10px; font-size: 16px; color: var(--blue); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 34px 54px; }
.tiny { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }

/* ===== 表格 ===== */
.tbl-wrap { padding: 26px 54px 40px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; background: var(--card); font-size: 13px; }
.tbl th {
  background: #eef3f8;
  color: var(--blue);
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}
.tbl td { border: 1px solid var(--line); padding: 10px 12px; color: #37485a; }
.tbl tr:hover td { background: #f7fafd; }

/* ===== 涂黑/反选可见 ===== */
.redact { background: #1f262e; color: #1f262e; padding: 1px 5px; border-radius: 3px; cursor: text; user-select: text; }
.redact::selection { color: #f2f6fa; background: #3d4752; }
.tiny-redact-hint { font-size: 11px; color: #9aa6b1; margin-top: 6px; }

/* ===== 公告/新闻列表 ===== */
.entry-list { padding: 26px 54px 40px; }
.entry-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-3);
  border-radius: 6px;
  padding: 16px 22px;
  margin-bottom: 14px;
  box-shadow: 0 2px 0 #1f2c3a0d;
}
.entry-card.pinned { border-left-color: var(--gold); }
.entry-card .date {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}
.entry-card .date.pin { background: #f6e7bc; color: #7a5b12; }
.entry-card h3 { display: inline; margin: 0; font-size: 15px; color: var(--ink); }
.entry-card a { text-decoration: none; }
.entry-card a:hover h3 { color: var(--blue-2); }
.entry-card p { margin: 6px 0 0; font-size: 13px; color: #45576a; }

/* ===== 搜索结果 ===== */
.search-results { padding: 30px 54px 60px; max-width: 860px; }
.search-results .count { color: #45576a; margin-bottom: 18px; }
.result-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.result-item a { font-size: 16px; font-weight: 700; text-decoration: none; color: var(--blue-2); }
.result-item a:hover { color: var(--blue); text-decoration: underline; }
.result-item p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.search-results .none { color: #45576a; background: var(--card); border: 1px dashed var(--line); border-radius: 8px; padding: 30px; text-align: center; }
.search-results .none b { color: var(--ink); }

/* ===== 禁止访问（红色模式） ===== */
body.body-forbidden { background: #140606; }
body.body-forbidden .page-shell { background: #1c0b0b; }
body.body-forbidden .site-top { background: #170707; }
body.body-forbidden .site-header { background: #241010; border-bottom-color: #4a1616; }
body.body-forbidden .main-nav { background: #1c0b0b; border-bottom-color: #3a1616; }
body.body-forbidden .main-nav a { color: #b55555; }
body.body-forbidden .main-nav a:hover { background: #2a1313; }
body.body-forbidden .main-nav a.active { color: #ff5555; border-bottom-color: #ff5555; }
body.body-forbidden .page-band { background: #241010; border-bottom-color: #3a1616; }
body.body-forbidden .page-band h1,
body.body-forbidden .page-band p,
body.body-forbidden .page-band .crumb { color: #c96a6a; }
body.body-forbidden .omnibox-form { background: #1d0e0e; border-color: #4a1616; }
body.body-forbidden .site-footer { background: #170707; color: #8a3a3a; }
body.body-forbidden .site-footer strong { color: #8a3a3a; }
body.body-forbidden .footer-main { background: #200d0d; border-color: #3a1616; }
body.body-forbidden .footer-main h4 { color: #b55555; }
body.body-forbidden .footer-main p,
body.body-forbidden .footer-main a { color: #9a4a4a; }

.fb-box { background: #241010; border: 2px solid #ff5555; border-radius: 8px; padding: 34px; color: #ff5555; }
.fb-box h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: .1em; }
.fb-box .fb-code { margin: 0 0 14px; font-size: 12px; letter-spacing: .3em; color: #8a3a3a; }
.fb-box .fb-line { margin: 0 0 20px; font-size: 13px; color: #c96a6a; }
.fb-box .fb-date { margin: 18px 0 0; font-size: 12px; color: #8a3a3a; }
.hidden-text {
  display: inline-block;
  background: #000;
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: text;
  user-select: text;
  font-size: 14px;
  line-height: 2;
}
.hidden-text::selection { color: #ff4b4b; background: #2a0a0a; }
.visible-text { display: inline-block; color: #ff3b3b; padding: 2px 8px; font-size: 14px; }

/* ===== 独立正文区块（自带留白，窄屏自适应） ===== */
.prose-band { padding: 30px 54px; }

/* ===== 手写体（隐藏页） ===== */
.handwrite {
  font-family: 'KaiTi', 'STKaiti', '楷体', serif;
  font-size: 16px;
  color: #4a2c16;
  background: #fdf6e8;
  border: 1px solid #e8d9b8;
  border-radius: 6px;
  padding: 18px 22px;
  line-height: 2.1;
}
.handwrite .sign { display: block; margin-top: 8px; text-align: right; color: #8a6f52; }

/* ===== 隐藏页提示 ===== */
.secret-note {
  margin: 30px 54px;
  padding: 14px 20px;
  background: #fdf6e8;
  border: 1px dashed #d9c69a;
  border-radius: 6px;
  font-size: 13px;
  color: #7a6437;
}

/* ===== 页脚 ===== */
.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 40px 54px 12px;
  background: #e9eef5;
  border-top: 1px solid var(--line);
}
.footer-main h4 { margin: 0 0 12px; font-size: 13px; color: var(--blue); letter-spacing: .08em; }
.footer-main p { margin: 0 0 8px; font-size: 12px; color: #5a6b7c; line-height: 1.9; }
.footer-main a { display: block; margin: 5px 0; color: #5a6b7c; text-decoration: none; font-size: 12px; }
.footer-main a:hover { color: var(--blue); }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 42px;
  background: var(--blue);
  color: #d8e6f2;
  font-size: 12px;
}
.site-footer strong { color: #fff; letter-spacing: .1em; }

/* ===== 明显关键词：黑色加粗 ===== */
b.kw { font-weight: 700; }

/* ===== 图片位（无图时显示占位框） ===== */
.photo-grid { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 14px; margin: 18px 0; }
.photo-grid.wall { flex-wrap: wrap; }
.photo-grid .photo { max-width: 220px; min-width: 0; flex: 1 1 0; }
.photo-grid .photo.phone-shot { max-width: 180px; }
.photo { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.photo img { width: 100%; height: auto; display: block; cursor: zoom-in; }
.photo.empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 2px dashed #c3cfdb;
  background: #f7fafd;
  font-size: 13px;
  color: #9aa6b1;
  cursor: default;
}
.photo.empty::after { content: attr(data-label); }
.photo.empty img { display: none; }
.photo figcaption { padding: 8px 12px; font-size: 12px; color: var(--muted); background: #f7fafd; }

/* ===== 图片灯箱 ===== */
.lbox {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: none;
  place-items: center;
  background: #0e2433e6;
  padding: 30px;
  cursor: zoom-out;
}
.lbox.open { display: grid; }
.lbox img {
  max-width: calc(100vw - 60px);
  max-height: calc(100vh - 60px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px #0009;
}

/* ===== 回到顶部 ===== */
.back-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 8px 20px #16354f44;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 16px; }
  .photo-grid { flex-direction: column; align-items: center; }
  .omnibox { width: 260px; }
}
@media (max-width: 760px) {
  .site-top-inner, .site-header, .main-nav, .page-band, .section-head,
  .tbl-wrap, .entry-list, .search-results, .footer-main, .grid-3, .grid-4, .grid-5,
  .two-col, .banner, .secret-note, .handwrite, .prose-band { padding-left: 20px; padding-right: 20px; }
  .site-top-inner { flex-wrap: wrap; }
  .site-header { display: flex; flex-direction: column; align-items: stretch; }
  .omnibox { width: 100%; }
  .omnibox-input { font-size: 16px; } /* 防 iOS 聚焦自动缩放 */
  .main-nav { overflow-x: auto; }
  .main-nav a { white-space: nowrap; padding: 10px 13px; }
  .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .tbl { min-width: 560px; } /* 宽表保持合理列宽，容器内横向滚动 */
  .banner { padding-top: 44px; padding-bottom: 44px; flex-direction: column; align-items: stretch; }
  .banner h1 { font-size: 26px; }
  .banner .photo { width: 100%; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stat { border-top: 1px solid var(--line); }
  .notice-strip { margin: 24px 20px 0; align-items: flex-start; flex-direction: column; }
  .site-footer { flex-wrap: wrap; }
  .site-footer strong { width: 100%; }
}
