/* PC 端默认隐藏（仅移动端 media 内通过 !important 显示） */
.site-logo .logo-text { display: none; }
.footer-mobile-links { display: none; }

/* ============================================================
   移动端统一还原层（设计稿 2026-08-29）
   全部规则在 max-width:768px 媒体查询内，PC 端零影响
   ============================================================ */
@media (max-width: 768px) {

  /* ============ Header 深蓝 56px + XMSF 文字 + 汉堡 ============ */
  .site-header {
    background: #1a3d8f !important;
    height: 56px !important; min-height: 56px !important;
    padding: 0 15px !important;
    border-bottom: none !important;
  }
  .header-inner { height: 56px !important; min-height: 56px !important; }

  /* 隐藏 PC 端导航/搜索/原 logo 图 */
  .site-nav { display: none !important; }
  .header-search { display: none !important; }
  .site-logo img { display: none !important; }
  .header-user { display: none !important; }

  /* 显示移动端文字 logo（XMSF，M 为黄绿） */
  .site-logo .logo-text {
    display: inline-block !important;
    color: #fff !important;
    font-size: 18px !important; font-weight: 800 !important;
    letter-spacing: 1px;
    line-height: 1 !important;
  }
  .site-logo .logo-m { color: #c8d830 !important; }

  /* 显示汉堡按钮 + 白色 */
  .mobile-menu-btn {
    display: flex !important; align-items: center; justify-content: center;
    color: #fff !important; background: transparent !important;
    border: none !important; padding: 8px !important;
  }
  .mobile-menu-btn svg, .mobile-menu-btn i, .mobile-menu-btn span { color: #fff !important; }

  /* 登录/搜索按钮白色 */
  .header-actions a, .header-actions button,
  .mobile-search-btn, .header-login-btn {
    color: #fff !important; background: transparent !important;
  }
  .header-actions a svg, .header-actions button svg { fill: #fff !important; stroke: #fff !important; }

  /* ============ 隐藏非设计稿区块 ============ */
  .home-quick-news { display: none !important; }       /* 隐藏"B 快讯"块 */
  .home-sidebar { display: none !important; }          /* 隐藏整个右侧栏（移动端不需要） */

  /* ============ Banner 220px 满宽 ============ */
  .home-banner, .home-banner-slider, .home-banner-slide { height: 220px !important; }
  .home-banner-slide img,
  .home-banner-placeholder { height: 220px !important; }

  /* ============ 区块标题：New 徽章 + 黑粗 + 灰"查看更多" ============ */
  .home-section-title {
    display: flex !important; align-items: center; justify-content: space-between;
    padding: 14px 4px 10px !important;
    margin: 0 !important;
    background: transparent !important;
    border-bottom: 1px solid #ececec !important;
  }
  .home-section-title h2 {
    font-size: 16px !important; font-weight: 700 !important;
    color: #1a1a1a !important; margin: 0 !important; padding: 0 !important;
    display: flex !important; align-items: center; gap: 8px;
  }
  /* 用 ::before 注入黄绿 New 徽章（隐藏原 New.png） */
  .home-section-title h2 img[src*="New"] { display: none !important; }
  .home-section-title:first-of-type h2::before,
  .home-section-title h2.new-title::before {
    content: 'New';
    display: inline-block;
    background: #c8d830; color: #fff;
    font-size: 11px; font-weight: 700; font-style: italic;
    padding: 2px 8px; border-radius: 10px;
    line-height: 1.2;
  }
  .home-section-title h2 .new-title-text { font-size: 16px; font-weight: 700; color: #1a1a1a; }
  .home-section-title .more-link { font-size: 12px !important; color: #999 !important; text-decoration: none !important; }

  /* 热门关注区块标题：🔥 emoji 替代 Hot.png */
  .hot-widget-hd h3 img[src*="Hot"] { display: none !important; }
  .hot-widget-hd h3 {
    font-size: 16px !important; font-weight: 700 !important;
    color: #1a1a1a !important;
    display: flex !important; align-items: center; gap: 6px;
  }
  .hot-widget-hd h3::before {
    content: '🔥';
    font-size: 16px;
    line-height: 1;
  }
  .hot-widget-hd .more-link { font-size: 12px !important; color: #999 !important; }
  .hot-widget-hd {
    display: flex !important; align-items: center; justify-content: space-between;
    padding: 14px 4px 10px !important;
    background: transparent !important; border-bottom: 1px solid #ececec !important;
  }

  /* ============ 最新资讯卡：横排 108×72 + 单行截断 ============ */
  .home-articles .article-list,
  .article-list { display: block !important; padding: 0 !important; margin: 0 !important; }
  .article-card {
    display: flex !important; flex-direction: row !important; align-items: center !important;
    padding: 12px 15px !important; margin: 0 !important;
    border-bottom: 1px solid #ececec !important;
    border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
    gap: 12px;
  }
  .article-card .article-thumb {
    width: 108px !important; height: 72px !important;
    min-width: 108px !important; max-width: 108px !important;
    border-radius: 6px !important; overflow: hidden !important;
    flex-shrink: 0; margin: 0 !important; background: #eee !important;
  }
  .article-card .article-thumb img,
  .article-card .article-thumb .article-thumb-placeholder {
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; border-radius: 6px !important;
  }
  .article-card .article-body {
    flex: 1; min-width: 0;
    padding: 0 !important; margin: 0 !important;
    display: flex !important; flex-direction: column; justify-content: space-between; gap: 6px;
  }
  .article-card .article-cat,
  .article-card .article-excerpt { display: none !important; }
  .article-card .article-title {
    font-size: 15px !important; font-weight: 500 !important;
    color: #222 !important; line-height: 1.4 !important;
    margin: 0 !important; padding: 0 !important;
    white-space: nowrap !important; overflow: hidden !important;
    text-overflow: ellipsis !important; display: block !important;
  }
  .article-card .article-footer {
    font-size: 12px !important; color: #999 !important;
    display: flex !important; justify-content: space-between; align-items: center;
    gap: 8px; margin: 0 !important; padding: 0 !important;
  }
  .article-card .article-footer svg { display: none !important; }
  .article-card .article-footer .author { color: #3470c8 !important; font-size: 12px !important; }
  .article-card .article-footer .views { color: #999 !important; font-size: 12px !important; }

  /* ============ 加载更多：蓝色文字 + 蓝色圆箭头 ============ */
  .pagination-wrap { padding: 20px 0 !important; text-align: center !important; }
  .pagination { display: inline-flex !important; align-items: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
  .pagination li { display: none !important; }
  .pagination li:has(a[rel="next"]) { display: inline-flex !important; align-items: center; }
  .pagination li:has(a[rel="next"]) a {
    color: #3470c8 !important; font-size: 14px !important; font-weight: 700;
    display: inline-flex !important; align-items: center; gap: 8px;
    text-decoration: none !important; padding: 6px 12px;
  }
  .pagination li:has(a[rel="next"]) a::after {
    content: '';
    width: 18px; height: 18px;
    background-color: #3470c8; border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-size: 12px; background-position: center; background-repeat: no-repeat;
    flex-shrink: 0;
  }

  /* ============ 热门关注卡：横排 + meta 纵向两行 ============ */
  .hot-articles-list { display: block !important; padding: 0 !important; margin: 0 !important; }
  .hot-article-item {
    display: flex !important; flex-direction: row !important; align-items: center !important;
    padding: 12px 15px !important; margin: 0 !important;
    border-bottom: 1px solid #ececec !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important; gap: 12px;
  }
  .hot-article-cover {
    width: 108px !important; height: 72px !important;
    min-width: 108px !important; max-width: 108px !important;
    border-radius: 6px !important; overflow: hidden !important; flex-shrink: 0;
    margin: 0 !important; background: #eee !important;
  }
  .hot-article-cover img { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 6px !important; }
  .hot-article-body {
    flex: 1; min-width: 0;
    padding: 0 !important; margin: 0 !important;
    display: flex !important; flex-direction: column !important;
    justify-content: center !important; gap: 4px;
  }
  .hot-article-cat { display: none !important; }
  .hot-article-meta {
    display: flex !important; flex-direction: column !important;
    gap: 2px !important; margin-top: 2px !important;
    font-size: 12px !important; color: #999 !important;
  }
  .hot-article-source { color: #3470c8 !important; font-size: 12px !important; }
  .hot-article-time { color: #999 !important; font-size: 12px !important; }
  .hot-article-title {
    font-size: 15px !important; font-weight: 500 !important;
    color: #222 !important; line-height: 1.4 !important;
    margin: 0 !important; padding: 0 !important;
    white-space: nowrap !important; overflow: hidden !important;
    text-overflow: ellipsis !important; display: block !important;
  }

  /* ============ 热门供需卡：横排 + 橙/蓝胶囊 ============ */
  .sd-hot-list { display: block !important; padding: 0 !important; margin: 0 !important; }
  .sd-hot-list .sd-hot-item {
    padding: 12px 15px !important; margin: 0 !important;
    border-bottom: 1px solid #ececec !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important;
    display: flex !important; align-items: center; gap: 12px;
  }
  .sd-type-tag {
    flex-shrink: 0; min-width: 28px !important; height: 22px !important;
    padding: 0 8px !important; font-size: 11px !important; border-radius: 11px !important;
    background: #165DFF !important; color: #fff !important;
    display: inline-flex !important; align-items: center; justify-content: center;
  }
  .sd-type-tag.supply { background: #FF7D00 !important; }
  .sd-type-tag.demand { background: #165DFF !important; }
  .sd-cat-tag { display: none !important; }
  .sd-hot-body { flex: 1; min-width: 0; padding: 0 !important; margin: 0 !important; }
  .sd-hot-title {
    font-size: 15px !important; font-weight: 500 !important; color: #222 !important;
    white-space: nowrap !important; overflow: hidden !important;
    text-overflow: ellipsis !important; display: block !important; margin: 0 !important;
  }
  .sd-hot-meta { display: none !important; }

  /* ============ 隐藏发布/编辑入口（核心需求） ============ */
  .sd-publish-btn,
  .btn-publish-shortcut { display: none !important; }
  a[href*="article.create"],
  a[href*="article.edit"],
  a[href*="supply-demand.create"],
  a[href*="supply-demand.edit"],
  .dc-promo, .drafts-create-btn, .ma-btn { display: none !important; }

  /* ============ Footer：深蓝三行白字（链接组 + 版权 + ICP） ============ */
  .site-footer-inner {
    background: #1a3d8f !important;
    padding: 20px 15px !important;
    text-align: center !important;
    border-top: none !important;
    width: 100% !important; box-sizing: border-box;
  }
  .footer-main, .footer-links, .footer-divider,
  .footer-brand, .footer-qrcode { display: none !important; }
  .footer-bottom {
    display: block !important; margin: 0 !important; padding: 0 !important;
    border-top: none !important; background: transparent !important;
  }
  .footer-bottom-inner {
    display: flex !important; flex-direction: column;
    align-items: center; justify-content: center; gap: 6px;
    padding: 0 !important; margin: 0 !important;
    color: rgba(255,255,255,0.7) !important; text-align: center;
    font-size: 11px; line-height: 1.6;
  }
  .footer-bottom a, .footer-icp { color: rgba(255,255,255,0.7) !important; text-decoration: none !important; }
  .footer-bottom-inner > * { line-height: 1.6; }
  /* 移动端 footer 链接组（关于我们/联系我们/加入我们/合作伙伴） */
  .footer-mobile-links {
    display: flex !important; justify-content: center; flex-wrap: wrap;
    gap: 16px; padding: 0 15px 14px;
  }
  .footer-mobile-links a { color: rgba(255,255,255,0.85); font-size: 12px; text-decoration: none; }

  /* ============ 汉堡菜单：全屏深蓝覆盖 + 5 项大字 ============ */
  .mobile-drawer {
    width: 100% !important; max-width: 100% !important;
    background: #1a3d8f !important;
    right: -100% !important; left: auto !important;
    transition: right 0.3s ease !important;
    box-shadow: none !important;
  }
  .mobile-drawer.open { right: 0 !important; }
  .mobile-drawer-backdrop { background: rgba(0,0,0,0.4) !important; }
  .mobile-drawer-nav {
    background: #1a3d8f !important; padding: 0 !important;
    display: flex !important; flex-direction: column !important;
  }
  .mobile-drawer-link {
    display: flex !important; align-items: center;
    min-height: 60px !important; padding: 0 20px !important;
    color: #fff !important;
    font-size: 18px !important; font-weight: 600 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    text-decoration: none !important; background: transparent !important;
  }
  .mobile-drawer-link:last-child { border-bottom: none !important; }
  .mobile-drawer-link:hover, .mobile-drawer-link.active { background: rgba(255,255,255,0.05) !important; }
  .mobile-drawer-link svg, .mobile-drawer-link i { display: none !important; }

  /* 抽屉内部的 user-info / guest / footer 在移动端隐藏（菜单极简） */
  .mobile-drawer-user, .mobile-drawer-footer { display: none !important; }

  /* ============ 点击区 ≥44px ============ */
  .nav-btn, .more-link, .mobile-menu-btn, .mobile-search-btn { min-height: 40px; }
}

/* ============================================================
   540 块 fallback（更窄屏更紧凑）
   ============================================================ */
@media (max-width: 540px) {
  .site-header, .header-inner { height: 52px !important; min-height: 52px !important; }
  .site-logo .logo-text { font-size: 16px; }
  .home-banner, .home-banner-slider, .home-banner-slide { height: 180px !important; }
  .home-banner-slide img, .home-banner-placeholder { height: 180px !important; }
  .article-card .article-thumb,
  .hot-article-cover { width: 96px !important; min-width: 96px !important; max-width: 96px !important; height: 64px !important; }
  .article-card .article-title,
  .hot-article-title { font-size: 14px !important; }
}
