/* ========================================
   浏览器兼容性补丁 - 2026 标准适配方案
   放弃 IE11，聚焦现代浏览器
   PC: Chrome 90+ / Edge / Firefox / Safari / 360极速 / QQ浏览器
   移动: 微信/支付宝内置 / Chrome Android / Safari iOS / 华为/小米/OPPO/VIVO自带
   ======================================== */

/* === PC端最小宽度底线 === */
/* 页面最小可视宽度 1200px，小于则出横向滚动条，保证布局不崩坏 */
@media (min-width: 0) {
  html {
    min-width: 1200px;
  }
}

/* 移动端覆盖：完全响应式，允许宽度自由缩放 */
@media (max-width: 1024px) {
  html {
    min-width: auto;
  }
}

/* === Webkit前缀（覆盖 Safari / 360极速 / QQ浏览器 等） === */
/* backdrop-filter 回退 */
.header.scrolled {
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .header.scrolled {
    background: rgba(13, 43, 92, 0.98);
  }
  .hero-slider-btn {
    background: rgba(0, 0, 0, 0.4);
  }
}

/* -webkit- 动画前缀（Safari / 旧版Chrome） */
@-webkit-keyframes fadeInUp {
  from { opacity: 0; -webkit-transform: translateY(30px); }
  to { opacity: 1; -webkit-transform: translateY(0); }
}
@-webkit-keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@-webkit-keyframes slideInLeft {
  from { opacity: 0; -webkit-transform: translateX(-30px); }
  to { opacity: 1; -webkit-transform: translateX(0); }
}
@-webkit-keyframes slideInRight {
  from { opacity: 0; -webkit-transform: translateX(30px); }
  to { opacity: 1; -webkit-transform: translateX(0); }
}

.animate-fadeInUp { -webkit-animation: fadeInUp 0.6s ease forwards; }
.animate-fadeIn { -webkit-animation: fadeIn 0.6s ease forwards; }
.animate-slideInLeft { -webkit-animation: slideInLeft 0.6s ease forwards; }
.animate-slideInRight { -webkit-animation: slideInRight 0.6s ease forwards; }

/* === 文本溢出省略 === */
.news-card h3,
.news-card p,
.news-list-body p,
.product-card-body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* === 滚动条美化（Webkit内核） === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

/* ========================================
   移动端适配 - 微信/支付宝/手机浏览器
   ======================================== */

/* iOS 安全区域适配（刘海屏/底部横条） */
@supports (padding-top: env(safe-area-inset-top)) {
  .header {
    padding-top: env(safe-area-inset-top);
    height: calc(var(--header-height) + env(safe-area-inset-top));
  }
  .main-nav {
    padding-top: env(safe-area-inset-top);
  }
  .footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .back-to-top {
    bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .mobile-menu-btn {
    top: calc(50% + env(safe-area-inset-top) / 2);
  }
}

/* === 高DPI屏幕字体平滑 === */
@media
  (-webkit-min-device-pixel-ratio: 2),
  (min-resolution: 192dpi) {
  html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ========================================
   分辨率梯队适配（2026标准）
   基准: 1920×1080 (16:9) 核心开发尺寸
   ======================================== */

/* === 大屏 2560×1440 (2K) === */
@media (min-width: 2560px) {
  html { font-size: 18px; }
  .container { max-width: 1500px; }
  .hero-slider { height: 800px; }
  .hero-slide-content h2 { font-size: 64px; }
  .hero-slide-content p { font-size: 24px; max-width: 800px; }
}

/* === 标准全高清 1920×1080 === */
@media (min-width: 1920px) {
  .container { max-width: 1320px; }
  .hero-slider { height: 750px; }
}

/* === 中端笔记本 1440×900 / 1600px 宽屏 === */
@media (min-width: 1440px) and (max-width: 1919px) {
  .container { max-width: 1200px; }
  .hero-slider { height: 650px; }
}

/* === 标准办公屏 1366×768（最小PC兼容底线） === */
@media (min-width: 1200px) and (max-width: 1439px) {
  .container { max-width: 1160px; }
  .hero-slider { height: 550px; }
  .hero-slide-content h2 { font-size: 36px; }
  .solution-image { width: 380px; height: 260px; }
}

/* === 平板横屏 1024px === */
@media (max-width: 1024px) {
  .hero-slider { height: 500px; }
  .about-preview-image { width: 100%; height: 280px; }
  .solution-image { width: 100%; height: 260px; }
}

/* === 平板竖屏 768px === */
@media (max-width: 768px) {
  .hero-slider { height: 400px; }
  .hero-slide-content h2 { font-size: 28px; }
  .hero-slider-btn { display: none; }
}

/* === 手机主流 375~428px === */
@media (max-width: 576px) {
  .hero-slider { height: 350px; }
  .hero-slide-content h2 { font-size: 24px; }
  .hero-slide-content p { font-size: 14px; margin-bottom: 20px; }
  .stat-number { font-size: var(--font-size-3xl); }
}

/* === 小屏手机 <375px === */
@media (max-width: 374px) {
  .hero-slider { height: 300px; }
  .hero-slide-content h2 { font-size: 20px; }
  .hero-slide-content p { font-size: 13px; margin-bottom: 16px; }
  .logo-text { font-size: 16px; }
  .logo-text span { font-size: 9px; }
  .logo-icon { width: 36px; height: 36px; font-size: 14px; }
  .page-banner { padding-top: 80px; }
  .page-banner h1 { font-size: 20px; }
  .stat-number { font-size: 24px; }
  .section-header h2 { font-size: 18px; }
  .solution-tabs { gap: 4px; }
  .solution-tab { padding: 8px 14px; font-size: 12px; }
}

/* ========================================
   触摸设备优化（移动端/平板）
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  /* 增大点击区域至 44px（Apple HIG 标准） */
  .nav-item > a { padding: 0 20px; }
  .dropdown a { padding: 14px 24px; min-height: 48px; display: flex; align-items: center; }
  .solution-tab { padding: 12px 28px; min-height: 44px; display: flex; align-items: center; }
  .pagination a,
  .pagination span { min-width: 44px; height: 44px; }
  .btn { min-height: 44px; }
  .faq-question { min-height: 48px; }
  .back-to-top { width: 48px; height: 48px; }

  /* 禁用hover效果（避免触屏粘滞） */
  .card:hover,
  .news-card:hover,
  .product-card:hover,
  .certificate-card:hover,
  .case-card:hover,
  .software-card:hover,
  .job-item:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
}

/* === 微信浏览器专属适配 === */
.wechat-browser .header {
  /* 微信内置浏览器顶部状态栏兼容 */
  padding-top: constant(safe-area-inset-top);
  padding-top: env(safe-area-inset-top);
}

.wechat-browser .hero-slider {
  /* 微信中轮播高度调整 */
  height: 450px;
}

@media (max-width: 768px) {
  .wechat-browser .hero-slider {
    height: 360px;
  }
}

/* ========================================
   打印样式
   ======================================== */
@media print {
  .header,
  .footer,
  .back-to-top,
  .nav-overlay,
  .mobile-menu-btn,
  .hero-slider-btn,
  .hero-slider-dots {
    display: none !important;
  }

  html { min-width: auto; }

  .page-banner {
    padding: 20px 0 !important;
    background: none !important;
    color: #000 !important;
  }

  .page-banner h1,
  .page-banner p {
    color: #000 !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .container { max-width: 100%; }
}
