/* ====================================================
   营赢杂志 PC 端正文内容可见性修复
   ====================================================
   
   问题根因：
   - PC 端（>821px）.swiper-slide 的 overflow:hidden + height:100% 
     导致 .template-scroll 的内容被截断，用户无法滚动查看正文
   - 移动端（<=820px）height:auto 使内容正常显示
   - .footer 脱离 flex 流后，.content 高度计算异常
   
   修复方案：
   - 在 PC 端将 .swiper-slide 的 overflow 改为 visible
   - 将 .template-scroll 的 max-height 设为 calc(100vh - 100px)
     使其可以正常滚动
   - 让页脚固定在视口底部
   - 强制 .content, .swiper-container, .swiper-wrapper, .home-page 
     高度为 calc(100vh - 100px)，与迁移前一致（减去 header 60px + footer 40px）
   ==================================================== */

   @media screen and (min-width: 821px) {

    /* 页脚固定在视口底部 */
    .footer {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 999 !important;
    }

    /* .content 高度保持 calc(100vh - 100px)，与迁移前一致（减去 header 60px + footer 40px） */
    .content {
        height: calc(100vh - 100px) !important;
    }

    /* .swiper-container 高度与 .content 一致 */
    .content .swiper-container {
        height: calc(100vh - 100px) !important;
    }

    /* .swiper-wrapper 高度与 .content 一致，防止 Swiper JS 设置不同高度 */
    .content .swiper-wrapper {
        height: calc(100vh - 100px) !important;
    }

    /* .home-page 最小高度与 .content 一致 */
    .content .home-page {
        min-height: calc(100vh - 100px) !important;
    }

    /* 允许 .swiper-slide 的内容溢出，不被裁断 */
    .content .swiper-container .swiper-slide {
        overflow: visible !important;
    }

    /* 让非首页的 .swiper-slide 高度由内容撑开 */
    .content .swiper-container .swiper-slide:not(.home-page) {
        height: auto !important;
    }

    /* .template-scroll 可以纵向滚动，高度不超过视口减去 header 和 footer 高度 */
    .content .swiper-container .swiper-slide .template-scroll {
        overflow-y: auto !important;
        max-height: calc(100vh - 100px) !important;
    }
}
