.card {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  background: #222;
  isolation: isolate;
}

/*
 * Media image becomes the visual background.
 */
.card__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

/*
 * Drupal adds several wrappers around field output.
 * Make sure they also occupy the full card.
 */
.card__media > div,
.card__media .field,
.card__media .field__item {
  width: 100%;
  height: 100%;
}

.card__media article {
  width: 100%;
  height: 100%;
}

.card__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

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

/*
 * Overlay improves readability of text over the image.
 */
.card__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.15) 45%,
    rgba(0, 0, 0, 0.65) 100%
  );
}

/*
 * Content area.
 *
 * Title stays toward the top.
 * CTA stays toward the bottom.
 */
.card__content {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  width: 100%;
  min-height: 420px;
  padding: 32px 24px;

  text-align: center;
}

/*
 * Card title
 */
.card__title {
  max-width: 420px;
  margin: 0;

  color: #fff;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
  line-height: 1.2;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/*
 * CTA field.
 */
.card__cta {
  margin-top: auto;
  padding-top: 32px;
}
.card__cta > div a { display: inline-block; vertical-align: middle; margin: 0 0 1rem 0; padding: 0.85em 1em; border: 1px solid transparent; border-radius: 0; -webkit-transition: background-color 0.25s ease-out, color 0.25s ease-out; transition: background-color 0.25s ease-out, color 0.25s ease-out; font-family: inherit; -webkit-appearance: none; line-height: 1; text-align: center; cursor: pointer;background-color: #0d4269;
    color: #fefefe; }
/*
 * Remove unwanted Drupal field spacing if necessary.
 */
.card__cta .field,
.card__cta .field__item {
  margin: 0;
}

/*
 * Optional subtle interaction.
 */
.card__media img {
  transition: transform 0.4s ease;
}

.card:hover .card__media img {
  transform: scale(1.03);
}


/* Tablet */
@media (max-width: 991px) {
  .card,
  .card__content {
    min-height: 380px;
  }

  .card__content {
    padding: 28px 20px;
  }
}


/* Mobile */
@media (max-width: 767px) {
  .card,
  .card__content {
    min-height: 340px;
  }

  .card__content {
    padding: 24px 16px;
  }

  .card__cta a {
    padding: 10px 20px;
  }
}

.card__media img {
  width: 100%;
  height: auto;
}

.cms-content-wrapper .layout__region--content:has(.card){
  padding-top: 0;
  display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    max-width: 1200px;
    @media (max-width: 991px) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 40px;
    }
    @media (max-width: 767px) {
      grid-template-columns: repeat(1, minmax(0, 1fr));
      gap: 30px;
    }
    .card__media div{
      height: 100%;
    }
    .card__media img {
      width: 100%;
      height: 100%;
    }

    .card {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 420px;
    overflow: hidden;
    background: #222;
    isolation: isolate;
    margin-bottom: 0;
    border: none;
    box-shadow: 0.5rem 0.5rem 0 var(--navy);
    @media (max-width: 991px) {
      min-height: 380px;
    }
    @media (max-width: 767px) {
      min-height: 340px;
    }
    }
    .contextual-region{height: 100%;}
    .contextual-region > div{height: 100%;}
    .card__cta > div a {
    
      background-color: #b3bd40;
      color: #fefefe;
      margin-bottom: 0;

      &:hover{
          background-color: var(--navy);
      }       
    }
}