.program-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
}

.program-card {
  position: relative;
  display: flex;
  min-width: 0;
  height: 372px;
  flex-direction: column;
  overflow: visible;
  background: #fff;
  border: 1px solid #dfe2de;
  border-radius: 8px;
}

.program-card--formation {
  border: 2px solid #c4a532;
  background: #fffdf5;
}

.program-card__media {
  position: relative;
  display: block;
  height: 190px;
  flex: 0 0 190px;
  overflow: hidden;
  background: #e8eae7;
  border-radius: 7px 7px 0 0;
}

.program-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.program-card:hover .program-card__media img {
  transform: scale(1.025);
}

.program-card__badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 88px);
  padding: 6px 8px;
  overflow: hidden;
  color: #fff;
  background: rgb(24 25 24 / 90%);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-card__badge--formation {
  color: #30280c;
  background: #f4d65f;
}

.program-card__badge--strong {
  color: #173f67;
  background: #dcecff;
  border: 1px solid #9fc2e6;
}

.program-card__save,
.program-card .save-button {
  position: absolute;
  z-index: 5;
  top: 10px;
  right: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  color: #181918;
  background: rgb(255 255 255 / 94%);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgb(0 0 0 / 14%);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.program-card__save.is-saved,
.program-card .save-button.is-saved {
  color: #fff;
  background: #d95843;
}

.program-card__menu {
  position: absolute;
  z-index: 6;
  top: 10px;
  right: 54px;
}

.program-card__menu > button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  color: #181918;
  background: rgb(255 255 255 / 94%);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgb(0 0 0 / 12%);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.program-card__menu > button > span {
  display: block;
  line-height: 1;
  transform: translateY(-1px);
}

.program-card__content {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 13px 14px 12px;
}

.program-card__eyebrow {
  display: block;
  overflow: hidden;
  color: #69706b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-card__title {
  display: -webkit-box;
  min-height: 42px;
  margin: 5px 0 6px;
  overflow: hidden;
  color: #181918;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.program-card__title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.program-card__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.program-card__host {
  flex: 0 0 auto;
  color: #555b57;
  font-size: 11px;
  font-weight: 800;
}

.program-card__tags {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow: hidden;
}

.program-card__tags span {
  flex: 0 0 auto;
  padding: 4px 6px;
  color: #555b57;
  background: #f0f2ee;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.program-card__context {
  margin: 9px 0 0;
  overflow: hidden;
  color: #3f5148;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-card--strong .program-card__context {
  color: #254d74;
}

.program-card__schedule {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 9px;
  color: #333835;
  padding-right: 0;
  padding-left: 0;
  background: transparent;
  border: 0;
  border-top: 1px solid #e4e6e2;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}

.program-card__schedule span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-card__schedule:hover span:first-child {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.program-card__formation {
  display: grid;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: auto -14px -12px;
  padding: 8px 13px;
  color: #493c11;
  background: #fff7d6;
  border-top: 1px solid #e1c55b;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
}

.program-card__formation span {
  display: block;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-card__formation strong {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.program-card__formation:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1023px) {
  .program-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .program-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .program-card {
    height: 282px;
  }

  .program-card__media {
    height: 128px;
    flex-basis: 128px;
  }

  .program-card__content {
    padding: 10px 12px 9px;
  }

  .program-card__title {
    min-height: 36px;
    margin: 3px 0 5px;
    font-size: 16px;
    line-height: 1.2;
  }

  .program-card__context {
    margin-top: 7px;
  }

  .program-card__schedule {
    min-height: 30px;
    padding-top: 7px;
  }

  .program-card__formation {
    min-height: 42px;
    margin: auto -12px -9px;
    padding: 6px 11px;
  }

  .program-card__badge {
    bottom: 9px;
    font-size: 10px;
  }
}
