/* =========================================================
   移动端适配（2026-11-08）
   ---------------------------------------------------------
   独立文件而不是塞进 style.css，原因有两个页面（dynamics / preview）
   根本没有引入 style.css，只引了自己的 CSS；把这些规则单独成文件，
   每个页面在 </head> 前引一次就能全站一致。
   必须放在页面自身 CSS 之后加载，靠顺序覆盖，不靠 !important 堆叠。
   ========================================================= */

/* 问题：drop.css 把 #topnanv 写死 1200px，index.css 把 .jst-con/.wrap 写死 1200px，
   首页 .search-box .keyword 写死 670px + margin-left:140px。
   390px 视口下整页横向溢出 826px，登录区被推到 left:1117 完全看不见，
   也没有任何折叠菜单入口。
   方案：≤991px 收成「logo + 登录 + 汉堡」，导航落成下拉抽屉；
        #anvlfteb 直接复用（不复制 DOM），保证导航只有一份数据源。 */

/* 全局钳制：.jst-con/.wrap 写死 1200px，但 1200~1409px 的容器只有 1170px、
   992~1199px 的容器只有 960px，都会被撑出横向滚动条。
   只加 max-width 收窄，桌面 1440（容器 1380 > 1200）完全不受影响。 */
.jst-con,
.wrap {
	max-width: 100%;
}

/* 兜底：手机模拟下布局视口一旦被撑大过一次，.preloader / .right_nav 这些
   position:fixed 的元素会跟着撑大到新的视口宽度，把横向溢出「锁死」
   （实测 390px 视口被锁死在 441px，且再也无法回落）。 */
@media (max-width: 991px) {
	/* 真正的种子：.right_nav li 用 right:-70px 让条子外探 70px（桌面 hover 露出效果），
	   手机上没有 hover，只会把布局视口撑大、把整条客服栏推出屏幕外。收平即可。 */
	.right_nav li {
		right: 0 !important;
	}

	/* 悬浮条本身贴边即可，宽度自适应内容 */
	.right_nav {
		max-width: 60vw;
	}

	/* 保险：即使还有残余的布局溢出，也不允许根元素横向滚动 */
	html {
		overflow-x: hidden;
	}
}


/* ≤1409：容器只有 1170px（1200~1409 档）或更窄，#topnanv 的 1200 定宽会撑出去；
   1440 以上容器 1380px，保持原样 */
@media (max-width: 1409px) {
	#topnanv {
		width: 100% !important;
		max-width: 100%;
		box-sizing: border-box;
	}
	.header-top .container {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}
	div.header-top .posbox a {
		padding: 0 12px;
	}
}

/* 汉堡按钮：默认不显示，≤991 出现 */
.wb-burger {
	display: none;
	position: relative;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	margin-left: 4px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.wb-burger span {
	position: absolute;
	left: 11px;
	width: 20px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .25s ease, opacity .18s ease, top .25s ease;
}

.wb-burger span:nth-child(1) { top: 14px; }
.wb-burger span:nth-child(2) { top: 20px; }
.wb-burger span:nth-child(3) { top: 26px; }

body.wb-nav-open .wb-burger span:nth-child(1) { top: 20px; transform: rotate(45deg); }
body.wb-nav-open .wb-burger span:nth-child(2) { opacity: 0; }
body.wb-nav-open .wb-burger span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* 抽屉打开时的遮罩，点击任意空白处收起 */
.wb-nav-mask {
	position: fixed;
	top: 56px;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, .42);
	opacity: 0;
	visibility: hidden;
	transition: opacity .22s ease, visibility .22s ease;
	z-index: 9990;
}

body.wb-nav-open .wb-nav-mask {
	opacity: 1;
	visibility: visible;
}

