/* 技术页面样式 */

/* 页面头部样式 */
.page-header {
  padding-top: calc(var(--header-height) + var(--spacing-xxl));
  padding-bottom: var(--spacing-xl);
  background: linear-gradient(to bottom, var(--dark-color), #0f3460);
  color: white;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('/img/cases/header-bg-pattern.png') center/cover no-repeat;
  opacity: 0.1;
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 2.5rem;
  color: white;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 38rem;
  margin: 0 auto;
}

/* 技术概述部分 */
.tech-overview {
  padding: var(--spacing-xxl) 0;
}

.tech-overview h2 {
  font-size: 1.875rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.tech-overview p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* 统计数据样式 */
.tech-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .tech-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-item {
  background-color: rgba(var(--primary-rgb), 0.1);
  padding: 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-3px);
}

.stat-item h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-item p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* 技术栈列表样式 */
.tech-stack-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.tech-stack-list > div {
  margin-bottom: 0.5rem;
}

.tech-stack-list .d-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.tech-stack-list h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  font-weight: 600;
}

.tech-stack-progress {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background-color: var(--bg-muted);
  margin-bottom: 0.5rem;
}

.tech-stack-progress .bg-primary {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.5s ease;
}

.tech-tag {
  display: inline-block;
  background-color: var(--bg-muted);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background-color: var(--primary-color);
  color: white;
}

/* 技术分类部分 */
.tech-categories {
  padding: var(--spacing-xxl) 0;
  background-color: var(--bg-muted);
}

.tech-categories h2 {
  font-size: 1.875rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
  text-align: center;
}

.tech-categories p {
  color: var(--text-secondary);
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 3rem;
}

/* 技术分类选项卡 */
.tech-categories-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.tech-category-tab {
  padding: 1rem 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tech-category-tab:hover {
  color: var(--primary-color);
}

.tech-category-tab.active {
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
}

/* 技术文章网格 */
.tech-articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .tech-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .tech-articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 技术文章卡片 */
.tech-article-card {
  background-color: var(--bg-card);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.tech-article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.article-img {
  height: 12rem;
  overflow: hidden;
}

.article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.tech-article-card .p-6 {
  padding: 1.5rem;
}

.article-category {
  display: inline-block;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tech-article-card h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.tech-article-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.article-meta span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.article-meta i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

.tech-article-card .btn {
  background-color: var(--primary-color);
  color: white;
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

.tech-article-card .btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* 分页样式 */
.pagination {
  justify-content: center;
  margin-top: 3rem;
}

.pagination .page-link {
  color: var(--text-secondary);
  border-color: var(--border-color);
  margin: 0 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.pagination .page-link:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.pagination .page-item.disabled .page-link {
  color: var(--text-muted);
  background-color: var(--bg-muted);
  border-color: var(--border-color);
}

/* 精选文章样式 */
.featured-tech {
  padding: var(--spacing-xxl) 0;
}

.featured-tech h2 {
  font-size: 1.875rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
  text-align: center;
}

.featured-tech p {
  color: var(--text-secondary);
  text-align: left;
  margin: 0 1rem 1rem 0;
}

.featured-tech .bg-white {
  background-color: var(--bg-card);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.featured-tech img {
  height: 100%;
  object-fit: cover;
}

.featured-tech .p-8 {
  padding: 2rem;
}

.featured-tech h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.featured-tech h4 {
  font-size: 1.125rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.featured-tech ul {
  padding-left: 0;
}

.featured-tech li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.featured-tech li i {
  color: var(--primary-color);
  margin-right: 0.75rem;
  margin-top: 0.25rem;
}

/* 代码块样式 */
.code-block {
  background-color: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.875rem;
  overflow-x: auto;
  white-space: pre-wrap;
  margin-bottom: 2rem;
}

/* 技术能力展示样式 */
.tech-capabilities {
  padding: var(--spacing-xxl) 0;
  background-color: var(--bg-muted);
}

.tech-capabilities h2 {
  font-size: 1.875rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
  text-align: center;
}

.tech-capabilities p {
  color: var(--text-secondary);
  text-align: center;
  max-width: 38rem;
  margin: 0 auto 3rem;
}

/* 技术特性卡片样式 */
.tech-feature-card {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  height: 100%;
}

.tech-feature-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.tech-feature-icon {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.tech-feature-card h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.tech-feature-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tech-feature-card ul {
  padding-left: 0;
}

.tech-feature-card li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.tech-feature-card li i {
  color: var(--primary-color);
  margin-right: 0.75rem;
  margin-top: 0.25rem;
}

/* 技术分享与合作部分 */
.tech-collaboration {
  padding: var(--spacing-xxl) 0;
  text-align: center;
}

.tech-collaboration h2 {
  font-size: 1.875rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.tech-collaboration p {
  color: var(--text-secondary);
  max-width: 38rem;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.tech-collaboration .btn {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
  font-weight: 500;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
  margin: 0 0.5rem;
}

.tech-collaboration .btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.tech-collaboration .btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tech-collaboration .btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background-color: transparent;
}

.tech-collaboration .btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* 返回顶部按钮样式 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--primary-color);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .tech-overview .row {
    gap: 2rem;
  }
  
  .featured-tech .row {
    flex-direction: column;
  }
  
  .featured-tech img {
    height: 18rem;
  }
}

@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2rem;
  }
  
  .page-header p {
    font-size: 1.125rem;
  }
  
  .tech-categories-tabs {
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  
  .tech-category-tab {
    white-space: nowrap;
  }
  
  .tech-collaboration .btn {
    margin: 0.5rem;
    display: block;
  }
  
  .tech-collaboration .flex {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 576px) {
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .tech-overview h2,
  .tech-categories h2,
  .featured-tech h2,
  .tech-capabilities h2,
  .tech-collaboration h2 {
    font-size: 1.5rem;
  }
  
  .article-img {
    height: 10rem;
  }
  
  .featured-tech img {
    height: 15rem;
  }
  
  .featured-tech .p-8 {
    padding: 1.5rem;
  }
}
