/* 门户 Thymeleaf 页面补充样式：汇总旧静态页里的内联样式，并兼容服务端渲染使用的链接型 Tab / 分页 */

/* ===== 内页 Banner 左下角装饰遮罩（对齐 Vue 版 PortalInnerBanner 的 __art 层） ===== */
.portal-inner-banner__art {
  position: absolute; left: 180px; bottom: 0; height: 140px;
  z-index: 1; pointer-events: none;
}
.portal-inner-banner__art img {
  position: absolute; bottom: 0; height: 100%; width: auto; max-width: none;
}
.portal-inner-banner__solid { left: 0; z-index: 1; }
.portal-inner-banner__gradient { left: 66px; z-index: 2; }
@media (max-width: 768px) { .portal-inner-banner__art { display: none; } }

/* ===== 思源宋体（Source Han Serif SC / Noto Serif SC）=====
   系统没装该字体时会退化成 SimSun，所以这里用 @font-face 真正加载字体文件。
   字体文件放置位置：ruoyi-admin/src/main/resources/static/portal-assets/fonts/SourceHanSerifSC-Heavy.woff2
   （思源宋体为 SIL OFL 开源字体，可直接自签分发；建议按首屏用到的字做子集化，体积可从十几 MB 降到几十 KB） */
@font-face {
  font-family: "SourceHanSerifSC";
  src: local("Source Han Serif SC Heavy"),
       local("Noto Serif SC Black"),
       url("/portal-assets/fonts/SourceHanSerifSC-Heavy.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap; /* 字体加载期间先用后备字体渲染，避免首屏空白 */
}

/* ===== 首页轮播标题：已从 <h1> 改为 <p>，样式需与 index.css 里 h1 完全一致 ===== */
/* 说明：index.css 有 .portal-home-hero-copy p{color:#3e3938;font-size:34px}（那是 slogan 的样式），
        会命中改用 p 的轮播标题，所以这里必须显式覆盖 color 与 font-size。 */
.portal-home-hero-copy .portal-home-hero-title {
  margin: 0 0 32px;
  font-family: "SourceHanSerifSC", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
  font-size: 110px; font-weight: 900; line-height: 1.33;
  color: #971a18; /* 与 index.css 里 .portal-home-hero-copy 的主色一致（原来是 h1 继承来的） */
  text-shadow: 0 2px 2px rgba(255, 255, 255, .65); /* 与 index.css 里 h1 的投影一致 */
}
.portal-home-hero-copy .portal-home-hero-title b { display: inline-block; transform: translateX(98px); }

/* 无障碍隐藏：内容对屏幕阅读器与搜索引擎可见，但不占视觉空间。
   用于首页承载品牌全称的 H1（轮播文案不占用 H1）。 */
.portal-sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 1200px) {
  .portal-home-hero-copy .portal-home-hero-title { font-size: 60px; }
  .portal-home-hero-copy .portal-home-hero-title b { transform: translateX(50px); }
}
@media (max-width: 768px) {
  .portal-home-hero-copy .portal-home-hero-title { font-size: 36px; margin-bottom: 12px; }
  .portal-home-hero-copy .portal-home-hero-title b { transform: translateX(20px); }
}
@media (max-width: 480px) {
  .portal-home-hero-copy .portal-home-hero-title { font-size: 28px; }
  .portal-home-hero-copy .portal-home-hero-title b { transform: translateX(10px); }
}

