@use 'src/app/styles/font' as *;
@use 'src/app/styles/variables' as *;

.card {
  padding: 0 !important;
  overflow: hidden;
  margin-top: 0;
  min-height: 184px;
  display: grid;
  grid-template-columns: 240px 1fr;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(24, 40, 72, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(24, 40, 72, 0.14);
  }

  @media (max-width: $large) {
    grid-template-columns: 200px 1fr;
  }

  @media (max-width: $medium) {
    grid-template-columns: 1fr;
  }
}

.media-wrapper {
  width: 100%;
  height: 100%;
  min-height: 184px;
  overflow: hidden;

  @media (max-width: $medium) {
    min-height: 220px;
  }
}

.img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: stretch;
  padding: 18px 20px !important;
  overflow: hidden;
  height: 100%;

  @media (max-width: $small) {
    flex-direction: column;
    gap: 14px;
    padding: 16px !important;
  }
}

.description-wrapper {
  width: 100%;
  min-width: 0;
  padding-right: 10px;

  @media (max-width: $small) {
    padding-right: 0;
  }
}

.title {
  cursor: pointer;
  margin: 0 0 6px;
  font-size: $fs-medium;
  font-weight: $fw-extra-bold;
  color: $blue;
  line-height: 1.35;
  letter-spacing: 0.15px;

  &:hover {
    text-decoration: underline;
  }
}

.subtitle {
  margin: 0 0 8px;
  color: $light-grey;
  font-size: $fs-small;
  letter-spacing: 0.2px;
}

.description {
  color: $grey;
  font-size: $fs-normal;
  font-weight: $fw-lighter;
  margin: 0;
  text-overflow: initial;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.45;
}

.price-wrapper {
  border-left: 1px solid rgba(94, 139, 255, 0.16);
  min-width: 138px;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;

  @media (max-width: $small) {
    border-left: 0;
    border-top: 1px solid rgba(94, 139, 255, 0.16);
    min-width: 0;
    padding-left: 0;
    padding-top: 12px;
    width: 100%;
  }
}

.price-label {
  margin: 0;
  color: $light-grey;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.price {
  margin: 2px 0;
  font-weight: $fw-extra-bold;
  font-size: 28px;
  color: $dark-grey;
  line-height: 1.15;
}

.price-period {
  margin: 0;
  color: $light-grey;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.35px;
}

.learn-button {
  margin-top: 12px;
}
