@charset "utf-8";
/* 学院二级网站：学院入口页、学院主页、专业详情页 公共样式
   依赖 /css/pagedetail/public.css、/css/pagedetail/the_new.css 提供的公共头部与底部样式 */

body {
    background-color: #eef1f5;
    color: #333;
    font-size: 14px;
}

/* 公共头部已抽到 /header.html（由 /js/header.js 注入），样式不再写在这里。
   头部在文档流里占位：logo 行 120px + 吸顶导航条 53px + 边框 ≈ 177px */

.xy-container {
    width: 1260px;
    margin: 0 auto;
    /* 头部已占位，这里只留一点点间距 */
    padding: 16px 0 40px 0;
}

.xy-section {
    background-color: #fff;
    padding: 24px;
    margin-bottom: 20px;
}

/* 顶部横幅图：与学院简介页用同一张图，宽度跟内容区对齐、按原比例显示 */
.xy-top-ad {
    width: 1260px;
    margin: 12px auto 0 auto;
}

.xy-top-ad img {
    display: block;
    width: 100%;
    /* 按需求固定 300px 高（宽度撑满内容区，图会被纵向压一点） */
    height: 300px;
}

.xy-section-title {
    position: relative;
    font-size: 22px;
    color: #1c1436;
    line-height: 34px;
    padding-left: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e6eaf0;
}

.xy-section-title:before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 5px;
    height: 22px;
    background-color: #a32c25;
}

/* 统一空状态与图片占位，容器尺寸保持不变，避免加载前后布局跳动 */
.xy-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: #98a2b3;
    font-size: 15px;
    background-color: #f7f8fa;
    border: 1px dashed #d9dee6;
    box-sizing: border-box;
    padding: 20px;
    text-align: center;
}

.xy-cover {
    position: relative;
    display: block;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    overflow: hidden;
    background-color: #f2f4f7;
}

.xy-cover img {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xy-ph {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #98a2b3;
    font-size: 14px;
    background-color: #f2f4f7;
    border: 1px dashed #d9dee6;
    box-sizing: border-box;
}

/* ---------------- 学院入口页 ---------------- */
.xy-intro {
    text-align: center;
    padding: 10px 20px 24px 20px;
}

.xy-intro h1 {
    font-size: 30px;
    color: #1c1436;
    margin-bottom: 10px;
}

.xy-intro p {
    color: #5a6472;
    font-size: 15px;
    line-height: 26px;
}

.xy-college-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.xy-college-card {
    display: block;
    color: #333;
    border: 1px solid #e6eaf0;
    transition: box-shadow .2s, transform .2s;
}

.xy-college-card:hover {
    box-shadow: 0 6px 18px rgba(28, 20, 54, .12);
    transform: translateY(-2px);
}

.xy-college-card .xy-card-body {
    padding: 16px;
}

.xy-college-card h3 {
    font-size: 20px;
    color: #1c1436;
    margin-bottom: 8px;
}

.xy-college-card .xy-slogan {
    color: #a32c25;
    font-size: 14px;
    line-height: 22px;
    margin-bottom: 8px;
}

.xy-college-card .xy-summary {
    color: #6b7280;
    font-size: 14px;
    line-height: 24px;
}

/* ---------------- 学院主页 ---------------- */
.xy-banner {
    position: relative;
    width: 100%;
    /* 横幅框按设计稿比例 2100:600（= 1260×360，即 3.5:1）：
       设计按 2100×600 出图后正好铺满；还没换图时 contain 完整显示原图，只留底色，不裁切 */
    aspect-ratio: 2100 / 600;
    overflow: hidden;
    background-color: #f2f4f7;
    margin-bottom: 20px;
}

.xy-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.xy-banner-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 40px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .6));
    color: #fff;
}

.xy-banner-mask h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.xy-banner-mask p {
    font-size: 16px;
    opacity: .92;
}

.xy-video {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    background-color: #f2f4f7;
    overflow: hidden;
}

