@layer utilities {
  .content-auto {
    content-visibility: auto;
  }
  .text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  .transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
  }
  .scale-hover {
    transition: transform 300ms ease, box-shadow 300ms ease;
  }
  .scale-hover:hover {
    transform: scale(1.05);
  }
  .card-shadow {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }
}

/* ===== 新增：动画 Keyframes 与通用类（不改变布局） ===== */

/* 组件显现（向上淡入） */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 轻微漂浮效果，用于装饰圆形背景或图标 */
@keyframes floatSlow {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* 轻微放大/缩小脉冲 */
@keyframes pulseSoft {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.95; }
  100% { transform: scale(1); opacity: 1; }
}

/* 可复用类 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  will-change: transform, opacity;
}
.reveal.in-view {
  animation: revealUp 600ms cubic-bezier(.22,.9,.36,1) forwards;
}

.float-deco {
  animation: floatSlow 6s ease-in-out infinite;
  will-change: transform;
}

.pulse-soft {
  animation: pulseSoft 4s ease-in-out infinite;
}

/* 按钮渐变与微交互（增强 CTA） */
.btn-gradient {
  background-image: linear-gradient(90deg, #165DFF 0%, #36CFC9 100%);
  color: #fff;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  will-change: transform, box-shadow;
}
.btn-gradient:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(21,93,255,0.12);
}

/* 图片轻微视差：在 hover 或 group-hover 时放大并略微偏移 */
.img-parallax {
  transition: transform .6s cubic-bezier(.22,.9,.36,1);
  transform-origin: center center;
}
.img-parallax.in-view {
  transform: none;
}
.img-parallax.group-hover\:scale-110:hover,
.img-parallax.group-hover\:scale-110.group-hover:hover {
  transform: scale(1.06) translateY(-6px);
}

/* 减少运动：检测 prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .float-deco, .pulse-soft, .btn-gradient, .img-parallax { animation: none !important; transition: none !important; }
}

/* ===== 新增覆盖：取消 logo 与按钮的动画（即使类存在亦无动画） ===== */
.logo,
button,
a.btn-gradient,
a.bg-primary,
button.bg-primary {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
}

/* 确保 logo 可见（修复不小心被隐藏的问题） */
.logo {
  opacity: 1 !important;
  visibility: visible !important;
  display: inline-block !important;
  transform: none !important;
  clip-path: none !important;
  filter: none !important;
}

/* ===== 新增：毛玻璃面板与全屏背景画布样式（不改变主色调） ===== */
/* 只通过低 alpha 覆盖和 backdrop-filter 来实现毛玻璃视觉，保留原有颜色感觉 */
.frosted, .bg-frosted {
  background-color: rgba(255,255,255,0.06); /* 非侵入性浅色叠加，保留底色 */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* 给现有面板提供一个轻量的 frost 类，使用时不会改变文本颜色 */
.panel-frost {
  background-color: rgba(255,255,255,0.06) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  backdrop-filter: blur(6px) !important;
}

/* 背景 canvas（圆形） */
.background-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* 确保页面主内容在 canvas 之上 */
main, header, footer {
  position: relative;
  z-index: 10;
}

/* ===== 导航栏毛玻璃样式（默认轻微；滚动后更明显） ===== */
/* 基于现有 Tailwind 类，但提供更平滑的视觉效果与回退 */
#navbar {
  background-color: rgba(255,255,255,0.6); /* 回退颜色，兼容不支持 backdrop-filter 的浏览器 */
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

/* 滚动或激活态（脚本会给 navbar 添加 .shadow） */
#navbar.shadow {
  background-color: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(16,24,40,0.08);
}

