/* ========================================
   移动端响应式设计样式表
   适配所有 /web 页面
   ======================================== */

/* ========================================
   0. 桌面端隐藏所有移动端元素（默认状态）
   ======================================== */

/* 默认在桌面端完全隐藏所有移动端专用元素 */
.mobile-menu-toggle,
.mobile-auth-buttons,
.mobile-user-info,
.mobile-nav-overlay,
.mobile-nav-menu {
  display: none !important;
}

/* ========================================
   1. 顶部导航栏移动端优化
   ======================================== */

/* 汉堡菜单图标 */
.mobile-menu-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
  min-width: 44px;
  min-height: 44px;
  position: relative;
}

/* 图标字体样式 */
.mobile-menu-toggle .iconfont {
  font-size: 28px;
  color: #333;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: absolute;
}

/* 点击激活状态 - 汉堡图标旋转并缩小消失 */
.mobile-menu-toggle.active .iconfont {
  transform: rotate(180deg) scale(0);
  opacity: 0;
  color: #1890FF;
}

/* X关闭图标（默认隐藏） */
.mobile-menu-toggle::after {
  content: '✕';
  font-size: 32px;
  color: #1890FF;
  position: absolute;
  transform: rotate(-180deg) scale(0);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-weight: 300;
  line-height: 1;
}

