@charset "utf-8";

/* ===== 模块：导航栏 + 首屏轮播图（来源：cs.pku my） ===== */
.site-header {
    position: relative;
    z-index: 20;
    height: 1.2rem;
    background: #f7f7f3 url("../images/banner/navigation-header-bg.svg") center / cover no-repeat;
    border-bottom: 2px solid #045ea2;
}

.site-header.fixed {
    position: sticky;
    top: 0;
    height: 1rem;
}

.site-header.fixed .site-logo {
    width: clamp(3.8rem, 32vw, 5.8rem);
}

/* 固定导航时 logo 缩小，右侧预留同步收紧，保持与常态一致的留白 */
.site-header.fixed .site-header__right {
    width: calc(100% - 6.4rem);
}

.site-header.fixed .desktop-nav > ul > li {
    height: .5rem;
}

.site-header__inner {
    width: min(16rem, calc(100% - .6rem));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: block;
    width: clamp(4.2rem, 34vw, 6.2rem);
    flex: 0 0 auto;
}

.site-header .site-logo {
    transform: translateY(.03rem);
}

.site-header:not(.fixed) .site-logo {
    transform: translateY(.03rem) translateX(-.2rem);
}



.site-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.site-header__right {
    position: relative;
    display: flex;
    width: calc(100% - 6.8rem);
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
}

.site-header__tools {
    position: relative;
    display: flex;
    min-height: .38rem;
    align-items: center;
    justify-content: flex-end;
    gap: .12rem;
    color: #999;
    font-size: .17rem;
}

.header-tool-link {
    line-height: 1;
    transition: color .2s;
}

.header-tool-link:hover,
.header-tool-link:focus {
    color: #045ea2;
}

.header-separator {
    color: #aaa;
}

.wechat-tool {
    position: relative;
    display: flex;
    align-items: center;
}

