/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* background-color: #f9fafb; */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
}

/* 容器样式 */

/* 标题样式 */
.page-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: bold;
  text-align: center;
  margin-bottom: 2rem;
  color: #1f2937;
}

/* 图片展示区域 */
.gallery-wrapper {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.gallery-container {
  display: flex;
  transition: transform 0.5s ease-out;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}

.gallery-slide {
  min-width: 100%;
  padding: 0 0.5rem;
  scroll-snap-align: start;
}

/* 图片网格布局 */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 1280px;
  margin: 0 auto;
}


@media (max-width: 768px) {
  .image-grid {
    width: 100%;
    justify-items: center;
    grid-template-columns: repeat(1, 1fr);
  }
}

/* 图片卡片样式 */
.image-card {
  border-radius: 30px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  animation: fadeInUp 0.6s forwards ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  display: block;
}

/* 加载时的动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 鼠标经过时的动画效果 */
.image-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* 为图片添加样式和独立的悬停效果 */
.image-card img {
  width: 303px;
  height: auto;
  border-radius: 30px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

/* 添加层次感的覆盖效果 */
.image-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.image-card:hover::before {
  opacity: 1;
}

/* 控制按钮样式 */
.btn-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.slide-btn {
  background-color: #e5e7eb;
  color: #374151;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  border: none;
  cursor: pointer;
}

.slide-btn:hover:not(:disabled) {
  background-color: #2DBE41;
  color: white;
}

.slide-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.slide-btn i {
  margin: 0 0.5rem;
}

/* 页码指示器样式 */
.pagination {
  display: none;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.page-indicator {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background-color: #d1d5db;
}

.page-indicator.active {
  background-color: #3b82f6;
}

/* 自定义图标样式（替代Font Awesome） */
.icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.icon-chevron-left {
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22currentColor%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpolyline points=%2215 18 9 12 15 6%22%3E%3C/polyline%3E%3C/svg%3E');
}

.icon-chevron-right {
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22currentColor%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpolyline points=%229 18 15 12 9 6%22%3E%3C/polyline%3E%3C/svg%3E');
}