/**
 * 中联数科官网 - 自定义优化样式
 * 优化内容：中文字体渲染、视觉层次、动画效果、移动端适配、无障碍
 */

/* =============================================
   1. 中文字体渲染优化
============================================= */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* 中文字体回退栈，优先使用系统中文字体 */
  font-family: "Jost", "PingFang SC", "Microsoft YaHei", "微软雅黑", "Hiragino Sans GB", sans-serif;
}

/* 标题中文字体优化 */
h1, h2, h3, h4, h5, h6,
.hero-title, .service-title, .info-title,
.faq-title, .footer-col-title, .customer-name {
  font-family: "Jost", "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
  letter-spacing: 0.02em;
}

/* 正文中文字体行高优化 */
p, .about-text, .service-text, .faq-answer, .footer-text-about-us {
  font-family: "Jost", "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

/* =============================================
   2. Hero 区域视觉强化
============================================= */
.hero-title {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.9;
  opacity: 0.9;
}

/* Hero CTA 按钮组间距 */
.cta-links-area {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cta-links-area .cta-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-links-area .cta-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(9, 175, 244, 0.35);
}

/* =============================================
   3. 服务卡片视觉优化（等高对齐）
============================================= */

/* 服务行：强制等高拉伸 */
.services-row {
  align-items: stretch !important;
}

.service-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  /* 等高布局：卡片占满列高度，内容纵向排列 */
  display: flex !important;
  flex-direction: column !important;
  height: 100%;
  box-sizing: border-box;
  /* 防止内容溢出 */
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
}

.service-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(9, 175, 244, 0.15) !important;
}

/* 服务卡片内容区域：自动撑满剩余空间 */
.service-box .service-content {
  flex: 1 1 auto;
}

/* "查看方案"链接始终贴底 */
.service-box .read-more {
  margin-top: auto;
  display: inline-block;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--clr-main);
}

.service-text {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 0.6rem;
}

/* =============================================
   4. 统计数字区域视觉强化
============================================= */
.stat-num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-desc {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.stat-box-inner {
  transition: transform 0.3s ease;
  padding: 2rem 1rem;
  border-radius: 12px;
}

/* =============================================
   5. 导航栏优化
============================================= */
.menu-navbar {
  transition: all 0.3s ease;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
  position: relative;
}

/* 导航下划线动画 */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--clr-main);
  border-radius: 2px;
  transition: left 0.25s ease, right 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  left: 0;
  right: 0;
}

/* =============================================
   6. FAQ 手风琴优化
============================================= */
.faq-btn {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}

.card {
  border-radius: 8px !important;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(9, 175, 244, 0.12) !important;
}

.faq-answer {
  font-size: 0.92rem;
  line-height: 1.85;
}

/* =============================================
   7. 客户案例区域优化
============================================= */
.portfolio-btn {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 50px !important;
  transition: all 0.25s ease;
}

.item {
  border-radius: 12px;
  overflow: hidden;
}

.portfolio-img {
  transition: transform 0.4s ease;
}

.item:hover .portfolio-img {
  transform: scale(1.03);
}

/* =============================================
   8. 团队成员卡片优化
============================================= */
.testmonial-card {
  border-radius: 16px;
  transition: transform 0.3s ease;
}

.customer-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.customer-role {
  font-size: 0.875rem;
  opacity: 0.7;
  letter-spacing: 0.03em;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.85;
}

/* =============================================
   9. 联系我们区域优化
============================================= */
.info-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.info-text {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* =============================================
   10. 按钮视觉优化
============================================= */
.btn-solid {
  border-radius: 50px;
  padding: 0.6rem 1.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(9, 175, 244, 0.4);
}

.btn-outline {
  border-radius: 50px;
  padding: 0.6rem 1.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline:hover {
  transform: translateY(-2px);
}

/* =============================================
   11. 移动端响应式优化
============================================= */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
    line-height: 1.35;
  }

  .hero-subtitle {
    font-size: 0.88rem;
    line-height: 1.8;
  }

  .cta-links-area {
    flex-direction: row;
    gap: 10px;
  }

  .sec-heading .title {
    font-size: 1.6rem;
  }

  .service-box {
    margin-bottom: 1rem;
  }

  .stat-num {
    font-size: 2rem;
  }

  /* 导航移动端优化 */
  .menu-navbar {
    padding: 0.75rem 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .cta-links-area .cta-link {
    font-size: 0.85rem;
    padding: 0.5rem 1.2rem;
  }
}

/* =============================================
   12. 滚动条美化
============================================= */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--clr-main);
  border-radius: 3px;
  opacity: 0.6;
}

