/* ============================================================
   responsive.css — 移动端自适应增强
   加载于 common.css 之后，仅覆盖移动端表现，桌面端不受影响
   ============================================================ */

/* ==================== 全局错位修复（桌面+移动） ==================== */
/* detail 页面包屑原样式缺失，补齐 */
.breadlist{padding:12px 0;font-size:14px;color:#777;overflow:hidden;line-height:22px}
.breadlist a{color:#777}
.breadlist a:hover{color:#9e0505}
.breadlist .icon{width:12px;height:12px;margin:0 4px;vertical-align:middle}

/* 六宫格：原固定 401.8px 宽在 1170 容器下放不下 3 列导致掉行，改 flex 三等分 */
.sixpart{display:flex;flex-wrap:wrap;gap:20px;margin-left:0;margin-right:0}
.sixpart .sixitem{width:calc((100% - 40px)/3);float:none;margin:0;box-sizing:border-box}

/* 首页资讯三栏：31.7%+margin 累计溢出 5px，改 flex 三等分 */
.addnewsbox{display:flex;flex-wrap:wrap}
.addnewsbox .sixnewbox{width:33.33%;margin-left:0;float:none;padding-left:20px;box-sizing:border-box;padding-right:5px}

/* 问答三栏：33.3%+padding 无 border-box 溢出 90px 导致第三栏被裁 */
.newsbox .newitem{box-sizing:border-box}

/* 问答/资讯详情富文本防溢出 */
.anstopcon .anscontent img,.odetailpage .odetailcon img{max-width:100%;height:auto}
.anstopcon .anscontent table,.odetailpage .odetailcon table{max-width:100%;display:block;overflow-x:auto}
.anstopcon .anscontent pre,.odetailpage .odetailcon pre{white-space:pre-wrap;word-break:break-all}

/* 详情页信息格子：长文本（籍贯/失踪地点）允许换行，防溢出边框 */
.detailCon .tracemes .mesbox .mes{overflow:hidden}
.detailCon .tracemes .mesbox .mes .mesdetail{word-break:break-all}

/* 手机抽屉导航：默认隐藏，仅 ≤767px 启用（见下方手机段） */
.navtoggle{display:none}
.navdrawer{display:none}

/* ==================== 平板（≤991px） ==================== */
@media screen and (max-width: 991px) {

  /* 紧急寻亲：12.5% → 一行4个 */
  .crashbox .topbox .topitem{width: 25%;}
  .crashbox .topbox .topitem .itemtxt{display: none !important;}

  /* 最新寻亲：10% → 一行5个 */
  .norbox .noritem{width: 20%;}
  .norbox .noritem .inner{height: 150px;}
  .norbox .noritem .itemimg{height: 150px;}
  .norbox .noritem .itemimg .imgbg{height: 150px;}

  /* 六宫格：一行2个（flex 已全局启用，改两等分） */
  .sixpart .sixitem{width: calc(50% - 10px);}
  .sixpart .sixitem .sicon .siconitem{width: 33.33%;}
  .sixpart .sixitem .sicon .siconitem .imgbox{height: 110px;}

  /* 寻人大厅列表：一行2个 */
  .hallitem{width: 49%;}
  .hallitem .hleft{width: 35%;}
  .hallitem .hleft .imgBox{height: 130px;}
  .hallitem .hright .halltxt{white-space: normal;text-overflow: clip;}

  /* 资讯列表 */
  .newspage .newslist .newitem .newsimg{width: 130px;}
  .newspage .newslist .newitem .newstxt{padding-left: 144px;}

  /* 详情页 */
  .detailCon .tracemes .itemimg{height: 200px;}
  .detailCon .tracemes .mesbox .mes{font-size: 15px;}
  .provideClue .clueBox .inputItem input{width: 240px;}
  .provideClue .clueBox .textBox{width: 360px;}

  /* 页脚：平板下介绍栏略加宽，二维码间距收紧 */
  footer .kfimgbox .kfimgleft{width: 48%;}
  footer .kfimgbox .kfimg{margin-right: 24px;}
  footer .citys .citylists{padding-right: 40px;}
}

/* ==================== 手机（≤767px） ==================== */
@media screen and (max-width: 767px) {

  /* ---------- 头部：品牌 + 搜索 + 三条杠抽屉导航 ---------- */
  /* 单行 56px 固定头，下方 whitecon 精确占位 */
  .whitecon{height: 56px;}
  .navbarbox{padding: 0;}
  .navbarbox .container{display: flex;align-items: center;height: 56px;padding: 0 12px;}
  .navbarbox .navbarbrand{font-size: 20px;line-height: 56px;padding-left: 0;margin-right: auto;flex: none;}
  .navbarbox .navbaright{float: none;display: flex;align-items: center;overflow: visible;margin: 0;}
  /* 登记按钮移入抽屉，头部只留搜索，避免窄屏挤压 */
  .navbarbox .navbarreg{display: none;}
  .navbarbox .navbar-form{float: none;display: flex;align-items: center;margin: 0;padding: 0;border: none;box-shadow: none;}
  .navbarbox .navbar-form .form-group{margin: 0;display: inline-block;vertical-align: middle;}
  .navbarbox .navbar-form .form-control{width: 96px;height: 32px;line-height: 20px;padding: 0 8px;font-size: 13px;display: inline-block;vertical-align: middle;}
  .navbarbox .navbar-form .btn{padding: 0 8px;height: 32px;line-height: 30px;font-size: 13px;display: inline-block;vertical-align: middle;}
  /* 三条杠按钮 */
  .navtoggle{display: flex;flex-direction: column;justify-content: center;gap: 4px;width: 34px;height: 34px;margin-left: 10px;padding: 0 7px;background: none;border: 0;cursor: pointer;-webkit-tap-highlight-color: transparent;}
  .navtoggle span{display: block;width: 100%;height: 2px;background: #9e0505;border-radius: 2px;}
  /* 横滑导航改为抽屉承载 */
  .navbarcon{display: none !important;}
  .navareabox{display: none;}

  /* ---------- 抽屉导航 ---------- */
  .navdrawer{display: block;position: fixed;inset: 0;z-index: 10050;pointer-events: none;}
  .navdrawer-mask{position: absolute;inset: 0;background: rgba(0,0,0,.45);opacity: 0;transition: opacity .28s ease;}
  .navdrawer-panel{position: absolute;top: 0;right: 0;bottom: 0;width: 78%;max-width: 320px;background: #fff;box-shadow: -8px 0 24px rgba(0,0,0,.18);transform: translateX(105%);transition: transform .28s ease;display: flex;flex-direction: column;overflow-y: auto;-webkit-overflow-scrolling: touch;}
  .navdrawer.open{pointer-events: auto;}
  .navdrawer.open .navdrawer-mask{opacity: 1;}
  .navdrawer.open .navdrawer-panel{transform: translateX(0);}
  body.navdrawer-open{overflow: hidden;}
  .navdrawer-head{display: flex;align-items: center;justify-content: space-between;height: 56px;padding: 0 16px;background: #9e0505;color: #fff;position: sticky;top: 0;z-index: 2;}
  .navdrawer-title{font-size: 18px;font-weight: bold;}
  .navdrawer-close{background: none;border: 0;color: #fff;font-size: 26px;line-height: 1;padding: 4px 6px;cursor: pointer;}
  .navdrawer-nav{display: flex;flex-direction: column;padding: 6px 0;border-bottom: 1px solid #f1f1f1;}
  .navdrawer-nav a{display: block;padding: 13px 18px;font-size: 16px;color: #333;border-left: 3px solid transparent;}
  .navdrawer-nav a.active{color: #9e0505;font-weight: bold;border-left-color: #9e0505;background: #fdf6f6;}
  .navdrawer-region{border-bottom: 1px solid #f1f1f1;padding-bottom: 8px;}
  .navdrawer-region summary{list-style: none;padding: 13px 18px;font-size: 15px;color: #333;position: relative;cursor: pointer;}
  .navdrawer-region summary::-webkit-details-marker{display: none;}
  .navdrawer-region summary:after{content: "";position: absolute;right: 20px;top: 17px;width: 7px;height: 7px;border-right: 2px solid #999;border-bottom: 2px solid #999;transform: rotate(45deg);transition: transform .2s ease, top .2s ease;}
  .navdrawer-region[open] summary:after{transform: rotate(-135deg);top: 21px;}
  .navdrawer-pros{display: flex;flex-wrap: wrap;gap: 8px;padding: 2px 16px 6px;}
  .navdrawer-pros a{font-size: 13px;color: #666;background: #f5f5f5;border-radius: 3px;padding: 5px 9px;}
  .navdrawer-pros a:active{background: #fdf6f6;color: #9e0505;}
  .navdrawer-foot{padding: 16px;}
  .navdrawer-foot a{display: block;height: 40px;line-height: 40px;text-align: center;background: #9e0505;color: #fff;border-radius: 4px;font-size: 15px;}

  /* ---------- 首页 ---------- */
  .banerxt{margin-top: 10px;}
  .crashbox,.normalbox{padding: 15px 10px 0;margin-top: 10px;}
  .crashbox .topbox .topitem{width: 50%;}
  .norbox .noritem{width: 33.33%;}
  .norbox .noritem .inner{height: 130px;}
  .norbox .noritem .itemimg{height: 130px;}
  .norbox .noritem .itemimg .imgbg{height: 130px;}
  .norbox .noritem .name{font-size: 12px;padding: 4px;}
  .comtitbox .comtitname{font-size: 18px;}
  .comtitbox .comtitmore{padding: 0 10px;height: 24px;line-height: 24px;font-size: 13px;}

  /* 六宫格：一行1个，单元格三等分 */
  .sixbox{padding-left: 10px;padding-right: 10px;margin-top: 10px;}
  .sixpart{gap: 15px;}
  .sixpart .sixitem{width: 100%;padding: 15px;}
  .sixpart .sixitem .sixtitle .titletxt{font-size: 17px;}
  .sixpart .sixitem .sicon{margin-top: 10px;}
  .sixpart .sixitem .sicon .siconitem{width: 33.33%;font-size: 14px;}
  .sixpart .sixitem .sicon .siconitem .imgbox{height: 96px;}

  /* 资讯三栏 → 一栏 */
  .addnewsbox{padding: 15px 15px 15px 15px;display: block;}
  .addnewsbox .sixnewbox{width: 100%;padding: 0;}
  .addnewsbox .sixnewtit .titletxt{font-size: 17px;}
  .addnewsbox .sixnewlist .snone{height: 110px;margin-top: 10px;}

  /* 问答三栏 → 一栏 */
  .newsbox{padding: 15px;}
  .newsbox .title{font-size: 18px;}
  .newsbox .newslist{box-shadow: none;margin-top: 15px;padding: 5px 0;}
  .newsbox .newitem{width: 100%;padding: 0;}
  .newsbox .newitem .newitit .titletxt{font-size: 17px;}

  /* 寻人话题 */
  .xrlabelbox{padding: 10px 10px 2px;margin-top: 10px;}
  .xrlabelbox .xrlbtxt{font-size: 14px;}

  /* ---------- 查询/搜索列表页 ---------- */
  .hallhtml{padding-top: 15px;}
  .hallhtml .bread{font-size: 13px;margin-bottom: 12px;}
  .hallhtml .hotlabel{margin-bottom: 12px;}
  .hallhtml .hotlabel .hotlabelTit{margin-right: 10px;font-size: 15px;}
  .hallhtml .hotlabel .hotlabelItem{margin-right: 8px;padding: 0 10px;font-size: 14px;}
  .hallitem{width: 100%;padding: 8px;margin-bottom: 8px;}
  .hallitem .hleft{width: 34%;margin-right: 10px;}
  .hallitem .hleft .imgBox{height: 120px;}
  .hallitem .hright .halltit{font-size: 14px;height: auto;-webkit-line-clamp: 1;}
  .hallitem .hright .halltxt{font-size: 13px;line-height: 22px;}

  /* 底部轮播三栏 → 一栏 */
  .comlists{margin-top: 10px;}
  .comlists .slidelist{margin-right: 0;}
  .comlists .slidelist .slideitem{width: 100%;float: none;border-right: none;border-bottom: 12px solid #f5f5f5;box-sizing: border-box;padding-bottom: 5px;}

  /* ---------- 寻人问答列表 ---------- */
  .anstopicbox{padding: 12px 12px 8px;margin-top: 10px;}
  .anstopicbox .anslistsbox .anslists .anslists{width: 100%;}
  .anstopicbox .anslistsbox .anslists .ansitem{padding-top: 12px;padding-bottom: 12px;}
  .anstopicbox .anslistsbox .anslists .anstit{font-size: 16px;white-space: normal;}

  /* 问答/资讯详情 → 单栏 */
  .detailCon{padding: 0 12px;}
  .detailCon .tracemesbox{width: 100%;}
  .detailCon .traceTitle{font-size: 20px;padding: 20px 5px 0;word-break: break-all;}
  .detailCon .traceTime{font-size: 14px;}
  .detailCon .tracemes{margin-top: 15px;}
  .detailCon .tracemes .topmes{padding-left: 5px;}
  .detailCon .tracemes .itemimg{width: 40%;height: 170px;float: left;}
  .detailCon .tracemes .mesbox{width: 60%;}
  /* 信息格子：允许换行自适应高度，防长文本溢出 */
  .detailCon .tracemes .mesbox .mes{font-size: 14px;height: auto;min-height: 42px;line-height: normal;padding: 9px 0;}
  .detailCon .tracemes .mesbox .mes .mestit,.detailCon .tracemes .mesbox .mes .mesdetail{line-height: 22px;vertical-align: middle;}
  .detailCon .tracemes .mesbox .mes .mesdetail{padding-right: 4px;}
  .detailCon .tracemes .mesbox .addmes{font-size: 14px;}
  .detailCon .botmes .bottitle{font-size: 17px;}
  .detailCon .botmes .missdetail{font-size: 15px;line-height: 26px;}
  .detailCon .detailtips{padding: 12px;margin-top: 15px;}
  .detailCon .detailtips .tipTit{font-size: 16px;line-height: 30px;}
  .detailCon .detailtips .tiplists{font-size: 14px;line-height: 24px;}

  /* 线索表单：单栏铺满 */
  .provideClue .clueBox{width: 100%;float: none;}
  .provideClue .clueBox .inputItem .inputTit{width: 90px;font-size: 14px;}
  .provideClue .clueBox .inputItem input{width: calc(100% - 90px);box-sizing: border-box;min-width: 0;}
  .provideClue .clueBox .textBox{width: 100%;}
  .provideClue .clueBox textarea{font-size: 14px;}
  /* 上传图片：两列布局，防文字溢出 */
  .provideClue .upload-content .content-img .file{width: 48%;height: 90px;line-height: 90px;font-size: 12px;margin-right: 2%;box-sizing: border-box;text-align: center;}
  .provideClue .upload-content .content-img .file input{height: 90px;}
  .provideClue .upload-content .content-img .content-img-list-item{width: 48%;height: 90px;margin-left: 2%;box-sizing: border-box;}
  .provideClue .upload-content .content-img .content-img-list-item img{height: 90px;}
  .provideClue .cluetipcon{width: 100%;float: none;font-size: 14px;line-height: 24px;}

  /* ---------- 资讯列表 ---------- */
  .newspage .newslists{padding: 0 12px;}
  .newspage .newslist{width: 100%;padding-left: 0;}
  .newspage .newslist .newitem .newsimg{width: 100px;margin-right: 10px;}
  .newspage .newslist .newitem .newstxt{padding-left: 112px;padding-top: 6px;}
  .newspage .newslist .newitem .toptit .newstitle{font-size: 15px;}
  .newspage .newslist .newitem .newsdetail a{height: 40px;}

  /* ---------- 资讯详情 ---------- */
  .odetailpage{padding: 0 12px;}
  .odetailpage .odetailcon{width: 100%;}
  .odetailpage .odetailcon .odetailTitle{font-size: 20px;word-break: break-all;}
  .odetailpage .odetailcon div p{font-size: 15px;}

  /* ---------- 寻亲登记表单 ---------- */
  .publishForm{margin: 15px 12px;padding: 20px 15px;}
  .publishForm h2{font-size: 19px;margin-bottom: 15px;}
  .publishForm label{width: 100%;text-align: left;margin-right: 0;margin-bottom: 6px;display: block;}
  .publishForm input[type=text],.publishForm input[type=date],.publishForm select,.publishForm textarea{width: 100%;font-size: 15px;}
  .publishForm .submitbtn{width: 100%;max-width: 300px;}

  /* ---------- 寻亲登记（扫码登录卡片） ---------- */
  .publishPage{margin-top: 10px;padding-top: 0;min-height: 420px;}
  .publishPage .pubright{width: calc(100% - 24px);margin: 30px auto 0;padding: 22px 14px 30px;box-sizing: border-box;}
  .publishPage .pubright .pubTitle{font-size: 18px;}
  .publishPage .pubright .pubTip{font-size: 14px;}
  .publishPage .pubright .codeimg{width: 180px;height: 180px;}
  .publishPage .pubright .pubsteps p{font-size: 13px;line-height: 26px;}

  /* ---------- 分页 ---------- */
  .pagination{display: flex;flex-wrap: wrap;justify-content: center;}
  .pagination > li > a,.pagination > li > span{padding: 5px 10px;font-size: 14px;}

  /* 问答顶部标题允许换行 */
  .anstopcon .anstitle{white-space: normal;word-break: break-all;}
  .anstopcon{padding: 15px;}

  /* ---------- 页脚：恢复显示（common.css 在 768px 直接 display:none，导致手机端页脚信息全丢） ---------- */
  footer{display: block !important;margin-top: 24px;font-size: 13px;}
  footer .citys{padding: 0 15px 16px;box-sizing: border-box;}
  /* 友情链接：原来固定高 60px + 右内边距 80px（给展开按钮留位），手机上会截断，改为自适应换行 */
  footer .citys .citylists{height: auto;padding-right: 0;overflow: visible;}
  footer .citys .citystit{display: block;font-size: 15px;margin: 0 0 8px;}
  footer .citys .citylist .cityitem{padding-right: 14px;font-size: 13px;line-height: 26px;}
  /* 介绍 + 二维码：由左右两栏改为上下两段，避免 40% 窄列把文字挤成一条 */
  footer .kfimgbox{padding-top: 14px;}
  footer .kfimgbox .kfimgtit{font-size: 15px;margin-bottom: 8px;}
  footer .kfimgbox .kfimgleft{float: none;width: 100%;}
  footer .kfimgdes{font-size: 13px;line-height: 22px;margin: 0;color: #8d8d8d;}
  footer .kfimgbox .kfimgright{float: none;margin-top: 16px;}
  footer .kfimgbox .kfimgcon{display: flex;flex-wrap: wrap;gap: 20px;}
  footer .kfimgbox .kfimg{float: none;margin-right: 0;}
  footer .kfimg .codeimg{width: 88px;height: 88px;}
  footer .kfimg .codetxtsm{margin-top: 6px;font-size: 12px;}
  footer .splitline{margin-top: 16px;}
  /* 版权条：留出底部间距，避免被右下角悬浮"发布寻人"按钮压住 */
  footer .fbot{padding: 12px 15px calc(48px + env(safe-area-inset-bottom));line-height: 24px;}
  footer .fbot .copyright{font-size: 12px;}
  footer .fbot .tech{font-size: 12px;}
  footer .fbot a{padding-left: 8px;}
}

/* ==================== 小屏手机（≤400px） ==================== */
@media screen and (max-width: 400px) {
  .crashbox .topbox .topitem{width: 50%;}
  .norbox .noritem{width: 50%;}
  .norbox .noritem .inner{height: 170px;}
  .norbox .noritem .itemimg{height: 170px;}
  .norbox .noritem .itemimg .imgbg{height: 170px;}
  .detailCon .tracemes .mesbox .mes{font-size: 13px;}
  .hallitem .hleft{width: 36%;}
  /* 窄屏头部：搜索框再缩一档，防止与登记按钮挤压换行 */
  .navbarbox .navbar-form .form-control{width: 88px;}
  .navbarbox .navbar-brand{padding-left: 10px;}
  .navbarbox .navbaright{margin-right: 10px;}
  /* 扫码卡片：小屏二维码与步骤文字再缩一档 */
  .publishPage .pubright .codeimg{width: 160px;height: 160px;}
  .publishPage .pubright .pubsteps p{font-size: 12px;}
}
