/* ==================== 新闻动态 News ==================== */
.nw-search {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}

/* 日期：日期 | 值 | 日历图标，整块可点 */
.nw-date-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 220px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid #d8dde3;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
}

.nw-date-label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 14px;
    background: #f5f6f8;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    user-select: none;
}

.nw-date-sep {
    width: 1px;
    background: #d8dde3;
    flex-shrink: 0;
}

.nw-date-value {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 8px 0 12px;
    font-size: 14px;
    color: #333;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

.nw-date-value.is-empty {
    color: #bbb;
}

.nw-date-wrap > i {
    display: flex;
    align-items: center;
    padding-right: 12px;
    color: #999;
    font-size: 15px;
    pointer-events: none;
    flex-shrink: 0;
}

.nw-date-wrap input[type="date"] {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none; /* 由外层点击 + showPicker 唤起，保证整块可点 */
    z-index: 1;
    font-size: 16px;
}

.nw-date-wrap:focus-within {
    border-color: #1D78BD;
}

/* 关键词 + 搜索按钮一体 */
.nw-keyword-wrap {
    display: flex;
    align-items: stretch;
    width: 420px;
    max-width: 100%;
    height: 40px;
    border: 1px solid #d8dde3;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
}

.nw-keyword-wrap:focus-within {
    border-color: #1D78BD;
}

.nw-keyword {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    outline: none;
    box-sizing: border-box;
}

.nw-search-btn {
    flex-shrink: 0;
    min-width: 80px;
    height: 100%;
    padding: 0 20px;
    border: none;
    border-left: 1px solid #1D78BD;
    background: #1D78BD;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
    white-space: nowrap;
}

.nw-search-btn:hover {
    background: #1868a6;
}

/* Grid */
.nw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.nw-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
    box-sizing: border-box;
}

.nw-card:hover {
    box-shadow: 0 8px 24px rgba(29, 120, 189, .12);
}

.nw-card-img {
    height: 180px;
    background: #fafafa;
    overflow: hidden;
}

.nw-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.nw-card:hover .nw-card-img img {
    transform: scale(1.04);
}

.nw-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 18px 18px;
    background: #f7f8fa;
    transition: background .25s ease;
}

.nw-card:hover .nw-card-body {
    background: #1D78BD;
}

.nw-card-title {
    margin: 0;
    padding: 0 0 12px;
    border-bottom: 1px solid #e8eaed;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .25s ease, border-color .25s ease;
}

.nw-card:hover .nw-card-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, .35);
}

.nw-card-desc {
    margin: 12px 0 16px;
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    transition: color .25s ease;
}

.nw-card:hover .nw-card-desc {
    color: rgba(255, 255, 255, .9);
}

.nw-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.nw-card-more {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid #1D78BD;
    border-radius: 2px;
    font-size: 12px;
    color: #1D78BD;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    transition: color .25s ease, border-color .25s ease, background .25s ease;
}

.nw-card:hover .nw-card-more {
    color: #fff;
    border-color: #fff;
    background: transparent;
}

.nw-card-date {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    white-space: nowrap;
    transition: color .25s ease;
}

.nw-card:hover .nw-card-date {
    color: #fff;
}

.nw-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 15px;
}

/* Pagination */
.nw-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 40px;
}

.nw-pagination button {
    min-width: 40px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #1D78BD;
    background: #fff;
    color: #1D78BD;
    font-size: 13px;
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.nw-pagination button:hover:not(:disabled):not(.active) {
    background: rgba(29, 120, 189, .08);
}

.nw-pagination button.active {
    background: #1D78BD;
    color: #fff;
    font-weight: 600;
}

.nw-pagination button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 1024px) {
    .nw-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .nw-keyword-wrap {
        width: 360px;
    }
}

@media (max-width: 768px) {
    .nw-search {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .nw-date-wrap,
    .nw-keyword-wrap {
        width: 100%;
    }

    .nw-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nw-card-img {
        height: 200px;
    }

    .nw-pagination {
        gap: 6px;
        margin-top: 28px;
    }

    .nw-pagination button {
        min-width: 34px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }
}
