/* 全局样式 */

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

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

@keyframes zoomIn {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-zoom {
  animation: zoomIn 5s ease-in-out forwards;
}

.animate-slideDown {
  animation: slideDown 0.3s ease-out forwards;
}

/* 轮播图样式 */
.carousel-slide {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

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

/* 移动端菜单动画 */
.mobile-menu-enter {
  animation: slideDown 0.3s ease-out forwards;
}

/* 科技感网格点阵纹理 */
.tech-dot-pattern {
  background-image: radial-gradient(circle, rgba(15, 82, 186, 0.15) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}
.lazy-image {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 响应式字体大小 */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  html {
    font-size: 15px;
  }
}

@media (min-width: 1024px) {
  html {
    font-size: 16px;
  }
}

/* 导航链接样式 */
.nav-link {
  color: #444;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: #0F52BA;
}

.nav-link-active {
  background: #EEF4FF;
  color: #0A1A33 !important;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 6px;
}

/* 产品卡片外层容器 */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
/* 图片容器，固定高度 */
.product-img-box {
  height: 230px;
  overflow: hidden;
  background: #ffffff;
}
.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
/* 文字区域自动挤到底部 */
.product-text-wrap {
  margin-top: auto;
  padding: 12px 8px;
}

/* 产品分类按钮样式 */
.category-tab {
  border: none !important;
  outline: none !important;
}
.category-tab:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* 产品轮播 */
.carousel-viewport {
  overflow: hidden;
}
.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
}
.carousel-track > .product-card {
  flex: 0 0 calc(25% - 12px);
  margin-right: 12px;
}
@media (max-width: 1023px) {
  .carousel-track > .product-card {
    flex: 0 0 calc(50% - 12px);
  }
}
@media (max-width: 767px) {
  .carousel-track > .product-card {
    flex: 0 0 100%;
    margin-right: 0;
  }
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}
.carousel-dot.active {
  background: #0F52BA;
}

/* 图片放大弹窗 */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
.product-img-box {
  cursor: zoom-in;
}

/* 新闻分类筛选按钮样式 */
.news-filter-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.news-filter-btn:hover {
  background: #f5f5f5;
  color: #0F52BA;
}

.news-filter-btn.active {
  background: #0F52BA;
  color: #fff;
}

.news-filter-btn.active .count {
  color: rgba(255, 255, 255, 0.9);
}

.news-filter-btn .count {
  font-size: 12px;
  color: #999;
}

/* 合作伙伴Logo滚动动画 */
@keyframes partnerScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.partner-scroll-track {
  animation: partnerScroll 45s linear infinite;
  width: max-content;
}

/* 鼠标悬停时暂停滚动 */
.partner-scroll-track:hover {
  animation-play-state: paused;
}

/* 裁剪合作伙伴Logo图片右边缘，消除图片自带的黑边 */
.partner-scroll-track img {
  clip-path: inset(0 2px 0 0);
}