@charset "utf-8";
/*
手机端界面优化 + 底部导航栏
只在屏幕宽度 <= 980px 时生效，电脑端（> 980px）完全不受影响
主色使用变量 --ydj-accent，默认值取自主题配色
*/

/* 底部导航栏：桌面端默认隐藏 */
#mbnav{display:none;}

@media screen and (max-width: 980px) {
	:root{--ydj-accent:#d6623d;--ydj-card:#ffffff;--ydj-line:#f0f1f4;--ydj-text:#1f2329;--ydj-sub:#8b919b;}
	html{scroll-behavior:smooth;-webkit-tap-highlight-color:transparent;}

	body{
		margin-top:50px;
		background:#f4f5f7;
		font-size:14px;
		-webkit-font-smoothing:antialiased;
	}
	.container{width:auto;margin:0 10px;}

	/* ============ 顶部导航 ============ */
	#header{
		height:50px;line-height:50px;
		background:rgba(255,255,255,.98);
		border-bottom:1px solid var(--ydj-line);
		box-shadow:0 2px 12px rgba(17,24,39,.06);
	}
	.header .logo{width:100%;padding-left:14px;}
	.header .logo img{max-height:32px;}
	#mnav{right:46px;width:44px;padding:0;text-align:center;}
	#msearch{right:0;width:44px;padding:0;text-align:center;}
	#mnav i,#msearch i{font-size:19px;color:#3d4249;}

	/* 搜索框 */
	.search{top:50px;padding:12px 12px 14px;background:#fff;border-radius:0 0 14px 14px;box-shadow:0 14px 24px rgba(17,24,39,.1);}
	.search form{width:100%;display:flex;}
	.search input{float:none;flex:1;width:auto;height:40px;line-height:40px;border:1px solid #e6e8ec;border-right:0;border-radius:10px 0 0 10px;background:#f7f8fa;padding-left:12px;font-size:14px;}
	.search button{float:none;width:84px;height:40px;line-height:40px;border:0;border-radius:0 10px 10px 0;background:var(--ydj-accent);font-size:14px;}

	/* 左侧菜单（点底部“栏目”展开） */
	.mainl{
		top:50px;
		left:10px;right:10px;
		width:auto;
		max-height:calc(100vh - 60px);
		overflow-y:auto;-webkit-overflow-scrolling:touch;
		padding:8px 8px 14px;
		border-radius:0 0 16px 16px;
		box-shadow:0 16px 32px rgba(17,24,39,.16);
	}
	.mainl .nav{padding:0;}
	.widget_navbar li{padding:0;}
	.widget_navbar li a{border-radius:10px;line-height:44px;font-size:15px;margin-bottom:2px;}
	.mainl .widget_wechats img{border-radius:10px;}

	/* ============ 内容区 ============ */
	.mainc{padding-top:10px;}
	.mainc .body{background:transparent;border:0;border-radius:0;box-shadow:none;}

	/* 列表页大标题（同时兼容文章页标题） */
	.mainc h1{
		height:auto;min-height:46px;line-height:1.5;
		padding:11px 14px 11px 20px;
		background:#fff;border-left:0;border-radius:12px;
		box-shadow:0 4px 16px rgba(17,24,39,.05);
		font-size:16px;font-weight:700;color:var(--ydj-text);
		white-space:normal;text-overflow:clip;
		margin-bottom:10px;position:relative;
	}
	.mainc h1::before{
		content:"";position:absolute;left:9px;top:50%;margin-top:-8px;
		width:4px;height:16px;border-radius:3px;background:var(--ydj-accent);
	}
	.mainc h1 .tab{width:100%;}
	.mainc h1 .tab i{font-style:normal;font-weight:700;float:left;}

	/* 广告位 */
	.mainc .bannertop,.mainr .bannerright{margin:10px 0;border-radius:12px;overflow:hidden;}
	.mainc .bannertop:empty,.mainr .bannerright:empty{display:none;}

	/* ============ 幻灯片 ============ */
	#slider{height:180px;margin:0 0 10px;border-radius:14px;overflow:hidden;box-shadow:0 8px 22px rgba(17,24,39,.1);}
	.swiper-slide p{
		display:block;height:auto;line-height:20px;font-size:13px;
		padding:20px 12px 10px;
		background:linear-gradient(to top,rgba(0,0,0,.72),rgba(0,0,0,0));
		max-height:52px;overflow:hidden;
	}
	.swiper-pagination-bullets,.swiper-container-horizontal>.swiper-pagination-bullets{bottom:46px;width:100%;text-align:right;padding-right:12px;}
	.swiper-pagination-bullet{width:6px;height:6px;opacity:.8;}
	.swiper-button-next,.swiper-button-prev{display:none;}

	/* ============ 图文列表（首页/分类） ============ */
	.cms{padding:0;}
	.cms li{
		display:flex;align-items:stretch;
		padding:12px;margin-bottom:10px;
		background:var(--ydj-card);
		border:0;border-right:0;border-radius:12px;
		box-shadow:0 4px 16px rgba(17,24,39,.05);
		overflow:hidden;
	}
	.cms li:hover{background:var(--ydj-card);border-right:0;}
	.cms li .img{
		float:none;flex:0 0 108px;width:108px;height:82px;
		margin:0 12px 0 0;border-radius:9px;overflow:hidden;
	}
	.cms li .img img{border-radius:9px;}
	.cms li:hover .img img{transform:none;}
	.cms li .imgr{margin-left:0;flex:1;min-width:0;display:flex;flex-direction:column;}
	.cms li .imgr h5{
		height:auto;max-height:46px;line-height:23px;font-size:15px;
		font-weight:600;margin-bottom:8px;
		white-space:normal;overflow:hidden;
		display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
	}
	.cms li .imgr h5 a{color:var(--ydj-text);}
	.cms li .imgr p{display:none;}
	.cms li .imgr span{
		display:inline-block;align-self:flex-start;
		font-size:11px;line-height:20px;
		color:var(--ydj-accent);background:rgba(214,98,61,.09);
		padding:0 8px;border-radius:20px;
		white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;
	}
	.cms li .imgr span a{color:var(--ydj-accent);}
	.cms li .imgr span.time{
		display:block;float:none;align-self:flex-start;
		background:none;color:#a2a8b1;padding:0;
		margin-top:5px;font-size:11px;
	}

	/* ============ 纯标题列表 ============ */
	.list{padding:0;}
	.list ul{padding:0;}
	.list li{
		background:var(--ydj-card);border-radius:10px;
		padding:13px 14px;margin-bottom:8px;
		font-size:15px;line-height:1.5;
		white-space:normal;text-overflow:clip;
		box-shadow:0 3px 12px rgba(17,24,39,.04);
	}
	.list li span{color:var(--ydj-accent);font-size:12px;margin-right:10px;}
	.list li i{color:var(--ydj-accent);}

	/* ============ 分页 ============ */
	.pagebar{padding:10px 0 4px;}
	.pagebar span,.pagebar a{
		min-width:36px;line-height:36px;padding:0 11px;
		margin:4px 2px;font-size:14px;
		background:#fff;border:1px solid var(--ydj-line);
		border-radius:9px;box-shadow:none;
	}
	.pagebar span,.pagebar a:hover{background:var(--ydj-accent);border-color:var(--ydj-accent);color:#fff;}
	.ias_trigger{padding:16px 0;}
	.ias_trigger a{font-size:15px;color:var(--ydj-accent);}

	/* ============ 文章页 ============ */
	.mainc .info{
		display:flex;flex-wrap:wrap;gap:8px 12px;
		padding:12px 16px;
		margin:0;
		background:#fff;border:0;border-bottom:1px solid var(--ydj-line);
		border-radius:12px 12px 0 0;
		font-size:12px;color:var(--ydj-sub);
	}
	.mainc .info span{margin-right:0;}
	.mainc .info a{color:var(--ydj-sub);}
	.article_content{
		padding:8px 16px 20px;
		background:#fff;
		border-radius:0 0 12px 12px;
		font-size:16px;line-height:1.9;color:#333;
	}
	.mainc>.body>h1+.article_content{border-radius:12px;}
	.article_content img{border-radius:8px;}
	.article_content h2,.article_content h3,.article_content h4{
		background:#fbfbfb;border-left:3px solid var(--ydj-accent);border-radius:0 6px 6px 0;
		padding:9px 12px;margin:16px 0 10px;font-weight:600;color:#222;
	}
	.article_content h2{font-size:19px;}
	.article_content h3{font-size:17px;}
	.article_content h4{font-size:16px;}
	.article_content ul,.article_content ol{margin-left:22px;}
	.article_content table{font-size:13px;}
	.article_content pre{overflow-x:auto;border-radius:8px;padding:10px;}
	.article_content blockquote{margin:12px 0;border-radius:0 8px 8px 0;}

	/* 相关文章 / 评论区标题 */
	.mainc h3{
		background:#fff;border-left:0;border-radius:12px;
		padding:12px 16px 12px 22px;margin:14px 0 8px;
		font-size:15px;font-weight:700;color:var(--ydj-text);
		position:relative;
	}
	.mainc h3::before{
		content:"";position:absolute;left:11px;top:50%;margin-top:-8px;
		width:4px;height:16px;border-radius:3px;background:var(--ydj-accent);
	}
	.related{padding:10px 16px 14px;background:#fff;border-radius:12px;}
	.related li{font-size:14px;margin-bottom:10px;line-height:1.6;white-space:normal;}
	.related li span{color:var(--ydj-accent);margin-right:8px;}
	.related li i{color:var(--ydj-accent);}

	/* 评论 */
	.post_comments{padding:0;background:transparent;}
	#comments{background:#fff;border:0;border-radius:12px;padding:14px;}
	#comment .ping{font-size:17px;}
	.compost .com_box textarea{width:100%;min-height:92px;border-radius:9px;padding:9px;font-size:14px;}
	.compost .com_info ul{float:none;width:100%;display:block;}
	.compost .com_info li{float:none;width:100%;margin-right:0;}
	.compost .com_info li input{width:100%;height:38px;border-radius:9px;font-size:14px;}
	.compost .com_info button{width:100%;padding:10px 0;border-radius:9px;font-size:15px;float:none;}
	.comlist li{padding:14px 0;}
	.comlist li img{width:34px;height:34px;margin-left:2px;}
	.comlist li .clbody{margin-left:46px;}

	/* 404 / 搜索页 */
	.page404{background:#fff;border-radius:14px;padding:26px 16px;}
	.page404 h6{font-size:26px;line-height:1.5;text-shadow:none;color:var(--ydj-text);}
	.page404 h3{font-size:20px;}
	.serach404 form{width:100%;}
	.serach404 form input{width:72%;border-radius:9px 0 0 9px;border-right:0;}
	.serach404 form button{width:28%;border-radius:0 9px 9px 0;}
	.goindex404 a{border-radius:9px;padding:10px 34px;}

	/* 侧栏（开启后显示） */
	.mainr{padding-top:10px;}
	.widget{border-radius:12px;box-shadow:0 4px 16px rgba(17,24,39,.05);padding:12px 0;}
	.widget h4{border-left:3px solid var(--ydj-accent);border-radius:0 6px 6px 0;font-size:15px;padding-left:10px;margin-left:0;}

	/* ============ 页脚 ============ */
	#footer{
		margin-top:14px;
		padding:18px 14px calc(74px + env(safe-area-inset-bottom));
		background:#2a2d31;
		font-size:12px;line-height:22px;
	}
	#footer p{margin-bottom:6px;color:#9aa0a6;}
	#footer a{color:#c9ced6;}
	#footer img{max-width:15px;height:auto;}

	/* 返回顶部按钮上移，避免被底部导航遮挡 */
	.bottom_tools{right:12px;bottom:calc(68px + env(safe-area-inset-bottom)) !important;font-size:30px;}
	.bottom_tools a,.qr_tool{
		width:42px;height:42px;line-height:42px;border-radius:50%;
		background:rgba(31,35,41,.72);
		box-shadow:0 6px 16px rgba(17,24,39,.22);
	}
	.bottom_tools a.topcomment{line-height:44px;}

	/* ============ 底部导航栏 ============ */
	#mbnav{
		display:flex;
		position:fixed;left:0;right:0;bottom:0;z-index:1002;
		background:#fff;
		border-top:1px solid #eceef2;
		box-shadow:0 -6px 20px rgba(17,24,39,.08);
		padding-bottom:env(safe-area-inset-bottom);
	}
	#mbnav a{
		position:relative;flex:1;
		display:flex;flex-direction:column;align-items:center;justify-content:center;
		height:56px;gap:3px;
		color:#8b919b;font-size:11px;line-height:1;
		text-decoration:none;
		-webkit-tap-highlight-color:transparent;
	}
	#mbnav a i{font-size:19px;line-height:19px;transition:transform .2s ease;}
	#mbnav a span{letter-spacing:.5px;}
	#mbnav a.active{color:var(--ydj-accent);}
	#mbnav a.active i{transform:translateY(-2px);}
	#mbnav a.active::after{
		content:"";position:absolute;top:0;left:50%;
		transform:translateX(-50%);
		width:22px;height:3px;border-radius:0 0 3px 3px;
		background:var(--ydj-accent);
	}
	#mbnav a:active{background:#fafbfc;}
}

/* 超小屏微调 */
@media screen and (max-width: 360px) {
	.cms li .img{flex:0 0 96px;width:96px;height:74px;}
	.cms li .imgr h5{font-size:14px;}
	#mbnav a{font-size:10px;}
}
