* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.wrapper {
  background-color: #fff;
  width: 100%;
  margin: 0 auto;
  padding: 50px 0;
  transition: all .3s ease;
}

.card-title {
  font-size: 30px;
  font-family: sans-serif;
  font-weight: bold;
  color: #27213c;
  text-align: center;
  padding: 3rem 1.5rem;
}

.cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.col {
  width: calc(22% - 2rem);
  margin: .7rem;
  cursor: pointer;
}

.container {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.front1,
.back {
  background-size: cover;
  background-position: center;
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
  backface-visibility: hidden;
  text-align: center;
  min-height: 320px;
  height: auto;
  border-radius: 10px;
  background:linear-gradient(270deg,#000bab 0,#0078fa 100%);
  color: #ffffff;
  font-size: 1rem;
}


.front2,
.back {
  background-size: cover;
  background-position: center;
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
  backface-visibility: hidden;
  text-align: center;
  min-height: 320px;
  height: auto;
  border-radius: 10px;
  background:linear-gradient(270deg,#b61eeb 0,#7a2af1 100%);
  color: #ffffff;
  font-size: 1rem;
}

.front3,
.back {
  background-size: cover;
  background-position: center;
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
  backface-visibility: hidden;
  text-align: center;
  min-height: 320px;
  height: auto;
  border-radius: 10px;
  background:linear-gradient(270deg,#e9461a 0,#f1be29 100%);
  color: #ffffff;
  font-size: 1rem;
}

.front4,
.back {
  background-size: cover;
  background-position: center;
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
  backface-visibility: hidden;
  text-align: center;
  min-height: 320px;
  height: auto;
  border-radius: 10px;
  background:linear-gradient(270deg,#009688 0,#00bcd4 100%);
  color: #ffffff;
  font-size: 1rem;
}

.back {
  background:linear-gradient(270deg,#000bab 0,#0078fa 100%);
}


.front1:after {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  content: '';
  display: block;
  opacity: 1;
  backface-visibility: hidden;
  border-radius: 10px;
}

.front2:after {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  content: '';
  display: block;
  opacity: 1;
  backface-visibility: hidden;
  border-radius: 10px;
}

.front3:after {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  content: '';
  display: block;
  opacity: 1;
  backface-visibility: hidden;
  border-radius: 10px;
}

.front4:after {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  content: '';
  display: block;
  opacity: 1;
  backface-visibility: hidden;
  border-radius: 10px;
}

.container:hover .front1,
.container:hover .back {
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
}

.container:hover .front2,
.container:hover .back {
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
}

.container:hover .front3,
.container:hover .back {
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
}

.container:hover .front4,
.container:hover .back {
  transition: transform .7s cubic-bezier(.4, .2, .2, 1);
}

.back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.inner {
  transform: translateY(-50%) translateZ(60px) scale(.94);
  top: 53%;
  position: absolute;
  left: 0;
  width: 100%;
  padding: 2rem;
  box-sizing: border-box;
  outline: 1px solid transparent;
  perspective: inherit;
  z-index: 2;
}

.container .back {
  transform: rotateY(180deg);
  transform-style: preserve-3d;
}

.container .front1 {
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}

.container .front2 {
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}

.container .front3 {
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}

.container .front4 {
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}

.container:hover .back {
  transform: rotateY(0deg);
  transform-style: preserve-3d;
}

.container:hover .front1 {
  transform: rotateY(-180deg);
  transform-style: preserve-3d;
}

.container:hover .front2 {
  transform: rotateY(-180deg);
  transform-style: preserve-3d;
}

.container:hover .front3 {
  transform: rotateY(-180deg);
  transform-style: preserve-3d;
}

.container:hover .front4 {
  transform: rotateY(-180deg);
  transform-style: preserve-3d;
}

.front1 .inner p {
  font-size: 1.6rem;
  font-family: arial;
  margin-bottom: 2rem;
  color: #ffffff;
  text-align: center;
  position: relative;
}

.front2 .inner p {
  font-size: 1.6rem;
  font-family: arial;
  margin-bottom: 2rem;
  color: #ffffff;
  text-align: center;
  position: relative;
}

.front3 .inner p {
  font-size: 1.6rem;
  font-family: arial;
  margin-bottom: 2rem;
  color: #ffffff;
  text-align: center;
  position: relative;
}

.front4 .inner p {
  font-size: 1.6rem;
  font-family: arial;
  margin-bottom: 2rem;
  color: #ffffff;
  text-align: center;
  position: relative;
}

.front1 .inner p:after {
  content: '';
  width: 8rem;
  height: 1px;
  position: absolute;
  background: #ffffff;
  display: block;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: -.35rem;
}

.front2 .inner p:after {
  content: '';
  width: 8rem;
  height: 1px;
  position: absolute;
  background: #ffffff;
  display: block;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: -.35rem;
}

.front3 .inner p:after {
  content: '';
  width: 8rem;
  height: 1px;
  position: absolute;
  background: #ffffff;
  display: block;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: -.35rem;
}

.front4 .inner p:after {
  content: '';
  width: 8rem;
  height: 1px;
  position: absolute;
  background: #ffffff;
  display: block;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: -.35rem;
}

.inner a {
  text-decoration: none;
  color:#ffffff;
}

.inner a:hover {
  color: #ffffff;
  transition: all .3s;
}

@media screen and (max-width: 68rem) {
  .col {
    width: calc(33.333333% - 4rem);
  }
}

@media screen and (max-width: 52rem) {
  .col {
    width: calc(45% - 2rem);
  }
}

@media screen and (max-width: 38rem) {
  .col {
    width: 60%;
  }
}