.flip-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0 auto;
  box-sizing: content-box;
  padding: 0;
}
.flip-wrapper .item {
  flex: 0 0 23%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: initial;
  border-radius: 8px;
  height: 192px;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding-bottom: 4px;
}
.flip-wrapper .item:last-child {
  padding-bottom: 4px;
}
.flip-wrapper .item.animated {
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 1s ease, transform 1s ease;
}
.flip-wrapper .item.animated.visible {
  opacity: 1;
  transform: translateX(0);
}

.flip-wrapper .back {
  max-width: 23%;
}
.flip-wrapper .item img {
  display: block;
  width: auto;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 10px;
}
.flip-wrapper .link {
  text-decoration: underline;
  font-size: 0.875rem;
  font-weight: 500;
}
.flip-wrapper .card-body {
  display: flex;
  transform-style: preserve-3d;
  flex: 1;
  width: 100%;
  min-width: 255px;
}

.flip-wrapper .back img {
  height: 65px !important;
}

.flip-wrapper .front, .flip-wrapper .back {
  will-change: transform;
  backface-visibility: hidden;
  /* Vendor prefix for Safari */
  -webkit-backface-visibility: hidden;
  min-width: 100%;
  box-shadow: 0px 2px 18px 0px rgb(39 39 52 / 6%);
}

.flip-wrapper .front {
  display: flex;
  flex-direction: column; 
  justify-content: center;
  padding: 16px;
}
.flip-wrapper .back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: rotateY(-180deg);
}
.flip-wrapper .item figure {
  position: relative;
  margin: 0;
}
.flip-wrapper .item figure figcaption {
  padding: 14px 18px;
  overflow: auto;
  justify-content: center;
}
.flip-wrapper .item figure .back-text p {
  padding-bottom: 2px;
}
.flip-wrapper .front-title {
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.6em;
}
.flip-wrapper .card-title {
  margin: 0px 10px;
}
.flip-wrapper .back-title {
  font-size: 1rem;
  letter-spacing: 1px;
  line-height: 1.6em;
  margin-bottom: 10px;
  color: #0C3D5C;
  font-family: var(--primary-font);
}
.flip-wrapper .back-text {
  line-height: 1.6em;
  font-size: 0.875rem;
  font-weight: 500;
}
.flip-wrapper .item:hover .front,
.flip-wrapper .item:focus .front {
  transform: rotateY(180deg);
}
.flip-wrapper .item:hover .back,
.flip-wrapper .item:focus .back {
  transform: rotateY(0deg);
}

@media (max-width: 1200px) {
  .flip-wrapper .card-body {
    min-width: 225px;
  }
}

@media (max-width: 980px) {
  .flip-wrapper .back {
    max-width: 100%;
    justify-content: start;
  }
  .flip-wrapper .front, .flip-wrapper .back {
    max-width: 100%;
  }
}

@media (max-width: 780px) {
  .flip-wrapper .card-body {
    min-width: 255px;
  }
}

@media (max-width: 600px) {
  .flip-wrapper .card-body {
    min-width: 290px;
  }
  .flip-wrapper .item figure figcaption {
    padding: 20px;
  }
}

@supports (aspect-ratio: 1 / 1) {
  .flip-wrapper .item img {
    height: revert;
    aspect-ratio: 1 / 1;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .flip-wrapper .item:hover .front,
  .flip-wrapper .item:focus .front {
    transition: transform 400ms;
  }
  .flip-wrapper .item:hover .back,
  .flip-wrapper .item:focus .back {
    transition: transform 400ms;
  }
  .flip-wrapper .front, .flip-wrapper .back {
    transition: transform 800ms 150ms;
  }
}