.home-hero {
  display: flex;
  gap: 0.5rem;
  /* padding: 3rem 2rem; */
  max-width: 1200px;
  margin: 10px auto;
  align-items: stretch;
}

.home-hero__primary {
  position: relative;
  color: #fff;
  background: url("../images/hero背景.a1b009a32dd5.png") center/cover no-repeat;
  border-radius: 12px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* min-height: 420px; */
  box-shadow: 0 2px 3px rgba(0,0,0,.1);
  /* 使用比例基线，避免右侧被挤压为 0 宽 */
  flex: 0 1 60%;
}

.home-hero__content {
  max-width: 68%;
}

.home-hero__feature-list {
  margin: 1.5rem 0;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.home-hero__feature-list li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 1rem;
}

.home-hero__feature-list li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: #fbb040;
  font-size: 1.25rem;
  line-height: 1;
}

.btn-primary {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.85rem 1.75rem;
  background-color: #ffffff;
  color: #000;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 3px rgba(0,0,0,.1);
}

.home-hero__quick-links {
  display: flex;            /* 改为 flex 容器 */
  flex-wrap: wrap;          /* 两行四格布局 */
  gap: 0.5rem;
  align-content: stretch;   /* 使两行均匀铺满 */
  flex: 0 1 40%;
  /* min-width: 300px; */         /* 桌面端下限，避免被挤没 */
}

.home-hero__quick-link {
  display: flex;               /* 让内部卡片可拉伸等高 */
  flex: 1 1 calc(50% - 0.25rem);  /* 2 列布局（扣除一半 gap）*/
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.home-hero__quick-link-card {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  /* aspect-ratio: 16 / 11; */
  min-height: 190px;   /* 为每个卡片提供最小高度 */
  box-shadow: 0 2px 3px rgba(0,0,0,.1);
  transform: scale(1);
  transition: transform .28s ease, box-shadow .28s ease;
  will-change: transform;
  flex: 1 1 auto;      /* 填充父级可用高度 */
}

.home-hero__quick-link:hover .home-hero__quick-link-card,
.home-hero__quick-link:focus-visible .home-hero__quick-link-card {
  transform: scale(1.035);
  box-shadow: 0 2px 3px rgba(0,0,0,.1);
}

.home-hero__quick-link-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
}

.home-hero__quick-link-name {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
}
.home-hero__quick-link-name::after {
  content: '↗';
  display: inline-block;
  margin-left: 6px;
  font-size: .95em;
  opacity: .85;
  transform: translateX(0);
  transition: transform .2s ease, opacity .2s ease;
}
.home-hero__quick-link:hover .home-hero__quick-link-name::after,
.home-hero__quick-link:focus-visible .home-hero__quick-link-name::after {
  transform: translateX(2px);
  opacity: 1;
}

@media (max-width: 1024px) {
  .home-hero { flex-direction: column; padding: 0px 10px; margin-bottom: 42px; }
  .home-hero__primary, .home-hero__quick-links { flex: 1 1 auto; min-width: 0; }

  .home-hero__content {
    max-width: 100%;
  }

  .home-hero__primary {
    min-height: 360px;
  }

  .home-hero__quick-links { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-auto-rows: minmax(180px, auto); }

  .home-hero__quick-link-card {
    aspect-ratio: 16 / 10;
  }
  
}

/* 移动端：右侧 4 张小卡每行显示 2 张 */
@media (max-width: 768px) {
  .home-hero__quick-links { gap: 8px; }
  .home-hero__quick-link { flex: 1 1 calc(50% - 4px); }
  .home-hero__quick-link-card {
    aspect-ratio: 16 / 12;
    min-height: 0;
    height: auto;
    min-width: 0;
  }
  .home-hero__quick-link-name { font-size: 0.95rem; }
}

/* 桌面端：右侧 4 卡铺满父容器高度（与左侧等高），两行平均分配 */
@media (min-width: 1025px) {
  .home-hero__quick-links {align-content: stretch;}
  .home-hero__quick-link { height: auto; }
  .home-hero__quick-link-card { height: auto; min-height: 190px; }
}

.home-category-nav {
  max-width: 1200px;
  /* margin: -2rem auto 3rem; */
  /* padding: 13px 2rem; */
  position: relative;
  z-index: 2;
  margin: auto;
}

.home-category-nav__list {
  display: flex;
  gap: 0.75rem;
  /* background: #ffffff; */
  border-radius: 999px;
  /* box-shadow: 0 2px 3px rgba(0,0,0,.1); */
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0px;
  /* width: 100%; */
}

.home-category-nav__list::-webkit-scrollbar {
  display: none;
}

.home-category-nav__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: none;
  /* background: #f5f6fb; */
  color: #1f2333;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  background-color: #ffffff;
}

.home-category-nav__chip:hover,
.home-category-nav__chip:focus-visible {
  background: #eef2ff;
  transform: translateY(-2px);
  box-shadow: 0 2px 3px rgba(0,0,0,.1);
  outline: none;
}

.home-category-nav__chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  font-size: 0.95rem;
  line-height: 1;
}

.home-category-nav__chip.is-active .home-category-nav__chip-icon {
  background: rgba(255, 255, 255, 0.18);
}

.home-category-nav__chip.is-active {
  background: #1f2333;
  color: #ffffff;
  /* box-shadow: 0 2px 3px rgba(0,0,0,.1); */
}

.home-category-nav__chip.is-active:hover,
.home-category-nav__chip.is-active:focus-visible {
  background: #111827;
}

@media (max-width: 768px) {
  .home-category-nav {
    margin: -1.5rem auto 2.5rem;
    /* padding: 0 1.25rem; */
  }

  .home-category-nav__chip {
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
  }
}
