/* =====================================================
   Liljas Plast — 手机 / 平板响应式（加载于 style.css 之后）
   头部、菜单、页脚三个页面一致，这里只写一份；新闻页自己的类单独标注。
   ===================================================== */

/* ---- 平板：首页新闻卡与页脚两列 ---- */
@media (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}

/* ---- 新闻页页脚：640 起两列（1024 起回到三列） ---- */
@media (min-width: 640px) and (max-width: 1023.9px) {
    .site-footer-news .footer-cols { grid-template-columns: 1fr 1fr; }
}

/* ---- 手机 ---- */
@media (max-width: 768px) {
    /* 容器左右 gutter 20px */
    .container { padding-left: 20px; padding-right: 20px; }

    /* 首页 hero：手机端内容本来就垂直居中，不再保留桌面的纵向留白 */
    .hero-content { padding-top: 0; padding-bottom: 0; }

    /* 顶部栏：无联系按钮、logo 28px、透明底白线汉堡 */
    .header-actions .btn-primary { display: none; }
    .logo img { height: 28px; }
    .header-actions .btn-menu { background: transparent; padding: 0; }
    .header-actions .btn-menu:hover { background: transparent; }
    .burger { gap: 4px; }
    .burger i { width: 24px; height: 3px; background: #fff; }
    .menu-label { display: none; }

    /* 主导航：纵向大字列表 */
    .menu-primary { flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 0; }
    .menu-primary > li { width: 100%; border-bottom: none; padding: 16px 0; }
    .menu-primary button,
    .menu-primary a { padding: 6px 0; font-size: 24px; font-weight: 700; text-transform: uppercase; color: #031f3d; }

    /* 两级菜单：根视图只显示主导航；点项后进入子视图（返回键 + 栏目名 + 子链接） */
    .menu-primary .menu-back {
        display: none;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #031f3d;
        color: #fff;
        flex-shrink: 0;
    }
    .menu-primary .menu-back svg { width: 10px; height: 16px; transform: rotate(180deg); }
    .menu-overlay:not(.in-sub) .menu-sub { display: none; }
    .menu-overlay.in-sub .menu-primary > li:not(.active) { display: none; }
    .menu-overlay.in-sub .menu-primary > li.active { display: flex; align-items: center; gap: 16px; padding: 24px 0 0px; }
    .menu-overlay.in-sub .menu-primary > li.active > button:not(.menu-back) { font-size: 24px; color: #031f3d; }
    .menu-overlay.in-sub .menu-primary > li.active .bar { display: none; }
    .menu-overlay.in-sub .menu-primary > li.active .menu-back { display: inline-flex; }
    .menu-sub h2 { display: none; }
    .menu-sub a { font-size: 16px; font-weight: 300; color: #031f3d; }
    .menu-sub li { margin-bottom: 16px; }
    .menu-body { flex-direction: column; }
    .menu-sub { min-width: 0; min-height: 0; }

    /* 面板占满全屏，推广卡压在底部 */
    .menu-panel { min-height: 100svh; display: flex; flex-direction: column; }
    .menu-panel .container { width: 100%; }
    .menu-body { flex: 1; min-width: 0; }
    .menu-promo { width: 100%; min-width: 0; margin-top: auto; }

    /* ✕ 关闭按钮移到面板顶部左侧，只显示图标 */
    .menu-close { top: 24px; left: 20px; transform: none; padding: 0; color: #031f3d; }
    .menu-close span { display: none; }
    .menu-backdrop { display: none; }

    /* 首页 hero */
    .hero { min-height: 380px; }
    .hero-title { font-size: 24px; }
    .hero-title strong { font-size: 36px; }

    /* 首页新闻卡 */
    .news-grid { grid-template-columns: 1fr; }
    .card-media { height: 240px; }

    /* 首页联系区块 */
    .footer-contact { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 48px; padding-bottom: 48px; }
    .contact-left { width: 100%; margin-bottom: 32px; }
    .contact-title { font-size: 36px; line-height: 45px; margin-bottom: 24px; }
    .contact-title strong { font-size: 36px; line-height: 45px; }
    .contact-left .link-green { margin-top: 0; }
    .contact-card { width: 190px; }
    .contact-photo { margin-bottom: 16px; }
    .contact-name { font-size: 20px; line-height: 28px; }
    .contact-role { font-size: 16px; line-height: 24px; }
    .contact-links { margin-top: 12px; gap: 4px; }

    /* 页脚三栏 */
    .footer-cols { grid-template-columns: 1fr; gap: 40px; padding-bottom: 48px; }

    /* 手机端字号（390px 实测） */
    .intro-text { font-size: 16px; line-height: 26px; }
    .section-title { font-size: 24px; line-height: 32px; margin-bottom: 32px; }
    .card-title { font-size: 20px; line-height: 28px; }
    .card-excerpt { font-size: 16px; line-height: 26px; }
    .btn { font-size: 14px; }
    .link-green { font-size: 16px; }
    .footer-col h3 { font-size: 20px; line-height: 26px; }
    .footer-col p { font-size: 16px; line-height: 26px; }
    .footer-link { font-size: 16px; }
    .menu-promo-text h4 { font-size: 20px; line-height: 26px; }
}
