/* 视频盒子基础样式 */
.section-video-box {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: #000;
    /* 保持 16:9 比例，你可以根据视频比例修改 */
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 视频铺满容器 */
}

/* 按钮样式微调 */
.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: #fff !important;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .section-header h2::after {
        left: 0;
        /* 移动端取消居中 */
        transform: none;
    }

    .section-desc {
        max-width: 100%;
    }
}

/* ------------------------------------------------------------------
   已删除：旧版首页 hero / value 区块样式（原 L53-L193，15 个类）
   类名：hero-section hero-bg grid-pattern hero-container hero-content
         hero-desc hero-actions hero-stats stat-item stat-number stat-label
         hero-video-box value-section value-card value-icon
   判据：全站 .htm 的 class 令牌中无一引用（脚本实测 deadcss_check.txt，中英两站同结论）。
   易误判处：.hero-section（单数）与 banner.css 的 .hero-sections（复数）不是同一个类，
             页面实际用的是复数，故单数这一组确为死样式，删它不影响 banner。
   保留：紧随其后的 #products 与 .section-header 仍在使用，未动。
   出处：外部审计《网站模板审计报告.md》死代码一节；首页改造后的遗留。
   ------------------------------------------------------------------ */

#products {
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--surface-bg);
}

.section-header {
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 2.5vw, 2.5rem);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 16px;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-desc {
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    color: var(--text-light);
    line-height: 1.7;
    max-width: 1200px;
}

@media (min-width: 2700px) {
    .section-desc {
        font-size: clamp(1.4rem, 1.6vw, 1.55rem);
    }

    .entry-card-info h3 {
        font-size: 1.45rem !important;
    }
}

.section-desc-center {
    margin-left: auto;
    margin-right: auto;
}

/* 类名重构（A）：.product-card → .entry-card，子部件统一继承前缀。
   原名有三处误导：
   ① 这张卡承载的是"栏目入口"这一结构角色，不是产品专属；
   ② .card-link / .card-info / .card-img-box 无前缀，与 Bootstrap 的
      .card / .card-link / .card-body / .card-img 落在同一命名空间
      （bootstrap.min.css 确有 .card-link+.card-link{margin-left:...}）；
   ③ 与列表页 lists_common.htm:117 的 .product-card 完全重名（那是另一个组件，
      现已同步改名为 .item-card，见重构 B）。
   配色沿用列表页 .level1-card 的两态语言（该语言现居 components/card.css）：
   常态 = 浅灰底 + 透明边框（把"边框"整个留给 hover，两态差异最大化）
   悬停 = 底色加深为浅蓝 + 蓝色边框显形 + inset 叠成视觉 2px 粗边 + 上浮 4px */
.entry-card {
    background: #f2f2f2;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    transition: all 0.3s ease;
}

.entry-card:hover {
    background: #dce7f5;
    border-color: #0d6efd;
    box-shadow: inset 0 0 0 1px #0d6efd, 0 10px 24px rgba(13, 110, 253, 0.25);
    /* 这里不能用 transform: translateY(-4px)。真站卡片带 .animate-fade-in-up
       （base.css:239 animation: fadeInUp .6s ease-out forwards），forwards 会永久保留
       关键帧里的 transform:translateY(0)，而动画值在层叠中高于普通作者声明，
       实测 hover 的 transform 被压成 matrix(1,0,0,1,0,0)。
       改用独立的 translate 属性：它与 transform 复合、不受该动画接管。 */
    translate: 0 -4px;
}

.entry-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.entry-card-img {
    width: 100%;
    height: clamp(200px, 28vw, 480px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* 白底 + #dee4ef 分隔线：产品图多为透明 PNG，需要一块承托面。
       与列表页 .level1-img 的处理保持一致。 */
    background: #ffffff;
    border-bottom: 1px solid #dee4ef;
}

.entry-card-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.entry-card:hover .entry-card-img img {
    transform: scale(1.05);
}

.entry-card-info {
    padding: 12px;
    /* 不设白底：var(--surface-bg) 会把卡片的 #f2f2f2→#dce7f5 两态整个盖掉。
       不设 border-top：.entry-card-img 的 border-bottom 已起分隔作用，
       两条 1px 并排会叠成 2px 双线。 */
    background: transparent;
    border-top: none;
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 8px;
}

/* 标题。此规则历史上写作 .card-info h4，而真站 index.htm:81 用的是 <h3>，
   导致它从不生效（标题一直吃全局 h3 的 24px / #334155 / margin-bottom 8px）。
   改名时把它对上了实际标签，规则第一次生效，副作用是 1.15rem 把标题从
   约 24px 压到 18.4px —— 观感上像"样式丢了"。
   现按裁定【删去 font-size 一行】，字号回到吃全局 h3 的 clamp(1.25rem,1.5vw,1.65rem)
   （1600 宽下约 24px）；颜色与字重保留，它们是两态悬停语言的一部分。 */
.entry-card-info h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

/* 标题悬停变蓝，与 .level1-card:hover h3 同一语言 */
.entry-card:hover .entry-card-info h3 {
    color: #0d6efd;
}

/* 此处原有 .card-link-icon / .card-link-text 三条规则（含两条 :hover），
   属旧首页 hero 遗留死样式：index.htm 无对应元素，本目录
   《网站模板审计报告.md:299》早已登记。重构时不迁入新命名空间，直接删除。 */

.swiper-wrapper {
    margin-bottom: 50px;
}

.app-section {
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--base-bg);
}

