/* 响应式修复样式 - 解决header遮挡和布局问题 */

/* 移除宽屏状态下header和banner之间的丑陋线条 */
@media (min-width: 1200px) {
  .header--static,
  .header--fixed,
  .header--hidden,
  .header--active,
  .header--scroll {
    border-bottom: none !important;
    box-shadow: none !important;
  }
  
  /* 宽屏状态下调整banner区域的padding，确保不被header遮挡 - 优化间距 */
  .home.home--title {
    padding-top: 5px !important; /* 减少padding，与中尺寸保持一致的视觉效果 */
    margin-top: 0px !important;
  }
}

/* 中等屏幕尺寸的响应式调整 */
@media (max-width: 1199px) and (min-width: 768px) {
  .home.home--title {
    padding-top: 85px !important; /* 与大屏保持一致的间距 */
    margin-top: 0px !important;
  }
  
  /* 确保header有正确的高度 */
  .header__content {
    height: 80px !important;
  }
}

/* 小屏幕尺寸的响应式调整 */
@media (max-width: 767px) {
  .home.home--title {
    padding-top: 85px !important; /* 小屏幕下适当调整 */
    margin-top: 0px !important;
  }
  
  /* 小屏幕下header高度调整 */
  .header__content {
    height: 75px !important;
  }
}

/* 超小屏幕的特殊处理 */
@media (max-width: 480px) {
  .home.home--title {
    padding-top: 80px !important;
    margin-top: 0px !important;
  }
  
  .header__content {
    height: 70px !important;
  }
}

/* CLS优化 - 防止布局偏移的样式 */
.home.home--title {
  min-height: 200px; /* 预设最小高度防止布局偏移 */
}

/* 轮播图容器CLS优化 - 统一16:9宽高比例设计 */
#vueBox {
  border-radius: 15px;
  overflow: hidden !important; /* 强制隐藏溢出内容，防止滚动条 */
  /* 统一使用16:9宽高比例，适配所有屏幕尺寸 */
  aspect-ratio: 16/9;
  width: 100%;
  /* GPU加速优化 */
  transform: translateZ(0);
  will-change: transform;
}

/* 移除之前的固定高度设置，统一使用aspect-ratio */
/* 所有屏幕尺寸都使用相同的16:9宽高比例，无需单独设置高度 */
/* 通过aspect-ratio: 16/9 自动计算高度，确保所有设备上比例一致 */

/* 轮播图图片样式优化 - 统一16:9比例 */
.vueBoxImg {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0px 0px 15px 15px;
  /* 统一使用16:9宽高比例 */
  aspect-ratio: 16/9;
  /* GPU加速优化 */
  transform: translateZ(0);
}

/* Element UI轮播图组件样式覆盖 - 彻底移除滚动条 */
.el-carousel {
  height: 100% !important;
  overflow: hidden !important; /* 防止轮播组件产生滚动条 */
}

.el-carousel__container {
  height: 100% !important;
  overflow: hidden !important; /* 防止容器产生滚动条 */
}

.el-carousel__item {
  height: 100% !important;
  overflow: hidden !important; /* 防止轮播项产生滚动条 */
}

/* 额外的滚动条移除措施 */
.el-carousel *,
.el-carousel *:before,
.el-carousel *:after {
  overflow: hidden !important; /* 修复overflow:visible警告，防止元素溢出边界 */
}

/* 针对可能的滚动条元素进行隐藏 */
.el-carousel::-webkit-scrollbar,
.el-carousel__container::-webkit-scrollbar,
.el-carousel__item::-webkit-scrollbar,
#vueBox::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.gallery-section {
  margin-top: 40px;
  padding: 0 15px;
  /* 预设最小高度，为异步加载的内容预留空间 */
  min-height: 600px;
}

/* 图集卡片样式 - 实现常驻显示名称和信息 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
  /* 预设最小高度避免内容加载时的布局偏移 */
  min-height: 400px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1f2e;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* 设置固定高度比例，避免图片加载时的布局偏移 */
  aspect-ratio: 4/5; /* 调整为更适合的宽高比 */
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.gallery-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 图集内页图片样式优化 - 确保完全填满容器 */
.gallery-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* 强制确保图片完全填满容器，横图会被裁剪 */
  object-position: center !important; /* 居中显示图片的重要部分 */
  transition: transform 0.3s ease;
  display: block !important;
  border-radius: inherit; /* 继承父容器的圆角 */
  /* 移除任何可能的尺寸限制 */
  max-width: none !important;
  max-height: none !important;
}

.gallery-item:hover .gallery-image img {
  transform: scale(1.02); /* 与首页封面保持一致的缩放效果 */
}

/* 图片数量标签 - 左上角 */
.gallery-count-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(47, 128, 237, 0.9);
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  z-index: 2;
  backdrop-filter: blur(4px);
}

/* 视频数量标签 - 右上角 */
.gallery-video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 59, 92, 0.9);
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  z-index: 2;
  backdrop-filter: blur(4px);
}

/* 标题信息 - 底部常驻显示 */
.gallery-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 30px 15px 15px;
  z-index: 2;
}

.gallery-title {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.gallery-date {
  color: rgba(255, 255, 255, 0.7);
}

.gallery-rating {
  color: #ffd700;
  font-weight: 500;
}

/* 加载状态样式 */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #e0e0e0;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(47, 128, 237, 0.3);
  border-top: 3px solid #2f80ed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

/* 空状态样式 */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #e0e0e0;
  font-size: 16px;
}

/* 分页样式优化 */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  margin-top: 20px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 15px;
}

.page-btn {
  padding: 10px 20px;
  background: #2f80ed;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
  background: #1e6bd8;
  transform: translateY(-2px);
}

.page-btn:disabled {
  background: #3a4553;
  color: #8a9199;
  cursor: not-allowed;
  transform: none;
}

.page-info {
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 500;
  padding: 0 10px;
}

/* 响应式网格调整 */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
  
  .gallery-section {
    padding: 0 10px;
  }
  
  .gallery-title {
    font-size: 13px;
  }
  
  .gallery-meta {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  
  .gallery-count-badge,
  .gallery-video-badge {
    font-size: 10px;
    padding: 3px 6px;
  }
  
  .gallery-info {
    padding: 20px 10px 10px;
  }
  
  .gallery-title {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
  
  .gallery-meta {
    font-size: 10px;
    margin-top: 5px;
  }
}

/* 图片数量和视频数量标签样式 */
.card__count-badge {
  position: absolute;
  top: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  z-index: 3;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* 图片数量标签 - 左上角，蓝色主题 */
.card__count-badge--images {
  left: 8px;
  background: rgba(47, 128, 237, 0.9);
}

/* 视频数量标签 - 右上角，红色主题 */
.card__count-badge--videos {
  right: 8px;
  background: rgba(255, 59, 92, 0.9);
}

/* 标签内图标样式 */
.card__count-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* 确保卡片标题和信息常驻显示 */
.card__title {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  margin-top: 10px;
}

.card__list {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  margin-top: 5px;
}

/* 优化卡片整体布局，确保信息始终可见 */
.card {
  position: relative;
  background: #1a1f2e;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* 确保图片容器有正确的相对定位 */
.card__cover {
  position: relative;
  display: block;
  overflow: hidden;
}

/* 图片样式优化，添加固定尺寸避免CLS */
.aspect-img-414x330 {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 414/330 !important;
  object-fit: cover !important;
  display: block;
}