/* 自定义样式 */

/* 霓虹发光效果 */
.neon-glow {
  box-shadow: 0 0 5px theme("colors.primary/50"), 0 0 10px theme("colors.primary/30")
}

/* 隐藏滚动条 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 修复banner闪现问题：初始化前隐藏所有slide */
.swiper-slide {
  display: none;
}

/* 只显示第一个slide */
.swiper-slide:first-child {
  display: block;
}

/* 初始化后让Swiper接管显示控制 */
.swiper-initialized .swiper-slide {
  display: block;
}

/* 统一section中H2样式 */
section h2 {
  font-size: 2.5rem !important;
  line-height: 1.2 !important;
  margin-bottom: 1.5rem !important;
}

/* 调整H2与下方p标签的间距 */
section h2 + p {
  margin-top: 0 !important;
  margin-bottom: 2rem !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
  section h2 {
    font-size: 2rem !important;
  }
}

/* 为所有slider图片添加一致的高度 */
.hero__thumb-2 img {
  min-height: 400px;
  object-fit: cover;
  height: 100%;
}

/* 修改导航箭头样式 */
.hero__swiper-button-next,
.hero__swiper-button-prev {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  color: rgb(76, 103, 255);
  font-size: 16px;
  transition: all 0.3s ease;
}

.hero__swiper-button-next:hover,
.hero__swiper-button-prev:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* 将箭头图标缩小 */
.hero__swiper-button-next::after,
.hero__swiper-button-prev::after {
  font-size: 18px;
  font-weight: bold;
}

/* 将箭头定位到banner外部 */
.hero__swiper {
  position: relative;
  padding: 90px 30px;
}

.hero__swiper-button-next {
  right: 0;
  margin-right: -20px;
}

.hero__swiper-button-prev {
  left: 0;
  margin-left: -20px;
}

/* 确保hero__shape-2显示在图片下面并能响应鼠标移动 */
.hero__shape-2 {
  position: absolute;
  bottom: 50px;
  left: -20px;
  z-index: 0;
}

/* 确保图片显示在shape元素上面 */
.hero__thumb-2 img {
  position: relative;
  z-index: 1;
}

/* 确保parallax效果正常工作 */
.parallaxed {
  transition: transform 0.1s ease-out;
}

/* 调整banner中H2字体权重 */
.hero__content h2 {
  font-weight: var(--bd-fw-sbold);
}

/* Footer section加相对定位（你的代码已有p-relative，可复用） */
.footer__border {
  position: relative;
  z-index: 1;
  /* 确保内容在伪元素上方 */
}

/* 伪元素承载footer背景图并设置透明度 */
.footer__border::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../img/worn_dots.jpg");
  background-repeat: repeat;
  opacity: 0.8;
  z-index: -1;
}

/* 为banner区域的p标签设置特殊样式，避免margin-bottom变成2rem */
.hero__content p {
  margin-bottom: 0rem !important;
}

/* WOW.js 性能优化补丁 */
/* 默认情况下，带有 wow 类的元素在 JS 加载前不要完全不可见，
   我们将其改为 opacity: 0 并在 2秒后强制显示，防止 JS 加载失败导致永不显示 */
.wow {
  visibility: visible !important;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

/* 当 WOW.js 脚本加载并初始化后，它会自动处理可见性 */
.wow.animated {
  opacity: 1;
}

/* 兜底：如果 3秒后还没动画，强制显示 */
@keyframes force-show {
  to { opacity: 1; }
}
.wow {
  animation: force-show 0.1s forwards;
  animation-delay: 3s;
}

/* 骨架屏闪烁动画 */
@keyframes skeleton-loading {
  0% { background-color: rgba(229, 231, 235, 0.5); }
  50% { background-color: rgba(229, 231, 235, 1); }
  100% { background-color: rgba(229, 231, 235, 0.5); }
}

.dark .skeleton-pulse {
  animation: skeleton-dark-loading 2s infinite ease-in-out;
}

@keyframes skeleton-dark-loading {
  0% { background-color: rgba(31, 41, 55, 0.5); }
  50% { background-color: rgba(55, 65, 81, 1); }
  100% { background-color: rgba(31, 41, 55, 0.5); }
}
