/*!
 * huning-menu.css — 导航下拉菜单（照 www.alfalaval.cn 的样式规范重写）
 * 全宽浅灰面板 / 多列并排 / 行高统一 / 悬停深灰高亮
 * 结构由 js/huning-data.js 从后台导航数据渲染：
 *   .hnm-holder > .hnm-panel > ul.hnm-col(并排多列) > li.hnm-item > a > .hnm-text(+.hnm-arrow)
 */

/* li 内嵌套的子列仅作数据模板，永不直接显示（由 JS 克隆挂载为并排列） */
.huning-menu .hnm-holder .hnm-src {
    display: none !important;
}

@media (min-width: 1200px) {
    /* ---- 面板：全宽浅灰带，无阴影无边框无圆角 ---- */
    .huning-menu .menu-item > .bdMegaMenuHolder.hnm-holder,
    .huning-menu .menu-item:last-child > .bdMegaMenuHolder.hnm-holder {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: var(--hn-left, 0px) !important;
        right: auto !important;
        transform: none !important;
        width: 100vw !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 36px 24px !important;
        background: #f5f5f5 !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        z-index: 1000 !important;
    }
    .huning-menu .menu-item:hover > .bdMegaMenuHolder.hnm-holder,
    .huning-menu .menu-item:focus-within > .bdMegaMenuHolder.hnm-holder,
    .huning-menu .menu-item.active > .bdMegaMenuHolder.hnm-holder {
        display: block !important;
    }
    /* 内容区：与页面主体同宽居中，列从内容区左缘排起（参考站效果；
       左对齐保证加列时已有列不位移） */
    .huning-menu .hnm-holder > .bdMegaMenuHelperWrapper {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }
    /* 主题残留的"查看全部"按钮彻底隐藏 */
    .huning-menu .hnm-holder .bdmg-dropdown-button {
        display: none !important;
    }

    /* ---- 列：每列等宽 300，仅间距分隔，无分隔线 ---- */
    .huning-menu .hnm-holder .hnm-col {
        list-style: none !important;
        display: block !important;
        visibility: visible !important;
        position: static !important;
        width: 300px !important;
        max-width: none !important;
        flex: 0 0 auto !important;
        margin: 0 0 0 24px !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        height: auto !important;
    }
    .huning-menu .hnm-holder .hnm-col:first-of-type {
        margin-left: 0 !important;
    }

    /* ---- 项：统一行高与缩进，文字整齐的关键 ---- */
    .huning-menu .hnm-col .hnm-item {
        width: auto !important;
        margin: 0 !important;
        position: relative !important;
    }
    .huning-menu .hnm-col .hnm-item > a {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 11px 16px !important;
        border-radius: 4px !important;
        text-decoration: none !important;
        transition: background-color .12s ease;
    }
    .huning-menu .hnm-col .hnm-item > a .hnm-text {
        display: inline !important;
        white-space: nowrap !important;
        max-width: none !important;
        overflow: visible !important;
        text-overflow: clip !important;
        font-size: 15px !important;
        line-height: 1.4 !important;
        font-weight: 500 !important;
        color: #2b2b33 !important;
        padding: 0 !important;
        border: none !important;
        background: none !important;
    }
    /* 每个项右侧箭头（CSS 绘制，不依赖图片字体，参考站效果：二级栏目也带箭头） */
    .huning-menu .hnm-col .hnm-item > a .hnm-text::after {
        content: "›" !important;
        display: inline-block !important;
        margin-left: 12px !important;
        font-size: 17px !important;
        line-height: 1 !important;
        color: #9aa3ad !important;
        background: none !important;
        width: auto !important;
        transform: none !important;
        transition: color .12s ease;
    }
    /* 悬停 / 激活：整行深灰底（参考站效果） */
    .huning-menu .hnm-col .hnm-item:hover > a,
    .huning-menu .hnm-col .hnm-item.hnm-on > a {
        background: #e4e6e8 !important;
    }
    .huning-menu .hnm-col .hnm-item:hover > a .hnm-text,
    .huning-menu .hnm-col .hnm-item.hnm-on > a .hnm-text {
        color: #0c2340 !important;
    }
    .huning-menu .hnm-col .hnm-item:hover > a .hnm-text::after,
    .huning-menu .hnm-col .hnm-item.hnm-on > a .hnm-text::after {
        color: #0c2340 !important;
    }
    /* 后续列字重略轻，层级区分 */
    .huning-menu .hnm-holder .hnm-col + .hnm-col .hnm-text {
        font-weight: 400 !important;
    }

    /* ---- 无子级栏目（工艺/方案/服务等）：同一灰底全宽带，项两列居中 ---- */
    .huning-menu .hnm-holder .hnm-col.hnm-flat {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        width: 720px !important;
        gap: 4px 40px !important;
        margin-left: 0 !important;
    }
}

/* ---- 移动端：列平铺缩进展开 ---- */
@media (max-width: 1199px) {
    .huning-menu .hnm-holder .hnm-col {
        display: block !important;
        visibility: visible !important;
        position: static !important;
        width: auto !important;
        margin: 0 0 6px 14px !important;
        padding: 0 0 0 12px !important;
        border-left: 2px solid #e6ecf2 !important;
        background: transparent !important;
        height: auto !important;
    }
    .huning-menu .hnm-col .hnm-item > a .hnm-text::after {
        display: none !important;
    }
}