.mail-tool {
    position: relative;
    display: inline-flex;
    width: .3rem;
    height: .3rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mail-tool::after {
    position: absolute;
    top: calc(100% + .1rem);
    left: 50%;
    z-index: 50;
    padding: .05rem .12rem;
    background: #fff;
    color: #555;
    font-size: .14rem;
    line-height: 1.4;
    white-space: nowrap;
    content: "学院信箱";
    box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
    opacity: 0;
    transform: translateX(-50%) translateY(.08rem);
    transition: .2s;
    visibility: hidden;
    pointer-events: none;
}

.mail-tool:hover::after,
.mail-tool:focus-within::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

.mail-tool img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.wechat-toggle,
.nav-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.wechat-toggle {
    width: .3rem;
    height: .3rem;
}

.wechat-toggle img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.wechat-qr {
    position: absolute;
    top: calc(100% + .12rem);
    right: -.5rem;
    z-index: 50;
    width: 1.8rem;
    padding: .1rem;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(.08rem);
    transition: .2s;
    visibility: hidden;
}

.site-header__tools .wechat-tool:hover .wechat-qr,
.site-header__tools .wechat-tool:focus-within .wechat-qr,
.site-header__tools .wechat-tool.is-open .wechat-qr {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.wechat-qr img {
    display: block;
    width: 100%;
    height: auto;
}

.wechat-caption {
    display: block;
    padding-top: .08rem;
    color: #555;
    font-size: .12rem;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
}

.nav-search {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    align-self: flex-start;
    margin-top: .05rem;
    margin-left: .3rem;
}

.nav-search input {
    position: absolute;
    top: calc(100% + .12rem);
    right: 0;
    z-index: 60;
    width: min(2.6rem, calc(100vw - .6rem));
    padding: .08rem .12rem;
    border: 1px solid #e3e3e3;
    border-radius: .06rem;
    outline: 0;
    color: #333;
    font: inherit;
    font-size: .2rem;
    line-height: 1.4;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .14);
    opacity: 0;
    transform: translateY(.08rem);
    transition: opacity .2s ease, transform .2s ease, border-color .2s;
    pointer-events: none;
    visibility: hidden;
}

.nav-search.open input {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.nav-search.open input:focus {
    border-color: #045ea2;
}

.nav-search button {
    width: .36rem;
    height: .36rem;
    color: #045ea2;
}

.nav-search button svg {
    width: .3rem;
    height: .3rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.desktop-nav {
    display: flex;
    align-self: flex-end;
    align-items: center;
    width: 100%;
}

.desktop-nav > ul {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: .08rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.desktop-nav > ul > li {
    position: relative;
    height: .65rem;
    flex: 0 0 auto;
    margin: 0;
}

.desktop-nav > ul > li > a {
    position: relative;
    z-index: 2;
    display: block;
    height: 100%;
    line-height: .46rem;
}

.desktop-nav .h3 {
    position: relative;
    height: 100%;
    color: #333;
    font-size: .2rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color .3s;
}

.desktop-nav .h3::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    margin-left: 0;
    background: #045ea2;
    content: "";
    opacity: 0;
    visibility: hidden;
    transition: .4s;
}

.desktop-nav > ul > li:hover .h3::after,
.desktop-nav > ul > li:focus-within .h3::after {
    width: .34rem;
    margin-left: -.17rem;
    opacity: 1;
    visibility: visible;
}

.desktop-nav .sub {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 30;
    width: max-content;
    min-width: 1.7rem;
    max-width: min(3.2rem, 90vw);
    background: #fff;
    box-shadow: 0 0 40px rgba(0, 0, 0, .12);
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
    transform-origin: top;
    transition: .25s;
    visibility: hidden;
}

.desktop-nav > ul > li:hover .sub,
.desktop-nav > ul > li:focus-within .sub {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
    visibility: visible;
}

.desktop-nav .sub .box {
    padding: 0;
    text-align: center;
}

.desktop-nav .sub a {
    display: block;
    white-space: nowrap;
    padding: .12rem .1rem;
    color: #666;
    font-size: .16rem;
    line-height: 1.5;
    transition: .25s;
}

.desktop-nav .sub a:hover,
.desktop-nav .sub a:focus {
    color: #fff;
    background: #045ea2;
}

.mobile-header,
.mobile-nav,
.nav-mask {
    display: none;
}

.banner_box {
    position: relative;
    z-index: 1;
    padding: 0;
}

/* 大轮播左右箭头：无底色，仅白色细箭头 */
.banner-arrow {
    position: absolute;
    top: 50%;
    z-index: 60;
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.9;
    transform: translateY(-50%);
    transition: opacity 0.25s, transform 0.25s;
}

.banner-arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.12);
}

.banner-arrow.prev {
    left: 0;
}

.banner-arrow.next {
    right: 0;
}

.banner-arrow svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: #fff;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.35));
}

.banner-arrow.next svg {
    transform: rotate(180deg);
}

@media (max-width: 767px) {
    .banner-arrow {
        width: 40px;
        height: 40px;
    }

    .banner-arrow.prev {
        left: 0.6rem;
    }

    .banner-arrow.next {
        right: 0.6rem;
    }

    .banner-arrow svg {
        width: 26px;
        height: 26px;
    }
}

