@charset "UTF-8";
/* ===========================================================
   首页「学院新闻」标题栏搜索区块  news-search
   追加内容，不影响站点原有样式
   =========================================================== */

/* 站点原样式 .title{overflow:hidden} 会裁掉绝对定位的下拉面板。
   这里改成建立 BFC 的 flow-root：既能包住内部浮动元素（h2 / 搜索框），
   又不会像 overflow:hidden 那样裁掉下拉面板。
   ::after 清除浮动作为不支持 flow-root 时的兜底。
   .first .news .title 只用于学院新闻标题栏，不影响其他 .title。 */
.first .news .title {
    display: flow-root;
    overflow: visible;
}

.first .news .title::after {
    content: "";
    display: block;
    clear: both;
}

.title .news-search {
    float: left;
    position: relative;
    width: 250px;
    margin-left: 24px;
    margin-top: 9px;
    font-size: 14px;
    z-index: 20;
}

/* 输入框 + 按钮 */
.news-search .news-search-box {
    display: flex;
    align-items: center;
    width: 250px;
    height: 34px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #d9dee3;
    border-radius: 17px;
    padding: 0 4px 0 14px;
    transition: border-color .2s, box-shadow .2s;
}

.news-search .news-search-box:hover {
    border-color: #9dc7ea;
}

.news-search.is-focus .news-search-box {
    border-color: #1882d8;
    box-shadow: 0 0 0 3px rgba(24, 130, 216, .14);
}

.news-search .news-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: #333;
    font-family: inherit;
    padding: 0;
}

.news-search .news-search-input::placeholder {
    color: #a8b2ba;
}

.news-search .news-search-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1882d8;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .15s;
}

.news-search .news-search-btn:hover {
    background: #ef5f00;
}

.news-search .news-search-btn:active {
    transform: scale(.92);
}

.news-search .news-search-btn svg {
    display: block;
}

/* 下拉结果面板 */
.news-search .news-search-panel {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    max-height: 306px;
    overflow-y: auto;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e3e8ec;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(20, 60, 100, .16);
    padding: 5px 0;
}

.news-search .news-search-panel[hidden] {
    display: none;
}

.news-search .news-search-panel::-webkit-scrollbar {
    width: 6px;
}

.news-search .news-search-panel::-webkit-scrollbar-thumb {
    background: #cfd8de;
    border-radius: 3px;
}

/* 面板顶部统计 */
.news-search .ns-head {
    padding: 7px 14px 6px;
    color: #8a949c;
    font-size: 12px;
    border-bottom: 1px solid #f1f4f6;
    margin-bottom: 4px;
}

.news-search .ns-head b {
    color: #1882d8;
    font-weight: bold;
}

/* 结果项 */
.news-search .ns-item {
    display: block;
    padding: 8px 14px;
    color: #333;
    font-size: 13px;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
}

.news-search .ns-item + .ns-item {
    border-top: 1px dashed #f2f5f7;
}

.news-search .ns-item:hover,
.news-search .ns-item.is-active {
    background: #f2f8fd;
    text-decoration: none;
}

.news-search .ns-item .ns-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-search .ns-item:hover .ns-title {
    color: #1882d8;
}

/* 分类标签 */
.news-search .ns-tag {
    display: inline-block;
    margin-right: 6px;
    padding: 0 6px;
    height: 17px;
    line-height: 17px;
    font-size: 11px;
    color: #1882d8;
    background: #eaf4fc;
    border-radius: 3px;
    vertical-align: 1px;
}

/* 命中关键词高亮 */
.news-search .ns-item mark {
    background: #fff2cc;
    color: #ef5f00;
    font-weight: bold;
    padding: 0 1px;
}

/* 空状态 */
.news-search .ns-empty {
    padding: 16px 14px;
    color: #9aa4ac;
    font-size: 13px;
    text-align: center;
    line-height: 1.7;
}

.news-search .ns-empty b {
    color: #ef5f00;
    font-weight: bold;
}

/* 提示条（离线/跳转提示） */
.news-search .ns-toast {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    background: rgba(38, 48, 58, .94);
    color: #fff;
    font-size: 12px;
    line-height: 1.55;
    border-radius: 8px;
    z-index: 30;
}

/* ---------- 窄屏适配 ---------- */
@media screen and (max-width: 1366px) {
    .title .news-search {
        width: 210px;
        margin-left: 16px;
    }

    .news-search .news-search-box {
        width: 210px;
    }
}

@media screen and (max-width: 1200px) {
    .title .news-search {
        float: right;
        clear: both;
        margin: 8px 10px 0 0;
        width: 230px;
    }

    .news-search .news-search-box {
        width: 230px;
    }

    .news-search .news-search-panel {
        left: auto;
        right: 0;
    }
}

@media screen and (max-width: 768px) {
    .title .news-search {
        float: none;
        width: 100%;
        margin: 10px 0 0;
    }

    .news-search .news-search-box {
        width: 100%;
    }

    .news-search .news-search-panel {
        left: 0;
        right: auto;
        width: 100%;
    }
}
