.card {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 6rem 1.5rem;
  color: whitesmoke;
  box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.1), 0 0px 2px rgba(0, 0, 0, 0.1), 0 0px 4px rgba(0, 0, 0, 0.1), 0 0px 8px rgba(0, 0, 0, 0.1), 0 0px 16px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  margin-bottom: 2.5rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.216);
  transition: all ease 0.3s;
  height: 100%;
}

.card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: all ease 1s;
  pointer-events: none;
}

.card:after {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 13%, rgb(0 0 0) 53%);
  transform: translateY(-10%);
  transition: all 0.8s ease;
  transition-delay: 0.25s;
}

.card.card-one:before {
  background-image: url('../img/service/Octa_Kasko_remonti-BRS_Group_Brivibas_iela_295.jpeg');
}
.card.card-two:before {
  background-image: url('../img/service/Auto_krasosana-BRS_Group_Brivibas_iela_295.jpeg');
}
.card.card-three:before {
  background-image: url('../img/service/Auto_serviss-BRS_Group_Brivibas_iela_295.jpeg');
}
.card.card-four:before {
  background-image: url('../img/service/Rezerves_dalas-BRS_Group_Brivibas_iela_295.jpg');
}
.card.card-five:before {
  background-image: url('../img/service/Riepas-BRS_Group_Brivibas_iela_295.jpg');
}
.card.card-six:before {
  background-image: url('../img/service/Auto_mazgasana-BRS_Group_Brivibas_iela_295.jpeg');
}
.card.card-seven:before {
  background-image: url('../img/service/Pretkoroziju_apstrade-BRS_Group_Brivibas_iela_295.jpeg');
}

.content-one {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 1rem;
  transition: all 0.9s ease;

  z-index: 1;
}

.content-one > * + * {
  margin-top: 1rem;
}

.title-one {
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1.2;
  margin: 0 0 5px;
  transition: all 1s ease;
  transition-delay: 0.4s;
}

.description-one {
  font-size: 1.45rem;
  line-height: 1.25;
}

.btn-round {
  cursor: pointer;
  width: auto;
  margin-top: 0;
  padding: 1rem 2rem;
  font-weight: bold;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: white;
  background-color: #45ae38;
  border: none;
  border-radius: 50px;
}

.btn-round:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

@media  (min-width: 100px) {
  .card:after {
    transform: translateY(0);
  }

  .content-one {
    transform: translateY(calc(100% - 1rem));
  }

  .content-one > *:not(.title-one) {
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.8s ease;
  }

  .card:hover,
  .card:focus-within {
    align-items: center;
  }

  .card:hover:before,
  .card:focus-within:before {
    transform: scale(125%);
  }

  .card:hover:after,
  .card:focus-within:after {
    transform: translateY(-24%);
    height: 250%;
  }

  .card:hover .content-one,
  .card:focus-within .content-one {
    transform: translateY(0);
  }

  .card:hover .content-one > *:not(.title-one),
  .card:focus-within .content-one > *:not(.title-one) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
  }

  .card:focus-within:before,
  .card:focus-within:after,
  .card:focus-within .content-one,
  .card:focus-within .content-one > *:not(.title-one) {
    transition-duration: 0s;
  }
}

@media (min-width: 991px) {
  .card:hover .title-one {
    font-size: 1.4rem;
  }
}