.xy-video video,
.xy-video iframe {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.xy-video>.xy-empty,
.zy-carousel-stage>.xy-empty {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.xy-major-grid {
    display: grid;
    /* 学院主页「专业设置」：一行两个专业 */
    grid-template-columns: repeat(2, 1fr);
    /* 卡片高度各按自己的封面图走，矮的不会被同一行的高卡拉出空白 */
    align-items: start;
    gap: 20px;
}

/* 卡片只留封面图：图框高度跟着图片本身走，图片上下不留空白、也不裁边。
   .xy-cover 默认是「固定比例框 + 绝对定位图片 + object-fit:cover」，
   这里把图片放回文档流按原比例撑高 */
.xy-major-grid .xy-cover {
    height: auto;
    min-height: 160px;
    padding-top: 0;
}

.xy-major-grid .xy-cover img {
    position: static;
    height: auto;
    object-fit: contain;
}

/* 没有封面图时给个固定比例占位，卡片不会被压成一条线 */
.xy-major-grid .xy-cover.is-empty {
    padding-top: 40%;
}

.xy-major-card {
    display: block;
    color: #333;
    border: 1px solid #e6eaf0;
    transition: box-shadow .2s, transform .2s;
}

.xy-major-card:hover {
    box-shadow: 0 6px 18px rgba(28, 20, 54, .12);
    transform: translateY(-2px);
}

.xy-major-card .xy-card-body {
    padding: 14px 16px;
}

.xy-major-card h3 {
    font-size: 18px;
    color: #1c1436;
    margin-bottom: 8px;
}

.xy-major-tags span {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 2px 8px;
    font-size: 12px;
    color: #a32c25;
    background-color: #fdf1f0;
    border: 1px solid #f5d6d4;
    border-radius: 2px;
}

.xy-major-meta {
    color: #6b7280;
    font-size: 13px;
    line-height: 24px;
}

.xy-contact-list {
    display: grid;
    /* 前两项（咨询电话 / 院校代码）按内容宽度，剩下的都给学院地址，
       地址长也不会换行；窄屏另有两列/一列的断点 */
    grid-template-columns: auto auto 1fr;
    gap: 12px;
}

.xy-contact-list li {
    background-color: #f7f8fa;
    padding: 14px 16px;
    line-height: 24px;
}

.xy-contact-list .xy-contact-label {
    color: #6b7280;
}

/* ---------------- 专业详情页 ---------------- */
/* 专业名等信息并入左栏顶部 */

/* 左栏顶部的专业名条：深色底、白字居中，与参考站一致 */
.zy-anchor-head {
    border-bottom: 1px solid #e6eaf0;
}

.zy-anchor-head .zy-anchor-title {
    background-color: #23395d;
    padding: 26px 12px;
    text-align: center;
}

.zy-anchor-head .zy-anchor-title h1 {
    color: #fff;
    font-size: 24px;
    line-height: 1.4;
    margin: 0;
}

/* 左栏内的栏目链接容器 */
.zy-anchor-nav {
    padding: 2px 0;
}

/* 降级版式下的页头（栏目全部停用时） */
.zy-legacy-head {
    background-color: #fff;
    padding: 24px;
    margin-bottom: 20px;
}

.zy-legacy-head h1 {
    font-size: 30px;
    color: #1c1436;
    margin-bottom: 10px;
}

.zy-legacy-head .zy-back {
    display: inline-block;
    margin-top: 12px;
    color: #234670;
}

.zy-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
}

.zy-anchor {
    width: 240px;
    flex: none;
    background-color: #fff;
    position: sticky;
    /* 让开吸顶的公共导航条（53px + 2px 下边框），否则贴上边就被它盖住 */
    top: 65px;
    /* 顶部专业名条要贴边，左右不留白 */
    padding: 0;
    /* 栏目数较多时左侧导航可滚动，避免超出视口后无法点到后面的栏目 */
    max-height: calc(100vh - 75px);
    overflow-y: auto;
    min-height: 500px;
}

.zy-anchor a {
    display: block;
    padding: 12px 18px;
    color: #4e6989;
    font-size: 15px;
    border-left: 3px solid transparent;
}

.zy-anchor a.on {
    color: #a32c25;
    font-weight: bold;
    border-left-color: #a32c25;
    background-color: #f7f8fa;
}

.zy-content {
    flex: 1;
    min-width: 0;
}

.zy-block {
    background-color: #fff;
    padding: 24px;
    margin-bottom: 20px;
    min-height: 100px;
}

.zy-text {
    color: #4b5563;
    font-size: 15px;
    line-height: 30px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 富文本正文：后台编辑器产出的 HTML，直接渲染
   注意不能用 white-space: pre-wrap（对 HTML 无意义且会撑开空白） */
.xy-richtext {
    color: #4b5563;
    font-size: 15px;
    line-height: 30px;
    word-break: break-word;
    overflow-x: auto;
}

.xy-richtext p {
    margin: 0 0 12px 0;
}

.xy-richtext img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px auto;
}

.xy-richtext table {
    max-width: 100%;
    margin: 12px 0;
    border-collapse: collapse;
}

.xy-richtext th,
.xy-richtext td {
    border: 1px solid #e6eaf0;
    padding: 8px 10px;
}

.xy-richtext h1,
.xy-richtext h2,
.xy-richtext h3,
.xy-richtext h4 {
    margin: 16px 0 10px;
    color: #1c1436;
}

.xy-richtext ul,
.xy-richtext ol {
    margin: 0 0 12px 0;
    padding-left: 22px;
}

.xy-richtext blockquote {
    margin: 12px 0;
    padding: 8px 14px;
    border-left: 3px solid #a32c25;
    background-color: #f7f8fa;
}

.xy-richtext a {
    color: #a32c25;
}

/* 栏目全部停用或删除时的降级版式，不显示左侧导航 */
.xy-legacy {
    display: block;
}

.zy-course-group {
    border: 1px solid #e6eaf0;
    margin-bottom: 12px;
}

.zy-course-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    background-color: #f7f8fa;
    font-size: 16px;
    color: #1c1436;
}

