.resource-hub-heading {
  position: relative;
  margin: 0 0 30px;
  padding: 6px 0 24px;
  border-bottom: 1px solid rgb(56 189 248 / 0.16);
  scroll-margin-top: 88px;
}

.resource-hub-heading::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: min(360px, 42vw);
  height: 1px;
  background: linear-gradient(90deg, rgb(56 189 248 / 0.88), transparent);
  box-shadow: 0 0 16px rgb(56 189 248 / 0.42);
}

.resource-hub-heading h2 {
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 1.5vw, 22px);
  max-width: none;
  margin: 0;
  color: #f5f8ff;
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 4px 28px rgb(0 0 0 / 0.44);
  scroll-margin-top: 88px;
}

.resource-hub-heading h2 strong {
  color: #f7f9ff;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 6px 34px rgb(0 0 0 / 0.52), 0 0 24px rgb(99 179 255 / 0.08);
}

.resource-hub-heading h2 span {
  color: #79dfff;
  font-size: clamp(0.64rem, 1vw, 0.82rem);
  font-weight: 650;
  letter-spacing: 0.055em;
  line-height: 1.2;
  opacity: 0.82;
  text-shadow: 0 4px 18px rgb(0 0 0 / 0.42);
}

/*
 * The React resource cards keep their own pointer tilt, border tracking,
 * edge light and hover elevation. This file changes only composition.
 */
.resource-card-list {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "featured featured featured featured featured featured featured featured workflow workflow workflow workflow"
    "product-a product-a product-a product-a product-a product-a product-b product-b product-b product-b product-b product-b"
    "cloud cloud cloud cloud repair repair repair repair course course course course"
    "community community community community community community community community community community community community";
  gap: 18px;
  padding: 0 0 34px;
}

.resource-card-cell:nth-child(1) { grid-area: featured; }
.resource-card-cell:nth-child(2) { grid-area: workflow; }
.resource-card-cell:nth-child(3) { grid-area: product-a; }
.resource-card-cell:nth-child(4) { grid-area: product-b; }
.resource-card-cell:nth-child(5) { grid-area: cloud; }
.resource-card-cell:nth-child(6) { grid-area: repair; }
.resource-card-cell:nth-child(7) { grid-area: course; }
.resource-card-cell:nth-child(8) { grid-area: community; }

.resource-card-cell:nth-child(1),
.resource-card-cell:nth-child(2) {
  min-height: 330px;
}

.resource-card-cell:nth-child(3),
.resource-card-cell:nth-child(4) {
  min-height: 238px;
}

.resource-card-cell:nth-child(5),
.resource-card-cell:nth-child(6),
.resource-card-cell:nth-child(7) {
  min-height: 214px;
}

.resource-card-cell:nth-child(8) {
  min-height: 152px;
}

.resource-card-cell:nth-child(1) .resource-card-head {
  max-width: 49%;
  padding: 32px 34px 0;
}

.resource-card-cell:nth-child(1) .resource-card-head-title {
  font-size: clamp(1.65rem, 2.5vw, 2.35rem);
  line-height: 1.24;
}

.resource-card-cell:nth-child(1) .resource-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
}

.resource-card-cell:nth-child(1) .resource-card-icon svg {
  width: 29px;
  height: 29px;
}

.resource-card-cell:nth-child(1) .resource-card-body {
  max-width: 48%;
  padding: 19px 34px 0;
}

.resource-card-cell:nth-child(1) .resource-card-copy p {
  font-size: 15px;
  line-height: 1.82;
}

.resource-card-cell:nth-child(1) .resource-card-tags {
  max-width: 49%;
  padding: 20px 34px 0;
}

.resource-card-cell:nth-child(1) .resource-card-cta {
  margin: 20px 34px 30px;
}

/* The featured APP keeps the card's native edge glow and tilt while presenting real product media. */
.resource-card-cell:nth-child(1) .app-card-surface.resource-card-surface::before {
  display: none;
}

.resource-feature-video-shell {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: -1%;
  width: 54%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, rgb(0 0 0 / 0.25) 5%, #000 18%, #000 82%, rgb(0 0 0 / 0.25) 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0, rgb(0 0 0 / 0.25) 5%, #000 17%, #000 83%, rgb(0 0 0 / 0.25) 95%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, rgb(0 0 0 / 0.25) 5%, #000 18%, #000 82%, rgb(0 0 0 / 0.25) 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0, rgb(0 0 0 / 0.25) 5%, #000 17%, #000 83%, rgb(0 0 0 / 0.25) 95%, transparent 100%);
  mask-composite: intersect;
  pointer-events: none;
  transform: translateY(-50%) translateZ(18px);
}

.resource-feature-video-shell::after {
  display: none;
}

.resource-feature-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.resource-card-cell:nth-child(2) .resource-card-head,
.resource-card-cell:nth-child(3) .resource-card-head,
.resource-card-cell:nth-child(4) .resource-card-head {
  padding-top: 25px;
}

.resource-card-cell:nth-child(2) .resource-card-head-title {
  font-size: 22px;
}

.resource-card-cell:nth-child(5) .resource-card-head-title,
.resource-card-cell:nth-child(6) .resource-card-head-title,
.resource-card-cell:nth-child(7) .resource-card-head-title {
  font-size: 18px;
  line-height: 1.4;
}

.resource-card-cell:nth-child(5) .resource-card-icon,
.resource-card-cell:nth-child(6) .resource-card-icon,
.resource-card-cell:nth-child(7) .resource-card-icon {
  width: 42px;
  height: 42px;
}

