@import url('https://fonts.googleapis.com/css?family=Roboto');

body {
  background: #262626;
  font-family: 'Roboto', sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;
}

.grid {
  display: grid;
  #grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 40px;
  align-items: stretch;
  width: 100%;
  margin: auto 0;
}


.mycard {
  position: relative;
  height: auto;
  margin-left: 10%;
  margin-right: 10%;
  padding: 20px 50px;
  background: #ff0;
  border-radius: 10px;
  border: 4px solid #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  animation: animate 5s linear infinite;
  overflow: hidden;
}

.mycard::before {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
  transform: skewx(-5deg);
  background: rgba(255, 255, 255, 0.2);
}

.mycard:nth-child(1) {
  background: #0f84d4;
}

.mycard:nth-child(2) {
  background: #f1206a url(https://www.transparenttextures.com/patterns/basketball.png);
}

.mycard:nth-child(3) {
  background: #0f84d4 url(https://www.transparenttextures.com/patterns/basketball.png);
}

@keyframes animate
{
  0%
  {
    background-position: 0 0;
  }
  100%
  {
    background-position: 0 -196px;
  }
}

.mycard .image {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 20px auto;
  overflow: hidden;
  z-index: 1;
}

.mycard .image img {
  width: 100%;
  height: auto;
}

.mycard .text {
  position: relative;
  color: #fff;
  font-size: 18px;
}


.mycard .details {
  text-align: center;
}

.mycard .details h2 {
  position: relative;
  color: #fff;
  margin: 0;
  padding: 0;
  font-size: 24px;
  z-index: 1;
}

.mycard .details h2 span {
  font-size: 20px;
}