/* 成功案例页面专用样式 */

/* 案例页面头部 */
.cases-header {
  margin-top: 80px;
  padding: 100px 0;
  background-color: #007bff;
  color: white;
  text-align: center;
}

.cases-header h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

/* 案例分类过滤器 */
.cases-filter {
  padding: 40px 0;
  background-color: #fff;
}

.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-tab {
  padding: 10px 20px;
  background-color: #f8f9fa;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-tab:hover {
  background-color: #e9ecef;
}

.filter-tab.active {
  background-color: #007bff;
  color: white;
}

/* 案例列表 */
.cases-list {
  padding: 60px 0;
  background-color: #f8f9fa;
}

.cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.case-item {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  height: 600px; /* 固定卡片高度 */
}

.case-item:hover {
  transform: translateY(-5px);
}

.case-image {
  height: 300px; /* 固定图片高度 */
  overflow: hidden;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-content {
  padding: 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.case-content h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #333;
  text-align: left;
}

.case-category {
  display: inline-block;
  background-color: #e9ecef;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  margin-bottom: 15px;
  color: #666;
}

.case-content p {
  margin-bottom: 60px; /* 增加底部间距，为按钮留出空间 */
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* 显示4行文字 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-more {
  display: inline-block;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s;
  margin-top: auto; /* 使用margin-top: auto替代绝对定位 */
  align-self: center; /* 让按钮靠左对齐 */
}

.btn-more:hover {
  background-color: #0056b3;
}

/* 响应式设计 */
@media (min-width: 768px) {
  .cases-grid {
    grid-template-columns: 1fr 1fr;
  }

  .case-item {
    height: 550px; /* 平板尺寸时调整高度 */
  }
}

@media (min-width: 1200px) {
  .cases-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .cases-header {
    padding: 60px 0;
  }

  .cases-header h1 {
    font-size: 32px;
  }

  .filter-tabs {
    flex-direction: column;
    align-items: center;
  }

  .filter-tab {
    width: 100%;
    text-align: center;
  }

  .case-item {
    height: auto; /* 移动端自适应高度 */
    min-height: 500px;
  }

  .case-image {
    height: 200px;
  }

  .case-content p {
    -webkit-line-clamp: 3; /* 移动端显示3行文字 */
  }
}

/* 案例详情页面样式 */
.case-detail-header {
  margin-top: 80px;
  padding: 60px 0;
  background-color: #007bff;
  color: white;
  text-align: center;
}

.case-detail-header h1 {
  font-size: 36px;
  margin-bottom: 20px;
}

.case-detail-header .case-category {
  font-size: 18px;
  opacity: 0.9;
}

.case-detail-section {
  padding: 60px 0;
}

.case-detail-section.bg-light {
  background-color: #f8f9fa;
}

.case-content {
  max-width: 800px;
  margin: 0 auto;
}

.case-content h2 {
  font-size: 28px;
  margin-bottom: 30px;
  color: #333;
  text-align: center;
}

.case-content h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #444;
}

.case-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #666;
}

.case-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.case-content ul li {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 15px;
  padding-left: 25px;
  position: relative;
  color: #666;
}

.case-content ul li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #007bff;
  font-size: 20px;
}

.case-content blockquote {
  font-size: 18px;
  font-style: italic;
  color: #555;
  border-left: 4px solid #007bff;
  padding: 20px;
  margin: 30px 0;
  background-color: #f8f9fa;
}

.case-content blockquote footer {
  margin-top: 10px;
  font-size: 16px;
  color: #777;
}

@media (max-width: 768px) {
  .case-detail-header {
    padding: 40px 0;
  }

  .case-detail-header h1 {
    font-size: 28px;
  }

  .case-detail-section {
    padding: 40px 0;
  }

  .case-content {
    padding: 0 20px;
  }
}
