/*
 * [V6适配] 强制左侧悬浮导航栏常驻显示（最终版）
 * 根因: ①V6 io_body_class 生成 container-body(不匹配子主题定位) ②JS 会给 body 加 mini-sidebar,
 * sidebar.php 内联 style 里 `.mini-sidebar .sidebar-nav{position:absolute;left:-100%}` 折叠隐藏它。
 * 已把配置 hy_sidebar_minisidebar 设为 0 关闭折叠; 这里再加无条件覆盖兜底。始终显示 sidebar。
 */
body .sidebar-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 220px !important;
    max-width: 220px !important;
    height: 100vh !important;
    z-index: 999 !important;
    display: block !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}
body .sidebar-nav .sidebar-menu {
    width: 220px !important;
    max-width: 220px !important;
}
/* 覆盖 mini-sidebar 折叠(即使 JS 仍加该类) */
body .mini-sidebar .sidebar-nav,
body.mini-sidebar .sidebar-nav {
    position: fixed !important;
    left: 0 !important;
    transform: none !important;
}
body .mini-sidebar .sidebar-nav .sidebar-menu {
    width: 220px !important;
}
body .main-content {
    margin-left: 220px !important;
}
/* 让导航项正常竖排显示 */
body .sidebar-nav .sidebar-menu-inner ul {
    padding: 10px 0;
    display: block !important;
}
body .sidebar-nav .sidebar-menu a {
    display: flex !important;
    align-items: center;
    padding: 10px 15px;
}
@media (max-width: 991px) {
    /* 移动端放行默认折叠(避免遮挡) */
    body .sidebar-nav {
        position: absolute !important;
        left: -100% !important;
        width: 220px !important;
    }
    body .main-content {
        margin-left: 0 !important;
    }
}
/* ==== [V6适配] 顶部大横幅(header-big)高度对齐线上 4.1810 ====
 * 根因: V6 main.css 给 .header-big 的 paddingBottom 设置使总高只有280px,
 * 线上4.1810 该区高428px(paddingBottom:180px)。总高不足导致下方轮播/内容被截断。
 */
body .header-big {
    padding-bottom: 180px !important;
    min-height: 420px !important;
}
/* 轮播/资讯区不嵌在大横幅内, 留出空间 */
body .swiper-container,
body .swiper,
body .intro-home-middle,
body .home-middle {
    position: relative !important;
    z-index: 5 !important;
}

/* ==== [V6适配] 侧边栏子菜单默认折叠(对齐线上4.1810) ====
 * 根因: V6 main.css 给 sidebar-item 的子 ul 设 display:block, 导致所有子分类全展开;
 * 线上 4.1810 style.min.css 里子 ul 默认 display:none, 仅 .sidebar-show 才展开。
 */
body .sidebar-nav .sidebar-menu-inner ul li.sidebar-item > ul {
    display: none !important;
}
body .sidebar-nav .sidebar-menu-inner ul li.sidebar-item.sidebar-show > ul,
body .sidebar-nav .sidebar-menu-inner ul li.sidebar-item.open > ul {
    display: block !important;
}
/* 收缩箭头默认朝右(折叠态), 展开时朝下 */
body .sidebar-nav .sidebar-more {
    transition: transform .2s;
}
body .sidebar-nav .sidebar-item.sidebar-show > .sidebar-more,
body .sidebar-nav .sidebar-item.open > .sidebar-more {
    transform: rotate(90deg);
}

/* ==== [V6适配] 顶部搜索框: 限宽居中 + 尺寸对齐线上(修复"搜索框有问题") ====
 * 根因: V6 main.css 让 #search.s-search 占满宽度(1060)且输入框跟到横幅下方(top294);
 * 线上4.1810 .s-search.mx-auto 限宽800px居中, 输入框在横幅内(top146左右)。
 */
