/* ═══════════════════════════════════════════
   Hermes Mobile Optimizations
   独立文件 — 不受模板重建影响
   v2: 2026-06-08 字体优化
   ═══════════════════════════════════════════ */

/* ── 导航栏 ── */
@media (max-width: 576px) {
  .sub_title { display: none; }
  .navbar-brand img { height: 34px !important; }
  .navbar { padding: 0.25rem 0; }
}

/* ── Hero 区域 ── */
@media (max-width: 480px) {
  .hero-section { min-height: 70vh; padding-top: 2rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .hermes-stat { padding: 0.75rem 0.5rem; }
  .hermes-stat-value { font-size: 1.35rem; }
  .hermes-stat-label { font-size: 10px; }
  .hero-cta { margin-bottom: 2.5rem; }
  .hero-cta .btn-hermes-lg { padding: 0.6rem 1.5rem; font-size: 14px; }
  .hero-content { padding: 0 0.75rem; }
}

/* ── 数据驾驶舱 ── */
@media (max-width: 768px) {
  #intel.hermes-section {
    width: 100% !important; max-width: 100vw !important;
    overflow-x: hidden !important; padding-left: 0 !important; padding-right: 0 !important;
  }
  #intel .hermes-container {
    width: 100% !important; max-width: 100% !important;
    padding-left: 0.75rem !important; padding-right: 0.75rem !important;
  }
  .dg { grid-template-columns: 1fr !important; gap: 0.75rem; width: 100% !important; }
  .dm { gap: 0.75rem; width: 100% !important; }
  .dr { gap: 0.75rem; width: 100% !important; }
  .dic { padding: 0.75rem; min-height: auto; width: 100% !important; }
  .ds { gap: 0.5rem; grid-template-columns: repeat(2, 1fr) !important; }
  .dst { padding: 0.35rem; }
  .dsv { font-size: 0.95rem !important; }
  .dsl { font-size: 9px !important; }
  .dp { padding: 0.75rem; width: 100% !important; }
  .dash-brief { padding: 0.75rem; font-size: 11px; width: 100% !important; }
  .dtrend { padding: 0.75rem; width: 100% !important; }
  .dash-brief h4, .dth h4 { font-size: 12px; }
  .dsrc { text-align: center; font-size: 10px; }
}

/* ── Dashboard 卡片内部元素 ── */
@media (max-width: 576px) {
  .dph { flex-wrap: wrap; gap: 0.35rem; padding-bottom: 0.5rem; margin-bottom: 0.5rem; }
  .dpt { margin-left: 0; font-size: 10px; }
  .inspect-summary { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }
  .inspect-metric { font-size: 11px; }
  .inspect-metric b { font-size: 1rem; }
  .inspect-name { font-size: 11px; }
  .inspect-count { font-size: 10px; min-width: 3rem; }
  .forecast-main { gap: 0.35rem; margin-bottom: 0.15rem; }
  .forecast-meta { padding-left: 0.8rem; gap: 0.35rem; flex-wrap: wrap; }
  .forecast-name { font-size: 11px; }
  .forecast-cat { font-size: 9px; }
  .forecast-meta span { font-size: 10px; }
  .forecast-score b { font-size: 12px; }
}

/* ── YETTA 指数卡片 ── */
@media (max-width: 640px) {
  .yetta-index-card { flex-direction: column !important; text-align: center; gap: 0.75rem !important; padding: 1rem !important; align-items: center !important; }
  .yetta-index-card > div:last-child { width: 100% !important; }
  .yetta-idx-bars { justify-content: center; }
}
@media (max-width: 480px) {
  .inspect-metric b { font-size: 1rem; }
  .inspect-summary { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 0.25rem; }
  .inspect-week { margin-left: 0; }
}

/* ── 超窄屏 统计卡片更小 ── */
@media (max-width: 480px) {
  .ds { gap: 0.4rem; }
  .dst { padding: 0.3rem; }
  .dsv { font-size: 0.85rem !important; }
  .dsl { font-size: 8px !important; }
}