/* ≤991：折叠为抽屉 */
@media (max-width: 991px) {
	div.header-top,
	div.header-top #topnavbar {
		height: 56px !important;
	}

	div.header-top #topnanv {
		width: 100% !important;
		display: flex !important;
		align-items: center;
		justify-content: flex-start;
		height: 56px !important;
		line-height: 56px !important;
		overflow: visible;
	}

	div.header-top .defu {
		float: none !important;
		flex: 0 0 auto;
		height: 56px;
		display: flex;
		align-items: center;
	}

	div.header-top .defu a { padding: 0 !important; }

	div.header-top .hhb-logo img {
		width: 104px !important;
		margin: 0 !important;
	}

	/* 登录区靠右，汉堡跟在它后面 */
	div.header-top #loginbtm {
		float: none !important;
		margin-left: auto;
		padding: 0 !important;
		height: 56px;
		line-height: 56px;
		display: flex;
		align-items: center;
		white-space: nowrap;
	}

	div.header-top #loginbtm .right-item-box { font-size: 14px; }
	div.header-top #loginbtm > .dropdown { display: inline-block; }

	/* 已登录时这一块是「个人中心 / 用户XXX / 退出登录」，390px 放不下，
	   把“用户”与用户名文字压成 0 号字（保留链接本身），只留两个入口 */
	div.header-top #loginbtm .pro_user { font-size: 0 !important; }
	div.header-top #loginbtm .pro_user a,
	div.header-top #loginbtm .pro_user .userCenter,
	div.header-top #loginbtm .pro_user .loginOut {
		font-size: 13px !important;
	}
	div.header-top #loginbtm .pro_user .userCenter,
	div.header-top #loginbtm .pro_user .loginOut {
		padding: 0 4px;
	}

	.wb-burger { display: block; }

	/* 导航抽屉：复用 #anvlfteb，收起时只做透明/位移，不影响布局。
	   宽度必须用 100vw 而不是 100%：手机上页面一旦有横向溢出，
	   Chrome 会把布局视口撑大，fixed 元素的 100% 会跟着变大，形成正反馈。 */
	div.header-top #anvlfteb {
		position: fixed;
		top: 56px;
		left: 0;
		right: auto;
		float: none !important;
		width: 100vw !important;
		max-width: 100vw;
		height: auto !important;
		max-height: calc(100vh - 56px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 6px 0 10px;
		background: #fff;
		box-shadow: 0 12px 26px rgba(15, 23, 42, .18);
		border-top: 1px solid #eef2f7;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-6px);
		transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
		z-index: 9995;
	}

	body.wb-nav-open #anvlfteb {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	/* 抽屉里的每一项：整行可点，深色文字（头部本身可能是深蓝底） */
	div.header-top #anvlfteb .posbox {
		float: none !important;
		display: block;
		height: auto !important;
		line-height: 1.4;
		border-bottom: 1px solid #f1f5f9;
	}

	div.header-top #anvlfteb .posbox:last-of-type { border-bottom: 0; }

	div.header-top #anvlfteb .posbox > a {
		display: block;
		padding: 15px 20px !important;
		font-size: 15px;
		font-weight: 500;
		color: #1f2937 !important;
	}

	div.header-top #anvlfteb .posbox > a:hover,
	div.header-top #anvlfteb .posbox > a:active {
		color: #1a6cf5 !important;
		background: #f8fafc;
	}

	div.header-top #anvlfteb .posbox i { display: none; }

	/* 当前页在抽屉里的高亮（去掉深底样式下的下划线装饰） */
	div.header-top #anvlfteb .posbox.nav-current > a {
		color: #1a6cf5 !important;
		font-weight: 600;
	}
	div.header-top #anvlfteb .posbox.nav-current::after { display: none; }

	/* 旧版下拉框（#seledbox）在移动端不参与布局 */
	div.header-top #anvlfteb #seledbox { display: none !important; }

	/* 抽屉打开时锁住页面滚动 */
	body.wb-nav-open { overflow: hidden; }
}

/* =========================================================
   移动端：首页首屏 / 搜索区 / 功能卡片
   ========================================================= */
