/* 老站专题页迁入后的公共修复（电脑端 + 移动端）
 * 用法：body 加 class="legacy-page"，在专题 CSS 之后加载本文件
 */

/* style.css / handf.css 的 .header 会污染全站顶栏 */
body.legacy-page #header.header {
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    line-height: normal !important;
    position: relative !important;
    z-index: 10001 !important;
}

/* 电脑端：固定顶栏 70px，banner 紧贴其下（无空白缝、顶部不被遮） */
@media screen and (min-width: 769px) {
    body.legacy-page .y_banner,
    body.legacy-page .y_banner2,
    body.legacy-page .xs-banner,
    body.legacy-page .h_banner,
    body.legacy-page .ecjia-function-list > .banner,
    body.legacy-page .One_lay_2EV2va,
    body.legacy-page .contentbanner {
        margin-top: 70px;
    }
}

@media screen and (max-width: 768px) {
    /* 移动端固定顶栏，正文下移，避免 body/head 重叠 */
    body.legacy-page {
        padding-top: 70px;
        height: auto;
        overflow-x: hidden;
    }

    body.legacy-page .moblie-nav {
        display: block !important;
        position: static !important;
    }
    body.legacy-page .mobile-nav-content {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        height: 70px !important;
        transform: none !important;
        z-index: 10002 !important;
        background: #fff;
        overflow: visible !important;
    }
    body.legacy-page .mobile-nav-header {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: 70px !important;
        padding: 0 20px !important;
        box-sizing: border-box !important;
        background: #fff;
        border-bottom: 1px solid #efefef;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        line-height: normal !important;
    }
    body.legacy-page .mobile-nav-logo {
        position: absolute !important;
        left: 20px !important;
        top: 50% !important;
        transform: translateY(-50%);
        display: block !important;
        line-height: 0 !important;
    }
    body.legacy-page .mobile-nav-logo img {
        max-height: 40px;
        width: auto;
        display: block;
    }
    body.legacy-page .mobile-nav-right {
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%);
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        width: 30px !important;
        height: 22px !important;
        margin: 0 !important;
        float: none !important;
        line-height: 0 !important;
        cursor: pointer;
        z-index: 2;
    }
    body.legacy-page .mobile-nav-right.active {
        transform: translateY(-50%) rotate(45deg);
    }
    body.legacy-page .mobile-nav-right span {
        display: block !important;
        width: 30px !important;
        height: 3px !important;
        margin: 0 0 5px !important;
        background: #333 !important;
        border-radius: 3px;
        line-height: 0 !important;
        float: none !important;
    }
    body.legacy-page .mobile-nav-right span:last-child {
        margin-bottom: 0 !important;
    }
}
