/* =====================================================
   QSYJ Tablet Portrait Fix
   只修复 iPad 竖屏，不影响手机与电脑
===================================================== */

@media (min-width:769px) and (max-width:1024px) and (orientation:portrait) {

  body {
    background:#f4f5f1 !important;
    overflow-x:hidden !important;
  }

  .desktop-page,
  .desktop-home {
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  .mobile-page,
  .mobile-home,
  .mobile-bottom-nav {
    display:none !important;
  }

  /* 顶部区域压缩，避免横向撑破 */
  .site-header,
  .qsyj-header,
  .desktop-header {
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  .desktop-header-inner,
  .qsyj-header-inner {
    max-width:100% !important;
    padding-left:32px !important;
    padding-right:32px !important;
    box-sizing:border-box !important;
  }

  .desktop-logo img,
  .site-logo img,
  .qsyj-logo img {
    max-width:180px !important;
    height:auto !important;
  }

  .desktop-search,
  .qsyj-search {
    max-width:260px !important;
  }

  /* 导航允许横向滚动，不强行挤压 */
  .desktop-nav,
  .qsyj-nav,
  .main-navigation {
    overflow-x:auto !important;
    white-space:nowrap !important;
    -webkit-overflow-scrolling:touch !important;
  }

  .desktop-nav a,
  .qsyj-nav a,
  .main-navigation a {
    font-size:15px !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }

  /* 首页 Hero 改为单列或安全宽度 */
  .qsyj-desktop-home,
  .desktop-home-main,
  .page-main {
    max-width:100% !important;
    padding-left:28px !important;
    padding-right:28px !important;
    box-sizing:border-box !important;
  }

  .hero,
  .home-hero,
  .qsyj-hero,
  .qsyj-hero-premium {
    width:100% !important;
    max-width:100% !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:24px !important;
    min-height:auto !important;
    overflow:hidden !important;
  }

  .hero-copy,
  .hero-image,
  .hero-quote {
    width:100% !important;
    max-width:100% !important;
  }

  .hero-copy h1,
  .qsyj-hero h1,
  .qsyj-hero-premium h1 {
    font-size:48px !important;
    line-height:1.15 !important;
    writing-mode:horizontal-tb !important;
    white-space:normal !important;
  }

  .hero-copy p,
  .qsyj-hero p,
  .qsyj-hero-premium p {
    font-size:20px !important;
    line-height:1.65 !important;
  }

  .hero-image img,
  .qsyj-hero img,
  .qsyj-hero-premium img {
    width:100% !important;
    height:auto !important;
    object-fit:cover !important;
  }

  /* 六大核心入口：iPad竖屏使用3列，不用6列 */
  .core-grid,
  .home-core-grid,
  .value-grid,
  .health-values {
    display:grid !important;
    grid-template-columns:repeat(3, 1fr) !important;
    gap:16px !important;
  }

  /* 推荐文章：iPad竖屏使用2列，不用5列 */
  .post-grid,
  .recommend-grid,
  .home-post-grid,
  .desktop-card-grid {
    display:grid !important;
    grid-template-columns:repeat(2, 1fr) !important;
    gap:18px !important;
  }

  .post-card,
  .recommend-card,
  .desktop-post-card {
    width:100% !important;
    min-width:0 !important;
  }

  .post-card-title,
  .desktop-post-card h3 {
    font-size:18px !important;
    line-height:1.45 !important;
  }

  /* 双栏内容改为单栏，避免右侧挤压 */
  .two-column,
  .home-two-column,
  .section-two-column,
  .content-sidebar-layout {
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:24px !important;
  }

  /* 页脚改为多列但不挤压 */
  .site-footer,
  .site-footer-premium {
    display:block !important;
  }

  .footer-grid,
  .footer-inner {
    display:grid !important;
    grid-template-columns:repeat(3, 1fr) !important;
    gap:24px !important;
    padding-left:32px !important;
    padding-right:32px !important;
  }
}

/* =====================================================
   QSYJ Tablet Hero Fix
   仅用于 iPad / 平板竖屏与横屏
===================================================== */

@media (min-width:769px) and (max-width:1024px){

  body{
    overflow-x:hidden !important;
  }

  .desktop-home,
  .desktop-page{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
  }

  .qsyj-hero-premium,
  .home-hero,
  .hero-section,
  .front-hero{
    width:100% !important;
    max-width:900px !important;
    margin:0 auto 28px !important;
    padding:48px 52px 36px !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:26px !important;
    min-height:auto !important;
    height:auto !important;
    overflow:visible !important;
  }

  .hero-copy,
  .hero-text,
  .qsyj-hero-copy{
    width:100% !important;
    max-width:620px !important;
    margin:0 auto !important;
    text-align:left !important;
    position:relative !important;
    z-index:2 !important;
  }

  .hero-copy h1,
  .hero-text h1,
  .qsyj-hero-copy h1{
    font-size:52px !important;
    line-height:1.12 !important;
    margin:0 0 24px !important;
    color:#006143 !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
  }

  .hero-copy p,
  .hero-text p,
  .qsyj-hero-copy p{
    font-size:22px !important;
    line-height:1.55 !important;
    margin:0 0 24px !important;
    max-width:560px !important;
  }

  .hero-actions,
  .qsyj-hero-actions{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:16px !important;
    margin-top:16px !important;
  }

  .hero-image,
  .qsyj-hero-image{
    width:100% !important;
    max-width:700px !important;
    height:330px !important;
    margin:0 auto !important;
    display:block !important;
    overflow:hidden !important;
    border-radius:0 !important;
  }

  .hero-image img,
  .qsyj-hero-image img{
    width:100% !important;
    height:100% !important;
    display:block !important;
    object-fit:cover !important;
    object-position:center center !important;
  }

  .hero-quote,
  .qsyj-hero-quote{
    width:100% !important;
    max-width:700px !important;
    margin:0 auto !important;
    padding:28px 32px !important;
  }
}