/* ==========================================================================
   光锥智能官网 · 手机版修复 v1（2026-11-29）
   只对手机生效：竖屏 (max-width:768px) and (orientation:portrait)
               横屏 (max-height:560px) / 宽度 ≤768px
   PC（宽>768 且 高>560）不命中任何规则；唯一的全局规则是
   picture.mfp{display:contents}
picture.mfp > source{display:none} 与 [hidden] 新增元素，
   它们只作用于本次新增的元素，PC 外观不变。
   ========================================================================== */

/* 新增的 <picture class="mfp"> 包裹层不参与布局：PC 上与原 <img> 完全一致 */
picture.mfp{display:contents}
picture.mfp > source{display:none}

/* ---------- 手机竖屏 + 横屏（与站点现有“紧凑视图”同一判定） ---------- */
@media (max-width:768px), (max-height:560px){
  /* S4 页脚电话：手机端显示可拨号链接，隐藏原纯文本 */
  .site-footer .f-col .f-phone{display:none !important}
  .site-footer .f-col .f-phone-m{display:block !important}
  .site-footer .f-col .f-phone-m a{display:inline-block;padding:10px 0;color:rgba(255,255,255,.82)}
}

/* ---------- 手机竖屏 ---------- */
@media (max-width:768px) and (orientation:portrait){

  /* S2 取消整屏强制吸附：恢复整页自然滚动（与横屏同一机制：由文档滚动） */
  html{height:auto !important}
  body,
  body.is-about,
  body.is-careers,
  body.is-product-deck,
  body.is-home{
    height:auto !important;
    min-height:0 !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    scroll-snap-type:none !important;
    scroll-behavior:auto !important;
  }
  body.is-about .snap-root,
  body.is-careers .snap-root,
  .snap-root,
  body.is-product-deck .deck-root,
  .deck-root{
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    scroll-snap-type:none !important;
    padding-bottom:0 !important;
  }
  .hero,
  .snap-section,
  .snap-footer-wrap,
  .deck-slide,
  .article-hero,
  article.article,
  .siblings,
  .contact-page,
  .biz-page .band,
  .biz-stack .band,
  .page-main,
  body > .site-footer,
  body.is-home .site-footer{
    scroll-snap-align:none !important;
    scroll-snap-stop:normal !important;
  }

  /* S1 + S2 内容屏：高度随内容、顶部对齐，不再屏内滚动 */
  body.is-about .snap-section,
  body.is-careers .snap-section,
  body.is-product-deck .deck-slide,
  .snap-footer-wrap,
  article.article,
  .page-main,
  .siblings{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
  }
  body.is-product-deck .deck-light,
  body.is-product-deck .deck-slide:not(.deck-cover){
    align-items:flex-start !important;
    justify-content:flex-start !important;
    padding-top:56px !important;
    padding-bottom:48px !important;
  }
  body.is-product-deck .deck-slide.deck-siblings{padding-top:48px !important;padding-bottom:40px !important}
  body.is-product-deck .deck-slide.snap-footer-wrap{padding-top:0 !important;padding-bottom:0 !important}

  /* 需要保持整屏的图片屏：封面、关于-业务板块条带、团队风采、招聘首屏、联系页 */
  body.is-product-deck .deck-cover{
    height:100svh !important;
    min-height:100svh !important;
    align-items:center !important;
    justify-content:center !important;
  }
  body.is-about #business,
  body.is-about #team{height:100svh !important;min-height:100svh !important;overflow:hidden !important}
  body.is-careers .snap-section:first-child{height:100svh !important;min-height:100svh !important}
  .contact-page{height:auto !important;min-height:100svh !important;max-height:none !important;overflow:visible !important}

  /* 关于我们：首屏留出顶栏，其余屏正常间距 */
  body.is-about .snap-section .sec-inner{padding-bottom:48px !important}
  body.is-about .snap-section:not(:first-child) .sec-inner{padding-top:56px !important}
  /* 服务体系图：高度改由图自身比例决定（原来依赖整屏高度） */
  body.is-about #service .sec-inner.service-inner{height:auto !important}
  body.is-about #service .itss-ref{aspect-ratio:3501/2300 !important;flex:none !important;height:auto !important;min-height:0 !important}
  /* 招聘：职位屏图片不再被顶栏遮挡问题由文档滚动 + 顶栏偏移处理 */
  body.is-careers .snap-section:not(:first-child){padding-top:0 !important}

  /* S3 AI 页首屏：底图换成无字场景图（见文件末尾 CSS 属性选择器，HTML 未改），标题正常显示 */
  .article-hero.cover-hero{
    height:100svh !important;
    max-height:100svh !important;
    aspect-ratio:auto !important;
    align-items:center !important;
    justify-content:center !important;
  }
  .article-hero.cover-hero .band-bg{filter:brightness(.62) !important;background-position:center center !important}
  .article-hero.cover-hero .band-bg::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(6,10,18,.25),rgba(6,10,18,.15) 45%,rgba(6,10,18,.45))}
  .article-hero.cover-hero .inner{
    position:relative !important;
    z-index:1;
    height:auto !important;
    padding:0 24px !important;
    text-align:center;
    color:#fff;
  }
  .article-hero.cover-hero .kicker{
    display:block !important;
    margin:0 0 14px;
    font-size:14px;
    letter-spacing:.24em;
    color:var(--lime,#c6e053);
  }
  .article-hero.cover-hero h1{
    position:static !important;
    width:auto !important;
    height:auto !important;
    margin:0 !important;
    overflow:visible !important;
    clip:auto !important;
    font-size:clamp(30px,8.6vw,40px) !important;
    font-weight:300 !important;
    letter-spacing:.12em !important;
    line-height:1.3;
    color:#fff;
    text-shadow:0 2px 12px rgba(0,0,0,.35) !important;
  }

  /* S4 页脚：去掉整屏空白，显示地址/邮箱/电话/栏目（内容为现有 PC 页脚） */
  .site-footer,
  body.is-home .site-footer,
  .snap-footer-wrap .site-footer,
  body > .site-footer{
    min-height:0 !important;
    height:auto !important;
    display:block !important;
    padding:40px 24px 20px !important;
    background:#0c1118;
  }
  .site-footer .f-wrap,
  body.is-home .site-footer .f-wrap{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:28px 20px !important;
    align-items:start !important;
    justify-content:stretch !important;
    text-align:left !important;
    width:100% !important;
    max-width:none !important;
    padding:0 0 24px !important;
  }
  .site-footer .f-brand{
    grid-column:1 / -1;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:14px !important;
  }
  .site-footer .f-legal-name{text-align:left !important;font-size:14px !important;color:rgba(255,255,255,.85) !important}
  .site-footer .f-logo img{height:32px !important;width:auto}
  .site-footer .f-col{display:block !important}
  .site-footer .f-col:last-child{grid-column:1 / -1;order:-1}
  .site-footer .f-brand{order:-2}
  .site-footer .f-col h4{margin:0 0 6px !important;font-size:14px !important;color:#fff}
  .site-footer .f-col a,
  .site-footer .f-col p{display:block !important;padding:0 !important;font-size:14px !important;line-height:1.6;color:rgba(255,255,255,.72)}
  .site-footer .f-col > a{padding:10px 0 !important;line-height:1.5}
  .site-footer .f-col a.sub{display:none !important}
  .site-footer .f-col p{margin:0 0 4px !important}
  .site-footer .f-col p a{display:inline-block !important;padding:10px 0 !important;color:rgba(255,255,255,.82)}
  .site-footer .f-bottom{
    display:flex !important;
    flex-direction:column;
    align-items:center;
    gap:4px;
    width:auto !important;
    padding:16px 0 4px !important;
    border-top:1px solid rgba(255,255,255,.1) !important;
    font-size:12px !important;
    color:rgba(255,255,255,.5);
    text-align:center;
  }
  .site-footer .f-bottom span:first-child{display:block !important}
  .site-footer .f-bottom a{display:inline-block;padding:8px 0;color:rgba(255,255,255,.62)}
}

/* S3 AI 页手机竖屏首屏：用同页 PC 版已在用的无字场景图替换带字横幅 */
@media (max-width:768px) and (orientation:portrait){
  .article-hero.cover-hero .band-bg[style*="ai-hospital-cover"]{background-image:url("../images/ai-hospital-scene.webp") !important}
  .article-hero.cover-hero .band-bg[style*="ai-community-cover"]{background-image:url("../images/ai-community-scene.webp") !important}
  .article-hero.cover-hero .band-bg[style*="ai-enterprise-cover"]{background-image:url("../images/ai-enterprise-scene.webp") !important}
}

/* S5 手机专用小图（新文件在 images/m/，原图不动；PC 不命中，仍加载原图） */
@media (max-width:768px), (max-height:560px){
  #honors[style*="star-049"]{background-image:url("../images/m/star-049.webp") !important}
  .band-bg[style*="team-project.webp"]{background-image:url("../images/m/team-project.webp") !important}
}
