.content-cards-section {
  position: relative;
}
.content-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;

  @media (width >= 768px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.content-card {
  position: relative;
  display: flex;
  width: 100%;

  @media (width < 768px) {
    --primary-btn-bg-color: var(--bg-foreground);

    background-color: var(--bg);
    color: var(--bg-foreground);
  }

  @media (width >= 768px) {
    transition: color 0.3s ease;

    &::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      background-color: var(--bg);
      transform: scaleY(0);
      opacity: 0;
      transition:
        transform 0.3s ease,
        opacity 0.3s ease;
      transform-origin: bottom;
    }

    &:hover {
      --primary-btn-bg-color: var(--bg-foreground);

      color: var(--bg-foreground);

      &::before {
        transform: scaleY(1);
        opacity: 1;
      }
    }
  }
}

.content-card__inner {
  display: flex;
  flex-direction: column;
  row-gap: 32px;
  width: 100%;
  height: 100%;
  padding: 24px 24px 32px 24px;

  @media (width >= 768px) {
    row-gap: 40px;
    padding: 24px 24px 44px 24px;
  }
}

.content-card__link {
  position: absolute;
  inset: 0;
}

.content-card__image {
  max-width: calc(279 / 437 * 100%);
  margin-inline: auto;
  overflow: hidden;
}

.content-card__image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.content-card__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
}

.content-card__subtitle {
  width: 100%;
  font-size: calc(14 / 16 * 1rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 24px;

  &:before,
  &:after {
    content: "";
    display: block;
    flex: 1;
    height: 1px;
    background-color: #d5d1c3;
  }
}