/* ── 核心能力 ── */
@media (max-width: 480px) {
  .capability-card { padding: 1rem; }
  .capability-card h4 { font-size: 0.95rem; }
  .capability-features li { font-size: 11px; }
  .cap-num { font-size: 1.5rem; }
}

/* ── 产品矩阵 ── */
@media (max-width: 576px) {
  .product-card-img { aspect-ratio: 16 / 9; height: auto; }
  .product-card-body { padding: 1rem; }
  .product-card-body h4 { font-size: 1rem; }
  .product-card-tags span { font-size: 10px; }
}

/* ── 解决方案 ── */
@media (max-width: 480px) {
  .sol-card { padding: 1rem; }
  .sol-card h4 { font-size: 0.95rem; }
  .sol-card p { font-size: 11px; }
  .sol-icon { width: 40px; height: 40px; margin-bottom: 0.75rem; }
}

/* ── 为什么选择 ── */
@media (max-width: 480px) {
  .why-c { padding: 1rem; }
  .why-c h4 { font-size: 0.95rem; }
  .why-c p { font-size: 11px; }
  .why-n { font-size: 1.2rem; }
}

/* ── 合规自查 ── */
@media (max-width: 576px) {
  .hermes-search { width: 100% !important; max-width: 100% !important; }
  .hermes-search input { width: 100% !important; }
  .selfcheck-card-action { width: 100%; }
  .selfcheck-card-action .btn-hermes-sm { width: 100%; }
}

/* ── Footer ── */
@media (max-width: 576px) {
  .footer .row { text-align: center; }
  .footer .col-12 { margin-bottom: 1rem; }
}

/* ── 全局超窄屏 ── */
@media (max-width: 360px) {
  .hermes-container { padding: 0 0.75rem; }
  .section-title { font-size: 1.25rem; }
  .hero-stats { gap: 0.35rem; }
  .hermes-stat-value { font-size: 1.15rem; }
  .hermes-stat-label { font-size: 9px; }
}

/* ── 三角验证三列网格 ── */
@media (max-width: 768px) {
  .tri-grid { grid-template-columns: 1fr !important; }
}

/* ── 全局防溢出 ── */
@media (max-width: 576px) {
  #intel .dp { overflow-x: auto !important; overflow-y: visible !important; -webkit-overflow-scrolling: touch; }
  #intel.hermes-section { overflow-x: hidden; }
  #intel .dg, #intel .dm, #intel .dr, #intel .dic, #intel .dtrend, #intel .dash-brief {
    max-width: 100% !important; min-width: 0 !important;
    box-sizing: border-box !important; overflow-wrap: break-word; word-break: break-word;
  }
  .forecast-main { flex-wrap: wrap !important; gap: 0.35rem; margin-bottom: 0.15rem; }
  .forecast-name { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .forecast-cat { font-size: 9px; white-space: nowrap; }
  .forecast-meta { padding-left: 0.5rem; gap: 0.25rem; flex-wrap: wrap; }
  .forecast-meta span { font-size: 9px; }
  .forecast-score b { font-size: 11px; }
  .inspect-name { font-size: 11px; max-width: 100%; }
  .inspect-count { font-size: 10px; min-width: 2.5rem !important; }
  .trow { gap: 0.25rem; }
  .twk { min-width: 2.5rem; font-size: 9px; }
  .tval { font-size: 9px; }
  .tbar { max-width: 60%; }
  .yetta-index-card > div { max-width: 100% !important; }
}

/* ── 通用触屏优化 ── */
@media (hover: none) and (pointer: coarse) {
  .nav-link, .btn-hermes, .product-card, .sol-card, .capability-card { min-height: 44px; }
  .product-card:hover, .sol-card:hover, .capability-card:hover, .trust-card:hover { transform: none; }
}
