/* 手机端 / 窄屏自适应（≤768px），在 index.css 之后加载 */

@media screen and (max-width: 768px) {

    body.mobile-nav-open {
        overflow: hidden;
    }

    .w16 {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0.24rem;
        padding-right: 0.24rem;
        box-sizing: border-box;
    }
    .wp {
        width: 94%;
        max-width: 100%;
        margin: 0 auto;
    }
    /* —— 顶栏 —— */
    .top-header {
        padding: 0.12rem 0 0.14rem;
        position: sticky;
        top: 0;
        z-index: 10100;
    }

    .top-header .w16 {
        flex-wrap: nowrap;
        align-items: flex-end;
        gap: 0.06rem;
    }

    /**
     * 左侧：Logo + .logo-text（display:contents 仅让 h1 参与网格）。
     * 招生代码：<p> 使用 absolute，相对 .top-left 定位微调。
     */
    .top-left {
        flex: 1;
        min-width: 0;
        position: relative;
        padding-top: 0.3rem;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto;
        column-gap: 0.12rem;
        align-items: center;
        align-self: stretch;
    }

    .top-left > a:first-of-type {
        grid-column: 1;
        grid-row: 1;
        align-self: end;
        line-height: 0;
        -webkit-tap-highlight-color: transparent;
    }

    .logo-text {
        display: contents;
    }

    .logo-text h1 {
        margin: 0 !important;
        padding: 0 0 0.02rem 0.14rem !important;
        border-left: 0.015rem solid rgba(255, 255, 255, 0.55);
        font-size: 0.26rem !important;
        font-weight: 700;
        letter-spacing: 0.06rem !important;
        line-height: 1.08;
        color: #fff;
    }

    .logo-text p {
        position: absolute;
        top: 0;
        right: 0;
        left: auto;
        margin: 0 !important;
        padding: 0 !important;
        max-width: calc(100% - 0.08rem);
        font-size: 0.18rem !important;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.94);
        text-align: right;
        white-space: normal;
        word-break: break-all;
        z-index: 1;
    }

    .logo {
        width: auto !important;
        height: 0.48rem !important;
        max-width: 46vw;
        object-fit: contain;
        vertical-align: bottom;
        display: block;
    }

    .top-right {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        align-self: flex-start;
        margin-top: 0.26rem;
        width: 0.52rem;
        height: 0.52rem;
        padding: 0;
        border: none;
        background: transparent;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;

    }

    .mobile-menu-btn img {
        width: 0.34rem;
        height: auto;
        display: block;
        filter: brightness(0) invert(1);
    }

    /* —— 全屏遮罩 + 抽屉导航 —— */
    .mobile-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        top: 1.02rem;
        background: rgba(0, 0, 0, 0.48);
        z-index: 10090;
        -webkit-tap-highlight-color: transparent;
    }

    body.mobile-nav-open .mobile-nav-backdrop {
        display: block;
    }

    .main-nav {
        position: fixed !important;
        top: 1.02rem;
        right: 0;
        bottom: auto;
        height: calc(100vh - 1.02rem);
        max-height: calc(100dvh - 1.02rem);
        left: auto;
        width: 100%;
        max-width: 100%;
        z-index: 10095;
        margin: 0;
        padding: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        transition: transform 0.28s ease;

        border-top: none;
    }

    body.mobile-nav-open .main-nav {
        transform: translateX(0);
    }

    .main-nav .w16 {
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        padding: 0.28rem 0.2rem 0.4rem;
        width: 100% !important;
    }

    .main-nav .nav-separator {
        display: none !important;
    }

    .main-nav .nav-item-wrapper {
        width: 100%;
        border-bottom: 0.01rem solid rgba(255, 255, 255, 0.14);
    }

    .main-nav .nav-item {
        padding: 0.16rem 0.36rem 0.16rem 0.1rem;
        font-size: 0.18rem !important;
        position: relative;
        z-index: 2;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.12);
        touch-action: manipulation;
    }

    /* 有二级菜单的一级项：右侧小三角标识，展开时朝上 */
    .main-nav .nav-item-wrapper:has(.nav-submenu) > .nav-item {
        padding-right: 0.38rem;
    }

    .main-nav .nav-item-wrapper:has(.nav-submenu) > .nav-item::after {
        content: "";
        position: absolute;
        right: 0.12rem;
        top: 50%;
        width: 0.09rem;
        height: 0.09rem;
        margin-top: -0.05rem;
        border-right: 0.03rem solid rgba(255, 255, 255, 0.92);
        border-bottom: 0.03rem solid rgba(255, 255, 255, 0.92);
        transform: rotate(45deg);
        transition: transform 0.22s ease, margin-top 0.22s ease;
    }

    .main-nav .nav-item-wrapper.nav-submenu-open:has(.nav-submenu) > .nav-item::after {
        margin-top: 0.02rem;
        transform: rotate(225deg);
    }

    .main-nav .nav-submenu {
        position: relative !important;
        z-index: 0;
        transform: none !important;
        left: auto !important;
        min-width: 0 !important;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        /* 与主导航栏整体渐变一致 */
        background: linear-gradient(to right, #33428f 0%, #2fb4aa 100%) !important;
        display: none;
    }
.nav-item-wrapper:hover .nav-submenu{display:none;}
    .main-nav .nav-item-wrapper.nav-submenu-open > .nav-submenu {
        display: block;
    }

    .main-nav .nav-submenu li a {
        text-align: left;
        padding: 0.1rem 0.12rem;
        font-size: 0.16rem !important;
        white-space: normal;
    }

    /* 二级项之间轻分隔，仍保持底色为渐变叠亮 */
    .main-nav .nav-submenu li + li {
        border-top: 0.01rem solid rgba(255, 255, 255, 0.1);
    }

    /* —— Hero —— */
    .hero-swiper {
        height: 1.7rem !important;
    }

    .hero-swiper .swiper-slide {
        height: 1.7rem !important;
    }

    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev {
        display: none !important;
    }

    .hero-swiper .swiper-pagination {
        display: none !important;
        bottom: 0.14rem !important;
    }

    .fixed-book-tag {
        width: 1.38rem !important;
        height: 0.66rem !important;
        padding-left: 0.28rem !important;
        bottom: 8% !important;
    }

    .fixed-book-icon {
        width: 0.48rem !important;
    }

    .fixed-book-year,
    .fixed-book-title {
        font-size: 0.16rem !important;
    }

    /* —— 四个入口 —— */
    .info-boxes {
        margin-top: -0.28rem;
    }

    .info-boxes .w16 {
        flex-wrap: wrap;
        gap: 0.14rem !important;
        justify-content: space-between !important;
    }

    .info-boxes .info-box {
        flex: 0 0 calc(50% - 0.07rem);
        max-width: calc(50% - 0.07rem);
        height: auto !important;
        padding: 0.14rem 0.12rem;
        border-radius: 0.14rem;
        border-width: 0.03rem;
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.12rem;
        text-align: left;
    }

    .info-box img {
        height: 0.38rem !important;
        flex-shrink: 0;
    }

    .info-box h3 {
        font-size: 0.16rem !important;
        margin-bottom: 0.04rem !important;
    }

    .info-box p {
        font-size: 0.11rem !important;
    }

    /* —— 招生动态 / 政策 —— */
    .news-policy {
        padding: 0.28rem 0 0.36rem;
    }

    .news-policy .w16 {
        flex-direction: column !important;
        gap: 0.36rem !important;
    }

    .news-section,
    .policy-section {
        width: 100% !important;
    }

    .section-header {
        margin-bottom: 0.14rem;
        padding-bottom: 0.08rem;
    }

    .title-text h3 {
        font-size: 0.28rem !important;
    }

    .title-sub .char-dongtai {
        font-size: 0.17rem !important;
    }

    .news-item {
        padding: 0.12rem 0 0.14rem;
    }

    .news-title {
        font-size: 0.17rem !important;
        line-height: 1.55;
    }

    .date {
        font-size: 0.15rem !important;
    }

    .policy-item {
        margin-bottom: 0.14rem !important;
    }

    .policy-tag {
        width: 0.66rem !important;
        height: 0.38rem !important;
        font-size: 0.22rem !important;
    }

    .policy-date {
        width: 0.66rem !important;
        height: 0.26rem !important;
        font-size: 0.14rem !important;
        line-height: 1 !important;
    }

    .policy-right {
        height: auto !important;
        min-height: 0.64rem;
        padding-left: 0.12rem !important;
        width: auto !important;
        min-width: 0 !important;
        flex: 1 !important;
    }

    .policy-title {
        font-size: 0.17rem !important;
    }

    .policy-desc {
        font-size: 0.15rem !important;
    }

    /* —— 院系专业：纵向手风琴 —— */
    .departments{
        background-size: auto;
    }


    .departments .section-title-center {
        padding-left: 0;
        padding-right: 0;
        justify-content: flex-start;
    }

    .departments .body {
        height: auto !important;
        margin-top: 0.2rem !important;
        padding: 0.12rem !important;
    }

    #deptAccordion.dept-accordion {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        gap: 0.1rem !important;
        overflow: visible !important;
    }

    #deptAccordion.dept-accordion.transitioning .dept-accordion-item .dept-acc-tab {
        pointer-events: auto !important;
    }

    #deptAccordion .dept-accordion-item {
        width: 100% !important;
        flex: none !important;
        height: auto !important;
        flex-direction: column !important;
        transition: none !important;
        overflow: visible !important;
    }

    #deptAccordion .dept-acc-tab {
        flex: none !important;
        width: 100% !important;
        height: auto !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 0.14rem 0.16rem !important;
        box-sizing: border-box;
    }

    #deptAccordion .dept-acc-tab h3 {
        writing-mode: horizontal-tb !important;
        -webkit-writing-mode: horizontal-tb !important;
        white-space: normal !important;
        line-height: 1.45 !important;
        font-size: 0.18rem !important;
        text-align: left;
        flex: 1;
        min-width: 0;
    }

    #deptAccordion .dept-acc-icon {
        margin-bottom: 0 !important;
        margin-right: 0.12rem !important;
        width: 0.32rem !important;
        height: 0.32rem !important;
    }

    #deptAccordion .dept-acc-panel {
        flex: none !important;
        width: 100% !important;
        height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        transition: none !important;
        display: none !important;
        overflow: visible !important;
    }

    #deptAccordion .dept-accordion-item.active .dept-acc-panel {
        display: block !important;
    }

    #deptAccordion .dept-acc-panel-inner {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        padding: 0.1rem 0.16rem 0.18rem 0.16rem !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        box-sizing: border-box;
    }

    #deptAccordion .dept-acc-panel-inner p {
        display: block !important;
        -webkit-line-clamp: unset !important;
        font-size: 0.16rem !important;
        line-height: 1.65 !important;
        margin-bottom: 0.08rem !important;
    }

    #deptAccordion .dept-acc-panel-inner .major-list {
        grid-template-columns: 1fr !important;
    }

    /* —— 校园风采 —— */
    .campus-showcase {
        padding: 0.28rem 0;
    }

    .showcase-content {
        flex-direction: column !important;
        gap: 0.2rem !important;
    }

    .video-section {
        width: 100% !important;
        height: auto !important;
    }

    .video-wrapper {
        height: 2rem !important;
        border-radius: 0.08rem;
    }

    .play-btn {
        width: 0.44rem !important;
        height: 0.44rem !important;
    }

    .video-caption {
        font-size: 0.13rem !important;
        padding: 0.1rem !important;
    }
   .gallery-grid{
display: flex;
 
    gap: 0.13rem;
    flex-wrap: wrap;}

   .gallery-grid a{width:48%;height:1.5rem !important;}

    .gallery-grid img {
        min-height: 1.1rem;
        object-fit: cover;
    }

    /* —— 底部横幅 —— */
    .bottom-banner-img {
        width: 100%;
        height: auto;
        max-height: 1.6rem;
        object-fit: cover;
    }

    /* —— 页脚 —— */
    .footer {
        padding: 0.32rem 0 !important;
    }

    .footer .w16 {
        flex-direction: column !important;
        gap: 0.28rem !important;
        align-items: stretch !important;
    }

    .footer-left {
        width: 100% !important;
        display: none;
    }

    .footer-center {
        margin-left: 0 !important;
        text-align: center;
    }

    .footer-center h4 {
        justify-content: center;
        font-size: 0.2rem !important;
        display: none;
    }

    .footer-center p {
        font-size: 0.16rem !important;
    }

    .footer-right {
        justify-content: center !important;
        display: none;
    }

    .footer-qr {
        justify-content: center !important;
    }

    .footer-bottom {
        height: auto !important;
        padding: 0.14rem 0.24rem;
        text-align: center;
        display: none;
    }

    .footer-bottom p {
        font-size: 0.13rem !important;
        line-height: 1.5;

    }

    /* —— 右侧浮动栏（手机隐藏） —— */
    .floating-sidebar {
        display: none !important;
    }

    /* —— 视频弹窗 —— */
    .video-modal-dialog {
        width: calc(100vw - 0.32rem) !important;
        max-width: none !important;
        height: auto !important;
        max-height: 85vh;
    }

    .video-modal-player {
        width: 100% !important;
        height: auto !important;
        max-height: 72vh;
        aspect-ratio: 16 / 9;
    }
}

