'Flip Card Hover not working in css html in safari (specifically on phone)

I am using a wordpress to create a site, I create some nice code for a flip card. It works fine in most browsers and even android phones. However when opening in safari on Iphone it wont work as intended. Could somebody suggest something?

HTML CODE

<div class="flip-card2">
 <div class="flip-card-inner2">
   <div class="flip-card-front2">
       <img src="image_url">
       <div class="center_image_text2">
           <p style="text-align:center;">My Title of card</p>
       </div>
   </div>
   <div class="flip-card-back2">
       <div onclick="" class="center_image_text2">
           <p style="text-align:center;">My Title of card</p>
           <button onclick="location.href='url_to'">Read more</button>
       </div>
   </div>
 </div>
</div>

CSS

.flip-card2 {
  background-color: transparent;
  width: 100%;
  height: 25rem;
  perspective: 1000px;
}

.flip-card-inner2 {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card2:hover .flip-card-inner2 {
  transform: rotateX(180deg);

}


.flip-card-front2, .flip-card-back2 {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 0px;
}



.flip-card-front2 img{
    border-radius: 0px;
        width: 100%;
        height: 100%;
    
}

.flip-card-back2 {
  background-color: #224d8e;
  color: white;
  transform: rotateX(180deg);
}
.center_image_text2 {
  width: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.6rem;
}

.center_image_text2 button{
    transition-duration: 0.3s;
    padding: 10px;
        padding-bottom: 14px;
        height: 55px;
    letter-spacing: 2.5px;
    color: white;
    border-color: white;
    background-color: transparent;
    border-radius: 20px;
    font-size: 22px;
        border: 2px solid white;
}

.center_image_text2 button:hover {
    border-color: black;
    color: white;
    background-color: black;
}

I have tried a few things but nothing seemed to work, I hope somebody with a fresh look could help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source