/* 添加页面容器样式使内容居中 */
.page-container {
  max-width: 1200px; /* 可根据需要调整最大宽度 */
  margin: 0 auto;   /* 水平居中 */
  padding: 0 16px;  /* 两侧内边距，在小屏幕上提供留白 */
}

.site-footer {
  max-width: 1200px; /* 可根据需要调整最大宽度 */
  margin: 0 auto;   /* 水平居中 */
  padding: 0 16px;  /* 两侧内边距，在小屏幕上提供留白 */
}

/* 项目页面样式 */
.project-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px; /* $spacing-unit * 4 = 8px * 4 */
  flex-wrap: wrap;
  gap: 16px; /* $spacing-unit * 2 = 8px * 2 */
}

/* 移动端适配：屏幕宽度 ≤ 768px 时 */
@media (max-width: 768px) { /* $mobile-breakpoint = 768px */
  .project-filters {
    flex-direction: column;
    align-items: stretch;
  }
}

.site-logo {
  text-align: center; /* 水平居中图片（图片默认是 inline 元素） */
  padding: 8px 0;
}

.site-logo img {
  max-width: 100%;
  height: auto;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  width: 100%;
}

.desktop-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* $spacing-unit = 8px */
}

.view-controls {
  display: flex;
  gap: 8px; /* $spacing-unit = 8px */
}

/* 筛选按钮 & 视图按钮 基础样式 */
.filter-btn, .view-btn {
  padding: 12px 24px; /* $spacing-unit*1.5 = 12px; $spacing-unit*3 = 24px */
  background-color: #f5f5f5; /* $light-color */
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

/* 激活状态样式 */
.filter-btn.active, .view-btn.active {
  background-color: #165DFF; /* $primary-color */
  color: white;
}

/* 非激活状态 hover 样式 */
.filter-btn:hover:not(.active), .view-btn:hover:not(.active) {
  background-color: #e8eaed;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px; /* $spacing-unit * 3 = 8px * 3 */
  margin-bottom: 48px; /* $spacing-unit * 6 = 8px * 6 */
}

.project-stats .stat-card {
  background-color: white;
  border-radius: 8px;
  padding: 24px; /* $spacing-unit * 3 = 8px * 3 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.project-stats .stat-card .stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: #165DFF; /* $primary-color */
  margin-bottom: 8px; /* $spacing-unit = 8px */
}

.project-stats .stat-card .stat-label {
  color: #666666; /* $text-light */
  font-size: 0.9rem;
}

.project-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px; /* $spacing-unit * 4 = 8px * 4 */
  margin-bottom: 48px; /* $spacing-unit * 6 = 8px * 6 */
}

/* 列表视图样式 */
.project-container.list-view {
  grid-template-columns: 1fr;
}

.project-container.list-view .project-item .project-card {
  display: flex;
  height: 200px;
}

.project-container.list-view .project-item .project-card .project-image {
  flex: 0 0 200px;
  height: 100%;
}

.project-container.list-view .project-item .project-card .project-image img {
  height: 100%;
}

.project-container.list-view .project-item .project-card .project-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-container.list-view .project-item .project-card .project-actions {
  margin-top: auto;
}

.project-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s, transform 0.3s;
}

.project-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

/* 项目卡片 hover 效果 */
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.project-image {
  position: relative;
}

.project-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s;
}

/* 卡片 hover 时，图片缩放效果 */
.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-image .project-category {
  position: absolute;
  top: 16px; /* $spacing-unit * 2 = 8px * 2 */
  right: 16px; /* $spacing-unit * 2 = 8px * 2 */
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px; /* $spacing-unit = 8px; $spacing-unit*2 = 16px */
  border-radius: 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-info {
  padding: 24px; /* $spacing-unit * 3 = 8px * 3 */
}

.project-info .project-title {
  margin-top: 0;
  margin-bottom: 16px; /* $spacing-unit * 2 = 8px * 2 */
}

.project-info .project-title a {
  color: #333333; /* $dark-color */
  text-decoration: none;
}

.project-info .project-title a:hover {
  color: #165DFF; /* $primary-color */
}

.project-info .project-description {
  color: #666666; /* $text-light */
  margin-bottom: 24px; /* $spacing-unit * 3 = 8px * 3 */
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-info .project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px; /* $spacing-unit * 2 = 8px * 2 */
  margin-bottom: 24px; /* $spacing-unit * 3 = 8px * 3 */
  font-size: 0.85rem;
  color: #666666; /* $text-light */
}

.project-info .project-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 8px; /* $spacing-unit = 8px */
}

.project-info .project-actions {
  display: flex;
  gap: 16px; /* $spacing-unit * 2 = 8px * 2 */
}

.load-more-container {
  text-align: center;
  margin: 48px 0; /* $spacing-unit * 6 = 8px * 6 */
}

.notification {
  position: fixed;
  bottom: 32px; /* $spacing-unit * 4 = 8px * 4 */
  left: 50%;
  transform: translateX(-50%);
  background-color: #333333; /* $dark-color */
  color: white;
  padding: 16px 32px; /* $spacing-unit*2 = 16px; $spacing-unit*4 = 32px */
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: fadeIn 0.3s, fadeOut 0.3s 2.7s;
}

/* 通知框入场动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* 通知框退场动画 */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
}