/* Miyo 云计算落地页 · 修复与体验增强 */

/* 加载层兜底：即使脚本异常，3 秒后也自动淡出 */
@keyframes miyo-loader-hide {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
#page-loader { animation: miyo-loader-hide .45s ease 2.6s forwards; }

/* 顶部 logo */
.nav-icon img { max-height: 40px !important; width: auto !important; }

/* 产品矩阵卡片可点击 */
a.matrix-card { display: block; text-decoration: none; color: inherit; }
a.matrix-card:hover { text-decoration: none; }
.matrix-card .card-name { color: #1f2937; }
.matrix-sidebar .matrix-nav-item .btn { text-decoration: none; }
.matrix-sidebar .matrix-nav-item .btn-primary {
  background: #8B8CBE !important; border-color: #8B8CBE !important; color: #fff !important;
  padding: 9px 18px !important; font-size: 13px !important;
}
.matrix-sidebar .matrix-nav-item .btn-default {
  background: #fff !important; border: 1px solid #dcdcea !important; color: #5f60a0 !important;
  padding: 9px 18px !important; font-size: 13px !important;
}

/* 产品卡片链接 */
.product-card-link { display: inline-flex; align-items: center; justify-content: center; }
.product-card h3 a:hover { color: #8B8CBE; }

/* 域名/产品搜索框 */
.domain-search .search-input-box input {
  color: #33364a !important;
  font-size: 15px !important;
}
.domain-search .search-input-box input::placeholder {
  color: #a7abbe !important;
  opacity: 1;
}
.domain-search .search-btn { color: #8B8CBE; }

/* 新闻/公告静态列表 */
.news-box .news-list .news-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-bottom: 1px dashed #ececf4;
}
.news-box .news-list .news-item:last-child { border-bottom: 0; }
.news-box .news-list .news-title {
  color: #4a4e63; text-decoration: none; font-size: 14px; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.news-box .news-list .news-title:hover { color: #8B8CBE; }
.news-box .news-list .news-date { color: #a3a7ba; font-size: 12px; flex: 0 0 auto; }

/* 高亮搜索命中的产品 */
.product-card.is-search-hit, .matrix-card.is-search-hit {
  box-shadow: 0 0 0 2px #8B8CBE, 0 16px 40px rgba(139, 140, 190, .22) !important;
  transform: translateY(-4px);
}

/* ---------------- 手机端 ---------------- */
@media (max-width: 768px) {
  /* 首屏：文字不再压到右侧 3D 球体上 */
  #home-banner .banner-media video { object-position: 72% center; }
  #home-banner .swiper-slide .banner-media { opacity: .62; }
  #home-banner .section-content.banner-content-left {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  #home-banner .banner-texts {
    max-width: 100% !important;
    background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.78) 62%, rgba(255,255,255,0) 100%);
    border-radius: 14px;
    padding: 10px 14px 12px;
    margin-left: -8px;
  }
  #home-banner #banner-title {
    font-size: 27px !important;
    line-height: 1.28 !important;
    max-width: 100% !important;
    letter-spacing: 0 !important;
  }
  #home-banner .banner-desc {
    font-size: 13px !important;
    line-height: 1.6 !important;
    max-width: 100% !important;
  }
  #home-banner .banner-text-label { font-size: 12px !important; }
  #home-banner .banner-timeline-controls { margin-top: 26px !important; }

  /* 产品矩阵：单列 */
  .matrix-container { flex-direction: column !important; padding: 0 14px !important; gap: 16px !important; }
  .matrix-sidebar { width: 100% !important; margin-left: 0 !important; }
  .matrix-grid { grid-template-columns: 1fr !important; }
  .matrix-column { margin-bottom: 0; }
  .column-header-box { height: 112px !important; padding: 20px !important; }
  .column-title { font-size: 20px !important; }
  .column-items { padding: 14px !important; }
  .matrix-card { padding: 14px !important; }

  /* 产品卡片：单列 */
  .product-list { grid-template-columns: 1fr !important; }
  .product-card { margin-bottom: 14px; }

  /* 新闻/公告 */
  .news-container { flex-direction: column !important; }
  .news-box { width: 100% !important; }

  /* 顶部按钮与头像 */
  .nav-links { display: none !important; }
  .nav-icon img { max-height: 34px !important; }
  #site-header-register-btn { font-size: 13px !important; padding: 7px 12px !important; }

  /* 搜索框文字 */
  .domain-search .search-input-box input { font-size: 14px !important; }
  .domain-search-wrapper { padding: 0 14px; }
}

#product-matrix { scroll-margin-top: 86px; }
#home-banner .banner-desc { max-width: 660px; }

/* 手机端 AI 助手收成小圆按钮，避免遮挡内容 */
@media (max-width: 768px) {
  #pandawiki-bot-btn {
    width: 52px !important;
    height: 52px !important;
    padding: 7px !important;
    gap: 0 !important;
    border-radius: 50% !important;
  }
  #pandawiki-bot-btn .ai-text { display: none !important; }
  #pandawiki-bot-btn .ai-avatar { width: 38px !important; height: 38px !important; }
  #pandawiki-bot-btn .ai-eyes { gap: 7px !important; }
  .video-section, .solutions-section, .news { scroll-margin-top: 70px; }
}