/* 移动菜单弹出时也应用毛玻璃 */
#mobileMenu {
  background-color: rgba(255,255,255,0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

@media (prefers-reduced-motion: reduce) {
  #navbar, #mobileMenu { transition: none !important; }
}

/* ===== 打字机效果样式（用于小标题） ===== */
.typewriter {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  vertical-align: bottom;
}
.typewriter-text {
  display: inline-block;
}
.typewriter-cursor {
  display: inline-block;
  width: 3px; /* 加粗为品牌视觉更明显 */
  height: 1.05em;
  background: #165DFF; /* 品牌蓝 */
  margin-left: 8px;
  vertical-align: bottom;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(22,93,255,0.18); /* 蓝色柔和光晕 */
  animation: tw-blink 0.9s step-end infinite;
  transform-origin: center;
}
@keyframes tw-blink { 0%, 45% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .typewriter-cursor { animation: none !important; }
}


/* ===== 卡片统一毛玻璃效果（应用于常见卡片类，不改动布局） ===== */
/* 选择常见的白色卡片与灰色面板，保持可读性并增加层次 */
.bg-white.rounded-xl,
.bg-gray-100.rounded-xl,
.p-6.bg-white,
.case-item .p-6,
.lg\:col-span-3.bg-white {
  /* 提升通透感：降低不透明度以获得更轻巧的毛玻璃效果 */
  background-color: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 20px rgba(16,24,40,0.03);
}

/* 客户评价卡片不使用毛玻璃效果：保持原生灰色背景以保证可读性 */
.testimonial-item .bg-gray-100,
.testimonial-item .bg-white,
.testimonial-item > div,
.testimonial-item .p-8,
.testimonial-item .rounded-xl {
  background-color: #F7F8FA; /* 固态背景 */
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
  box-shadow: 0 8px 18px rgba(16,24,40,0.04);
}

/* 更小的卡片（例如服务卡片内的小统计）采用更细微的效果 */
.w-16.h-16.rounded-lg,
.w-10.h-10.rounded-full {
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

@media (prefers-reduced-motion: reduce) {
  .bg-white.rounded-xl, .bg-gray-100.rounded-xl, .p-6.bg-white { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* 修复 WeChat QR Code 悬浮弹窗尺寸问题（header/footer/contact 中的 group-hover 弹出） */
/* 目标：让悬浮图片尺寸稳定、在移动端缩小，并增加键盘可访问性（focus-within） */
.group > .absolute.hidden.group-hover\:block {
  /* 默认隐藏，由 :hover 或 focus-within 控制显示 */
  display: none;
  pointer-events: auto;
  box-sizing: border-box;
  /* 固定为正方形容器（含 padding），内层图片填满形成正方形二维码 */
  width: 104px; /* 包括内边距 */
  height: 104px;
  padding: 4px; /* 让图片有呼吸感 */
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16,24,40,0.12);
}
.group:hover > .absolute.hidden.group-hover\:block,
.group:focus-within > .absolute.hidden.group-hover\:block {
  display: block;
}
.group > .absolute.hidden.group-hover\:block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px; /* 图片内角微圆，容器仍保持方形外观 */
}

/* 移动端适配：缩小二维码并避免超出视口（靠右显示） */
@media (max-width: 640px) {
  .group > .absolute.hidden.group-hover\:block {
    width: 80px;
    height: 80px;
    padding: 3px;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
  }
  .group > .absolute.hidden.group-hover\:block img {
    border-radius: 4px;
  }
}

/* 导航栏链接美化 */
nav.hidden.md\:flex.space-x-8 a {
  position: relative;
  padding: 0.5rem 0;
  font-weight: 600;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

nav.hidden.md\:flex.space-x-8 a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--primary-color, #165DFF);
  transition: width 0.3s ease;
}

nav.hidden.md\:flex.space-x-8 a.active::after {
  width: 100%;
}

nav.hidden.md\:flex.space-x-8 a.active {
  color: var(--primary-color, #165DFF);
}

/* ===== 移动端适配增强：触控尺寸、滚动锁定与安全区域 ===== */
/* 打开移动菜单时锁定页面滚动 */
body.overflow-hidden {
  overflow: hidden;
  overscroll-behavior: contain;
}

/* 增强移动菜单的触控目标尺寸与可读性 */
#mobileMenu a {
  padding: 0.875rem 0; /* 提高触控面积 */
  font-size: 1.05rem;
}

/* 安全区域（刘海/底部手势）适配 */
@supports (padding: env(safe-area-inset-bottom)) {
  header#navbar {
    padding-top: env(safe-area-inset-top);
  }
  #mobileMenu {
    padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
  }
}

/* 遮罩样式（若未用内联样式时也可作为后备） */
#menuOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 40; /* 在主内容之上、header 之下（header 已 z-50） */
  pointer-events: auto;
}

/* ===== 移动端导航栏优化 ===== */
@media (max-width: 767px) {
  /* 导航栏高度优化 */
  #navbar .py-4 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
  
  /* Logo 尺寸调整 */
  #navbar .logo {
    max-height: 32px !important;
    width: auto !important;
  }
  
  /* 菜单按钮优化 */
  #menuBtn {
    padding: 0.5rem !important;
    margin-right: -0.5rem !important;
  }
  
  /* 移动菜单优化 */
  #mobileMenu {
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  #mobileMenu a {
    padding: 0.75rem 0 !important;
    font-size: 1rem !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  }
  
  #mobileMenu a:last-child {
    border-bottom: none !important;
    margin-top: 0.5rem !important;
    padding: 0.875rem 1rem !important;
    border-radius: 0.5rem !important;
    background: #165DFF !important;
    color: white !important;
    text-align: center !important;
  }
  
  /* 主内容区域间距优化 */
  main section {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  /* 英雄区域优化 */
  #home {
    padding-top: 5rem !important;
    min-height: auto !important;
  }
  
  #home h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }
  
  #home p {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }
  
  /* 按钮尺寸优化 */
  #home .flex.flex-wrap.gap-4 a {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 0.5rem !important;
  }
  
  /* 客户头像区域优化 */
  #home .flex.-space-x-2 img {
    width: 32px !important;
    height: 32px !important;
  }
  
  #home .flex.-space-x-2 div {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.7rem !important;
  }
  
  /* 服务卡片间距优化 */
  #services .grid.gap-8 {
    gap: 1.5rem !important;
  }
  
  #services .bg-white.rounded-xl {
    padding: 1.5rem !important;
  }
  
  /* 案例筛选按钮优化 */
  .case-filter {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    margin: 0.25rem !important;
  }
  
  /* 团队成员卡片优化 */
  #team .grid.gap-8 {
    gap: 1.5rem !important;
  }
  
  #team .bg-white.rounded-xl img {
    height: 200px !important;
  }
  
  /* 客户评价轮播优化 */
  .testimonial-item {
    margin: 0 0.5rem !important;
  }
  
  /* 联系表单优化 */
  #contact .grid.gap-8 {
    gap: 1.5rem !important;
  }
  
  #contact .bg-white.p-8 {
    padding: 1.5rem !important;
  }
  
  /* 输入框优化 */
  #contact input, #contact select, #contact textarea {
    padding: 0.75rem !important;
    font-size: 1rem !important;
  }
  
  /* 防止文本溢出 */
  * {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  /* 图片响应式 */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* ===== FAQ 翻页样式 ===== */
.faq-container {
  position: relative;
  min-height: 400px;
}

.faq-page {
  display: none;
  animation: fadeIn 0.5s ease-in-out;
}

.faq-page.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-nav-btn {
  transition: all 0.3s ease;
  min-width: 100px;
}

.faq-nav-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faq-page-btn {
  transition: all 0.3s ease;
  cursor: pointer;
}

.faq-page-btn:hover {
  transform: scale(1.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .faq-nav-btn {
    min-width: 80px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .faq-page-btn {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }
}