.zy-course-body {
    padding: 8px 16px 16px 16px;
}

.zy-course-body.hide {
    display: none;
}

.zy-course-item {
    padding: 10px 0;
    border-bottom: 1px dashed #e6eaf0;
    line-height: 24px;
}

.zy-course-item:last-child {
    border-bottom: 0;
}

.zy-course-item .zy-course-name {
    font-size: 15px;
    color: #1c1436;
}

.zy-course-item .zy-course-intro {
    color: #6b7280;
    font-size: 13px;
}

.zy-carousel {
    position: relative;
    margin-top: 20px;
    background-color: #fff;
}

.zy-carousel-stage {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    background-color: #f2f4f7;
    overflow: hidden;
}

.zy-carousel-stage img,
.zy-carousel-stage video {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zy-carousel-stage .xy-ph {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.zy-carousel-title {
    padding: 10px 16px;
    color: #4b5563;
    font-size: 14px;
    min-height: 20px;
    border-top: 1px solid #e6eaf0;
}

.zy-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    color: #fff;
    background-color: rgba(28, 20, 54, .45);
    cursor: pointer;
    font-size: 22px;
    user-select: none;
}

.zy-carousel-btn.prev {
    left: 0;
}

.zy-carousel-btn.next {
    right: 0;
}

.zy-carousel-btn:hover {
    background-color: rgba(28, 20, 54, .7);
}

.zy-train-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 只有一条实训条件时占满整行；多条时保持每行最多两个 */
.zy-train-list.single {
    grid-template-columns: 1fr;
}

/* 实训条件图片固定高度 500px：覆盖 .xy-cover 默认的 16:9 比例撑高，
   单条铺满整行时不再被撑得过高；图片按 cover 裁切填满 */
.zy-train-item .xy-cover {
    height: 500px;
    padding-top: 0;
}

.zy-train-item h4 {
    font-size: 17px;
    color: #1c1436;
    margin: 12px 0 6px 0;
}

.zy-train-item p {
    color: #6b7280;
    font-size: 14px;
    line-height: 24px;
}

/* ---------------- 实训条件图片轮播 ---------------- */
/* 多张图片时每 3 秒自动切换，支持箭头、触屏滑动与鼠标按住拖动 */
.xy-gallery {
    position: relative;
}

.xy-gallery-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* 不显示横向滚动条：滑动靠触屏手势、鼠标拖动和左右箭头 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}