.banner_b {
    position: absolute;
    right: 0;
    bottom: 1.1rem;
    left: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner_b .swiper-pagination {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 .1rem 0 0;
}

.banner_b .swiper-pagination button {
    position: relative;
    display: flex;
    width: .54rem;
    height: .54rem;
    align-items: center;
    justify-content: center;
    margin: 0 -.05rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: transparent;
    font: inherit;
    font-size: .18rem;
    cursor: pointer;
    transition: 1s;
}

.banner_b .swiper-pagination button::before {
    position: absolute;
    inset: 0;
    background: url("../images/banner/banner_ico.png") center / auto 100% no-repeat;
    content: "";
    opacity: 0;
    animation: banner-spin 15s linear infinite;
}

.banner_b .swiper-pagination button::after {
    position: absolute;
    top: 50%;
    left: 120%;
    width: 0;
    height: 1px;
    background: #fff;
    content: "";
    opacity: 0;
    transition: 1s;
}

.banner_b .swiper-pagination button.active {
    margin-right: .6rem;
}

.banner_b .swiper-pagination button.active::before {
    opacity: 1;
}

.banner_b .swiper-pagination button.active::after {
    width: .5rem;
    opacity: 1;
}

.more0 svg {
    width: .24rem;
    height: .24rem;
    fill: #fff;
    transform: translateY(1px);
}

.banner {
    height: calc(100vh - 1.2rem);
    overflow: hidden;
}

.banner .swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 1s ease;
}

.banner .swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
}

.banner .swiper-slide .a {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.banner .swiper-slide .img {
    position: absolute;
    inset: 0;
    overflow: hidden;
    transform: scale(1.12);
    transition: transform 6s;
}

.banner .swiper-slide .img_hezi {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1) !important;
}

.banner .swiper-slide-active .img {
    transform: scale(1);
}

.banner .swiper-slide .img > img {
    display: none;
}

.banner .swiper-slide .img video.banner-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

/* 视频幻灯片取消 ken burns 放大，避免裁剪底部字幕 */
.banner .swiper-slide.slide-video {
    background: #0b1a2b;
}

.banner .swiper-slide.slide-video .img,
.banner .swiper-slide.slide-video.swiper-slide-active .img {
    transform: none;
}

