/* 基础动画样式：默认隐藏 */
.animation {
  visibility: hidden;
  opacity: 0;
  /* 统一动画过渡基础 */
  transition: opacity 0.3s ease;
}

/* 入场动画激活类 */
.fadeLeft,
.fadeRight,
.fadeUp,
.fadeDown,
.fadeZoom,
.fadeScale {
  visibility: visible;
}

/* 1. 向上滑入（原有优化） */
.fadeUp {
  animation: slideInUp ease-out 0.6s forwards;
  -webkit-animation: slideInUp ease-out 0.6s forwards;
}

@keyframes slideInUp {
  from {
    transform: translate3d(0, 50%, 0);
    opacity: 0;
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@-webkit-keyframes slideInUp {
  from {
    -webkit-transform: translate3d(0, 50%, 0);
    opacity: 0;
  }

  to {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
  }
}

/* 2. 向左滑入（原有优化） */
.fadeLeft {
  animation: slideInLeft ease-out 0.6s forwards;
  -webkit-animation: slideInLeft ease-out 0.6s forwards;
}

@keyframes slideInLeft {
  from {
    transform: translate3d(-50%, 0, 0);
    opacity: 0;
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@-webkit-keyframes slideInLeft {
  from {
    -webkit-transform: translate3d(-50%, 0, 0);
    opacity: 0;
  }

  to {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
  }
}

/* 3. 向右滑入（原有优化） */
.fadeRight {
  animation: slideInRight ease-out 0.6s forwards;
  -webkit-animation: slideInRight ease-out 0.6s forwards;
}

@keyframes slideInRight {
  from {
    transform: translate3d(50%, 0, 0);
    opacity: 0;
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@-webkit-keyframes slideInRight {
  from {
    -webkit-transform: translate3d(50%, 0, 0);
    opacity: 0;
  }

  to {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
  }
}

/* 4. 向下滑入（新增） */
.fadeDown {
  animation: slideInDown ease-out 0.6s forwards;
  -webkit-animation: slideInDown ease-out 0.6s forwards;
}

@keyframes slideInDown {
  from {
    transform: translate3d(0, -50%, 0);
    opacity: 0;
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@-webkit-keyframes slideInDown {
  from {
    -webkit-transform: translate3d(0, -50%, 0);
    opacity: 0;
  }

  to {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
  }
}

/* 5. 中心放大（原有重命名优化） */
.fadeZoom {
  animation: zoomIn ease-out 0.6s forwards;
  -webkit-animation: zoomIn ease-out 0.6s forwards;
}

@keyframes zoomIn {
  from {
    transform: scale3d(0.3, 0.3, 0.3);
    opacity: 0;
  }

  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

@-webkit-keyframes zoomIn {
  from {
    -webkit-transform: scale3d(0.3, 0.3, 0.3);
    opacity: 0;
  }

  to {
    opacity: 1;
    -webkit-transform: scale3d(1, 1, 1);
  }
}

/* 6. 轻微缩放淡入（新增：更柔和的效果） */
.fadeScale {
  animation: fadeScale ease-out 0.7s forwards;
  -webkit-animation: fadeScale ease-out 0.7s forwards;
}

@keyframes fadeScale {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@-webkit-keyframes fadeScale {
  from {
    -webkit-transform: scale(0.8);
    opacity: 0;
  }

  to {
    opacity: 1;
    -webkit-transform: scale(1);
  }
}

/* 图片容器动画 */
.image-container {
  overflow: hidden;
}

.image-container img {
  width: 100%;
  animation: imgZoomIn 4s forwards;
  -webkit-animation: imgZoomIn 4s forwards;
}


.image-container.animation {
  visibility: visible;
  opacity: 1 !important;
}


@keyframes imgZoomIn {
  0% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

@-webkit-keyframes imgZoomIn {
  0% {
    -webkit-transform: scale(1.1);
  }

  100% {
    -webkit-transform: scale(1);
  }
}

/* 图片悬停缩放（响应式） */
@media (min-width: 480px) {
  .img-scale {
    overflow: hidden;
  }

  .img-scale img {
    transform: scale(1);
    -webkit-transform: scale(1);
    transition: all 0.8s;
    -webkit-transition: all 0.8s;
  }

  .img-scale:hover img {
    transform: scale(1.1);
    -webkit-transform: scale(1.1);
  }
}