.resource-card-cell:nth-child(5) .resource-card-body,
.resource-card-cell:nth-child(6) .resource-card-body,
.resource-card-cell:nth-child(7) .resource-card-body {
  padding-top: 12px;
}

.resource-card-cell:nth-child(5) .resource-card-copy p,
.resource-card-cell:nth-child(6) .resource-card-copy p,
.resource-card-cell:nth-child(7) .resource-card-copy p {
  font-size: 13px;
  line-height: 1.62;
}

.resource-card-cell:nth-child(5) .resource-card-tags,
.resource-card-cell:nth-child(6) .resource-card-tags,
.resource-card-cell:nth-child(7) .resource-card-tags {
  padding-top: 12px;
}

.resource-card-cell:nth-child(5) .resource-card-cta,
.resource-card-cell:nth-child(6) .resource-card-cta,
.resource-card-cell:nth-child(7) .resource-card-cta {
  margin-top: 12px;
}

.resource-card-cell:nth-child(8) .app-card-surface.resource-card-surface {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.35fr) auto;
  align-items: center;
  column-gap: 28px;
  padding: 0 28px;
}

.resource-card-cell:nth-child(8) .resource-card-head,
.resource-card-cell:nth-child(8) .resource-card-body,
.resource-card-cell:nth-child(8) .resource-card-tags,
.resource-card-cell:nth-child(8) .resource-card-cta {
  padding: 0;
  transform: translateZ(28px);
}

.resource-card-cell:nth-child(8) .resource-card-body {
  padding-left: 10px;
}

.resource-card-cell:nth-child(8) .resource-card-tags {
  display: none;
}

.resource-card-cell:nth-child(8) .resource-card-cta {
  align-self: center;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid hsl(var(--card-accent) / 0.36);
  border-radius: 10px;
  background: hsl(var(--card-accent) / 0.08);
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .resource-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "featured featured"
      "workflow product-b"
      "product-a product-a"
      "cloud repair"
      "course course"
      "community community";
  }

  .resource-card-cell:nth-child(8) .app-card-surface.resource-card-surface {
    grid-template-columns: minmax(240px, 0.85fr) minmax(260px, 1.15fr) auto;
    column-gap: 18px;
  }
}

@media (max-width: 720px) {
  .resource-hub-heading {
    margin-bottom: 22px;
    padding-bottom: 20px;
  }

  .resource-hub-heading h2 {
    gap: 8px;
    white-space: nowrap;
  }

  .resource-hub-heading h2 strong {
    font-size: 2.25rem;
    letter-spacing: -0.03em;
  }

  .resource-hub-heading h2 span {
    font-size: clamp(0.43rem, 1.9vw, 0.56rem);
    letter-spacing: 0.01em;
    opacity: 0.76;
  }

  .resource-card-list {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "featured"
      "workflow"
      "product-a"
      "product-b"
      "cloud"
      "repair"
      "course"
      "community";
    gap: 16px;
  }

  .resource-card-cell:nth-child(n) {
    min-height: 0;
  }

  .resource-card-cell:nth-child(1) .resource-card-head,
  .resource-card-cell:nth-child(1) .resource-card-body,
  .resource-card-cell:nth-child(1) .resource-card-tags {
    max-width: none;
  }

  .resource-card-cell:nth-child(1) .resource-card-head {
    padding: 24px 20px 0;
  }

  .resource-card-cell:nth-child(1) .resource-card-head-title {
    font-size: 24px;
  }

  .resource-card-cell:nth-child(1) .resource-card-icon {
    width: 50px;
    height: 50px;
  }

  .resource-card-cell:nth-child(1) .resource-card-body,
  .resource-card-cell:nth-child(1) .resource-card-tags {
    padding-right: 20px;
    padding-left: 20px;
  }

  .resource-card-cell:nth-child(1) .resource-card-cta {
    margin-right: 20px;
    margin-left: 20px;
  }

  .resource-card-cell:nth-child(1) .app-card-surface.resource-card-surface::before {
    display: none;
  }

  .resource-feature-video-shell {
    position: relative;
    top: auto;
    right: auto;
    width: calc(100% - 40px);
    margin: 0 20px 22px;
    transform: none;
  }

  .resource-card-cell:nth-child(8) .app-card-surface.resource-card-surface {
    display: flex;
    padding: 0;
  }

  .resource-card-cell:nth-child(8) .resource-card-head,
  .resource-card-cell:nth-child(8) .resource-card-body,
  .resource-card-cell:nth-child(8) .resource-card-tags {
    padding-right: 19px;
    padding-left: 19px;
  }

  .resource-card-cell:nth-child(8) .resource-card-head {
    padding-top: 21px;
  }

  .resource-card-cell:nth-child(8) .resource-card-body {
    padding-top: 16px;
  }

  .resource-card-cell:nth-child(8) .resource-card-tags {
    display: flex;
    padding-top: 18px;
  }

  .resource-card-cell:nth-child(8) .resource-card-cta {
    align-self: flex-start;
    margin: 18px 19px 21px;
  }
}

@media (max-width: 480px) {
  .resource-hub-heading h2 span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resource-card-cell:nth-child(1) .app-card-surface.resource-card-surface::before {
    transform: none;
  }

  .resource-feature-video-shell {
    transform: translateY(-50%);
  }

  .resource-feature-video {
    filter: none;
  }
}

@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .resource-feature-video-shell {
    transform: none;
  }
}