.xy-gallery-track::-webkit-scrollbar {
    display: none;
}

/* 拖动或落位期间临时关掉 snap，否则位置会被立刻吸回去跟手不了 */
.xy-gallery-track.dragging,
.xy-gallery-track.settling {
    scroll-snap-type: none;
}

.xy-gallery-track.dragging {
    cursor: grabbing;
    user-select: none;
}

.xy-gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
}

.xy-gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 52px;
    line-height: 52px;
    text-align: center;
    color: #fff;
    background-color: rgba(28, 20, 54, .45);
    border: 0;
    padding: 0;
    cursor: pointer;
    font-size: 18px;
    user-select: none;
}

.xy-gallery-btn:hover {
    background-color: rgba(28, 20, 54, .7);
}

.xy-gallery-btn.prev {
    left: 0;
}

.xy-gallery-btn.next {
    right: 0;
}

.xy-gallery-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    z-index: 3;
    text-align: center;
    pointer-events: none;
}

.xy-gallery-dots i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 3px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .6);
    box-shadow: 0 0 2px rgba(0, 0, 0, .35);
}

.xy-gallery-dots i.on {
    background-color: #fff;
}

.zy-partner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.zy-partner-item {
    /* border: 1px solid #e6eaf0; */
    padding: 12px;
    text-align: center;
}

/* 合作单位 logo 位：固定小高度 + object-fit:contain。
   logo 不是照片，用 .xy-cover 那套（4:3 框 + cover）会把 logo 裁掉边、而且撑得太大 */
.zy-partner-logo {
    position: relative;
    display: block;
    width: 100%;
    height: 90px;
    overflow: hidden;
    background-color: #fff;
}

.zy-partner-logo img {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 120%;
    /* 等比缩放到框内完整显示，不裁切 */
    object-fit: contain;
    /* 留一点内边距，logo 不贴边 */
    padding: 6px;
    box-sizing: border-box;
}

.zy-partner-item p {
    margin-top: 8px;
    color: #4b5563;
    font-size: 14px;
    line-height: 22px;
}

/* ---------------- 图片点击放大 ---------------- */
/* 添加了 .xy-zoomable 的小图可点击查看大图，遮罩由 xueyuan.js 的 xyZoom 按需创建 */
.xy-zoomable {
    cursor: zoom-in;
}

.xy-zoom {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 99999999;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
}

.xy-zoom img {
    display: block;
    max-width: 90%;
    max-height: 90%;
    background-color: #fff;
}

/* ---------------- 师资力量：教师卡片轮播 ---------------- */
/* 一位老师一张卡片，卡片占满正文列宽；多张时原生 scroll-snap 左右滚动 */
.zy-teacher-carousel {
    position: relative;
}

.zy-teacher-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* 不显示横向滚动条：滚轮滑不到，靠左右箭头和鼠标按住拖动切换 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.zy-teacher-track::-webkit-scrollbar {
    display: none;
}

/* 鼠标拖动进行中：临时关掉 snap，否则每挪一格就被吸回去跟手不了 */
.zy-teacher-track.dragging,
/* 松手后的平滑落位期间也要关着：snap 会立刻把位置抢吸回旧卡片，和落位滚动打架 */
.zy-teacher-track.settling {
    scroll-snap-type: none;
}

.zy-teacher-track.dragging {
    cursor: grabbing;
    user-select: none;
}

