/* ========================================
   银川数据要素服务中心 2.0 - 响应式断点（优化版）
   全面修复移动端适配问题
   ======================================== */

/* ===== 大屏容器收窄（1280px以下） ===== */
@media (max-width: 1280px) {
  .container {
    max-width: 100%;
    padding: 0 32px;
  }
}

/* ===== 平板（1024px以下） ===== */
@media (max-width: 1024px) {
  .services-grid,
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .expert-card {
    width: 180px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-lg);
  }

  .footer-brand {
    grid-column: span 2;
  }

  .media-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  /* 隐藏桌面导航和咨询按钮 */
  .nav {
    display: none;
  }

  .btn-consult {
    display: none;
  }

  /* 显示移动端菜单按钮 */
  .mobile-menu-btn {
    display: flex;
  }

  /* header 优化 - 浅色风格 */
  .header {
    padding: 10px 0;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }

  .header.scrolled {
    padding: 8px 0;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
  }

  .logo img {
    height: 32px;
  }

  .logo {
    gap: 8px;
  }

  .logo-title {
    font-size: 14px;
    line-height: 1.2;
  }

  .logo-subtitle {
    display: none;
  }

  .header .container {
    padding: 0 16px;
  }

  /* 业务体系架构 - 平板适配 */
  .system-node {
    font-size: var(--font-size-sm);
    padding: 12px 16px;
  }

  .core-node {
    padding: 20px 24px;
  }

  :root {
    --section-padding: 80px 0;
  }
}

