/**
 * @file
 * Resource card styles.
 */

.resource-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg, 1.5rem);
  background: var(--color-white, #ffffff);
  border-radius: var(--radius-2xl, 1.5rem);
  padding: var(--space-lg, 1.5rem);
  box-shadow: 0 8px 24px -4px rgba(81, 88, 97, 0.16);
}

/* `shadow: false`. The card keeps its white surface, radius and padding — only
   the drop shadow goes, for placements where something else already separates
   the card from the page and the shadow reads as a second edge. */
.resource-card--flat {
  box-shadow: none;
}

.resource-card__media {
  flex: none;
  display: flex;
  justify-content: center;
}

.resource-card__media--brochure {
  width: 133px;
  height: 133px;
  overflow: hidden;
}

.resource-card__media--brochure .resource-card__img {
  width: 133px;
  height: 133px;
  object-fit: cover;
  object-position: top;
}

.resource-card__media--pdf {
  width: 120px;
}

.resource-card__media--pdf .resource-card__img {
  width: 120px;
  height: 168px;
}

.resource-card__media--tall {
  width: 100%;
  height: 168px;
}

.resource-card__media--tall .resource-card__img {
  width: 101px;
  height: 168px;
}

.resource-card__img {
  object-fit: cover;
}

.resource-card__img--framed {
  border: 0.5px solid var(--color-neutral-2, #d6d2c4);
}

.resource-card__img--desktop {
  display: none;
}

.resource-card__img--mobile {
  display: block;
}

.resource-card__body {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg, 1.5rem);
}

.resource-card__title {
  margin: 0;
  font-family: var(--font-agenda, 'agenda', Arial, sans-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: normal;
  color: var(--color-text-primary, #1d2d3a);
}

.resource-card__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-lg, 1.5rem);
}

.resource-card__text {
  margin: 0;
  font-family: var(--font-agenda, 'agenda', Arial, sans-serif);
  font-size: var(--size-body, 20px);
  line-height: normal;
  color: var(--color-text-primary, #1d2d3a);
}

.resource-card__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg, 1.5rem);
  align-items: stretch;
}

.resource-card__actions .btn {
  width: 100%;
}

.resource-card__download-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url('../../images/icons/download-icon.svg') center / contain no-repeat;
}

.resource-card__download-icon--outline {
  filter: invert(55%) sepia(68%) saturate(1752%) hue-rotate(329deg) brightness(101%) contrast(91%);
}

@media (min-width: 991px) {
  .resource-card {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-2xl, 2.5rem);
    padding: 26px 24px;
    width: 100%;
  }

  .resource-card__media--brochure {
    width: 133px;
    height: 189px;
    align-items: flex-start;
  }

  .resource-card__media--brochure .resource-card__img {
    width: 133px;
    height: 151px;
  }

  .resource-card__media--pdf {
    width: 133px;
    height: 168px;
    justify-content: flex-start;
  }

  .resource-card__media--tall {
    width: 133px;
    height: 222px;
  }

  .resource-card__media--tall .resource-card__img {
    width: 133px;
    height: 222px;
  }

  .resource-card__img--desktop {
    display: block;
  }

  .resource-card__img--mobile {
    display: none;
  }

  .resource-card__body {
    width: auto;
  }

  .resource-card__title {
    font-size: 26px;
  }
  .resource-card__actions {
    width: fit-content;
    align-items: stretch;
  }
  .resource-card__actions .btn--primary:hover {
    color: white;}

}

@media (min-width: 768px) {
  .resource-card__actions {
    width: fit-content;
  }
}