/* 激活状态 - X图标旋转放大显示 */
.mobile-menu-toggle.active::after {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

/* 移动端导航菜单覆盖层 */
.mobile-nav-overlay {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: calc(100vh - 72px);
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
}

/* 移动端导航菜单容器 */
.mobile-nav-menu {
  position: fixed;
  top: 72px;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: calc(100vh - 72px);
  background: #fff;
  z-index: 999;
  overflow-y: auto;
  transition: right 0.3s ease;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.mobile-nav-menu.active {
  right: 0;
}

.mobile-nav-menu .nav-item {
  display: block;
  padding: 16px 20px;
  border-bottom: 1px solid #E6EAED;
  color: #333;
  font-size: 16px;
  cursor: pointer;
  min-height: 44px;
}

.mobile-nav-menu .nav-item:active {
  background: #F7F8FA;
}

/* 移动端登录按钮容器 */
.mobile-auth-buttons {
  align-items: center;
  gap: 8px;
}

.mobile-auth-buttons .btn {
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   2. 媒体查询 - 移动端适配
   ======================================== */

@media screen and (max-width: 992px) {
  /* 导航栏布局调整 */
  .nav-header {
    padding: 0 15px !important;
    height: 72px;
  }
  
  .nav-header .nav-left {
    flex: 1;
    justify-content: space-between;
  }
  
  .nav-header .nav-left .nav-icon {
    order: 1;
  }
  
  .nav-header .nav-left .nav-icon img {
    width: 100px;
    height: 22px;
    margin-right: 0;
  }
  
  /* 隐藏桌面端导航菜单 */
  .nav-menu {
    display: none !important;
  }
  
  /* 显示移动端元素 */
  .mobile-menu-toggle {
    display: flex !important;
    order: 3;
  }

  .mobile-auth-buttons {
    display: flex !important;
    order: 2;
    margin-left: auto;
    margin-right: 15px;
  }

  .mobile-nav-overlay,
  .mobile-nav-menu {
    display: block !important;
  }

  /* 隐藏桌面端右侧导航 */
  .nav-right {
    display: none !important;
  }

  /* 隐藏桌面端下拉菜单（仅在移动端） */
  .nav-cont {
    display: none !important;
  }

  /* 移动端二级菜单样式 */
  .mobile-nav-menu .nav-item-parent {
    position: relative;
  }

  .mobile-nav-menu .nav-item-parent::after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform 0.3s ease;
  }

  .mobile-nav-menu .nav-item-parent.expanded::after {
    transform: translateY(-50%) rotate(180deg);
  }

  .mobile-nav-menu .nav-sub-menu {
    display: none;
    background: #F7F8FA;
  }

  .mobile-nav-menu .nav-sub-menu.show {
    display: block;
  }

  .mobile-nav-menu .nav-sub-item {
    padding: 12px 20px 12px 40px;
    border-bottom: 1px solid #E6EAED;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .mobile-nav-menu .nav-sub-item:active {
    background: #E6EAED;
  }

  /* 已登录状态 - 移动端显示 */
  .mobile-user-info {
    display: flex;
    align-items: center;
    order: 2;
    margin-left: auto;
    margin-right: 15px;
    min-height: 44px;
  }

  .mobile-user-info .head-img {
    width: 32px;
    height: 32px;
    background: #eee;
    border: 1px solid #E6EAED;
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-user-info .name {
    margin-left: 8px;
    font-size: 14px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* ========================================
     3. 首屏卡片区域 - 田字格布局
     ======================================== */

  .banner-s .banner-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px !important;
  }

  .banner-s .banner-list .banner-item {
    width: 100% !important;
    padding: 20px 15px !important;
    flex: none !important;
  }

  .banner-s .banner-list .banner-item h5 {
    font-size: 16px;
  }

  .banner-s .banner-list .banner-item .title-desc {
    font-size: 12px;
    margin: 8px 0 !important;
  }

  .banner-s .banner-list .banner-item .banner-tag {
    font-size: 11px;
    padding: 4px 6px;
  }

  /* ========================================
     4. Banner区域优化
     ======================================== */

  /* Banner图片完整显示 - 移除固定高度，让图片自适应 */
  .banner-cont .swiper-slide {
    height: auto !important;
    min-height: 200px !important;
  }

  /* Banner图片响应式显示 */
  .banner-cont .swiper-slide .img,
  .banner-cont .swiper-slide img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
  }

  .banner-cont .section-content h1 {
    font-size: 24px !important;
  }

  .banner-cont .banner-desc {
    font-size: 14px !important;
    margin-top: 15px !important;
    margin-bottom: 30px !important;
  }

  .banner-cont .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  /* ========================================
     5. 标题和标语区域
     ======================================== */

  .section-content {
    padding: 40px 15px !important;
  }

  .section-title h2 {
    font-size: 24px !important;
  }

  .section-title .section-desc {
    font-size: 14px !important;
    margin-top: 12px !important;
    line-height: 1.6;
  }

  /* ========================================
     6. 业务类型卡片区域 - 响应式网格
     ======================================== */

  .service-content {
    margin: 0 !important;
    margin-top: 30px !important;
  }

  .service-content .fboxRow {
    flex-direction: column;
    margin: 0 !important;
  }

  .service-content .fboxRow a {
    width: 100% !important;
  }

  .service .service-box {
    margin: 0 0 15px 0 !important;
    padding: 20px !important;
    min-height: auto !important;
  }

  .service .service-box .service-title {
    font-size: 18px !important;
  }

  .service-box .title-desc {
    font-size: 14px !important;
    height: auto !important;
    margin: 12px 0 !important;
  }

  .service .service-tag-group .service-tag {
    font-size: 11px !important;
    padding: 0 8px !important;
    height: 22px !important;
  }

  .service-btn-group {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .service-btn-group .fboxWrap {
    margin-top: 15px;
    width: 100%;
  }

  .service-btn-group .btn {
    flex: 1;
    text-align: center;
    padding: 10px 15px;
    font-size: 14px;
  }

  /* ========================================
     7. 解决方案区域 - 响应式卡片
     ======================================== */

  .resolve-content {
    margin: 0 !important;
    margin-top: 30px !important;
  }

  .resolve-content .fboxRow {
    flex-direction: column;
    margin: 0 !important;
  }

  .resolve-content .resolve-box {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 25px 20px !important;
  }

  .resolve-content .resolve-box h4 {
    font-size: 18px !important;
    margin-bottom: 15px !important;
  }

  .resolve-content .resolve-box .title-desc {
    font-size: 14px !important;
  }

  .resolve-content .resolve-box .resolve-link {
    margin-top: 30px !important;
    font-size: 13px !important;
  }

  /* ========================================
     8. 地图区域 - 改为数据展示
     ======================================== */

  .section-base .base {
    flex-direction: column !important;
  }

  .section-base .base img {
    display: none !important;
  }

  .base .base-content {
    width: 100% !important;
    margin-bottom: 40px !important;
  }

  .base .base-content .fboxRow {
    justify-content: center;
  }

  .base .base-content h2 {
    font-size: 32px !important;
  }

  .base .base-content .title-desc {
    font-size: 14px !important;
  }

  /* ========================================
     9. 服务实践区域
     ======================================== */

  .practice .practice-content {
    flex-direction: column;
    margin: 0 !important;
    margin-top: 30px !important;
  }

  .practice .practice-box {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 20px !important;
  }

  .practice .practice-box img {
    max-width: 150px;
    height: auto;
  }

  .brand-group {
    margin: 0 !important;
    justify-content: center;
  }

  .practice .brand-box {
    width: calc(50% - 10px) !important;
    margin: 5px !important;
    height: 100px !important;
  }

  .practice .brand-box img {
    width: 70px !important;
    height: auto !important;
  }

  /* ========================================
     10. 证书区域
     ======================================== */

  .cert-list {
    justify-content: center !important;
  }

  .cert-list .cert-item {
    width: calc(50% - 20px) !important;
    padding: 15px 10px !important;
  }

  .cert-list .cert-item img {
    width: 48px !important;
    height: 48px !important;
  }

  /* ========================================
     11. 新闻区域
     ======================================== */

  .news-content {
    flex-direction: column;
    gap: 40px !important;
    margin-top: 30px !important;
  }

  .news-content .news-cont {
    width: 100%;
  }

  .news-content .news-head .news-title {
    font-size: 16px !important;
  }

  .news-content .news-item .title {
    font-size: 13px !important;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .news-content .news-item .time {
    font-size: 12px !important;
    min-width: 80px !important;
  }

  /* ========================================
     12. 底部区域
     ======================================== */

  .footer .footer-content {
    flex-direction: column !important;
  }

  .footer .footer-item {
    width: 100% !important;
    margin-bottom: 20px;
    text-align: center;
  }

  .footer .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  /* ========================================
     13. 侧边工具栏优化
     ======================================== */

  .aside-tools {
    bottom: 20px !important;
    right: 10px !important;
  }

  .aside-tools .tools-item {
    width: 44px !important;
    height: 44px !important;
  }

  .aside-tools .tools-item img {
    width: 24px !important;
    height: 24px !important;
  }

  .aside-tools .tools-box {
    display: none !important;
  }
}

/* ========================================
   小屏幕设备 (576px - 768px)
   ======================================== */

@media screen and (min-width: 576px) and (max-width: 768px) {
  /* 业务卡片 - 每行2个 */
  .service-content .fboxRow {
    flex-direction: row !important;
    flex-wrap: wrap;
  }

  .service-content .fboxRow a {
    width: calc(50% - 7.5px) !important;
  }

  .service-content .fboxRow a:nth-child(odd) {
    margin-right: 7.5px;
  }

  .service-content .fboxRow a:nth-child(even) {
    margin-left: 7.5px;
  }

  /* 解决方案卡片 - 每行2个 */
  .resolve-content .fboxRow {
    flex-direction: row !important;
    flex-wrap: wrap;
  }

  .resolve-content .resolve-box {
    width: calc(50% - 7.5px) !important;
  }

  .resolve-content .fboxRow .resolve-box:nth-child(odd) {
    margin-right: 7.5px !important;
  }

  .resolve-content .fboxRow .resolve-box:nth-child(even) {
    margin-left: 7.5px !important;
  }

  /* 证书区域 - 每行3个 */
  .cert-list .cert-item {
    width: calc(33.333% - 20px) !important;
  }
}

/* ========================================
   中等屏幕设备 (768px - 992px)
   ======================================== */

@media screen and (min-width: 768px) and (max-width: 992px) {
  /* 业务卡片 - 每行3个 */
  .service-content .fboxRow {
    flex-direction: row !important;
    flex-wrap: wrap;
  }

  .service-content .fboxRow a {
    width: calc(33.333% - 10px) !important;
    margin: 0 5px 15px 5px !important;
  }

  /* 解决方案卡片 - 每行3个 */
  .resolve-content .fboxRow {
    flex-direction: row !important;
    flex-wrap: wrap;
  }

  .resolve-content .resolve-box {
    width: calc(33.333% - 10px) !important;
    margin: 0 5px 15px 5px !important;
  }

  /* 证书区域 - 每行4个 */
  .cert-list .cert-item {
    width: calc(25% - 20px) !important;
  }
}

/* ========================================
   极窄屏幕设备 (<576px)
   ======================================== */

@media screen and (max-width: 576px) {
  /* Banner高度进一步缩小 - 保持自适应 */
  .banner-cont .swiper-slide {
    height: auto !important;
    min-height: 150px !important;
  }

  /* 确保极窄屏幕下图片也完整显示 */
  .banner-cont .swiper-slide .img,
  .banner-cont .swiper-slide img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }

  .banner-cont .section-content h1 {
    font-size: 20px !important;
  }

  .banner-cont .banner-desc {
    font-size: 13px !important;
    margin-bottom: 20px !important;
  }

  /* 标题字体缩小 */
  .section-title h2 {
    font-size: 20px !important;
  }

  .section-title .section-desc {
    font-size: 13px !important;
  }

  /* 首屏卡片间距调整 */
  .banner-s .banner-list {
    gap: 8px;
    padding: 10px !important;
  }

  .banner-s .banner-list .banner-item {
    padding: 15px 10px !important;
  }

  .banner-s .banner-list .banner-item h5 {
    font-size: 14px;
  }

  .banner-s .banner-list .banner-item .title-desc {
    font-size: 11px;
  }

  /* 移动端按钮调整 */
  .mobile-auth-buttons .btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  /* Logo进一步缩小 */
  .nav-header .nav-left .nav-icon img {
    width: 90px;
    height: 20px;
  }

  /* 业务卡片 - 每行1个 */
  .service-content .fboxRow {
    flex-direction: column !important;
  }

  .service-content .fboxRow a {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
  }

  /* 解决方案卡片 - 每行1个 */
  .resolve-content .fboxRow {
    flex-direction: column !important;
  }

  .resolve-content .resolve-box {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
  }

  /* 新闻标题缩小 */
  .news-content .news-item .title {
    font-size: 12px !important;
  }

  .news-content .news-item .time {
    font-size: 11px !important;
    min-width: 70px !important;
  }
}

/* ========================================
   通用移动端优化
   ======================================== */

@media screen and (max-width: 992px) {
  /* 确保所有按钮有足够的点击区域 */
  .btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* 链接点击区域优化 */
  a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* 输入框优化 */
  input, textarea, select {
    font-size: 16px !important; /* 防止iOS自动缩放 */
    min-height: 44px;
  }

  /* 图片响应式 */
  img {
    max-width: 100%;
    height: auto;
  }

  /* 表格响应式 */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 防止文字溢出 */
  h1, h2, h3, h4, h5, h6, p, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* 滚动优化 */
  body {
    -webkit-overflow-scrolling: touch;
  }

  /* ========================================
     产品页面响应式优化
     ======================================== */

  /* 产品Banner - 移除固定高度，让图片自适应 */
  .product-banner {
    height: auto !important;
    min-height: 200px !important;
    padding: 15px 0 !important;
  }

  /* 产品页面Banner图片完整显示 */
  .product-banner img,
  .server-banner img,
  .banner-cloud img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
  }

  .product-banner .section-content h1 {
    font-size: 24px !important;
  }

  .product-banner .section-content .section-desc {
    font-size: 14px !important;
  }

  /* 产品热门组合 */
  .product-hot .hot-cont {
    margin: 0 !important;
    margin-top: 20px !important;
  }

  .product-hot .hot-list {
    flex-direction: column;
  }

  .product-hot .hot-item {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 20px !important;
  }

  .product-hot .hot-item h4 {
    font-size: 18px !important;
  }

  .product-hot .hot-price {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 15px;
  }

  .product-hot .hot-price .btn {
    width: 100% !important;
  }

  /* 产品云服务 */
  .product-cloud .cloud {
    margin: 0 !important;
    margin-top: 30px !important;
  }

  .product-cloud .cloud-box {
    min-width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 20px !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .product-cloud .cloud-box img {
    margin-right: 0 !important;
    margin-bottom: 15px;
    width: 100px !important;
    height: 100px !important;
  }

  /* 产品性能区域 */
  .product-performance .performance-cont {
    flex-direction: column;
  }

  .product-performance .performance-box {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 20px !important;
  }

  /* 产品优势 */
  .product-advantage .advantage-list {
    flex-direction: column;
  }

  .product-advantage .advantage-item {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 20px !important;
  }

  /* ========================================
     解决方案页面响应式优化
     ======================================== */

  /* 解决方案Banner - 移除固定高度，让图片自适应 */
  .solution-banner {
    height: auto !important;
    min-height: 200px !important;
  }

  /* 解决方案页面Banner图片完整显示 */
  .solution-banner img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
  }

  .solution-content .solution-box {
    width: 100% !important;
    margin: 0 0 15px 0 !important;
    padding: 20px !important;
  }

  .solution-content .solution-box img {
    width: 100% !important;
    height: auto !important;
  }

  /* ========================================
     新闻/公告页面响应式优化
     ======================================== */

  .news-list-content,
  .announce-list-content {
    padding: 15px !important;
  }

  .news-item-card,
  .announce-item-card {
    margin-bottom: 15px !important;
    padding: 15px !important;
  }

  .news-item-card img {
    width: 100% !important;
    height: auto !important;
  }

  /* ========================================
     文档页面响应式优化
     ======================================== */

  .document-sidebar {
    display: none !important;
  }

  .document-content {
    width: 100% !important;
    padding: 15px !important;
  }

  .document-content h1 {
    font-size: 22px !important;
  }

  .document-content h2 {
    font-size: 20px !important;
  }

  .document-content h3 {
    font-size: 18px !important;
  }

  .document-content pre {
    overflow-x: auto;
    font-size: 13px !important;
  }

  /* ========================================
     关于我们页面响应式优化
     ======================================== */

  .about-content .about-section {
    padding: 30px 15px !important;
  }

  .about-timeline {
    padding-left: 20px !important;
  }

  .about-timeline-item {
    padding-left: 30px !important;
  }

  /* ========================================
     联系我们页面响应式优化
     ======================================== */

  .contact-form {
    padding: 20px 15px !important;
  }

  .contact-form input,
  .contact-form textarea {
    width: 100% !important;
  }

  .contact-info {
    flex-direction: column;
  }

  .contact-info-item {
    width: 100% !important;
    margin-bottom: 15px;
  }

  /* ========================================
     页脚（Footer）响应式优化
     ======================================== */

  /* 页脚整体布局 */
  .footer-content {
    padding: 20px 15px !important;
  }

  /* 页脚导航区域 */
  .footer-nav {
    flex-direction: column !important;
  }

  .footer-nav-left {
    width: 100% !important;
    flex-direction: column !important;
  }

  .footer-nav-right {
    width: 100% !important;
    margin-top: 30px;
  }

  /* 页脚导航项 */
  .footer-nav-box {
    width: 100% !important;
    margin-bottom: 25px !important;
    padding: 0 !important;
  }

  .footer-nav-head {
    font-size: 16px !important;
    margin-bottom: 15px !important;
    font-weight: 600;
  }

  .footer-nav-cont {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .footer-nav-item {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-top: 0 !important;
  }

  /* 二维码 */
  .qr-code {
    width: 120px !important;
    height: 120px !important;
    margin-top: 15px;
  }

  .qr-code img {
    width: 100% !important;
    height: 100% !important;
  }

  /* 友情链接 */
  .footer-link {
    flex-wrap: wrap !important;
    padding: 15px 0 !important;
    font-size: 13px !important;
    line-height: 2 !important;
  }

  .footer-link a {
    margin: 0 10px 5px 0 !important;
    font-size: 13px !important;
  }

  /* 页脚备案信息 */
  .footer-record {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 15px 0 !important;
    font-size: 12px !important;
    line-height: 1.8 !important;
  }

  .footer-record .left-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }

  .footer-record a,
  .footer-record span {
    font-size: 12px !important;
    display: block;
  }
}

