/* --- 首页新闻列表组件 - Grid布局版 (已修复撑破容器 + 左右1:1布局) --- */
.qlbd-sec-news {
    width: 100%;
    padding: var(--ql-space-6) 0;
    background-color: var(--ql-color-white);
}

.qlbd-sec-news__container {
    max-width: var(--ql-container-width); /* 限制在 1200px */
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--ql-space-4);
    /* 使用 Grid 布局 */
    display: grid;
    /* ✅ 核心修改 1：改为 1fr 1fr，实现左右精确 50% 对半分，同时保留 minmax 防止长文本撑破网格 */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: var(--ql-space-6);
}

/* --- 通用新闻卡片样式 --- */
.qlbd-sec-news__item {
    display: flex;
    flex-direction: column;
    padding-bottom: var(--ql-space-3);
    border-bottom: 1px solid var(--ql-color-border-light);
    /* ✅ 核心修改 2：打破 Flex/Grid 子项默认的最小宽度锁定，允许内容向内压缩 */
    min-width: 0; 
}

/* 默认隐藏大图，只在第一条显示 */
.qlbd-sec-news__img-box {
    display: none;
    width: 100%;
    /* 稍微调高了一点，为了更好地和右边 4 条新闻的总高度对齐。如觉得不合适可微调这里 (如改回310px或加到360px) */
    height: 340px; 
    overflow: hidden;
    border-radius: var(--ql-radius-md);
    margin-bottom: var(--ql-space-3);
}

.qlbd-sec-news__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.qlbd-sec-news__item:hover .qlbd-sec-news__img {
    transform: scale(1.05);
}

/* 头部信息 (标题 + 日期) */
.qlbd-sec-news__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--ql-space-2);
    /* ✅ 核心修改 3：确保头部区域也能被压缩，让标题超长时的省略号(...)生效 */
    width: 100%;
    min-width: 0;
}

.qlbd-sec-news__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ql-color-text-primary);
    margin: 0;
    cursor: pointer;
    transition: color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.qlbd-sec-news__item:hover .qlbd-sec-news__title {
    color: var(--ql-color-primary);
}

.qlbd-sec-news__date {
    font-size: 14px;
    color: var(--ql-color-text-placeholder);
    /* 防止右侧时间文字被挤压换行 */
    flex-shrink: 0; 
}

.qlbd-sec-news__desc {
    font-size: 14px;
    color: var(--ql-color-text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* --- 第一条新闻特殊样式 (:first-child) --- */
.qlbd-sec-news__item:first-child {
    /* 占据左侧第一列，跨越 5 行 (右侧有4条 + 间距) */
    grid-column: 1 / 2;
    grid-row: 1 / 5;
    border-bottom: none;
    padding-bottom: 0;
}

/* 第一条显示图片 */
.qlbd-sec-news__item:first-child .qlbd-sec-news__img-box {
    display: block;
}

/* 第一条标题变大，且单行显示 */
.qlbd-sec-news__item:first-child .qlbd-sec-news__title {
    font-size: 24px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: calc(100% - 100px);
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}

/* 第一条头部布局调整 - 保持水平对齐 */
.qlbd-sec-news__item:first-child .qlbd-sec-news__header {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
}

.qlbd-sec-news__item:first-child .qlbd-sec-news__date {
    margin-top: 0;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 其他条目 (从第2条开始) */
.qlbd-sec-news__item:not(:first-child) {
    /* 强制在右侧列 */
    grid-column: 2 / 3;
}

/* 最后一条去掉底边框 */
.qlbd-sec-news__item:last-child {
    border-bottom: none;
}

/* --- 响应式布局 --- */
@media (max-width: 991px) {
    .qlbd-sec-news__container {
        display: flex;
        flex-direction: column;
        gap: var(--ql-space-4);
    }

    .qlbd-sec-news__item:first-child {
        border-bottom: 1px solid var(--ql-color-border-light);
        padding-bottom: var(--ql-space-3);
    }

    .qlbd-sec-news__img-box {
        height: 200px;
    }
}