/* 全局动画定义 */

/* 品牌进入动画 */
@keyframes brandEnter {
  0% { transform: translateY(-10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* 淡入动画 */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* 淡出动画 */
@keyframes fadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* 向上滑动动画 */
@keyframes slideUp {
  0% { transform: translateY(30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* 向下滑动动画 */
@keyframes slideDown {
  0% { transform: translateY(-30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* 向左滑动动画 */
@keyframes slideLeft {
  0% { transform: translateX(30px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* 向右滑动动画 */
@keyframes slideRight {
  0% { transform: translateX(-30px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* 弹跳动画 */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

/* 脉冲动画 */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* 旋转动画 */
@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 悬停上浮效果 */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(2,6,23,.15);
}

/* 悬停旋转效果 */
.hover-rotate {
  transition: transform 0.5s ease;
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* 悬停颜色变化 */
.hover-color {
  transition: color 0.3s ease, background-color 0.3s ease;
}

/* 页面元素动画 */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 延迟动画类 - 统一管理 */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* 按钮动画 */
.btn-animation {
  transition: all 0.3s ease;
}

.btn-animation:hover {
  transform: translateY(-2px);
}

/* 波纹效果 - 统一管理 */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple 0.6s linear;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* 下划线动画 */
.underline-animation,
.underline-hover {
  position: relative;
}

.underline-animation::after,
.underline-hover::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--brand);
  transition: width 0.3s ease;
}

.underline-animation:hover::after,
.underline-hover:hover::after {
  width: 100%;
}

/* 图片放大效果 */
.zoom-image {
  transition: transform 0.5s ease;
  opacity: 0;
}

.zoom-image.loaded {
  opacity: 1;
}

/* 卡片悬停效果 */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* 脉冲按钮效果 */
.pulse-button {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(57, 129, 245, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(57, 129, 245, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(57, 129, 245, 0);
  }
}

/* 悬停缩放效果 */
.hover-scale {
  overflow: hidden;
}

.hover-scale img {
  transition: transform 0.5s ease;
}

.hover-scale:hover img {
  transform: scale(1.05);
}

/* 滚动显示动画 */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 数字增长动画 */
.count-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* 轮播图动画 */
.carousel-item {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-item.active {
  opacity: 1;
}

/* 淡入淡出动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 导航栏滚动效果 - 统一管理 */
.nav-scroll {
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-scroll.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 32px rgba(2,6,23,.12);
  padding-top: 8px;
  padding-bottom: 8px;
}

/* 响应式动画调整 */
@media (max-width: 768px) {
  .fade-in-section {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
}


/* 数字计数器动画 */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.count-animate {
  animation: countUp 1s ease-out forwards;
}


/* 按钮动画效果增强 */
.btn-animation {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-animation:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.4s ease;
  z-index: -1;
}

.btn-animation:hover:before {
  left: 100%;
}

/* 加载动画 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  animation: spin 1s linear infinite;
}

/* 卡片悬停效果增强 */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(2,6,23,.15);
}

.card-hover:hover .card-image img {
  transform: scale(1.08);
}

/* 图片放大效果 */
.zoom-image {
  transition: transform 0.5s ease;
}

.zoom-image:hover {
  transform: scale(1.05);
}

/* 轮播图平滑过渡 */
.carousel-item {
  transition: opacity 0.6s ease-in-out;
}

/* 指示器动画 */
.carousel-dots .dot {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 下划线动画 */
.underline-animation {
  position: relative;
}

.underline-animation:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 0.3s ease;
}

.underline-animation:hover:after {
  width: 100%;
}

/* 文字渐入效果 */
.text-fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* 背景渐变动画 */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animate {
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

/* 闪烁动画 */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.blink {
  animation: blink 2s ease-in-out infinite;
}

/* 弹跳加载 */
@keyframes bounce-load {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.bounce-loader div {
  animation: bounce-load 1.4s ease-in-out infinite both;
}

.bounce-loader div:nth-child(1) {
  animation-delay: -0.32s;
}

.bounce-loader div:nth-child(2) {
  animation-delay: -0.16s;
}

/* 呼吸动画 */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 1; }
}

.breathe {
  animation: breathe 4s ease-in-out infinite;
}

/* 页面加载动画 */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #cfe8ff, #e0f2fe, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.page-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 32px;
  animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from { text-shadow: 0 0 10px rgba(10, 109, 246, 0.3); }
  to { text-shadow: 0 0 20px rgba(10, 109, 246, 0.6); }
}

.loader-spinner {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid var(--brand);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-top-color: var(--accent);
  animation-delay: -0.4s;
}

.spinner-ring:nth-child(3) {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-top-color: var(--accent-2);
  animation-delay: -0.8s;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* 鼠标跟随效果 */
.mouse-follower {
  transition: transform 0.1s ease;
}

/* 卡片3D效果 */
.card, .feature-card, .news-card, .case-card {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

/* 文字打字机效果 */
[data-typewriter] {
  overflow: hidden;
  white-space: nowrap;
}