/* 确保 Slide 宽度 */
.application-master-swiper .swiper-slide {
    width: 100%;
}

.app-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 1200px) {
    .app-grid {
        display: grid;
        /* 依然是4列 */
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 1fr 1fr;
        gap: 24px;
    }

    .app-grid .app-card:nth-child(5n+1) {
        grid-column: span 2;
        grid-row: span 2;
    }

    .app-card {
        height: 100%;
        display: block;
        position: relative;
    }
}

.app-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s ease;
    text-decoration: none;
}

.app-card:hover {
    transform: scale(1.02);
}

.app-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.6s ease;
}

.app-card:hover .app-card-img {
    transform: scale(1.02);
}

.app-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 37, 64, 0.7) 0%, rgba(10, 37, 64, 0.9) 100%);
}

.app-card-overlay:hover {
    background: linear-gradient(180deg, rgba(10, 37, 64, 0.2) 0%, rgba(10, 37, 64, 0.3) 100%);
}

.app-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: #FFFFFF;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    font-weight: 600;
    margin: 0;
}

/* 应用卡标题字号全站统一：原 768px 断点下对每组第 1 张与第 3 张单独放大，
   每组 5 张时 10 张卡会命中第 1/3/6/8 张，字号不一致被判为缺陷，故移除该特例。
   基类 .app-card-title 的 clamp 值保持不变。 */

@media (max-width: 991.98px) {
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }

    .hero-desc {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
        gap: 32px;
    }

    .stat-item {
        text-align: center;
    }

    .section-header h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    #application .section-header {
        text-align: center;
    }
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .mb-8 {
        margin-bottom: 3rem;
    }

    .mb-12 {
        margin-bottom: 4rem;
    }
}

/* ============================================================
   成功案例区块（B1）
   深色底，与产品区(白)/应用区(浅灰)区分。
   卡片本体复用 components/case_card.css 的 .case-item-* 类，
   这里只补「深色底 + 标题/按钮在深色底上的适配」，不重复定义卡片样式。
   ============================================================ */
.case-section {
    background: linear-gradient(160deg, #0A2540 0%, #0f172a 60%);
}

/* 标题：白字 + 居中浅色下划线（.section-header h2 默认深色、左对齐，需覆盖） */
.case-section-header h2 {
    color: #fff;
}
.case-section-header h2::after {
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
}
.case-section-desc {
    color: rgba(255, 255, 255, 0.75);
    margin: 0 auto;
}

/* 卡片间距交给 grid 的 g-4/g-5 控制，去掉 .case-item-link 自带的下边距 */
.case-section .case-item-link {
    margin-bottom: 0;
}

/* 「查看全部」按钮：深色底上用白底品牌字，与浅色区块的 .btn-view-all 区分 */
.case-section-btn {
    background-color: #fff;
    color: var(--primary-color) !important;
}
.case-section-btn:hover {
    background-color: var(--accent-color);
    color: #fff !important;
}

/* ============================================================
   无缩略图占位（09-29 新增，配合 index.htm 的 litpic 守卫）
   ------------------------------------------------------------
   模板侧：litpic 为空时不再输出 <img>，也不再输出内联 background-image，
   而是给容器挂一个 -noimg 类。原因：空 src 会让浏览器向页面自身再发一次
   请求并拿回 200 text/html —— 既是坏图，又白耗一次请求。
   这里只负责把空容器画成"有意为之的中性面板"，不写任何文案
   （写"暂无图片"要中英各一套，而且反而更刺眼）。
   ============================================================ */

/* 产品卡：容器本就是白底 + 下分隔线，给一点极浅的斜向渐变表示占位 */
.entry-card-img.entry-card-noimg {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

/* 应用卡：标题是白字浮层，占位底必须够深才读得清。
   用 --primary-color 保持与全站主色一致，取不到时退回 #0a2540。 */
.app-card-img.app-card-noimg {
    background-image: linear-gradient(135deg, var(--primary-color, #0a2540) 0%, #16365c 100%);
    background-size: cover;
    background-position: center;
}
