.project-groups {
  display: grid;
  gap: 26px;
}

.project-group {
  position: relative;
  padding: 24px;
  overflow: hidden;
  background: var(--factory-panel, #fff);
  border: 1px solid var(--factory-line, #deded9);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(29, 30, 34, 0.055);
}

.project-group::before {
  position: absolute;
  top: 0;
  left: 24px;
  width: 58px;
  height: 3px;
  content: "";
  background: var(--factory-red, #c81622);
  border-radius: 0 0 999px 999px;
}

.project-group-heading {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2px 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--factory-line, #deded9);
}

.project-group-heading h3 {
  margin: 0;
  color: var(--factory-ink, #15171b);
  font-family: Unbounded, Montserrat, Arial, sans-serif;
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.project-group-heading p {
  margin: 7px 0 0;
  color: var(--factory-muted, #74777d);
  font-size: 12px;
  line-height: 1.5;
}

.project-group-heading > span {
  flex: none;
  padding: 7px 10px;
  color: var(--factory-red-dark, #a70f18);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  background: #fff1f2;
  border: 1px solid #f0d1d4;
  border-radius: 999px;
}

.portal-page .section-title .count {
  white-space: nowrap;
}

@media (max-width: 620px) {
  .project-groups {
    gap: 20px;
  }

  .project-group {
    padding: 20px 16px 16px;
    border-radius: 16px;
  }

  .project-group::before {
    left: 16px;
  }

  .project-group-heading {
    align-items: flex-start;
    padding-bottom: 15px;
  }

  .project-group-heading p {
    max-width: 34ch;
  }

  .portal-page .section-title {
    gap: 16px;
    align-items: flex-start;
  }

  .portal-page .section-title .count {
    padding-top: 6px;
    font-size: 11px;
  }
}
