/**
 * 首页 section_key=articles 区块样式 + 各首页模块统一底部 CTA
 *
 * 路径：includes/site_pages/partial_css/home-section-articles.css
 * 装配：home_page_assembler.php 在 payload 含 articles 或 featured_products 等区块时注入
 *
 * 统一底部按钮：`.home-section-footer-cta` + `.home-section-cta-btn`（主色橙、大号）
 * 色彩：主 CTA / 装饰条使用 frontend-colors.css 中主色橙（--primary-color 系）
 * 截断：资讯卡片正文仅使用 line-clamp，不在父级设 max-height，避免出现「半行被切」
 */

.site-main .home-articles-section {
    --home-art-thumb-w: 144px;
    --home-art-thumb-h: 96px;
    --home-art-radius: 14px;
    --home-art-title-fs: 1.0625rem;
    --home-art-title-lh: 1.35;
    --home-art-excerpt-fs: 0.875rem;
    --home-art-excerpt-lh: 1.5;
}

/* ========== 标题区：全宽容器内居中，收紧 main.css 里 section-title 过大下边距 ========== */

.site-main .home-articles-heading--center {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.site-main .home-articles-section .home-articles-heading__title.section-title {
    text-align: center;
    margin-bottom: 0.65rem;
}

.site-main .home-articles-section .home-articles-heading__subtitle.section-subtitle {
    text-align: center;
    margin-bottom: 0;
    margin-top: 0;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

/* 标题下短装饰条（主色橙），增强区块识别度 */
.site-main .home-articles-heading--center .home-articles-heading__title::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 0.65rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color, #ffb366), var(--primary-hover, #e8a04d));
}

.site-main .home-articles-grid {
    margin-top: 2rem;
}

@media (min-width: 992px) {
    .site-main .home-articles-grid {
        margin-top: 2.25rem;
    }
}

/* ========== 底部 CTA（多区块共用：精选产品、资讯等）========== */

.site-main .home-section-footer-cta {
    margin-top: 2.25rem;
}

@media (min-width: 992px) {
    .site-main .home-section-footer-cta {
        margin-top: 2.75rem;
    }
}

.site-main .home-section-cta-btn {
    min-width: 12rem;
    min-height: 3rem;
    padding: 0.65rem 2.25rem;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 999px;
    color: var(--text-on-primary, #fff);
    background: linear-gradient(135deg, var(--primary-color, #ffb366), var(--primary-hover, #e8a04d));
    box-shadow: 0 12px 28px var(--primary-rgba-30, rgba(255, 179, 102, 0.35));
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.site-main .home-section-cta-btn:hover {
    color: var(--text-on-primary, #fff);
    filter: brightness(1.03);
    transform: translateY(-2px);
    box-shadow: 0 16px 34px var(--primary-rgba-40, rgba(255, 179, 102, 0.45));
}

.site-main .home-section-cta-btn:focus-visible {
    outline: 3px solid var(--primary-lighter, #ffd9b3);
    outline-offset: 2px;
}

/* ========== 卡片 ========== */

.site-main .home-articles-card {
    border-radius: var(--home-art-radius);
    background: var(--bg-primary, #fff);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.site-main .home-articles-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
}

.site-main .home-articles-card__link {
    display: block;
    height: 100%;
}

.site-main .home-articles-card__inner {
    padding: 1rem 1.1rem;
    min-height: calc(var(--home-art-thumb-h) + 0.5rem);
}

.site-main .home-articles-card__thumb {
    width: var(--home-art-thumb-w);
    flex: 0 0 var(--home-art-thumb-w);
    height: var(--home-art-thumb-h);
    overflow: hidden;
    border-radius: 12px;
    background: #f1f5f9;
}

.site-main .home-articles-card__thumb-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* 正文区：不设 max-height，仅用整数行 line-clamp，避免最后一行被「拦腰截断」 */
.site-main .home-articles-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow: visible;
}

.site-main .home-articles-card__title {
    margin: 0;
    font-size: var(--home-art-title-fs);
    line-height: var(--home-art-title-lh);
    font-weight: 700;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.site-main .home-articles-card__excerpt {
    margin: 0;
    font-size: var(--home-art-excerpt-fs);
    line-height: var(--home-art-excerpt-lh);
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .site-main .home-articles-section {
        --home-art-thumb-w: 118px;
        --home-art-thumb-h: 79px;
    }

    .site-main .home-articles-card__excerpt {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .site-main .home-section-cta-btn {
        width: 100%;
        max-width: 22rem;
    }
}
