/* =========================================================
   科仪有维首页手机版定向优化
   适用模板：body.authority-home.authority-home-v3
   作用范围：仅手机端（<=768px）
   版本：2026071718

   调整内容：
   1. “我有检测需求 / 我有仪器能力”同一排展示
   2. 手机端隐藏六类检测能力
   3. 工程师资源每行展示2名
   4. 科技头条标题固定1行省略
   5. 专题专区每行展示2个专题
   ========================================================= */

@media (max-width:768px){

  /* ---------------------------------------------------------
     一、检测服务与开放共享：两个入口同排
     --------------------------------------------------------- */
  body.authority-home-v3 .kyyw-testing-actions{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
    width:100%;
  }

  body.authority-home-v3 .kyyw-testing-action{
    display:flex;
    min-width:0;
    min-height:158px;
    padding:15px 12px 13px !important;
    flex-direction:column;
  }

  body.authority-home-v3 .kyyw-testing-action-type{
    margin-bottom:8px;
    font-size:11px;
    line-height:1.4;
  }

  body.authority-home-v3 .kyyw-testing-action h3{
    margin:0 0 7px;
    font-size:17px !important;
    line-height:1.45;
  }

  body.authority-home-v3 .kyyw-testing-action p{
    display:-webkit-box;
    min-height:39px;
    margin:0;
    overflow:hidden;
    font-size:12px !important;
    line-height:1.65 !important;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
  }

  body.authority-home-v3 .kyyw-testing-action-link{
    margin-top:auto;
    padding-top:10px;
    font-size:12px;
  }

  /* 手机端不展示“色谱与质谱分析”等六类能力 */
  body.authority-home-v3 .kyyw-testing-grid{
    display:none !important;
  }

  body.authority-home-v3 .kyyw-testing-bottom{
    margin-top:12px;
  }

  /* ---------------------------------------------------------
     二、工程师资源：一行2名，4名形成2×2
     --------------------------------------------------------- */
  body.authority-home-v3 .kyyw-engineer-list{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
    padding:10px !important;
  }

  body.authority-home-v3 .kyyw-engineer-item{
    display:flex !important;
    min-width:0;
    min-height:86px;
    padding:10px 9px !important;
    flex-direction:column;
    align-items:flex-start !important;
    justify-content:flex-start;
  }

  body.authority-home-v3 .kyyw-engineer-item .kyyw-resource-tag{
    display:block;
    max-width:100%;
    margin:0 0 8px;
    overflow:hidden;
    padding:3px 7px;
    font-size:10px;
    line-height:1.45;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  body.authority-home-v3 .kyyw-engineer-item strong{
    display:block;
    width:100%;
    min-width:0;
    margin:0;
    overflow:hidden;
    font-size:16px !important;
    line-height:1.45;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  body.authority-home-v3 .kyyw-engineer-item i{
    display:none !important;
  }

  /* ---------------------------------------------------------
     三、科技头条：标题固定1行
     --------------------------------------------------------- */
  body.authority-home-v3 .focus-news-v4 li{
    min-width:0;
  }

  body.authority-home-v3 .focus-news-v4 li a{
    display:block !important;
    min-width:0;
    overflow:hidden !important;
    white-space:nowrap !important;
    text-overflow:ellipsis !important;
    -webkit-box-orient:initial !important;
    -webkit-line-clamp:initial !important;
  }

  /* ---------------------------------------------------------
     四、专题专区：一行2个
     --------------------------------------------------------- */
  body.authority-home-v3 .kyyw-topic-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:9px !important;
    padding:10px !important;
  }

  body.authority-home-v3 .kyyw-topic-card{
    display:flex;
    min-width:0;
    min-height:188px;
    padding:15px 12px 13px !important;
    flex-direction:column;
  }

  body.authority-home-v3 .kyyw-topic-index{
    margin-bottom:10px;
    font-size:12px;
  }

  body.authority-home-v3 .kyyw-topic-card h3{
    margin:0 0 8px;
    font-size:16px !important;
    line-height:1.5;
  }

  body.authority-home-v3 .kyyw-topic-card p{
    display:-webkit-box;
    margin:0;
    overflow:hidden;
    font-size:12px !important;
    line-height:1.7 !important;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
  }

  body.authority-home-v3 .kyyw-topic-link{
    margin-top:auto;
    padding-top:10px;
    font-size:12px;
  }
}

/* 兼容较窄手机：仍保持两个入口、两个工程师和两个专题同排 */
@media (max-width:420px){
  body.authority-home-v3 .kyyw-testing-actions,
  body.authority-home-v3 .kyyw-engineer-list,
  body.authority-home-v3 .kyyw-topic-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  body.authority-home-v3 .kyyw-testing-action{
    min-height:150px;
    padding-left:10px !important;
    padding-right:10px !important;
  }

  body.authority-home-v3 .kyyw-topic-card{
    min-height:180px;
    padding-left:10px !important;
    padding-right:10px !important;
  }
}
