/* ===== 手机端适配（仅 ≤768px 生效，不影响桌面） ===== */
@media (max-width: 768px) {

    /* 全局防横向溢出 */
    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
    }

    /* ---------- 导航 ---------- */
    #nav_c {
        height: 54px;
        top: 0;
    }
    .nav_warp_l {
        width: 108px;
        height: 54px;
        overflow: hidden;
    }
    .nav_warp_l img {
        height: 28px !important;
        top: 13px !important;
        left: 12px !important;
    }
    .nav_item_c {
        display: block; /* 原模板在 ≤720px 隐藏了菜单，这里恢复 */
        left: 108px; /* 避开左侧 logo，防止重合 */
        right: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nav_parent {
        position: relative;
        width: auto;
        padding: 0 7px;
        font-size: 14px;
    }
    .nav_p_t {
        padding-top: 15px;
        white-space: nowrap;
    }
    .nav_child_c {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        min-width: 128px;
        background: rgba(37, 68, 148, 0.97);
        z-index: 9999;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    }
    .nav_child {
        height: 42px;
        margin-top: 0;
    }
    .nav_c_t {
        padding-top: 10px;
    }
    .nav_c_t a {
        font-size: 14px;
        white-space: nowrap;
    }

    /* ---------- 首页主视觉 ---------- */
    #mainB {
        height: 170px;
        min-height: 0;
        top: 76px;
    }
    #douback {
        display: none;
    }

    /* ---------- 项目信息面板（搜索 + 网格） ---------- */
    .proj-panel {
        position: relative; /* 手机端改为正常流，避免网格压住下方内容 */
        left: auto;
        top: 0;
        transform: none;
        margin: 10px auto 0;
        padding: 0 12px;
    }
    .proj-search {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 14px;
    }
    .proj-search input,
    .proj-search button {
        flex: none; /* 修复竖排 flex 下输入框高度被压缩 */
        width: 100%;
        height: 44px;
        font-size: 15px;
        box-sizing: border-box;
    }
    .proj-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 12px;
    }
    .proj-card {
        min-height: 118px;
        padding: 10px 9px;
        gap: 5px;
    }
    .proj-title {
        font-size: 13px;
    }
    .proj-deadline,
    .proj-details {
        font-size: 12px;
    }
    .proj-more-inner {
        font-size: 14px;
    }

    /* ---------- 首页模块卡片 ---------- */
    .cfmore {
        min-height: 0;
        top: 16px;
    }
    .cfmorett {
        font-size: 24px;
    }
    .moreline {
        flex-wrap: wrap;
        justify-content: center;
        height: auto;
        margin: 8px 0;
    }
    .morebox {
        width: 138px;
        height: 138px;
        margin: 10px 12px;
    }
    .morebg {
        width: 100%;
        height: 100%;
    }
    .moreat {
        font-size: 20px;
    }

    /* ---------- 学术信息库 ---------- */
    .proj-page {
        padding: 108px 12px 40px;
    }
    .proj-page-title {
        font-size: 22px;
        margin-bottom: 14px;
    }
    .proj-page .proj-search {
        margin-top: 4vh;
    }
    .proj-pagination button {
        min-width: 34px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }

    /* ---------- 页脚 ---------- */
    .footer0_0 {
        display: none;
    }
    .footer1_1 {
        display: none;
    }
    .footer1 {
        top: 56px;
    }
    .f12_cell {
        width: 62px;
        height: 62px;
        margin: 0 10px;
    }
    .f12_cell img {
        width: 34px;
        height: 34px;
    }

    /* ---------- 详情弹窗 ---------- */
    .proj-modal-box {
        margin: 12vh auto 0;
        padding: 22px 18px;
    }
    .proj-modal-title {
        font-size: 17px;
    }
    .proj-modal-details {
        font-size: 14px;
    }
}