/* ===== 列表页通用容器 ===== */
.portal-section-page { background: #fff; padding-bottom: 128px; }
.portal-section-container { width: 1200px; max-width: 100%; margin: 0 auto; padding-top: 55px; }
@media (max-width: 1200px) { .portal-section-container { width: auto; padding: 24px 20px; } }
@media (max-width: 768px) { .portal-section-container { padding: 24px 12px; } }

/* Tab 与分页改用 a 标签（无 JS 也可翻页），继承原 button 样式 */
.portal-tabs a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 106px; height: 36px; padding: 0 16px;
  border: 1px solid #ddd; background: #fff; color: #777;
  font-size: 14px; line-height: 1; text-decoration: none;
}
.portal-tabs a:hover { border-color: #a72a23; color: #a72a23; }
.portal-tabs a.active { border-color: #a72a23; background: #a72a23; color: #fff; }

.portal-pagination a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid #dedede; background: #fff; color: #777;
  font-size: 15px; line-height: 1; text-decoration: none;
}
.portal-pagination a.active { border-color: #a72a23; background: #a72a23; color: #fff; }
.portal-pagination .is-disabled { opacity: .4; pointer-events: none; }
.portal-pagination a.is-nav { width: auto; min-width: 36px; padding: 0 10px; }

.portal-empty { text-align: center; color: #999; padding: 40px 0; }

/* ===== 校园风采 ===== */
.portal-campus-page { background: #fff; padding-bottom: 90px; }
.campus-showcase { width: 1200px; max-width: 100%; margin: 0 auto; padding-top: 55px; }
@media (max-width: 1200px) { .campus-showcase { width: auto; padding: 24px 20px; } }
@media (max-width: 768px) { .campus-showcase { padding: 24px 12px; } }

/* ===== 学校概况 ===== */
.about-page { background: #fff; color: #222; padding-bottom: 84px; }
.about-profile { width: 1200px; margin: 0 auto; padding-top: 46px; }
.about-profile-title { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 36px; }
.about-profile-title i { display: block; width: 109px; height: 1px; background: #555; }
.about-profile-title h1,
.about-profile-title h2 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1; }
.article-box { color: #000; }
.about-profile-copy { margin: 22px 0; font-size: 16px; line-height: 1.75; text-align: left; color: #222; }
.about-profile-copy p { margin: 0 0 12px; }
.about-profile-image { display: block; width: 100%; height: auto; margin: 20px 0; border-radius: 8px; }
@media (max-width: 1200px) { .about-profile { width: auto; padding: 24px 20px; } }
@media (max-width: 768px) { .about-profile { padding: 24px 12px; } .about-profile-title h1, .about-profile-title h2 { font-size: 17px; } .about-profile-title i { width: 40px; } }

/* ===== 联系我们 ===== */
.portal-contact-page { background: #fff; }
.portal-contact-content { width: 1200px; max-width: 100%; margin: 46px auto; }
.portal-contact-heading {
  display: grid; grid-template-columns: 109px auto 109px;
  align-items: center; justify-content: center; column-gap: 44px; margin: 0 0 40px;
}
.portal-contact-heading i { display: block; width: 109px; height: 1px; background: #a42d2a; }
.portal-contact-heading h1,
.portal-contact-heading h2 { margin: 0; color: #111; font-size: 20px; font-weight: 600; line-height: 1.45; }
@media (max-width: 1200px) { .portal-contact-content { width: auto; padding: 20px; } }
@media (max-width: 768px) {
  .portal-contact-content { padding: 20px 12px; }
  .portal-contact-heading { grid-template-columns: 1fr; text-align: center; }
  .portal-contact-heading i { display: none; }
  .portal-contact-details p { white-space: normal; }
}

/* ===== 站内搜索 ===== */
.portal-search-page { background: #fff; padding-bottom: 90px; }
.portal-search-main { width: 1200px; max-width: 100%; margin: 46px auto; padding: 0 20px; }
.portal-search-heading {
  display: grid; grid-template-columns: 109px auto 109px;
  align-items: center; justify-content: center; column-gap: 44px; margin: 0 0 40px;
}
.portal-search-heading i { display: block; width: 109px; height: 1px; background: #a42d2a; }
.portal-search-heading h1,
.portal-search-heading h2 { margin: 0; color: #111; font-size: 20px; font-weight: 600; line-height: 1.45; }
@media (max-width: 1200px) { .portal-search-main { width: auto; } }
@media (max-width: 768px) {
  .portal-search-main { padding: 0 12px; }
  .portal-search-heading { grid-template-columns: 1fr; text-align: center; }
  .portal-search-heading i { display: none; }
}

/* ===== 内容不存在 ===== */
.portal-notfound { background: #fff; padding: 90px 0 120px; text-align: center; }
.portal-notfound h1 { margin: 0 0 16px; font-size: 22px; color: #333; }
.portal-notfound p { margin: 0 0 28px; color: #888; }
.portal-notfound a { color: #a42d2a; }
/* 404 页：错误码、搜索框与推荐入口 */
.portal-notfound__code { margin: 0 0 8px; font-size: 90px; line-height: 1; font-weight: 900; letter-spacing: 4px; color: #971a18; }
.portal-notfound__desc { font-size: 15px; line-height: 1.8; }
.portal-notfound__search { display: flex; gap: 8px; max-width: 460px; margin: 0 auto 28px; }
.portal-notfound__search input { flex: 1; height: 42px; padding: 0 14px; font-size: 14px; border: 1px solid #ddd; border-radius: 4px; }
.portal-notfound__search button { height: 42px; padding: 0 22px; border: 0; border-radius: 4px; background: #971a18; color: #fff; font-size: 14px; cursor: pointer; }
.portal-notfound__links { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: center; }
.portal-notfound__links a { font-size: 15px; text-decoration: none; }
.portal-notfound__links a:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .portal-notfound__code { font-size: 64px; }
  .portal-notfound__search { flex-direction: column; }
}
