/*
 * 创场创业 CMS V10.1 Patch 09
 * 图片卡片式 Mega 下拉菜单
 */

@media(min-width:993px){
    .mega-dropdown-cards{
        padding:22px 0 24px;
        background:#fff;
        border-top:1px solid #eceef1;
        box-shadow:0 14px 32px rgba(25,30,36,.13);
    }

    .mega-dropdown-cards .mega-dropdown-inner{
        width:min(1180px,calc(100% - 32px));
        margin:0 auto;
    }

    .mega-card-grid{
        display:grid;
        grid-template-columns:repeat(
            var(--mega-count,5),
            minmax(0,1fr)
        );
        gap:28px;
        align-items:start;
    }

    .mega-image-card{
        display:block;
        min-width:0;
        color:#222;
        text-align:center;
        text-decoration:none;
    }

    .mega-image-wrap{
        display:block;
        position:relative;
        width:100%;
        aspect-ratio:1.52 / 1;
        overflow:hidden;
        background:#eef0f2;
        border-radius:9px;
        box-shadow:0 2px 8px rgba(30,35,40,.06);
    }

    .mega-image-wrap::after{
        content:"";
        position:absolute;
        inset:0;
        border:1px solid rgba(0,0,0,.035);
        border-radius:inherit;
        pointer-events:none;
    }

    .mega-image-wrap img{
        display:block;
        width:100%;
        height:100%;
        object-fit:cover;
        transition:
            transform .32s ease,
            filter .32s ease;
    }

    .mega-image-card strong{
        display:block;
        margin-top:10px;
        color:#24282d;
        font-size:16px;
        font-weight:700;
        line-height:1.45;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
        transition:color .2s ease;
    }

    .mega-image-card small{
        display:-webkit-box;
        margin-top:4px;
        color:#8b9198;
        font-size:12px;
        font-weight:400;
        line-height:1.5;
        -webkit-line-clamp:1;
        -webkit-box-orient:vertical;
        overflow:hidden;
    }

    .mega-image-card:hover .mega-image-wrap img{
        transform:scale(1.055);
        filter:saturate(1.04);
    }

    .mega-image-card:hover strong{
        color:#b57f00;
    }

    /* 清除旧版文字列和右侧专题图布局的影响 */
    .mega-dropdown-cards .mega-row,
    .mega-dropdown-cards .mega-row-four,
    .mega-dropdown-cards .mega-col,
    .mega-dropdown-cards .mega-image-col{
        display:none!important;
    }
}

@media(min-width:993px) and (max-width:1199px){
    .mega-card-grid{
        gap:18px;
    }

    .mega-image-card strong{
        font-size:15px;
    }
}

/* 手机端仍使用现有 offcanvas 菜单，不显示 Mega 下拉 */
@media(max-width:992px){
    .mega-dropdown-cards{
        display:none!important;
    }
}
