/*: Desktop + iPads landscape (768px) */
.letter-container {
  /* margin: 2.5em auto; */
  margin: 0.5em auto;
  display: flex;
  justify-content: center;
  font-weight: 300;
  width: 100%;
  caret-color: transparent; /* esconde el color del cursor */
}

.letter {
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transform-style: preserve-3d;
  transform: perspective(2000px);
  transition: 1s;

  min-width: 31.3rem;
  min-height: 37.5rem;
}

.letter:hover {
  transform: perspective(2000px) rotate(-3deg);
}

.letter .imgBox {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  transform-origin: left;
  z-index: 1;
  transition: 1s;
}

.letter:hover .imgBox {
  transform: rotateY(-135deg);
}

.letter .imgBox img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.letter .letter-details {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  padding: 0.625rem;
  background-color: var(--theme-color);
  color: var(--text-color);
}

.letter .letter-details h3 {
  text-align: center;
  font-size: 1.1em;
  padding: 0.25em 0 0.25em 0;
  margin: 0;
  font-weight: bold;
  font-style: normal;
}

.letter .letter-details p {
  text-align: justify;
  margin: 0.6em auto;
  line-height: 1.5;
  letter-spacing: 0.2px;
  padding: 0px 0.6em;
  font-size: 0.82em;
  font-family: var(--font-coverLetter);
  font-weight: normal;
}

/* .letter .letter-details p span {
  background-color: var(--text-color-small);
  color: var(--white-color);
} */

.letter .letter-details p a {
  color: var(--boton-contact-color);
}

.letter .letter-details p a.xxx {
  background-color: var(--background-boton-color);
  border-radius: 5px;
  padding: 0.25em 0.8em;
}

.letter .letter-details p span a:hover {
  text-decoration: underline;
  cursor: pointer;
  filter: brightness(130%);
  opacity: 0.5;
  color: var(--white-color);
}

.letter .letter-details p a.btn-coverLetter {
  display: inline-block;
  background-color: var(--background-boton-color);
  color: var(--boton-contact-color);
  box-shadow: -10px 20px 35px rgba(0, 0, 0, 0.15);
  border: none;
  font-size: 1em;
  font-weight: bold;
  border-radius: 5px;
  padding: 0.25em 0.8em;
  margin: 0.5em 1em;
  text-align: center;
  cursor: pointer;
  transition: 0.5s;
}

.letter .letter-details p a.btn-coverLetter:hover {
  filter: brightness(130%);
  opacity: 0.5;
  color: var(--white-color);
}

@keyframes moverImg {
  0% {
    transform: translate(100%);
  }
}

/*: Smartphones */
@media screen and (max-width: 500px) {
  /* .coverLetter {
    padding-top: 6em;
  } */
  .coverLetter {
    padding-bottom: 1em;
  }
  .letter {
    min-height: 40rem;
  }
  .letter:hover {
    transform: perspective(2000px) rotate(0deg);
  }

  .letter .imgBox img {
    width: 80%;
    position: absolute;
    top: 0;
    left: 10%;
  }
  .letter .letter-details {
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
  }
}
/*: Smartphone Samsung J2 & minimum viewport for Desktop   */
@media screen and (min-width: 499px) and (max-width: 767px) {
  .letter .letter-details h3 {
    padding: 0.25em 0 0.25m 0;
    margin: 0;
    font-weight: bold;
    font-style: normal;
  }
  .letter .letter-details p {
    margin: 0.6em 20px 0;
  }
  .letter:hover {
    transform: perspective(2000px) rotate(0deg);
  }
}

/*: Smartphone iPhone 6/7/8 Plus  */
@media only screen and (max-width: 414px) {
  .letter {
    min-width: 414px;
    min-height: 850px;
  }
  .letter:hover {
    transform: perspective(2000px) rotate(0deg);
  }
  .letter .imgBox img {
    width: 90%;
    position: absolute;
    top: 0;
    left: 6%;
  }
  .letter .letter-details {
    position: absolute;
    top: 0;
    left: 4%;
    right: 4%;
  }
}

/*: Smartphone Galaxy S5  */
@media only screen and (max-width: 360px) {
  .letter {
    min-width: 360px;
    /* min-height: 880px; */
    min-height: 100vh;
    height: 950px;
  }
  .letter .imgBox img {
    width: 90%;
    position: absolute;
    top: 0;
    left: 6%;
  }
  .letter .letter-details {
    position: absolute;
    top: 0;
    left: 4%;
    right: 4%;
  }
}

/*: Smartphone iPhone X  */
@media only screen and (max-width: 375px) {
  .letter {
    min-width: 375px;
    /* min-height: 850px; */
    min-height: 100vh;
    height: 950px;
  }
  .letter .imgBox img {
    width: 90%;
    position: absolute;
    top: 0;
    left: 8%;
  }
  .letter .letter-details {
    position: absolute;
    top: 0;
    left: 4%;
    right: 4%;
  }
}