.zy-teacher-card {
    flex: 0 0 100%;
    width: 100%;
    min-height: 300px;
    box-sizing: border-box;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 53px;
    /* 与参考站一致的深蓝横向渐变 */
    background-image: linear-gradient(90deg, #31397b, #555c92);
    scroll-snap-align: start;
}

.zy-teacher-photo {
    position: relative;
    flex: none;
    width: 265px;
    height: 265px;
    overflow: hidden;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, .12);
}

.zy-teacher-photo img {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    /* 照片按原比例完整显示在方框里，不裁切（多余部分留卡片底色） */
    object-fit: cover;
}

/* 深色卡片上的图片占位改成浅色，避免整块灰底太突兀 */
.zy-teacher-photo .xy-ph {
    color: rgba(255, 255, 255, .72);
    background-color: rgba(255, 255, 255, .12);
    border: 0;
}

.zy-teacher-info {
    flex: 1;
    min-width: 0;
    color: #fff;
}

.zy-teacher-name {
    font-size: 26px;
    font-weight: bold;
    line-height: 1.3;
}

.zy-teacher-position {
    margin-top: 10px;
    color: #c6d4f0;
    font-size: 19px;
    font-weight: bold;
    line-height: 1.4;
}

.zy-teacher-intro {
    margin-top: 18px;
    color: #f2f5ff;
    font-size: 16px;
    line-height: 1.8;
}

/* 箭头：贴在卡片右侧（照片在左边，这样不会挡住人像），样式与课程媒体轮播一致 */
.zy-teacher-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    color: #fff;
    background-color: rgba(28, 20, 54, .45);
    border: 0;
    padding: 0;
    cursor: pointer;
    font-size: 22px;
    user-select: none;
}

.zy-teacher-btn.next {
    right: 0;
}

.zy-teacher-btn.prev {
    right: 40px;
}

.zy-teacher-btn:hover {
    background-color: rgba(28, 20, 54, .7);
}

.xy-loading {
    text-align: center;
    color: #98a2b3;
    padding: 40px 0;
}

/* ---------------- 专业介绍页 ---------------- */
/* 搜索框：右侧放大镜用 CSS 画，不额外引图片资源 */
.xy-major-search {
    position: relative;
    width: 460px;
    max-width: 100%;
    margin-bottom: 24px;
}

.xy-major-search input {
    width: 100%;
    height: 44px;
    padding: 0 56px 0 14px;
    box-sizing: border-box;
    border: 1px solid #dcdfe6;
    background-color: #fff;
    color: #333;
    font-size: 15px;
    outline: none;
}

.xy-major-search input:focus {
    border-color: #23395d;
}

.xy-major-search-icon {
    position: absolute;
    right: 0;
    top: 0;
    width: 52px;
    height: 44px;
    border-left: 1px solid #e6eaf0;
    pointer-events: none;
}

.xy-major-search-icon:before {
    content: "";
    position: absolute;
    left: 16px;
    top: 11px;
    width: 12px;
    height: 12px;
    border: 2px solid #6b7280;
    border-radius: 50%;
}

.xy-major-search-icon:after {
    content: "";
    position: absolute;
    left: 29px;
    top: 25px;
    width: 8px;
    height: 2px;
    background-color: #6b7280;
    transform: rotate(45deg);
}

.zy-major-group {
    margin-bottom: 36px;
}

.zy-major-group-title {
    position: relative;
    font-size: 26px;
    font-weight: bold;
    color: #1c1436;
    line-height: 40px;
    padding-left: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e6eaf0;
}

.zy-major-group-title:before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 26px;
    background-color: #a32c25;
}

.zy-major-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 24px;
}

.zy-major-card {
    display: block;
    background-color: #fff;
    border: 1px solid #e6eaf0;
    box-shadow: 0 2px 10px rgba(28, 20, 54, .06);
    transition: box-shadow .2s, transform .2s;
}

