/* The course card. Consumers: Courses (home track), Course Catalog
   (grid). Width, flex and snap belong to the consumer. */
.course-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px; /* her flat 20 at every width, not the medium token */
  background: var(--color-cards-bg);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.course-card__media {
  position: relative;
  flex: none;
  width: 100%;
  aspect-ratio: 427 / 265;
  border-radius: 20px; /* the frame's; not a token — ask before changing */
  overflow: hidden;
}
.course-card__media img,
.course-card__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
/* Added interaction, her call: the cover grows a little under the pointer. */
@media (hover: hover) and (pointer: fine) and (min-width: 989px) {
  .course-card:hover .course-card__media img,
  .course-card:hover .course-card__media video {
    transform: scale(1.05);
  }
}

/* The pill reads it off the body; keep it above that rule's own use. */
.course-card {
  --course-card-padding-y: 24px; /* her 24 above the title and under the pills */
}

.course-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Her rule: the air above the pills is a multiple of the padding
     under them — 1.5, which reads as double once the text's line
     spacing and the pill's own padding are counted. */
  gap: calc(1.5 * var(--course-card-padding-y));
  /* The frame's fixed 262 body, scaled with the card below 1440. */
  min-height: clamp(187px, calc(116.05px + 10.135vw), 262px);
  padding: var(--course-card-padding-y) var(--card-padding-m-block);
}
.course-card__text {
  display: flex;
  flex-direction: column;
  gap: var(--gap-heading-to-subtitle);
}
.course-card__title {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-primary);
  font-weight: 500; /* her call, as How To Study's card title */
  /* The card-L token with her 24 low end instead of its 20 (recipe). */
  font-size: clamp(24px, calc(16.432px + 1.0811vw), 32px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.course-card__description,
.course-card__facts {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: var(--font-size-body-card-s);

  /* PROPOSED: wider than the 1.3 the two-line card had, her call once
     the offline card grew a third line. */
  line-height: 1.6;
}
/* The facts' labels are Medium, their values Regular; the online card's
   description is Regular throughout — do not fold these back together. */
.course-card__facts {
  font-weight: 500;
}
.course-card__fact-value {
  font-weight: 400;
}

.course-card__labels {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(5px, calc(1.216px + 0.54054vw), 9px);
}
/* The format pill sits on the cover, 16 into the top-left corner (her
   call — the format is what the card is picked by, and on a photo the
   colour reads calmer than on white). */
.course-card__pill {
  position: absolute;
  top: 16px; /* her 16 into the corner, not the body's insets */
  left: 16px;
  z-index: 1; /* above the cover's hover zoom */
  /* A micro shadow so the pill holds on a light cover (her call). */
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.15);
}
.course-card__pill--online {
  background: var(--color-pill-online);
}
.course-card__pill--offline {
  background: var(--color-pill-offline);
}

/* A card with no page yet: still a card, plainly not a link. */
.course-card--soon {
  cursor: default;
}
.course-card--soon .course-card__media {
  opacity: 0.55;
}
.course-card__pill--soon {
  left: auto;
  right: 16px;
  background: var(--color-text);
  color: var(--color-cards-bg);
}