body .header-big .s-search {
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
body .header-big #search-text {
    max-width: 800px !important;
    height: 50px !important;
}
body .header-big .super-search-fm {
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* ==== [V6适配] 修复canvas背景iframe遮挡搜索框 ====
 * 根因: V6 .header-big 的 canvas-bg(canvas动画iframe) 是 position:absolute 顶层元素,
 * 虽 z-index:auto 但 iframe 独立层叠, 盖住 static 的搜索框(elementFromPoint 实锤 canvas-bg 覆盖)。
 * 线上4.1810 搜索框可见, 靠给搜索区 relative + z-index 提升到 iframe 上方。
 */
body .header-big .s-search {
    position: relative !important;
    z-index: 10 !important;
}
body .header-big .s-type {
    position: relative !important;
    z-index: 10 !important;
}
body .header-big .bulletin-big {
    position: relative !important;
    z-index: 5 !important;
}
/* 降低canvas覆盖威胁: canvas作为背景不拦截点击 */
body .header-big .canvas-bg {
    z-index: 0 !important;
    pointer-events: none !important;
}

/* ==== [V6适配] 分类区块tab样式对齐线上4.1810 ====
 * 根因: V6 首页 io_home_config 的 content 模块用 slider-tab 组件(ul.slider-tab 浅灰底 + li.slider-li 选中红字白),
 * 线上 4.1810 用 slider_menu.mini_tab(透明底 + 灰色圆角tab + 文字区分选中)。两套视觉不同。
 * 用 CSS 把 V6 slider-tab 改成线上观感: 容器透明、tab 灰字圆角、去掉红色填充。
 */
body ul.slider-tab.slider-ul {
    background: transparent !important;
}
body ul.slider-tab .slider-li.tab-item {
    background: transparent !important;
    border-radius: 8px !important;
    color: #777 !important;
}
body ul.slider-tab .slider-li.tab-item.active,
body ul.slider-tab .slider-li.tab-item.active a,
body ul.slider-tab .slider-li.tab-item.active:hover,
body ul.slider-tab .slider-li.tab-item.active a:hover {
    background: transparent !important;
    color: #333 !important;
    font-weight: 600 !important;
}
body ul.slider-tab .slider-li.tab-item a {
    color: #777 !important;
    background: transparent !important;
    border-radius: 4px !important;
}

/* ==== [V6适配] 分类区块选中tab: 蓝色文字+蓝色下划线(对齐线上4.1810) ====
 * 线上 slider_menu.mini_tab 选中态 = 蓝色文字(#1677FF) + 蓝细下划线, 底色保持浅灰;
 * V6 slider-li 选中态原为填充色。改: 选中=蓝字+下划线, 非选中=灰字。
 */
/* 非选中灰字 */
body ul.slider-tab .slider-li.tab-item {
    color: #777 !important;
}
body ul.slider-tab .slider-li.tab-item a {
    color: #777 !important;
    text-decoration: none !important;
}
/* 选中: 蓝字 + 蓝下划线(用::after贴合文字宽度, 见下方) */
body ul.slider-tab .slider-li.tab-item.active a,
body ul.slider-tab .slider-li.tab-item.active,
body ul.slider-tab .slider-li.tab-item.on a,
body ul.slider-tab .slider-li.tab-item.on {
    color: #1677FF !important;
    background: transparent !important;
    font-weight: 500 !important;
    border-bottom: none !important;
    border-radius: 0 !important;
}
/* 下划线用 ::after 贴合文字宽度(padding 10px, 内容宽=li宽-20px, 底部居中) */
body ul.slider-tab .slider-li.tab-item {
    position: relative !important;
}
body ul.slider-tab .slider-li.tab-item.active::after,
body ul.slider-tab .slider-li.tab-item.on::after {
    content: "" !important;
    position: absolute !important;
    left: 10px !important;
    right: 10px !important;
    bottom: 0 !important;
    height: 2px !important;
    background: #1677FF !important;
    border-radius: 2px !important;
}

/* ==== [V6适配] 彻底移除选中tab的anchor滑动指示器(对齐线上, 线上无滑块无跟随动画) ====
 * 根因: V6 slider-tab 里 li.anchor 是跟随选中的滑动指示器(bg=主题红#f1404b),
 * 用户会看到"蓝线/红块随鼠标移到其他tab跳转动画"。线上4.1810无此滑块。
 * 选中态改用 .active::after 固定文字下划线(见上), anchor 直接隐藏。
 */
body ul.slider-tab li.anchor,
body ul.slider-tab .anchor {
    display: none !important;
}
