/*
  新闻-7 (news_7) 公共样式: 浅灰底 居中标题 + 两列大卡(上图下文: 名称/日期/简介/READ MORE) + 底部居中按钮。
  取自 D:/desktop/333.png ("popular products" 板块)。
  固定样式走这里(名称 1 行/简介 2 行锁高省略, 字距/大写); 实例配置(模块背景/卡片背景/文字颜色字号/
  通用按钮配置等)由模块模板内联 <style> 以 CSS 变量注入。无 js: hover 全部走 CSS; 移动端断点 1000px。
*/

/* 模块背景: 设计稿浅灰 #F6F6F6, 由配置注入 */
.ly_news_7 {
    position: relative;
    overflow: hidden;
    background-color: var(--n7-module-bg-color, #F6F6F6);
}

.ly_news_7 .section {
    position: relative;
}

/* ==================== 标题(设计稿居中) ==================== */

.ly_news_7 .n7_title {
    margin: 0 0 36px;
    text-align: center;
    color: var(--deco-title-color, #15293E);
    font-size: var(--n7-pc-title-size, 26px);
    font-weight: 600;
    line-height: 1.25;
}

/* 卡内文字对齐(nameAlign): 名称/日期/简介/READ MORE 一起对齐。
   挂 .n7_text 容器靠继承生效, 容器内新增元素自动跟着对齐。 */
.ly_news_7[data-name-align="center"] .n7_text { text-align: center; }
.ly_news_7[data-name-align="right"] .n7_text { text-align: right; }

/* ==================== 两列大卡 ==================== */

.ly_news_7 .n7_grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ly_news_7 .n7_card {
    display: block;
    overflow: hidden;
    background-color: var(--n7-card-bg-color, #FFFFFF);
    border-radius: 8px;
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
}

.ly_news_7 .n7_card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(23, 35, 59, .10);
}

.ly_news_7 .n7_pic {
    overflow: hidden;
}

.ly_news_7 .n7_pic img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: var(--n7-img-fit, cover);
    object-position: var(--n7-img-position, center center);
    transition: transform .5s ease;
}

.ly_news_7 .n7_card:hover .n7_pic img {
    transform: scale(1.04);
}

/* 封面比例: fit=设计稿图比例(404:286) */
.ly_news_7 .n7_pic { aspect-ratio: 404 / 286; }
.ly_news_7 .r_1_1 .n7_pic { aspect-ratio: 1 / 1; }
.ly_news_7 .r_4_3 .n7_pic { aspect-ratio: 4 / 3; }
.ly_news_7 .r_2_3 .n7_pic { aspect-ratio: 2 / 3; }

/* ---- 卡内文字区: 名称 -> 日期 -> 简介 -> READ MORE ---- */

.ly_news_7 .n7_text {
    box-sizing: border-box;
    padding: 18px 20px 30px;
}

/* 名称固定 1 行(高度锁定 1.4em = line-height), 超出省略号, 保证两卡文字区对齐 */
.ly_news_7 .n7_name {
    margin: 0;
    height: 1.4em;
    color: var(--n7-name-color, #101828);
    font-size: var(--n7-pc-name-size, 16px);
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ly_news_7 .n7_date {
    margin-top: 12px;
    color: var(--n7-date-color, #6A7282);
    font-size: var(--n7-pc-date-size, 12px);
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* 简介固定 2 行(高度锁定 3em = 1.5 × 2), 超出省略号 */
.ly_news_7 .n7_brief {
    margin-top: 14px;
    height: 3em;
    color: var(--n7-brief-color, #6A7282);
    font-size: var(--n7-pc-brief-size, 14px);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* READ MORE: 设计稿蓝色小字, 颜色与底部按钮共用 readMoreColor */
.ly_news_7 .n7_more {
    margin-top: 28px;
    color: var(--n7-more-color, #516FF5);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.2;
}

/* ==================== 底部按钮(通用按钮配置: 颜色/字号/圆角/宽高由变量注入) ==================== */

.ly_news_7 .n7_btn_wrap {
    margin-top: 32px;
    text-align: center;
}

.ly_news_7 .n7_btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 9px 26px;
    font-family: var(--n7-btn-font, Poppins-Regular);
    font-size: var(--n7-pc-btn-font-size, 13px);
    color: var(--n7-btn-text-color, #516FF5);
    background-color: var(--n7-btn-bg-color, #00000000);
    border: 1px solid var(--n7-btn-border-color, #516FF5);
    border-radius: var(--n7-pc-btn-radius, 4px);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: color .3s ease, background-color .3s ease, border-color .3s ease;
}

.ly_news_7 .n7_btn:hover {
    color: var(--n7-btn-text-hover-color, #FFFFFF);
    background-color: var(--n7-btn-bg-hover-color, #516FF5);
    border-color: var(--n7-btn-border-hover-color, #516FF5);
}

/* ==================== 移动端 ==================== */

@media screen and (max-width: 1000px) {
    .ly_news_7 .n7_title {
        margin-bottom: 20px;
        font-size: var(--n7-mobile-title-size, 20px);
    }

    .ly_news_7 .n7_grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ly_news_7 .n7_pic { aspect-ratio: 4 / 3; }
    .ly_news_7 .r_1_1 .n7_pic { aspect-ratio: 1 / 1; }
    .ly_news_7 .r_4_3 .n7_pic { aspect-ratio: 4 / 3; }
    .ly_news_7 .r_2_3 .n7_pic { aspect-ratio: 2 / 3; }

    .ly_news_7 .n7_text { padding: 14px 16px 22px; }
    .ly_news_7 .n7_name { font-size: var(--n7-mobile-name-size, 14px); }
    .ly_news_7 .n7_date { font-size: var(--n7-mobile-date-size, 12px); }
    .ly_news_7 .n7_brief { font-size: var(--n7-mobile-brief-size, 13px); }
    .ly_news_7 .n7_more { margin-top: 20px; }

    .ly_news_7 .n7_btn_wrap { margin-top: 22px; }
    .ly_news_7 .n7_btn {
        font-size: var(--n7-mobile-btn-font-size, 13px);
        border-radius: var(--n7-mobile-btn-radius, 4px);
    }
}
