@font-face {
  font-family: 'SC Heavy';
  src: local('Source Han Sans SC Heavy');
  font-display: swap;
  font-weight: 900;
}

:root {
  --portal-red: #a71918;
  --portal-deep: #8d1716;
  --portal-soft: #f7f2ef;
  --portal-ink: #333;
  --portal-muted: #777;
  --portal-line: #e7ded9;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-width: 1200px;
  min-height: 100vh;
  overflow-x: visible;
  background: #fff;
  color: var(--portal-ink);
  font-family: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.4; }
.portal-container { width: 1200px; max-width: 100%; margin: 0 auto; }

/* ===== Header ===== */
.portal-header { position: relative; z-index: 30; width: 100%; min-width: 1200px; background: #fff; }
.portal-topbar { display: flex; align-items: center; justify-content: space-between; width: 1200px; height: 147px; margin: 0 auto; }
.portal-brand { width: 609px; min-width: 420px; flex: 0 1 609px; cursor: pointer; }
.portal-brand img { width: 100%; max-width: 368px; height: auto; }
.portal-header-tools { display: flex; align-items: center; gap: 104px; }

.portal-search {
  height: 42px; min-width: 300px; max-width: 510px; flex: 1 1 510px;
  padding: 0 16px; display: flex; align-items: center;
  border: 1px solid #e8e8e8; border-radius: 8px; background: #fff;
}
.portal-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #555; font-size: 16px; }
.portal-search input::placeholder { color: #b4b4b4; }
.portal-search-icon {
  width: 21px; height: 21px; flex: 0 0 21px; padding: 0;
  border: 2px solid var(--portal-red); border-radius: 50%; background: transparent;
  position: relative;
}
.portal-search-icon::after {
  content: ""; position: absolute; right: -7px; bottom: 0;
  width: 10px; height: 2px; background: var(--portal-red);
  transform: rotate(48deg); transform-origin: left center;
}

.site-group-wrap { position: static; }
.site-group {
  width: 160px; height: 45px; padding: 0 25px;
  display: flex; align-items: center; justify-content: center; gap: 15px;
  border: 0; border-radius: 8px;
  background: var(--portal-red); color: #fff; font-size: 16px;
  white-space: nowrap; cursor: pointer;
}
.site-group-icon { width: 20px; height: 20px; flex: 0 0 28px; object-fit: contain; }

.site-group-panel {
  position: absolute; z-index: 50; top: 200px; right: 5%;
  width: 42%; max-height: calc(100vh - 240px); padding: 19px 0 23px;
  overflow-y: auto; background: rgba(255,255,255,.98);
  box-shadow: 0 12px 20px rgba(38,28,25,.14);
  visibility: hidden; opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.site-group-wrap:hover .site-group-panel,
.site-group-wrap:focus-within .site-group-panel,
.site-group-wrap.is-open .site-group-panel {
  visibility: visible; opacity: 1; pointer-events: auto;
  transform: translateY(0); transition-delay: 0s;
}
.site-group-panel__content { width: calc(100% - 48px); margin: 0 auto; color: #3e3e3e; }
.site-group-panel h2 { margin: 0 0 13px; color: #292929; font-size: 17px; font-weight: 600; line-height: 1.25; }
.site-group-section { margin: 0 0 15px; }
.site-group-section:last-child { margin-bottom: 0; }
.site-group-section header { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.site-group-section h3 { margin: 0; color: #292929; font-size: 16px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.site-group-section header i { display: block; flex: 1; height: 1px; background: #cfcfcf; }
.site-group-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px 20px; }
/* a = 已配置外链；span = 后台未配置 url 的兜底展示（不产生空 href），样式保持一致 */
.site-group-links a, .site-group-links span { overflow: hidden; color: #4b4b4b; font-size: 14px; line-height: 1.3; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.site-group-links a:hover, .site-group-links a:focus-visible { outline: 0; color: var(--portal-red); }

/* ===== Navigation ===== */
.portal-nav { height: 66px; min-width: 1200px; background: var(--portal-red); color: #fff; }
.portal-nav-inner { height: 100%; display: flex; align-items: stretch; width: 1200px; margin: 0 auto; }
.portal-nav a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 0 16px; color: #fff; font-size: 18px; font-weight: 400;
  text-decoration: none; white-space: nowrap; position: relative;
  transition: background .2s ease;
}
.portal-nav a:hover, .portal-nav a.active { background: rgba(101, 0, 0, .2); }
.portal-nav a.active::after {
  content: ""; position: absolute; bottom: 0; left: 50%;
  width: 34px; height: 4px; background: #f7d9b1; transform: translateX(-50%);
}

/* ===== Inner Banner ===== */
.portal-inner-banner {
  min-width: 1200px; height: 350px; position: relative; overflow: hidden;
  background-position: center 50%; background-repeat: no-repeat; background-size: cover;
}
.portal-inner-banner__shade { position: absolute; inset: 0; background: rgba(22,15,12,.1); }
.portal-inner-banner__content {
  position: absolute; left: 50%; bottom: 40px; z-index: 2;
  color: #fff; width: 1200px; max-width: none; transform: translateX(-50%);
}
/* 详情页的 Banner 标题降级为 h2（H1 让给文章标题），样式保持一致 */
.portal-inner-banner__content h1,
.portal-inner-banner__content h2 { margin: 0; font-size: 24px; font-weight: 400; line-height: 35px; }
.portal-inner-banner__subtitle { margin: 20px 0 0; font-size: 16px; line-height: 1; opacity: .9; }

/* ===== Section Title ===== */
.section-title {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; margin-bottom: 35px;
}
.section-title i { display: block; width: 109px; height: 1px; background: #777; }
.section-title h1,
.section-title h2 { margin: 0; color: #222; font-size: 20px; font-weight: 600; line-height: 1.45; }

/* ===== Tabs ===== */
.portal-tabs {
  display: flex; justify-content: center; gap: 18px; margin-bottom: 36px;
}
.portal-tabs button {
  min-width: 106px; height: 36px; padding: 0 16px;
  border: 1px solid #ddd; background: #fff; color: #777; font-size: 14px; cursor: pointer;
}
.portal-tabs button.active { border-color: #a72a23; background: #a72a23; color: #fff; }

/* ===== Article List Row ===== */
.article-list-row {
  min-height: 194px; display: grid;
  grid-template-columns: 321px minmax(0, 1fr) 120px;
  gap: 24px; align-items: center; padding: 22px 18px;
  margin-bottom: 12px; border: 1px solid #ededed; background: #fff;
}
.article-list-row__image { width: 321px; height: 150px; object-fit: cover; }
.article-list-row__body { min-width: 0; align-self: stretch; position: relative; padding: 1px 0 34px; }
.article-list-row__body h2 {
  margin: 0 0 18px; color: #333; font-size: 16px; font-weight: 700;
  line-height: 23px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.article-list-row__category {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  font-size: 12px; font-weight: 400; line-height: 1; border-radius: 2px; white-space: nowrap; flex-shrink: 0;
}
.article-list-row__category--news { background: #eef3ff; color: #3b6cff; }
.article-list-row__category--notice { background: #fff5e6; color: #e68a00; }
.article-list-row__category--admissions { background: #eef3ff; color: #3b6cff; }
.article-list-row__category--recruitment { background: #fff5e6; color: #e68a00; }
.article-list-row__category--teachers { background: #eef3ff; color: #3b6cff; }
.article-list-row__category--research { background: #fff5e6; color: #e68a00; }
.article-list-row__body p {
  display: -webkit-box; margin: 0; color: #666; font-size: 12px;
  line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.article-list-row__more {
  position: absolute; right: 0; bottom: 0;
  width: 94px; height: 32px; display: inline-flex;
  align-items: center; justify-content: center;
  background: #a72a23; color: #fff; font-size: 13px;
}
.article-list-row__date {
  align-self: stretch; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-left: 1px solid #f0f0f0; color: #222;
}
.article-list-row__date b { font-size: 34px; font-weight: 400; line-height: 1; }
.article-list-row__date span { margin-top: 10px; font-size: 16px; line-height: 1; }

/* ===== Pagination ===== */
.portal-pagination {
  display: flex; justify-content: center; gap: 10px; margin-top: 48px;
}
.portal-pagination button {
  width: 36px; height: 36px; padding: 0;
  border: 1px solid #dedede; background: #fff; color: #777;
  font-size: 15px; line-height: 1; cursor: pointer;
}
.portal-pagination button.active { border-color: #a72a23; background: #a72a23; color: #fff; }
.portal-pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ===== Article Detail ===== */
.article-detail-layout {
  width: 876px; max-width: 100%; margin: 0 auto; padding-top: 46px;
}
.article-detail-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #eee;
}
.article-detail-back {
  padding: 6px 16px; border: 1px solid #ddd; background: #fff;
  color: #555; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.article-detail-back:hover { border-color: #a72a23; color: #a72a23; }
.article-detail-meta { display: flex; align-items: center; gap: 24px; color: #999; font-size: 14px; line-height: 1; }
.article-detail-font-size { display: inline-flex; align-items: center; gap: 6px; color: #999; font-size: 14px; }
.article-detail-font-size button {
  padding: 2px 10px; border: 1px solid #ddd; background: #fff;
  color: #666; font-size: 13px; cursor: pointer; line-height: 1.6;
}
.article-detail-font-size button:hover:not(:disabled) { border-color: #a72a23; color: #a72a23; }
.article-detail-font-size button.active { border-color: #a72a23; background: #a72a23; color: #fff; }
.article-detail-font-size button:disabled { opacity: 0.4; cursor: not-allowed; }
.article-detail-content { width: 100%; color: #222; }
.article-detail-header { margin: 0 0 30px; text-align: center; }
.article-detail-title-row {
  display: grid; grid-template-columns: 109px auto 109px;
  align-items: center; justify-content: center; gap: 44px;
}
.article-detail-title-row i { width: 109px; height: 1px; background: #777; }
.article-detail-content h1 { margin: 0; color: #222; font-size: 32px; font-weight: 600; line-height: 1.45; }
.article-detail-content p {
  margin: 16px 0 24px; color: #292929; line-height: 1.8;
  text-align: justify; text-indent: 2em;
}
.article-detail-content p:last-child { margin-bottom: 0; }
.article-detail-html { color: #292929; line-height: 1.8; }
.article-detail-html img { display: block; width: 100%; max-width: 100%; height: auto; }

/* ===== Campus Grid ===== */
.campus-list__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 20px;
}
.campus-list__card { border: 1px solid #ececec; background: #fff; }
.campus-list__image {
  display: block; width: 100%; aspect-ratio: 257 / 197;
  height: auto; overflow: hidden; background: #ddd;
}
.campus-list__image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .25s ease;
}
.campus-list__card:hover .campus-list__image img { transform: scale(1.04); }
.campus-list__body {
  height: 82px; padding: 17px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.campus-list__body h3 { margin: 0 0 9px; color: #333; font-size: 16px; font-weight: 500; line-height: 1; }
.campus-list__body p { margin: 0; color: #aaa; font-size: 12px; }
.campus-list__body > a {
  width: 27px; height: 27px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #c98a87; border-radius: 50%; color: #a72a23; font-size: 19px; line-height: 1;
}
.campus-list__body > a:hover { background: #a72a23; color: #fff; }

/* ===== Search ===== */
.portal-search-form { display: flex; width: 720px; height: 44px; margin: 0 auto 24px; border: 1px solid #ddd; }
.portal-search-form input { flex: 1; border: 0; padding: 0 14px; font-size: 14px; outline: 0; }
.portal-search-form button { width: 96px; border: 0; background: #a72a23; color: #fff; cursor: pointer; font-size: 14px; }
.portal-search-summary { margin: 0 0 20px; color: #888; font-size: 14px; }
.portal-search-row {
  display: grid; grid-template-columns: 193px minmax(0, 1fr) 100px;
  gap: 16px; align-items: center; min-height: 161px;
  padding: 14px 0; border-bottom: 1px solid #eee;
}
.portal-search-row__thumb { width: 193px; height: 125px; background: #f7f7f7; }
.portal-search-row__thumb img { width: 193px; height: 125px; object-fit: cover; }
.portal-search-row__body { min-width: 0; }
.portal-search-row__meta { display: flex; justify-content: space-between; margin-bottom: 7px; color: #999; font-size: 13px; }
.portal-search-row__meta span { color: #a42d2a; }
.portal-search-row h2 { margin: 0 0 10px; color: #333; font-size: 18px; line-height: 1.4; }
.portal-search-row p {
  display: -webkit-box; margin: 0 0 10px; color: #777; font-size: 14px;
  line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.portal-search-row > a {
  width: 100%; height: 32px; display: flex; align-items: center; justify-content: center;
  background: #a42d2a; color: #fff; font-size: 13px;
}

/* ===== Contact ===== */
.portal-contact-map { display: block; width: 100%; height: auto; aspect-ratio: 1807 / 524; object-fit: cover; }
.portal-contact-details { margin-top: 34px; color: #3c3c3c; font-size: 14px; line-height: 20px; }
.portal-contact-details p { margin: 0 0 17px; }
.portal-contact-details p:last-child { margin-bottom: 0; }

/* ===== Footer ===== */
.portal-footer {
  position: relative; min-width: 1200px; margin-top: 24px; overflow: hidden;
  padding: 0 0 26px; background: #9E120F; color: #fff;
}
.portal-footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 18%, rgba(255,255,255,.05), transparent 34%),
              radial-gradient(circle at 78% 18%, rgba(255,255,255,.04), transparent 28%);
}
.portal-footer .portal-container {
    width: 1200px;
    max-width: none;
    margin: 0 auto
}

.footer-main {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(450px, 1fr) 1px minmax(648px, 1fr);
  gap: 34px; align-items: flex-start; padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.footer-left { display: grid; grid-template-columns: 164px 1fr; gap: 22px; align-items: flex-start; }
.footer-logo-box {
  width: 164px; height: 164px; display: flex;
  align-items: center; justify-content: center; padding: 11px;
}
.footer-logo-box img { width: 100%; height: 100%; object-fit: cover; object-position: 8% center; }
.footer-about { padding-top: 4px; }
.footer-about h3 { margin: 0 0 16px; color: #fff; font-size: 22px; font-weight: 600; letter-spacing: 1px; }
.footer-lines p { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: #f9dfd7; font-size: 14px; line-height: 1.5; }
.footer-lines p:last-child { margin-bottom: 0; }
.footer-contact-icon { width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; filter: brightness(0) invert(1); opacity: .7; }
.footer-divider { width: 1px; height: 160px; align-self: center; justify-self: center; margin-top: 10px; background: rgba(255,255,255,.8); }
.footer-right { display: grid; grid-template-columns: repeat(4, 130px); gap: 14px; align-items: start; padding-top: 2px; }
.footer-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; text-align: center; }
.footer-qr-box {
  width: 130px; height: 130px; display: flex;
  align-items: center; justify-content: center; padding: 6px; background: #fff;
}
.footer-qr-image { width: 118px; height: 118px; object-fit: contain; }
.footer-qr small { color: #fff; font-size: 12px; letter-spacing: 1px; }
.footer-bottom {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 22px; padding-top: 16px; flex-wrap: wrap;
}
.footer-links { display: flex; align-items: center; gap: 14px; color: #f5d5cc; font-size: 13px; }
.footer-links a { color: #f5d5cc; }
.footer-copy { color: #f5d5cc; font-size: 13px; white-space: nowrap; }
.footer-copy a { color: #f5d5cc; text-decoration: underline; }

/* ===== Responsive: Tablet ===== */
@media (max-width: 1200px) {
  body, .portal-header, .portal-nav, .portal-footer { min-width: 0; }
  .portal-topbar { width: calc(100% - 40px); height: auto; min-height: 100px; padding: 16px 0; }
  .portal-brand { width: auto; min-width: 0; flex: 0 1 auto; max-width: 400px; }
  .portal-header-tools { gap: 24px; }
  .portal-search { min-width: 180px; max-width: 320px; }
  .portal-nav { min-width: 0; height: auto; min-height: 50px; }
  .portal-nav-inner { min-width: 0; overflow-x: auto; }
  .portal-nav a { font-size: 18px; padding: 0 10px; flex: 0 0 auto; }
  .portal-inner-banner { min-width: 0; }
  .portal-inner-banner__content { left: 0; transform: none; width: auto; padding: 0 20px; }
  .article-list-row { grid-template-columns: 220px minmax(0, 1fr) 100px; gap: 16px; }
  .article-list-row__image { width: 220px; height: 120px; }
  .article-detail-layout { width: 100%; padding: 16px 20px; }
  .campus-list__grid { grid-template-columns: repeat(2, 1fr); }
  .portal-search-form { width: 100%; max-width: 720px; }
  .portal-search-row { grid-template-columns: 150px minmax(0, 1fr) 90px; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-divider { display: none; }
  .footer-right { grid-template-columns: repeat(4, 120px); gap: 12px; justify-content: start; }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
  .portal-topbar { flex-wrap: wrap; gap: 10px; width: calc(100% - 24px); padding: 10px 0; min-height: 0; }
  .portal-brand { max-width: 60%; flex: 0 0 100%; }
  .portal-brand img { max-width: 280px; height: auto; }
  .portal-header-tools { flex: 1 1 100%; order: 3; gap: 10px; justify-content: stretch; }
  .portal-search { flex: 1; min-width: 0; max-width: none; height: 36px; padding: 0 12px; }
  .portal-search input { font-size: 14px; }
  .site-group-wrap { display: block; position: static; flex: 0 0 auto; }
  .site-group { width: auto; height: 36px; padding: 0 12px; font-size: 13px; gap: 8px; border-radius: 6px; }
  .site-group-icon { width: 18px; height: 18px; flex: 0 0 18px; }
  .site-group-panel { position: fixed; top: auto; left: 8px; right: 8px; width: auto; max-width: none; max-height: 60vh; border-radius: 10px; }
  .site-group-links { grid-template-columns: repeat(2, 1fr); gap: 6px 12px; }
  .site-group-links a, .site-group-links span { font-size: 13px; }
  .portal-nav { min-width: 0; width: 100%; overflow: hidden; height: auto; min-height: 0; }
  .portal-nav-inner { width: 100%; min-width: 0; flex-wrap: nowrap; overflow-x: visible; gap: 0; padding: 0; }
  .portal-nav a { flex: 1 1 0; min-width: 0; font-size: 13px; font-weight: 400; padding: 6px 2px; height: auto; line-height: 1.4; white-space: nowrap; border-radius: 0; text-align: center; }
  .portal-inner-banner { height: 200px; }
  .portal-inner-banner__content { left: 20px; bottom: 20px; padding: 0; }
  .portal-inner-banner__content h1 { font-size: 20px; }
  .portal-inner-banner__subtitle { margin-top: 12px; font-size: 14px; }
  .article-list-row { grid-template-columns: 1fr; min-height: auto; padding: 16px; }
  .article-list-row__image { width: 100%; height: auto; max-height: 200px; aspect-ratio: 16/9; }
  .article-list-row__date { flex-direction: row; gap: 8px; border-left: 0; border-top: 1px solid #f0f0f0; padding-top: 10px; justify-content: flex-start; }
  .article-list-row__date b { font-size: 20px; }
  .article-list-row__date span { margin-top: 0; font-size: 13px; }
  .article-detail-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .article-detail-back { align-self: flex-start; }
  .article-detail-meta { flex-wrap: wrap; gap: 10px 16px; justify-content: center; }
  .article-detail-title-row { grid-template-columns: 30px auto 30px; gap: 12px; }
  .article-detail-title-row i { width: 30px; }
  .article-detail-content h1 { font-size: 22px; }
  .campus-list__grid { grid-template-columns: 1fr; }
  .portal-search-form { height: 38px; }
  .portal-search-row { grid-template-columns: 1fr; min-height: auto; }
  .portal-search-row__thumb { width: 100%; height: auto; max-height: 200px; }
  .portal-search-row__thumb img { width: 100%; height: auto; }
  .portal-footer { min-width: 0; padding: 0 12px 16px; }
  .portal-footer .portal-container { width: 100%; }
  .footer-main { grid-template-columns: 1fr; gap: 16px; padding: 16px 0; }
  .footer-left { grid-template-columns: 1fr; }
  .footer-logo-box { width: 100px; height: 100px; }
  .footer-about h3 { font-size: 18px; margin-bottom: 12px; }
  .footer-lines p { font-size: 13px; }
  .footer-right { grid-template-columns: repeat(2, 1fr); gap: 12px; justify-content: stretch; }
  .footer-qr-box { width: 100px; height: 100px; }
  .footer-qr-image { width: 88px; height: 88px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .footer-copy { white-space: normal; font-size: 12px; }
}

/* ===== Responsive: Small Mobile ===== */
@media (max-width: 480px) {
  .portal-nav a { font-size: 11px; padding: 5px 0; }
  .campus-list__grid { grid-template-columns: 1fr; }
  .footer-right {
	  grid-template-columns: 1fr 1fr !important;
  }
}
