.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
    gap: 0.5rem;
    /* padding: 3rem 2rem; */
    max-width: 1200px;
    margin: 10px auto;
    align-items: stretch;
    /* margin-bottom: 10px; */
}

.hero-left {
  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 16px 40px rgba(16, 24, 64, 0.25);
}

.hero-content {
  max-width: 68%;
}

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

.hero-features li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 1rem;
}

.hero-features 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: #fbb040;
  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 10px 24px rgba(251, 176, 64, 0.35);
}

.hero-right {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  grid-auto-rows: auto;
}

.hero-right-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.hero-right-cat {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  /* aspect-ratio: 16 / 11; */
  min-height: 190px;
  box-shadow: 0 12px 28px rgba(16, 24, 64, 0.18);
  transform: scale(1);
  transition: transform .28s ease, box-shadow .28s ease;
  will-change: transform;
}

.hero-right-link:hover .hero-right-cat,
.hero-right-link:focus-visible .hero-right-cat {
  transform: scale(1.035);
  box-shadow: 0 16px 36px rgba(16, 24, 64, 0.28);
}

.hero-right-cat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
}

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

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 0px;
    margin-bottom: 42px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-left {
    min-height: 360px;
  }

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

  .hero-right-cat {
    aspect-ratio: 16 / 10;
  }
}

/* 移动端：右侧 4 张小卡每行显示 2 张 */
@media (max-width: 768px) {
  .hero-right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 8px;
  }
  .hero-right-cat {
    /* 让卡片在两列下根据可用宽度自动收缩，不再强制最小高度 */
    aspect-ratio: 16 / 12;
    min-height: 0;
    height: auto;
    min-width: 0; /* 允许在 grid 中缩窄，避免内容撑开导致挤叠 */
  }
.cat-name { font-size: 0.95rem; }
}

/* 桌面端：右侧 4 卡铺满父容器高度（与左侧等高），两行平均分配 */
@media (min-width: 1025px) {
  .hero-right { height: 100%; grid-template-rows: repeat(2, 1fr); }
  .hero-right-link { height: 100%; }
  .hero-right-cat { height: 100%; min-height: 0; }
}

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

.category-nav__inner {
  display: flex;
  gap: 0.75rem;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 16px 32px rgba(16, 24, 64, 0.12);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px;
  /* width: 100%; */
}

.category-nav__inner::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  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;
}

.category-chip:hover,
.category-chip:focus-visible {
  background: #eef2ff;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(16, 24, 64, 0.14);
  outline: none;
}

.category-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;
}

.category-chip.is-active .category-chip__icon {
  background: rgba(255, 255, 255, 0.18);
}

.category-chip.is-active {
  background: #1f2333;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.28);
}

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

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

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