/* 基础卡片样式 */
.content-cards {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.content-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
}

.content-card:hover, 
.content-card:active, 
.content-card:focus, 
.content-card:visited {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
}

.content-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #4f46e5, #8b5cf6);
  opacity: 0.8;
  transition: width 0.3s ease;
  z-index: 1;
}

.content-card:hover::before {
  width: 6px;
}

/* 调整布局：图片在右侧，文字在左侧 */
.content-card {
  flex-direction: row-reverse;
}

.card-info {
  flex: 1;
  padding-right: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
}

/* 标题调整到最上面 */
.card-title {
  order: -1;
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  position: relative;
  padding-bottom: 8px;
}

.card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, #4f46e5, #8b5cf6);
  border-radius: 2px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.card-text {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-image {
  width: 160px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.content-card:hover .card-image {
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.content-card:hover .card-image img {
  transform: scale(1.1);
}

.badge {
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge.bg-primary {
  background: linear-gradient(135deg, #3b82f6, #60a5fa) !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, #ef4444, #f87171) !important;
}

.badge.bg-warning {
  background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
}

.badge.bg-info {
  background: linear-gradient(135deg, #06b6d4, #22d3ee) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content-card {
    flex-direction: row-reverse; /* 保持与桌面版相同的方向 */
    align-items: flex-start; /* 顶部对齐 */
    padding: 12px 15px; /* 减小内边距 */
  }

  .card-info {
    padding-left: 15px; /* 减小左边距 */
    padding-bottom: 0;
    order: initial; /* 使用默认顺序 */
  }

  .card-image {
    width: 100px; /* 减小图片宽度 */
    height: 70px; /* 减小图片高度 */
    margin-bottom: 0;
    order: initial; /* 使用默认顺序 */
    flex-shrink: 0; /* 防止图片缩小 */
  }
  
  .card-title {
    font-size: 15px;
    margin-bottom: 8px;
    -webkit-line-clamp: 2; /* 限制标题行数 */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .card-text {
    font-size: 13px;
    -webkit-line-clamp: 2; /* 限制文本行数 */
    line-height: 1.4;
  }
  
  .badge {
    padding: 3px 6px;
    font-size: 11px;
  }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
  .content-card {
    padding: 10px 12px;
  }

  .card-info {
    padding-left: 12px;
  }

  .card-image {
    width: 80px;
    height: 60px;
  }
  
  .card-title {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .card-text {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
  
  .card-meta {
    gap: 6px;
  }
  
  .badge {
    padding: 2px 5px;
    font-size: 10px;
  }
}

/* 无限滚动样式 */
.middle-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-repeat: repeat;
  background-size: unset;
  background-color: transparent;
  background-position: 0px -284.15px;
  background-image: url("../image/middle_bg.jpg");
  background-attachment: fixed;
}

#about.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin: 0;
  padding: 0;
}

#about .marquee-content {
  display: flex;
  width: max-content;
  animation: marqueeAnimation 25s linear infinite;
}

#about .marquee-content img {
  display: block;
  width: auto;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}

@keyframes marqueeAnimation {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

#about.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

/* 特性卡片样式 */
.feature-card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.feature-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.feature-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feature-content h4 {
  margin-bottom: 1rem;
}

.feature-content p {
  margin-bottom: 0;
  color: #666;
  line-height: 1.6;
}

.features .row.g-4 {
  --bs-gutter-y: 2rem;
}

/* 内容卡片区域样式 */
.content-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.content-card {
  display: flex;
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-info {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.card-text {
  font-size: 14px;
  color: #666;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.card-image {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 响应式调整，保持水平布局 */
@media (max-width: 576px) {
  .card-info {
    padding: 8px;
    max-height: 100px; /* 与图片高度一致 */
    justify-content: center;
  }
  
  .card-image {
    width: 100px;
    height: 100px;
  }
  
  .card-title {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.2;
  }
  
  .card-meta {
    gap: 4px;
  }
  
  .card-text {
    font-size: 12px;
    -webkit-line-clamp: 2;
    line-height: 1.3;
  }
}

#more {
  margin-top: 30px;
  margin-bottom: 30px;
}