/* 首页正文独立样式：按 1920px 设计画布排版，不改公共头部和内页样式。 */
.home-page main .section-heading h2::after { margin-top: 5px; }
.home-page main .section-heading p { margin-top: 6px; line-height: 28px; }
.home-page main .section-heading .more-link { margin-top: 30px; }
.home-page main .more-link { position: relative; border-right: 0; width: 120px; }
.home-page main .more-link::after { position: absolute; top: 0; left: 122px; width: 4px; height: 30px; content: ""; background: var(--orange); }

/* 学院新闻：恢复左侧标题、书法装饰及 820×480 主图的位置。 */
.home-page .news { min-height: 1060px; padding: 100px 0 91px; }
.home-page .news .page-width { position: relative; width: 1620px; margin: 0 auto; }
/* 覆盖旧版桌面新闻区的左偏移，让标题、卡片与新稿统一从 150px 起排。 */
html.is-pc .home-page .news .page-width { margin: 0 auto; }
.home-page .news-calligraphy { position: absolute; top: 164px; left: 50px; width: 140px; height: 350px; }
/* 主新闻以整块区域承接当前标题链接，图片、摘要和留白均可点击；不重复维护新闻地址。 */
.home-page .featured-news { position: relative; grid-template-columns: 554px 820px; height: 520px; transition: transform .25s ease, box-shadow .25s ease; }
.home-page .featured-copy { position: static; }
.home-page .featured-slide h3 a::after { position: absolute; inset: 0; z-index: 1; content: ""; }
/* 悬停或键盘聚焦时轻微上浮、显示柔和阴影，并同步强调当前新闻标题。 */
.home-page .featured-news:hover, .home-page .featured-news:focus-within { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(22, 92, 145, .12); }
.home-page .featured-news:hover .featured-slide.active h3 a, .home-page .featured-news:focus-within .featured-slide.active h3 a { color: var(--blue); }
.home-page .featured-slide h3 a:focus-visible::after { outline: 2px solid var(--blue); outline-offset: 3px; }
.home-page .featured-copy h3 { height: 60px; margin: 80px 0 30px; font-size: 18px; line-height: 30px; }
.home-page .featured-copy p { color: #999; line-height: 28px; -webkit-line-clamp: 4; }
/* 页码置于整块链接上层，保证切换新闻时不会触发详情跳转。 */
.home-page .news-pager { left: 40px; bottom: 40px; z-index: 2; height: 30px; }
/* 尊重系统减少动态效果的设置，保留阴影和标题颜色反馈。 */
@media (prefers-reduced-motion: reduce) {
  .home-page .featured-news { transition: none; }
  .home-page .featured-news:hover, .home-page .featured-news:focus-within { transform: none; }
}
.home-page .news-grid { margin-top: 60px; gap: 86px; }
.home-page .news-card-copy h3 { margin-top: 15px; }

/* 两个列表栏目共用横向标题栏，按钮右侧预留橙色装饰条的位置。 */
.home-page main .home-list-heading { position: relative; }
.home-page main .home-list-heading .more-link { position: absolute; top: 0; right: 6px; margin-top: 0; }
.home-page main .home-list-heading .more-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* 通知公告：与学术动态统一为 1620px，三列两行保留固定的日期和正文间距。 */
.home-page .notice { width: 1620px; padding-top: 60px; }
.home-page .notice-grid { column-gap: 90px; }
.home-page .notice-item { height: 120px; padding-right: 38px; grid-template-columns: 89px minmax(0, 1fr); }
.home-page .notice-item h3 a::after { position: absolute; inset: 0; content: ""; }
.home-page .notice-item h3 a:focus-visible { outline: none; }
.home-page .notice-item h3 a:focus-visible::after { outline: 2px solid var(--blue); outline-offset: 3px; }

/* 学术动态：整区曲线、建筑线稿及卡片均使用 Figma 原图。 */
.home-page .academic { width: 100%; padding: 60px 0; background: url("../images/home-academic-curves.png") center bottom / 1920px 360px no-repeat; }
.home-page .academic-top { position: relative; grid-template-columns: 800px 1fr; gap: 0; height: 340px; margin-top: 40px; }
.home-page .academic-building { position: absolute; right: -150px; bottom: 0; width: 970px; height: 340px; max-width: none; pointer-events: none; }
.home-page .academic-event { position: relative; display: block; min-width: 0; height: 500px; background-position: center; background-size: 100% 100%; }
.home-page .academic-event-featured { height: 340px; background-image: url("../images/home-academic-compact-featured.jpg"); }
.home-page .academic-event-02 { background-image: url("../images/home-academic-compact-card-02.jpg"); }
.home-page .academic-event-03 { background-image: url("../images/home-academic-compact-card-03.jpg"); }
.home-page .academic-event-04 { background-image: url("../images/home-academic-compact-card-04.png"); }
.home-page .academic-event-05 { background-image: url("../images/home-academic-compact-card-05.jpg"); }
.home-page .academic-event-copy { padding: 160px 20px 0 30px; }
.home-page .academic-event-featured .academic-event-copy { padding: 60px 30px 0 170px; }
/* 固定标题行数，避免长标题挤占下方会议信息；首张一行，其余两行。 */
.home-page .academic-event h3 { display: -webkit-box; height: 80px; margin: 0; overflow: hidden; font-size: 20px; font-weight: 400; line-height: 40px; text-overflow: ellipsis; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.home-page .academic-event-featured h3 { height: 40px; -webkit-line-clamp: 1; }
/* 会议信息分为两列：左侧固定宽度放图标，右侧放一段完整文案。 */
.home-page .academic-details { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 20px; margin: 66px 0 0; color: #999; font-size: 16px; line-height: 45px; }
/* 左列三个图标按文案行高纵向排列，与右列文案独立。 */
.home-page .academic-details-icons { display: grid; grid-auto-rows: 45px; place-items: center; align-self: start; }
.home-page .academic-details-icons img { width: 28px; height: 28px; }
/* 右列只维护一段文本，保留输入的三行换行，过长内容自动折行。 */
.home-page .academic-details-text { min-width: 0; margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.home-page .academic-details::before { position: absolute; top: -36px; left: 0; width: calc(100% - 10px); height: 4px; content: ""; background: linear-gradient(90deg, var(--blue), transparent); }
.home-page .academic-event-featured .academic-details { margin-top: 56px; }
.home-page .academic-event-featured .academic-details::before { width: calc(100% + 30px); }
.home-page .academic-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; height: 500px; margin-top: 40px; }

/* 学术动态首次入屏：首张从左、建筑图从右、其余四张从下方渐显，时长放慢至 2 秒。 */
.home-page .academic .academic-reveal { opacity: 0; transform: translateY(60px); transition: opacity 2s ease, transform 2s cubic-bezier(.22, 1, .36, 1); }
.home-page .academic .academic-event-featured.academic-reveal { transform: translateX(-100px); }
.home-page .academic .academic-building.academic-reveal { transform: translateX(100px); }
.home-page .academic .academic-reveal.is-visible { opacity: 1; transform: none; }
/* 键盘聚焦时直接展示卡片，避免焦点进入尚未滚动显示的内容。 */
.home-page .academic .academic-reveal:focus-visible { opacity: 1; transform: none; }

/* 卡片激活态仅替换背景，不将页脚下方的参考画面追加到页面。 */
.home-page .academic-event-featured:hover, .home-page .academic-event-featured:focus-visible { background-image: url("../images/home-academic-compact-featured-hover.jpg"); }
.home-page .academic-event-02:hover, .home-page .academic-event-02:focus-visible { background-image: url("../images/home-academic-compact-card-02-hover.jpg"); }
.home-page .academic-event-03:hover, .home-page .academic-event-03:focus-visible { background-image: url("../images/home-academic-compact-card-03-hover.jpg"); }
.home-page .academic-event-04:hover, .home-page .academic-event-04:focus-visible { background-image: url("../images/home-academic-compact-card-04-hover.png"); }
.home-page .academic-event-05:hover, .home-page .academic-event-05:focus-visible { background-image: url("../images/home-academic-compact-card-05-hover.jpg"); }
.home-page .academic-event:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* 实验室四栏：当前平台展开为 960px，其他平台保留 320px 的原图裁切。 */
.home-page .laboratories { display: flex; margin-top: 0; }
.home-page .home-lab { position: relative; flex: 1; min-width: 0; height: 400px; overflow: hidden; color: #fff; background: center / cover no-repeat; transition: flex .35s ease; }
.home-page .home-lab-teaching { background-image: url("../images/home-laboratory-teaching-small.png"); }
.home-page .home-lab-ministry { background-image: url("../images/home-laboratory-ministry-small.png"); }
.home-page .home-lab-hunan { background-image: url("../images/home-laboratory-hunan-small.png"); }
.home-page .home-lab-packaging { background-image: url("../images/home-laboratory-packaging-small.png"); }
.home-page .home-lab::before { position: absolute; inset: 0; content: ""; background: rgba(22, 92, 145, .85); }
.home-page .home-lab.is-active { flex: 3; }
.home-page .home-lab.is-active::before { background: rgba(0, 0, 0, .5); }
.home-page .home-lab-teaching.is-active { background-image: url("../images/home-laboratory-teaching.png"); }
.home-page .home-lab-ministry.is-active { background-image: url("../images/home-laboratory-ministry.png"); }
.home-page .home-lab-hunan.is-active { background-image: url("../images/home-laboratory-hunan.png"); }
.home-page .home-lab-packaging.is-active { background-image: url("../images/home-laboratory-packaging.png"); }
.home-page .home-lab-compact { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; line-height: 34px; text-align: center; }
.home-page .home-lab-details { position: relative; width: 960px; height: 100%; padding: 60px; visibility: hidden; opacity: 0; }
.home-page .home-lab-details h2 { margin: 0; font-size: 24px; font-weight: 400; line-height: 34px; }
.home-page .home-lab-details .more-link { margin-top: 20px; }
.home-page .home-lab.is-active .home-lab-details { visibility: visible; opacity: 1; }
/* 激活后仅隐藏紧凑标题的视觉，保留键盘焦点，避免展开时焦点丢失。 */
.home-page .home-lab.is-active .home-lab-compact { opacity: 0; pointer-events: none; }
.home-page .home-lab:focus-within { outline: 2px solid var(--orange); outline-offset: -2px; }
.home-page .laboratory-stats { margin-top: 95px; }
.home-page .laboratory-stats strong { font-size: 50px; line-height: 70px; }
.home-page .laboratory-stats small { font-size: 18px; }
.home-page .departments > a { transition: color .2s ease, background .2s ease; }

/* 关于我们：设计稿统计项保持四列两行及 50px 数值层级。 */
.home-page .about-stats { margin-top: 58px; row-gap: 60px; }
.home-page .about-stats strong { font-size: 50px; }
.home-page .about-stats small { font-size: 18px; }
.home-page .about .section-heading h2::after { background: var(--blue); }

/* 首页页脚统一沿用 footer.css 的公共样式，桌面端和手机端均不单独覆盖。 */

/* 手机端由公共设备函数切换：各栏目纵向排布，正文按可读字号展示。 */
html.is-mobile .home-page .news { min-height: 0; padding: 56px 0; }
html.is-mobile .home-page .news .page-width, html.is-mobile .home-page .notice { width: calc(100% - 32px); margin: 0 auto; }
html.is-mobile .home-page .news-calligraphy { display: none; }
html.is-mobile .home-page main .section-heading .more-link { margin-top: 22px; }
html.is-mobile .home-page main .home-list-heading .more-link { margin-top: 0; }
html.is-mobile .home-page .featured-news { height: auto; }
html.is-mobile .home-page .featured-copy h3 { height: auto; max-height: 60px; margin: 18px 0 12px; }
/* 手机端页码与纵向文字区域左侧对齐，继续独立响应点击。 */
html.is-mobile .home-page .news-pager { left: 0; bottom: 4px; }
html.is-mobile .home-page .news-grid { margin-top: 42px; }
html.is-mobile .home-page .notice { padding-top: 56px; }
html.is-mobile .home-page .notice-item { grid-template-columns: 72px minmax(0, 1fr); height: auto; padding-right: 14px; }
html.is-mobile .home-page .academic { padding: 56px 0; background-size: auto 360px; }
html.is-mobile .home-page .academic-top { display: flex; flex-direction: column; height: auto; margin-top: 28px; }
html.is-mobile .home-page .academic-building { display: none; }
html.is-mobile .home-page .academic-event { height: auto; min-height: 450px; border-radius: 12px; }
html.is-mobile .home-page .academic-event-featured { min-height: 390px; }
html.is-mobile .home-page .academic-event-copy { padding: 140px 20px 36px; }
html.is-mobile .home-page .academic-event-featured .academic-event-copy { padding: 52px 18px 36px 78px; }
/* 移动端沿用首张两行、其余三行的省略规则，高度按 32px 行高限制。 */
html.is-mobile .home-page .academic-event h3 { height: auto; max-height: 96px; font-size: 20px; line-height: 32px; -webkit-line-clamp: 3; }
html.is-mobile .home-page .academic-event-featured h3 { max-height: 64px; -webkit-line-clamp: 2; }
/* 移动端保留图标与文案两列，缩小图标、列间距和行高。 */
html.is-mobile .home-page .academic-details, html.is-mobile .home-page .academic-event-featured .academic-details { grid-template-columns: 24px minmax(0, 1fr); gap: 10px; margin-top: 50px; font-size: 14px; line-height: 40px; }
html.is-mobile .home-page .academic-details-icons { grid-auto-rows: 40px; }
html.is-mobile .home-page .academic-details-icons img { width: 24px; height: 24px; }
html.is-mobile .home-page .academic-details::before { top: -26px; }
html.is-mobile .home-page .academic-grid { display: grid; grid-template-columns: 1fr; height: auto; margin-top: 24px; gap: 24px; }

/* 触屏不依赖悬停：四个实验平台直接展示，各自使用设计稿展开背景。 */
html.is-mobile .home-page .laboratories { display: block; margin-top: 0; }
html.is-mobile .home-page .home-lab { height: auto; min-height: 230px; }
html.is-mobile .home-page .home-lab-teaching { background-image: url("../images/home-laboratory-teaching.png"); }
html.is-mobile .home-page .home-lab-ministry { background-image: url("../images/home-laboratory-ministry.png"); }
html.is-mobile .home-page .home-lab-hunan { background-image: url("../images/home-laboratory-hunan.png"); }
html.is-mobile .home-page .home-lab-packaging { background-image: url("../images/home-laboratory-packaging.png"); }
html.is-mobile .home-page .home-lab::before { background: rgba(0, 0, 0, .5); }
html.is-mobile .home-page .home-lab-compact { display: none; }
html.is-mobile .home-page .home-lab-details { width: 100%; height: auto; padding: 42px 20px; visibility: visible; opacity: 1; }
html.is-mobile .home-page .home-lab-details h2 { font-size: 20px; line-height: 30px; }
html.is-mobile .home-page .laboratory-stats { margin-top: 60px; }
html.is-mobile .home-page .laboratory-stats strong { font-size: 38px; line-height: 56px; }
html.is-mobile .home-page .about-stats { row-gap: 28px; }
html.is-mobile .home-page .about-stats strong { font-size: 30px; }

/* 减少动态效果的系统偏好下，学术内容直接展示，实验平台直接切换宽度。 */
@media (prefers-reduced-motion: reduce) {
  .home-page .academic .academic-reveal { opacity: 1; transform: none; transition: none; }
  .home-page .notice-item, .home-page .notice-item::before { transition: none; }
  .home-page .home-lab { transition: none; }
}