/* ===== 手机（768px以下） ===== */
@media (max-width: 768px) {
  /* 网格布局 - 单列 */
  .services-grid,
  .cases-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .expert-card {
    width: 160px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-item {
    padding: 16px 12px;
  }

  .media-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* footer - 单列 */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-md);
  }

  .footer-brand,
  .footer-qrcode {
    grid-column: span 1;
  }

  /* 合作伙伴 */
  .partner-logos {
    gap: var(--gap-xs);
    flex-wrap: wrap;
    justify-content: center;
  }

  .partner-logo-item {
    padding: 8px 14px;
    font-size: var(--font-size-sm);
  }

  /* Hero 区域 - 移动端优化（修复微信黑屏） */
  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    padding: 0 16px;
    margin-top: 0;
  }

  .hero-glass {
    padding: 24px 20px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
  }

  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
    margin-bottom: 20px;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: var(--font-size-base);
  }

  .hero-badge {
    font-size: var(--font-size-xs);
    padding: 5px 12px;
    margin-bottom: 16px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
  }

  .hero-stat-chip {
    padding: 0 12px;
  }

  .hero-stat-num {
    font-size: var(--font-size-xl);
  }

  .hero-stat-divider {
    display: none;
  }

  .scroll-indicator {
    bottom: 20px;
  }

  /* 区域标题 - 移动端优化 */
  :root {
    --section-padding: 60px 0;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .section-label {
    font-size: var(--font-size-xs);
    letter-spacing: 2px;
  }

  .section-title {
    font-size: clamp(1.8rem, 7vw, 2.8rem);
    margin-bottom: 12px;
    letter-spacing: 0.03em;
  }

  .section-desc {
    font-size: var(--font-size-base);
    line-height: 1.6;
  }

  /* 服务卡片 */
  .service-card {
    padding: 24px 20px;
  }

  .service-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .service-title {
    font-size: var(--font-size-lg);
  }

  .service-desc {
    font-size: var(--font-size-sm);
    line-height: 1.6;
  }

  .service-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
    min-height: 40px;
    font-size: var(--font-size-sm);
  }

  /* 案例卡片 */
  .case-card {
    padding: 20px;
  }

  .case-title {
    font-size: var(--font-size-base);
  }

  .case-desc {
    font-size: var(--font-size-sm);
    line-height: 1.6;
  }

  .case-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
    min-height: 40px;
    font-size: var(--font-size-sm);
  }

  /* 新闻动态 */
  .news-tabs {
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    padding-bottom: 8px;
  }

  .news-tabs::-webkit-scrollbar {
    display: none;
  }

  .news-tab {
    padding: 8px 14px;
    white-space: nowrap;
    font-size: var(--font-size-xs);
    min-height: 40px;
  }

  .news-item {
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
  }

  .news-date {
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }

  .news-day {
    font-size: var(--font-size-lg);
  }

  .news-month {
    font-size: var(--font-size-xs);
  }

  .news-body h3 {
    font-size: var(--font-size-base);
    line-height: 1.4;
  }

  .news-body p {
    font-size: var(--font-size-sm);
    line-height: 1.6;
  }

  /* 专家智库 */
  .experts-carousel-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .experts-carousel-wrapper::-webkit-scrollbar {
    display: none;
  }

  .expert-card {
    padding: 16px;
    min-width: 160px;
  }

  .expert-avatar {
    width: 48px;
    height: 48px;
    font-size: var(--font-size-lg);
  }

  .expert-name {
    font-size: var(--font-size-sm);
  }

  .expert-title {
    font-size: var(--font-size-xs);
  }

  /* CTA 区域 */
  .cta {
    padding: 60px 0;
  }

  .cta-title {
    font-size: var(--font-size-2xl);
    margin-bottom: 16px;
  }

  .cta-desc {
    font-size: var(--font-size-base);
    margin-bottom: 24px;
    line-height: 1.6;
  }

  .btn-cta {
    min-height: 48px;
    padding: 14px 32px;
    font-size: var(--font-size-base);
  }

  /* Footer */
  .footer-bottom {
    text-align: center;
    font-size: var(--font-size-xs);
  }

  .footer-links a {
    padding: 6px 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    font-size: var(--font-size-sm);
  }

  .footer-contact li {
    padding: 6px 0;
    font-size: var(--font-size-sm);
  }

  /* Page Banner */
  .page-banner {
    min-height: 200px;
    padding: 120px 0 40px;
  }

  .banner-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .banner-desc {
    font-size: var(--font-size-base);
    line-height: 1.6;
  }

  /* 业务体系架构 - 移动端垂直布局 */
  .system-architecture {
    gap: 16px;
  }

  .system-layer {
    flex-direction: column;
    align-items: center;
  }

  .system-node {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .system-connector {
    transform: rotate(90deg);
    width: 40px;
    height: 20px;
  }

  /* 统计数字 */
  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: var(--font-size-xs);
  }

  /* 浮动按钮 */
  .back-to-top {
    width: 44px;
    height: 44px;
    bottom: 70px;
    right: 16px;
    font-size: 18px;
  }

  .diagnosis-fab {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 16px;
  }

  .phone-fab {
    width: 48px;
    height: 48px;
    bottom: 16px;
    left: 16px;
    font-size: 20px;
  }

  .wechat-fab {
    width: 48px;
    height: 48px;
    bottom: 80px;
    left: 16px;
    font-size: 20px;
  }

  /* 十步法图表 */
  .ten-steps-svg {
    max-width: 100%;
    height: auto;
  }

  /* 移动端页脚优化 - 快速导航和服务入口横向排列 */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  /* 快速导航和服务入口并排 */
  .footer-column:nth-child(2),
  .footer-column:nth-child(3) {
    grid-column: span 1;
  }

  .footer-column h4 {
    font-size: var(--font-size-xs);
    margin-bottom: 12px;
  }

  .footer-links a {
    font-size: var(--font-size-xs);
    margin-bottom: 6px;
  }

  .footer-column:nth-child(4) {
    grid-column: span 2;
  }

  .footer-qrcode {
    grid-column: span 2;
    text-align: center;
  }
}

/* ===== 小屏手机（480px以下） ===== */
@media (max-width: 480px) {
  .logo img {
    height: 28px;
  }

  .logo-title {
    font-size: var(--font-size-base);
  }

  .logo-subtitle {
    display: none;
  }

  .expert-card {
    width: 140px;
    min-width: 140px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-xs);
  }

  .container {
    padding: 0 12px;
  }

  .hero-glass {
    padding: 20px 16px;
  }

  .hero-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .media-card-overlay .play-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .partner-name {
    font-size: var(--font-size-xs);
  }

  .partner-logo-item {
    padding: 6px 10px;
  }

  .section-title {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
  }

  .service-card,
  .case-card {
    padding: 16px;
  }

  .cta-title {
    font-size: var(--font-size-xl);
  }

  .page-banner {
    padding: 100px 0 32px;
  }

  .banner-title {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
  }
}

/* ===== 横屏手机（针对移动端优化） ===== */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .hero-glass {
    margin-bottom: 16px;
  }

  .scroll-indicator {
    display: none;
  }
}

/* ===== 微信内置浏览器特殊适配 ===== */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-device-width: 768px) {
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  textarea {
    font-size: 16px !important;
  }

  body {
    -webkit-text-size-adjust: 100% !important;
  }
}
