/* DDKK Ant Design 5.x 风格样式 */
/* 所有选择器都使用完整前缀*/

/* ==================== Hero 区域 ==================== */
.index-hero {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px 0 32px;
  margin-bottom: 32px;
}

.hero-content {
  max-width: 1200px; /* 默认：小屏 / ≤1365px 使用收缩版 */
  margin: 0 auto;
  padding: 0px 24px;
  text-align: left;
}

.hero-title {
  font-size: 40px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 17px;
  font-weight: 400;
  color: rgb(82 32 238);
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.hero-slogan {
  font-size: 24px;
  font-weight: 500;
  color: rgb(255 0 0 / 88%);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-button {
  display: inline-block;
  padding: 6px 14px;
  font-size: 14px;
  line-height: 1.5715;
  color: rgba(0, 0, 0, 0.88);
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  background: #ffffff;
  transition: all 0.2s;
  cursor: pointer;
}

.hero-button:hover {
  color: #1677ff;
  border-color: #1677ff;
  background: rgba(22, 119, 255, 0.06);
}

.hero-columns {
  max-width: 1200px; /* 默认：小屏 / ≤1365px 使用收缩版 */
  margin: 0 auto;
  padding: 0 24px;
  text-align: left;
  /* 锚点定位时，减去导航栏高度，确保标题显示出来 */
  scroll-margin-top: 65px;
}

.column-title {
  font-size: 20px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.column-description {
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.65);
  margin: 0;
  line-height: 1.6;
}

/* ==================== 分类区域 ==================== */
.index-categories {
  max-width: 1200px; /* 默认：小屏 / ≤1365px 使用收缩版 */
  margin: 0 auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 8px;
}

.category-section {
  margin-bottom: 40px;
}

.category-section:last-child {
  margin-bottom: 0;
}

.category-heading {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-decoration: none;
  line-height: 1.5;
  transition: all 0.2s ease;
  /* 滚动定位时，减去导航栏高度，确保标题显示出来 */
  scroll-margin-top: 80px;
  /* 去掉锚链接跳转时的蓝色焦点框 */
  outline: none;
}

.category-heading:hover {
  color: #1677ff;
}

/* 当被锚链接定位到时，变成蓝色 */
.category-heading:target {
  color: #1677ff;
  font-weight: 600;
}

/* 当分类被激活时（通过 JavaScript 添加 active 类），变成蓝色 */
.category-heading.active {
  color: #1677ff !important;
  font-weight: 600;
  border-bottom-color: #1677ff;
}

.category-heading:focus {
  outline: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* ==================== 卡片样式 - 块状布局（无边框，有背景色） ==================== */
.category-card {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.category-card:hover {
  background: rgba(22, 119, 255, 0.08);
  border-color: rgba(22, 119, 255, 0.3);
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.15), 0 3px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.card-link {
  display: flex;
  align-items: flex-start;
  padding: 12px;
  text-decoration: none;
  color: inherit;
}

.card-link-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.category-card:has(.card-link-disabled):hover {
  transform: translateY(0);
  background: rgba(0, 0, 0, 0.02);
  border-color: transparent;
  box-shadow: none;
}

.category-card:has(.card-link-disabled):hover .card-image {
  transform: scale(1);
}

.category-card:has(.card-link-disabled):hover .card-img {
  transform: scale(1);
}

.category-card:has(.card-link-disabled):hover .card-title {
  color: rgba(0, 0, 0, 0.88);
}

.category-card:has(.card-link-disabled):hover .card-description {
  color: rgba(0, 0, 0, 0.65);
}

.card-image {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  margin-right: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .card-image {
  transform: scale(1.05);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .card-img {
  transform: scale(1.1);
}

.card-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 500;
  color: #ff4d4f;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 77, 79, 0.3);
  border-radius: 2px;
  z-index: 1;
}

.card-content {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
  margin: 0 0 6px 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.category-card:hover .card-title {
  color: #1677ff;
}

.card-description {
  font-size: 13px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.65);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.category-card:hover .card-description {
  color: rgba(0, 0, 0, 0.88);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 767.98px) {
  .index-hero {
    padding: 20px 0 24px;
    margin-bottom: 24px;
    background: #ffffff;
    border-radius: 8px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-slogan {
    font-size: 14px;
  }

  .hero-actions {
    gap: 8px;
    margin-bottom: 24px;
  }

  .hero-button {
    padding: 5px 12px;
    font-size: 13px;
  }

  .hero-columns {
    padding: 0 16px;
  }

  .column-title {
    font-size: 18px;
  }

  .column-description {
    font-size: 13px;
  }

  .index-categories {
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
  }

  .category-section {
    margin-bottom: 32px;
  }

  .category-heading {
    font-size: 18px;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .card-link {
    padding: 10px;
  }

  .card-image {
    width: 56px;
    height: 56px;
    margin-right: 10px;
  }

  .card-title {
    font-size: 14px;
  }

  .card-description {
    font-size: 12px;
  }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) and (max-width: 1439.98px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1440px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============= 首页内容区宽度响应适配（PC） ============= */
/* <1366px：保持默认 1200px（上面定义） */

/* 1366px–1499.98px：主宽 1300px */
@media (min-width: 1366px) and (max-width: 1499.98px) {
  .hero-content,
  .hero-columns,
  .index-categories {
    max-width: 1300px;
  }
}

/* 1500px–1599.98px：主宽 1500px */
@media (min-width: 1500px) and (max-width: 1599.98px) {
  .hero-content,
  .hero-columns,
  .index-categories {
    max-width: 1500px;
  }
}

/* 1600px–1699.98px：主宽 1600px */
@media (min-width: 1600px) and (max-width: 1699.98px) {
  .hero-content,
  .hero-columns,
  .index-categories {
    max-width: 1600px;
  }
}

/* 1700px–1919.98px：主宽 1700px */
@media (min-width: 1700px) and (max-width: 1919.98px) {
  .hero-content,
  .hero-columns,
  .index-categories {
    max-width: 1700px;
  }
}

/* 1920px–2559.98px：主宽 1700px */
@media (min-width: 1920px) and (max-width: 2559.98px) {
  .hero-content,
  .hero-columns,
  .index-categories {
    max-width: 1700px;
  }
}

/* ≥2560px：主宽 1900px（保持居中） */
@media (min-width: 2560px) {
  .hero-content,
  .hero-columns,
  .index-categories {
    max-width: 1900px;
  }
}

/* ==================== 页脚区域 ==================== */
.footer {
  background: #ffffff;
  border-radius: 8px 8px 0 0;
  padding: 16px 24px;
  margin-top: 32px;
}
