body {
  color: #333;
  font-family: Arial, Helvetica, serif;
  font-weight: normal;
  margin: 0;
  padding: 0;
  background: url(https://josetxu.com/img/fondo_blanco.png) repeat 0 0 #fff;
}

.cardBox {
  float: left;
  width: 23.7%;
  font-size: 1.2em;
  margin: 1% 0 0 1%;
  perspective: 800px;
  transition: all 0.3s ease 0s;
}

.cardBox:hover .flip-card {
  transform: rotateY( 180deg);
}

.flip-card {
  background: #222;
  cursor: default;
  height: 300px;
  transform-style: preserve-3d;
  transition: transform 0.4s ease 0s;
  width: 100%;
  -webkit-animation: giro 1s 1;
  animation: giro 1s 1;
}

.flip-card p {
  margin-bottom: 1.8em;
}

.flip-card .back{
  backface-visibility: hidden;
  box-sizing: border-box;
  color: white;
  display: block;
  font-size: 1.2em;
  height: 100%;
  padding: 0.8em;
  position: absolute;
  text-align: center;
  width: 100%;
}
.flip-card .front{
  backface-visibility: hidden;
  box-sizing: border-box;
  color: white;
  display: block;
  font-size: 1.2em;
  height: 100%;
  padding: 0.8em;
  position: absolute;
  text-align: center;
  width: 100%;
}
.flip-card .front strong {
  background: #fff;
  border-radius: 100%;
  color: #222;
  font-size: 1.5em;
  line-height: 30px;
  padding: 0 7px 4px 6px;
}

.flip-card .back {
  transform: rotateY( 180deg);
}

.flip-card .back a {
  padding: 0.3em 0.5em;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 1px;
  font-size: 0.9em;
  transition: all 0.2s ease 0s;
}

.flip-card .back a:hover {
  background: #fff;
  color: #333;
  text-shadow: 0 0 1px #333;
}

.cardBox:nth-child(1) .flip-card .front{
  background-image: url('img/riego.png');
  background-size: cover;
  background-position: center;
}
.cardBox:nth-child(2) .flip-card .front{
  background-image: url('img/cultivos.png');
  background-size: cover;
  background-position: center;
}
.cardBox:nth-child(3) .flip-card .front{
  background-image: url('img/monitoreo.png');
  background-size: cover;
  background-position: center;
}
.cardBox:nth-child(4) .flip-card .front{
  background-image: url('img/implement.png');
  background-size: cover;
  background-position: center;
}
.cardBox:nth-child(1) .flip-card .back {
  background: #294a23;
}

.cardBox:nth-child(2) .flip-card .back {
  background: #999145;
}

.cardBox:nth-child(3) .flip-card .back {
  background: #294a23;
}

.cardBox:nth-child(4) .flip-card .back {
  background: #999145;
}

.cardBox:nth-child(2) .flip-card {
  -webkit-animation: giro 1.5s 1;
  animation: giro 1.5s 1;
}

.cardBox:nth-child(3) .flip-card {
  -webkit-animation: giro 2s 1;
  animation: giro 2s 1;
}

.cardBox:nth-child(4) .flip-card {
  -webkit-animation: giro 2.5s 1;
  animation: giro 2.5s 1;
}

.flip-card .front {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
}

.flip-card .front::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.flip-card .front h3,
.flip-card .front strong {
  position: relative;
  z-index: 2;
}

.flip-card .back {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: absolute;
  inset: 0;
  padding: 1rem;
}
.flip-card .front h3 {
  font-size: 1.2rem;
}

.flip-card .back p {
  font-size: 1rem;
}

/* tablet */
@media (max-width: 768px) {
  .flip-card .front h3 {
    font-size: 1rem;
  }
  .flip-card .back p {
    font-size: 0.9rem;
  }
}

/* celular */
@media (max-width: 480px) {
  .flip-card .front h3 {
    font-size: 0.85rem;
  }
  .flip-card .back p {
    font-size: 0.75rem;
  }

  .flip-card .front strong {
    font-size: 1rem;
  }
}

@-webkit-keyframes giro {
  from {
    transform: rotateY( 180deg);
  }
  to {
    transform: rotateY( 0deg);
  }
}

@keyframes giro {
  from {
    transform: rotateY( 180deg);
  }
  to {
    transform: rotateY( 0deg);
  }
}

@media screen and (max-width: 767px) {
  .cardBox {
    margin-left: 2.8%;
    margin-top: 3%;
    width: 46%;
  }
  .flip-card {
    height: 285px;
  }
  .cardBox:last-child {
    margin-bottom: 3%;
  }
}

@media screen and (max-width: 480px) {
  .cardBox {
    width: 94.5%;
  }
  .flip-card {
    height: 260px;
  }
}

/*BOTON*/
.btn-flotante {
  position: fixed;
  left: 50px;       
  top: 56%;    
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: #0d1f14;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  text-decoration: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 9999;
  transition: 0.3s ease;
}

.btn-flotante:hover {
  background: #234a33;
  transform: translateY(-50%) scale(1.1);
}