/**
 * 首页样式 - 参考 iLovePDF 设计
 * 简洁、专业、现代
 */

/* ========================================
 * 页面基础布局
 * ======================================== */
body {
  background-color: transparent;
}

#content-wrap {
  min-height: calc(100vh - 60px);
}

/* 背景底纹 - 恢复原始样式 */
.pattern-bg {
  background-image: url('/images/new/background.svg');
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  position: fixed;
  background-position: center center;
  background-size: 100% auto;
  background-color: #f8f9fa !important;
}

/* ========================================
 * 顶部 Banner 区域 - 恢复原始 Bootstrap 默认样式
 * ======================================== */
#jumbotron {
  padding: 3rem 3rem;
  margin-bottom: 0;
}

#jumbotron .display-4 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

#jumbotron .lead {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
 * Tab 导航 - 恢复原始样式
 * ======================================== */
.projectServiceNav {
  height: 60px;
  text-align: center;
  position: relative;
  z-index: 99;
  background: rgba(255, 255, 255, .1);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

/* Tab 包装器 */
.nav-tabs-wrapper {
  display: flex;
  width: 100%;
}

.nav-tabs-wrapper > div {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 1;
  height: 60px;
  color: #198DF3;
  background-color: #fff;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.nav-tabs-wrapper > div:after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 35px;
  background: rgba(0, 0, 0, .1);
  position: absolute;
  right: 0;
  top: 12.5px;
}

.nav-tabs-wrapper > div:last-child:after,
.nav-tabs-wrapper > div.select:after {
  display: none;
}

.nav-tabs-wrapper > div:hover {
  color: #0d6efd;
  background: #f0f7ff;
}

.nav-tabs-wrapper > div.select {
  background-color: #198df3;
  color: #fff;
}

.nav-tabs-wrapper > div.select:before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 60px;
  background-color: #198df3;
  position: absolute;
  left: -1px;
  top: 0;
}

/* 兼容旧选择器 */
.projectServiceNav > div {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 1;
  height: 60px;
  color: #198DF3;
  background-color: #fff;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  position: relative;
}

.projectServiceNav > div:after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 35px;
  background: rgba(0, 0, 0, .1);
  position: absolute;
  right: 0;
  top: 12.5px;
}

.projectServiceNav > div:last-child:after,
.projectServiceNav > div.select:after {
  display: none;
}

.projectServiceNav > div:hover {
  color: #0d6efd;
  background: #f0f7ff;
}

.projectServiceNav > div.select {
  background-color: #198df3;
  color: #fff;
}

.projectServiceNav > div.select:before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 60px;
  background-color: #198df3;
  position: absolute;
  left: -1px;
  top: 0;
}

/* 无搜索结果提示 */
.no-results-message {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.no-results-message .no-results-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.5;
}

.no-results-message .no-results-text {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.no-results-message .no-results-hint {
  font-size: 14px;
  color: #9ca3af;
}

/* ========================================
 * 功能卡片容器
 * ======================================== */
.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 3fr));
  gap: 20px 24px;
  padding: 24px 0 40px;
}

/* ========================================
 * 功能卡片 - 紧凑风格
 * ======================================== */
.feature-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  position: relative;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}

.feature-card::before {
  display: none;
}

.feature-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.feature-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* 卡片图标 */
.feature-card .home-card-icon,
.home-card-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.feature-card:hover .home-card-icon {
  transform: scale(1.05);
}

/* 卡片标题 */
.feature-card .card-title,
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 6px 0;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.feature-card:hover .card-title {
  color: #2563eb;
}

/* 卡片描述 */
.feature-card .card-text {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 收藏图标 */
.feature-card .favorite-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 4px;
}

.feature-card:hover .favorite-icon {
  opacity: 0.5;
}

.feature-card .favorite-icon:hover {
  opacity: 1;
  background: #f3f4f6;
}

.favorite-icon img {
  width: 18px;
  height: 18px;
}

/* ========================================
 * 操作区域
 * ======================================== */
.operation {
  background: transparent;
}

.product-box {
  padding: 0;
}

.product-box.hidden {
  display: none;
}

/* ========================================
 * 辅助类
 * ======================================== */
.clearfix {
  clear: both;
}

.hidden {
  display: none;
}

/* ========================================
 * 响应式设计
 * ======================================== */
@media (max-width: 768px) {
  #jumbotron {
    padding: 36px 20px !important;
  }

  #jumbotron .display-4 {
    font-size: 1.6rem;
  }

  #jumbotron .lead {
    font-size: 0.9rem;
  }

  .projectServiceNav {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 6px;
  }

  .projectServiceNav > div {
    padding: 8px 18px;
    font-size: 13px;
  }

  .features-container {
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 16px;
  }

  .feature-card {
    padding: 16px;
  }

  .feature-card .home-card-icon,
  .home-card-icon {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .features-container {
    grid-template-columns: 1fr;
  }

  .projectServiceNav > div,
  .nav-tabs-wrapper > div {
    font-size: 16px;
  }
}

/* ========================================
 * 深色模式
 * ======================================== */
.dark-mode body,
[data-theme="dark"] body {
  background-color: #0f172a;
}

.dark-mode #jumbotron,
[data-theme="dark"] #jumbotron {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
}

.dark-mode .projectServiceNav,
[data-theme="dark"] .projectServiceNav {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .projectServiceNav > div,
[data-theme="dark"] .projectServiceNav > div {
  color: #94a3b8;
}

.dark-mode .projectServiceNav > div:hover,
[data-theme="dark"] .projectServiceNav > div:hover {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
}

.dark-mode .projectServiceNav > div.select,
[data-theme="dark"] .projectServiceNav > div.select {
  color: #ffffff;
  background: #2563eb;
}

.dark-mode .operation,
[data-theme="dark"] .operation {
  background: #0f172a;
}

.dark-mode .feature-card,
[data-theme="dark"] .feature-card {
  background: #1e293b;
  border-color: #334155;
}

.dark-mode .feature-card:hover,
[data-theme="dark"] .feature-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.dark-mode .feature-card .card-title,
.dark-mode .card-title,
[data-theme="dark"] .feature-card .card-title,
[data-theme="dark"] .card-title {
  color: #f1f5f9;
}

.dark-mode .feature-card:hover .card-title,
[data-theme="dark"] .feature-card:hover .card-title {
  color: #60a5fa;
}

.dark-mode .feature-card .card-text,
[data-theme="dark"] .feature-card .card-text {
  color: #94a3b8;
}