/* 桌面端不展示汉堡按钮与遮罩占位 */
.mobile-menu-btn {
    display: none;
}



@media screen and (max-width: 1024px) {
    .inner .ejlm {
        display: block;
        margin: 0.4rem 0;
    }

    .ban .ejlm, .ban .yjlm {
        display: none;
    }

    .ban .yjlm h2 {
        font-size: 0.4rem;
    }

    .ejlm ul {
        display: none;
        background: #3a4a9d;
        padding: 0.3rem;
    }

    .sjlm {
        display: none
    }

    .ejlm ul li {
        width: 100%;
        line-height: 0.5rem;
        font-size: 0.18rem
    }

    .ejlm ul li.active a {
        color: #e6c390;

    }

    .ejlm li a {
        border: none;
        padding: 0;
        line-height: 0.5rem
    }

    .inner {
        padding: 0 0 0.4rem;
    }

    .lr-t {
        display: block !important;
    }

    .ban::before {
        height: 1.5rem;
        display: none;
    }

    .bs-l {
        width: 100%;
        margin-bottom: 0.3rem;
        position: relative;
    }

    .bs-l ul {
        display: flex;
        flex-wrap: wrap; /* justify-content: center; */
    }

    .bs-l ul li {
        width: 20%;
        text-align: center;
        height: .65rem;
        border-top: none;
    }

    .bs-r {
        width: 100%;
    }

    .xx4 > img {
        width: 100%;
    }

    .xxscrol {
        padding-right: 0.25rem;
    }

    .ndjj p {
        margin-bottom: 0.3rem;
    }

    .ndjj2 {
        margin: 0 0 0.3rem 0;
        padding: 0.4rem 0;
    }

    .ndjj1::after {
        bottom: 0;
    }

    .xrld-l {
        width: 100%;
    }

    .yxbm li h4 a {
        white-space: pre-wrap;
        width: calc(100% - 0.2rem);
    }

    .xdld1 h2 {
        height: auto;
        padding: .2rem 0
    }

    .list li {
        width: 100%;
        margin-bottom: 0.2rem;
    }
    .list li .kxdt-l {
        width: .9rem;
        height: .9rem;
       padding:0 0.1rem;
    }
    .list li .kxdt-l p {
        font-size: 0.2rem;
    }
    .list li .kxdt-r {
        width: calc(100% - .9rem);
    }
}