.zy-major-card:hover {
    box-shadow: 0 8px 22px rgba(28, 20, 54, .14);
    transform: translateY(-2px);
}

/* 整张卡片就是专业封面图：按原图比例撑高，不裁切 */
.zy-major-pic {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    background-color: #f2f4f7;
}

.zy-major-pic img {
    display: block;
    width: 100%;
    height: auto;
}

/* 没有封面图时用固定比例的占位块把卡片撑起来 */
.zy-major-pic.is-empty {
    padding-top: 40%;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1300px) {
    .xy-container {
        width: 100%;
        padding: 16px;
        box-sizing: border-box;
    }
}

@media (max-width: 1260px) {
    /* 头部与导航条的窄屏样式（横向滚动、二级面板整行展开）已随公共头部移到 /header.html */

    .xy-top-ad {
        width: auto;
        margin: 10px 10px 0 10px;
    }

    /* 窄屏按原比例缩放，避免压得太扁 */
    .xy-top-ad img {
        height: auto;
    }

    .footbox .in1260 {
        width: 100%;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .xy-college-grid,
    .xy-major-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 侧栏收窄，给正文让出更多宽度 */
    .zy-anchor {
        width: 180px;
    }
}

@media (max-width: 900px) {
    .xy-college-grid,
    .xy-major-grid,
    .xy-contact-list,
    .zy-train-list,
    .zy-partner-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 教师卡片改为上下排布，照片缩到 160px，否则窄屏下文字被挤成一列 */
    .zy-teacher-card {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        min-height: 0;
        text-align: center;
    }

    .zy-teacher-photo {
        width: 160px;
        height: 160px;
    }

    .zy-teacher-name {
        font-size: 22px;
    }

    .zy-teacher-position {
        margin-top: 6px;
        font-size: 17px;
    }

    .zy-teacher-intro {
        margin-top: 12px;
        font-size: 15px;
        text-align: left;
    }

    .zy-layout {
        flex-direction: column;
    }

    /* 专业介绍页：卡片本身较宽，窄屏下一行一张 */
    .zy-major-cards {
        grid-template-columns: 1fr;
    }

    /* 左栏改为整宽纵向排布：顶部专业名条保持通栏，仅栏目链接横向滚动 */
    .zy-anchor {
        position: static;
        width: 100%;
        padding: 0;
        margin-bottom: 12px;
        /* 横排后不再需要纵向滚动限制 */
        max-height: none;
        overflow: visible;
        /* 桌面端用来和右侧正文对齐的 min-height:500px 在整宽排布下会留一大块空白 */
        min-height: 0;
    }

    .zy-anchor-head .zy-anchor-title {
        padding: 18px 12px;
    }

    .zy-anchor-head .zy-anchor-title h1 {
        font-size: 20px;
    }

    /* 栏目链接横排滚动 */
    .zy-anchor-nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 6px 0;
    }

    .zy-anchor-nav a {
        display: inline-block;
        border-left: 0;
        border-bottom: 3px solid transparent;
        padding: 10px 14px;
    }

    .zy-anchor-nav a.on {
        border-left-color: transparent;
        border-bottom-color: #a32c25;
    }

    /* 窄屏下宽表格改为块级横向滚动，避免撑破内容区 */
    .xy-richtext table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 640px) {
    .xy-college-grid,
    .xy-major-grid,
    .xy-contact-list,
    .zy-train-list,
    .zy-partner-grid {
        grid-template-columns: 1fr;
    }

    .zy-major-group-title {
        font-size: 22px;
        line-height: 34px;
    }

    .xy-banner-mask {
        padding: 16px 20px;
    }

    .xy-banner-mask h1 {
        font-size: 24px;
    }

    .xy-section,
    .zy-block {
        padding: 16px;
    }

    .xy-richtext {
        font-size: 14px;
        line-height: 26px;
    }

    .xy-richtext h1,
    .xy-richtext h2,
    .xy-richtext h3,
    .xy-richtext h4 {
        font-size: 17px;
    }
}