::-webkit-scrollbar-thumb:hover {
  opacity: 1;
}

/* =============================================
   13. 图片渲染优化
============================================= */
img {
  image-rendering: auto;
  max-width: 100%;
  height: auto;
}

/* =============================================
   14. 焦点可见性（无障碍）
============================================= */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--clr-main);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================
   15. 暗色主题下的额外优化
============================================= */
.dark-theme body,
body.dark-theme {
  -webkit-font-smoothing: subpixel-antialiased;
}

.dark-theme .service-title {
  color: var(--clr-main);
}

/* =============================================
   16. 页脚优化
============================================= */
.footer-text-about-us {
  font-size: 0.9rem;
  line-height: 1.8;
  opacity: 0.85;
}

.footer-menu-link {
  font-size: 0.9rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-menu-link:hover {
  padding-left: 4px;
}

.contact-info-card {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

/* =============================================
   17. 搜索框优化
============================================= */
.search-input {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.95rem;
}

/* =============================================
   18. 合作伙伴 Logo 区域
============================================= */

/* 合作伙伴区块容器增强 */
.our-clients {
  position: relative;
  overflow: hidden;
}

/* 背景渐变装饰 */
.our-clients::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
    rgba(9, 175, 244, 0.03) 0%,
    rgba(0, 115, 177, 0.02) 50%,
    rgba(9, 175, 244, 0.03) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Logo 卡片样式增强 */
.client-logo {
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(9, 175, 244, 0.1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* 卡片背景装饰效果 */
.client-logo::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(9, 175, 244, 0.05) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
  pointer-events: none;
}

.client-logo:hover::before {
  opacity: 1;
  animation: cardShine 0.6s ease;
}

@keyframes cardShine {
  from {
    transform: rotate(45deg) translateY(-50%);
  }
  to {
    transform: rotate(45deg) translateY(50%);
  }
}

/* Logo 图片样式 */
.client-logo img {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  transition: all 0.3s ease;
  filter: grayscale(0.3) brightness(0.95);
  position: relative;
  z-index: 1;
}

/* 悬停效果 */
.client-logo:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 32px rgba(9, 175, 244, 0.25);
  border-color: rgba(9, 175, 244, 0.3);
  background: rgba(255, 255, 255, 0.95);
}

.client-logo:hover img {
  filter: grayscale(0) brightness(1);
  transform: scale(1.1);
}

/* Swiper 容器优化 */
.clients-logos .swiper-container {
  padding: 1rem 0;
}

.clients-logos .swiper-wrapper {
  padding: 0.5rem 0;
}

/* 暗色主题适配 */
body.dark-theme .our-clients::before {
  background: linear-gradient(135deg,
    rgba(9, 175, 244, 0.06) 0%,
    rgba(0, 115, 177, 0.04) 50%,
    rgba(9, 175, 244, 0.06) 100%);
}

body.dark-theme .client-logo,
.dark-theme .client-logo {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(9, 175, 244, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-theme .client-logo:hover,
.dark-theme .client-logo:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(9, 175, 244, 0.4);
  box-shadow: 0 12px 32px rgba(9, 175, 244, 0.3);
}

body.dark-theme .client-logo img,
.dark-theme .client-logo img {
  filter: grayscale(0.4) brightness(0.85);
}

body.dark-theme .client-logo:hover img,
.dark-theme .client-logo:hover img {
  filter: grayscale(0) brightness(1);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .client-logo {
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
  }

  .client-logo img {
    max-width: 100px;
    max-height: 50px;
  }
}

/* =============================================
   19. 页面加载动画优化
============================================= */
.loading-screen {
  z-index: 9999;
}

/* =============================================
   20. 回到顶部按钮
============================================= */
#back-to-top {
  border-radius: 50%;
  transition: all 0.3s ease;
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(9, 175, 244, 0.4);
}

/* =============================================
   21. 解决方案模块 - 文字卡片样式
============================================= */

/* —— Isotope 与 Bootstrap Flex 列兼容修复 ——
   Isotope 默认对 .portfolio-item 用 position:absolute 定位，
   会导致 d-flex 等高列失效并产生重影。
   改为让容器用相对定位，item 用正常流布局。 */
.portfolio-group {
  position: relative;
}

/* 纯 CSS 过滤方案：pf-hidden / pf-visible 类控制显示隐藏 */
.portfolio .portfolio-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

/* 隐藏态：淡出并折叠高度，不占据文档流 */
.portfolio .portfolio-item.pf-hidden {
  display: none !important;
}

/* 显示态：淡入动画 */
.portfolio .portfolio-item.pf-visible {
  display: flex !important;
  animation: pfFadeIn 0.35s ease forwards;
}

@keyframes pfFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 避免 Isotope 残留的 absolute 定位干扰（如 Isotope 已初始化过） */
.portfolio .portfolio-group > .row {
  position: static !important;
  height: auto !important;
}

.portfolio .portfolio-group .portfolio-item {
  position: static !important;
  left: auto !important;
  top: auto !important;
}





/* 文字卡片基础 */
.pf-text-card {
  background: #fff;
  border: 1px solid rgba(9, 175, 244, 0.12);
  border-radius: 16px;
  padding: 2rem 1.8rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* 顶部装饰线 */
.pf-text-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-main, #09aff4), rgba(9, 175, 244, 0.3));
  border-radius: 16px 16px 0 0;
}

/* 强调色卡片变体 */
.pf-text-card.pf-card-accent {
  background: linear-gradient(145deg, #f0fbff 0%, #ffffff 100%);
  border-color: rgba(9, 175, 244, 0.2);
}

.pf-text-card.pf-card-accent::before {
  background: linear-gradient(90deg, var(--clr-main, #09aff4), #0073b1);
}

/* 卡片悬停效果 */
.pf-text-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(9, 175, 244, 0.18);
  border-color: rgba(9, 175, 244, 0.35);
}

/* 图标区域 */
.pf-card-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--clr-main, #09aff4) 0%, #0073b1 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  flex-shrink: 0;
}

.pf-card-icon i {
  font-size: 1.5rem;
  color: #fff;
}

/* 卡片标题 */
.pf-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* 卡片描述 */
.pf-card-desc {
  font-size: 0.88rem;
  line-height: 1.85;
  color: #555;
  margin-bottom: 1rem;
}

/* 特性列表 */
.pf-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem 0;
}

.pf-card-features li {
  font-size: 0.85rem;
  color: #444;
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.5;
}

.pf-card-features li i {
  color: var(--clr-main, #09aff4);
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* 申请试用按钮 */
.pf-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--clr-main, #09aff4);
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--clr-main, #09aff4);
  border-radius: 50px;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.pf-card-btn:hover {
  background: var(--clr-main, #09aff4);
  color: #fff;
  transform: translateX(3px);
  box-shadow: 0 4px 14px rgba(9, 175, 244, 0.35);
}

.pf-card-btn i {
  transition: transform 0.25s ease;
}

.pf-card-btn:hover i {
  transform: translateX(3px);
}

/* 暗色主题适配 */
body.dark-theme .pf-text-card,
.dark-theme .pf-text-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(9, 175, 244, 0.2);
}

body.dark-theme .pf-text-card.pf-card-accent,
.dark-theme .pf-text-card.pf-card-accent {
  background: linear-gradient(145deg, rgba(9, 175, 244, 0.08) 0%, rgba(255,255,255,0.03) 100%);
}

body.dark-theme .pf-card-title,
.dark-theme .pf-card-title {
  color: #f0f0f0;
}

body.dark-theme .pf-card-desc,
.dark-theme .pf-card-desc {
  color: #bbb;
}

body.dark-theme .pf-card-features li,
.dark-theme .pf-card-features li {
  color: #ccc;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .pf-text-card {
    padding: 1.5rem 1.3rem;
  }

  .pf-card-title {
    font-size: 1rem;
  }

  .pf-card-desc {
    font-size: 0.85rem;
  }
}