.banner .swiper-slide .top {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.banner .swiper-slide .top .wp {
    width: min(16rem, calc(100% - .6rem));
    margin: 0 auto;
}

.banner .swiper-slide .top .box {
    width: 10.26rem;
    max-width: 100%;
    padding: .6rem .6rem 1.5rem;
    background: url("../images/banner/banner_bg.png") center / 100% 100% no-repeat;
    transform: translateY(.5rem);
    transition: 1s;
}

.banner .swiper-slide .top h3 {
    width: 7.8rem;
    max-width: 100%;
    margin: 0 0 .25rem;
    color: #fff;
    font-size: .4rem;
    line-height: 1.5;
    text-shadow: 0 4px 4px rgba(40, 0, 3, .8);
}

.banner .swiper-slide-active .top .box {
    transform: translateY(0);
}

.banner .txt1 span {
    display: inline-block;
    margin: 0 .5px;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(-16px);
    transition: 500ms;
}

.banner.on .swiper-slide-active .txt1 span {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* ===== 视频轮播：标题白色文字置于左下角（字幕上方），不遮挡视频底部字幕 ===== */
.banner .swiper-slide.slide-video .top {
    align-items: flex-end;
    justify-content: flex-start;
}

.banner .swiper-slide.slide-video .top .wp {
    width: 100%;
    margin: 0;
    padding: 0 0 1.8rem .6rem;
}

.banner .swiper-slide.slide-video .top .box {
    width: auto;
    max-width: 92%;
    padding: 0;
    background: none;
    transform: none;
}

.banner .swiper-slide.slide-video .top h3 {
    width: auto;
    max-width: 100%;
    margin: 0;
    color: #fff;
    font-size: .36rem;
    line-height: 1.45;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
}

@keyframes banner-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1199px) {
    .site-header {
        display: none;
    }

    .mobile-header {
        position: relative;
        z-index: 1000;
        display: flex;
        height: .7rem;
        align-items: center;
        justify-content: space-between;
        padding-left: 15px;
        background: #f9f6f1;
        box-shadow: 0 3px 5px rgba(0, 0, 0, .05);
    }

    .mobile-header .site-logo {
        width: min(5rem, 80vw);
    }

    .nav-toggle {
        position: relative;
        z-index: 2;
        display: flex;
        width: .85rem;
        min-width: .85rem;
        height: .7rem;
        align-items: center;
        justify-content: center;
        border: 0;
        background: #045ea2;
        cursor: pointer;
    }

    .nav-toggle span,
    .nav-toggle span::before,
    .nav-toggle span::after {
        position: absolute;
        display: block;
        width: .34rem;
        height: 2px;
        background: #fff;
        content: "";
        transition: .3s;
    }

    .nav-toggle span::before {
        top: -8px;
    }

    .nav-toggle span::after {
        top: 8px;
    }

    .nav-toggle[aria-expanded="true"] span {
        background: transparent;
    }

    .nav-toggle[aria-expanded="true"] span::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .mobile-nav {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 999;
        display: block;
        width: min(100%, 520px);
        height: 100vh;
        padding: 55px 20px 30px;
        overflow-y: auto;
        color: #fff;
        background: #045ea2;
        opacity: 0;
        pointer-events: none;
        transform: translateX(105%);
        transition: .3s ease-out;
        visibility: hidden;
    }

    .mobile-nav.act {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
        visibility: visible;
    }

    .mobile-nav__close {
        position: absolute;
        top: 7px;
        right: 15px;
        border: 0;
        color: #fff;
        background: none;
        font-size: 30px;
        cursor: pointer;
    }

    .list_box_nav_mobile {
        width: 100%;
        margin: 0;
        padding: 0 0 10px;
        list-style: none;
    }

    .list_box_nav_mobile > li {
        position: relative;
        width: 100%;
        margin: 0 auto;
        overflow: hidden;
    }

    .list_box_nav_mobile > li .con {
        position: relative;
    }

    .list_box_nav_mobile > li .a {
        display: flex;
        width: 100%;
        min-height: .6rem;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, .15);
        color: rgba(255, 255, 255, .8);
        font-size: .18rem;
        transition: .3s;
    }

    .list_box_nav_mobile > li .expand {
        position: absolute;
        top: 0;
        right: 0;
        width: .64rem;
        height: .64rem;
        border: 0;
        background: url("../images/banner/arrow_down.svg") center / 15px 15px no-repeat;
        cursor: pointer;
        transform: rotate(0);
        transition: transform .2s;
    }

    .list_box_nav_mobile > li.on1 .expand {
        transform: rotate(-90deg);
    }

    .list_box_nav_mobile > li .list {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
    }

    .list_box_nav_mobile > li .list[hidden] {
        display: none;
    }

    .list_box_nav_mobile > li .list a {
        display: block;
        color: rgba(255, 255, 255, .6);
        font-size: 13px;
        line-height: 2.5;
    }

    .nav-mask {
        position: fixed;
        inset: 0;
        z-index: 998;
        display: block;
        background: rgba(0, 0, 0, .4);
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s;
    }

    .nav-mask.act {
        opacity: 1;
        pointer-events: auto;
    }

    .banner {
        height: calc(100vh - .7rem);
    }

    .banner .swiper-slide .img_hezi {
        padding-bottom: 50%;
    }
}

@media (max-width: 991px) {
    .banner .swiper-slide .top h3 {
        font-size: .3rem;
    }

    .banner .swiper-slide .top .box {
        padding: .3rem;
    }

    .banner .swiper-slide.slide-video .top h3 {
        font-size: .28rem;
    }

    .banner .swiper-slide.slide-video .top .wp {
        padding: .4rem 0 0 .4rem;
    }

    .banner_b {
        bottom: .04rem;
    }
}

@media (max-width: 767px) {
    .banner .swiper-slide .top h3 {
        margin-bottom: .1rem;
        font-size: .2rem;
    }

    .banner .swiper-slide .top .box {
        height: auto;
        padding: .3rem;
    }

    .banner .swiper-slide.slide-video .top h3 {
        font-size: .2rem;
    }

    .banner .swiper-slide.slide-video .top .wp {
        padding: .3rem 0 0 .3rem;
    }

    .banner .swiper-slide .img_hezi {
        padding-bottom: 60%;
    }
}