@media (max-width: 991px) {
	.jst-con,
	.wrap {
		width: 100% !important;
		max-width: 100%;
		box-sizing: border-box;
		padding-left: 16px;
		padding-right: 16px;
	}

	.section-con {
		height: auto !important;
		padding-bottom: 26px;
		background-size: cover;
		background-position: 50% 50%;
	}

	.section-con .title {
		padding-top: 34px;
		font-size: 25px;
		line-height: 1.35;
		letter-spacing: .04em;
	}

	.banner-menu {
		display: flex;
		justify-content: center;
		gap: 10px;
		height: auto;
		margin: 20px 0 12px !important;
	}

	.banner-menu li {
		float: none;
		width: auto;
		margin-right: 0;
	}

	.banner-menu li a {
		padding: 0 12px;
		height: 32px;
		line-height: 32px;
		font-size: 15px;
	}

	.search-box {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		height: auto !important;
	}

	.search-box .keyword {
		flex: 1 1 100%;
		width: 100% !important;
		height: 46px !important;
		margin-left: 0 !important;
		border-radius: 8px !important;
		box-sizing: border-box;
		font-size: 15px !important;
	}

	.search-btn {
		flex: 1 1 0;
		width: auto !important;
		height: 44px !important;
		line-height: 44px !important;
		border-radius: 8px !important;
		font-size: 15px !important;
		float: none;
	}

	.ad-con {
		flex: 1 1 0;
		float: none;
		position: static;
		margin-top: 0 !important;
	}

	.ad-con .adsearch {
		width: 100%;
		height: 44px !important;
		line-height: 44px !important;
		margin-left: 0;
		font-size: 15px;
		border-radius: 8px;
		box-sizing: border-box;
	}

	.ad-con .hot-img { display: none; }

	.search-more {
		width: 100% !important;
		left: 0 !important;
		top: 56px !important;
		box-sizing: border-box;
	}

	/* 四张功能卡片：横向两列，避免 22% 宽度把文字压成一列一个字 */
	.list-bottom {
		flex-wrap: wrap;
		height: auto !important;
		padding: 18px 16px !important;
		margin-top: 28px !important;
		gap: 16px 0;
		top: 0 !important;
		background-size: cover;
	}

	.list-bottom li {
		width: 50% !important;
		box-sizing: border-box;
		padding-right: 10px;
	}

	.list-bottom li .right .top .title { font-size: 15px; }
	.list-bottom li .right .text { font-size: 12px; line-height: 1.55; }

	/* 全局 .container 被置为 padding:0，Bootstrap 的 .row 用 -15px 负边距，
	   手机上会把行撑出视口 15px；恢复容器内边距让负边距被抵消 */
	.container {
		padding-left: 15px !important;
		padding-right: 15px !important;
		box-sizing: border-box;
	}

	.header-top .container {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}
}

/* ≤1409：容器不足 1200px 的档位（1200~1409 容器 1170、992~1199 容器 960），
   index.css 里项目列表标题写死 width:1180px + nowrap 会撑出横向滚动条。
   改成随容器收缩，超出部分省略号（浮动在右边的日期不受影响）。
   桌面 1440（容器 1380）不在此范围，保持原样。 */
@media (max-width: 1409px) {
	.comm-list li p a {
		display: block;
		width: auto !important;
		max-width: 100%;
		box-sizing: border-box;
	}

	/* 列表底部「来源 / 业务类型 / 信息类型」每项 margin-right:100px，
	   手机上直接把行撑出视口（实测是 390px 视口被撑到 441px 的元凶） */
	.comm-list li > span {
		margin-left: 0 !important;
		margin-right: 14px !important;
	}
}

/* ≤1199：平板/手机档收掉 Bootstrap row 的 -15px 负边距。
   这套模板里很多容器（含页脚的 .bg-dark.footer）没有 15px 内边距，
   负边距只会把行撑出视口。负边距本来就是配合容器内边距用的，收掉无副作用。 */
@media (max-width: 1199px) {
	.row {
		margin-left: 0;
		margin-right: 0;
	}
}

@media (max-width: 420px) {
	.section-con .title { font-size: 22px; }
	.list-bottom li { width: 100% !important; }
	.list-bottom li .right .text { font-size: 12.5px; }
}
