.flip-box {
  display: flex;
  align-content: stretch;
  min-height: 200px;
  flex-wrap: wrap;
  position: relative;
  border: 10px solid transparent;
  padding:0;
  border-top: 0;  
  -webkit-perspective: 1000;
          perspective: 1000;
  
  &:hover {
    .back {
        transform: rotateY(0deg);
        z-index: 10;
    }
    
    .front {
        transform: rotateY(180deg);
      z-index: -1;
    }
    
}

}

.back, .front {
    position: relative;
    background-color: #1b2d61;
    color: white;
    display: flex;
    justify-content: center;
    align-content: center;
    flex: 0 0 100%;
    -webkit-transition: all 1s cubic-bezier(.5,1,.5,1);
    transition: all 1s cubic-bezier(.5,1.3,.5,1.3);
    transform-style: preserve-3d;
    background-size: cover;
    background-position: center;
  }

  
  .back {
    background: #7D1E19;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: -1;
    transform: rotateY(-180deg);
    
    &:after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 30px;
      height: 30px;
      border: 15px solid transparent;
      border-bottom-color: #f2f4f5;
      border-left-color: #f2f4f5;
      background: #1D1E46;
    }
}

.front {
    z-index: 10;
    &::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
    }
    .content {
        font-size: 2rem;
        position: relative;
        z-index: 2;
    }
    
    &:after {
      content: "";
      position: absolute;
      bottom: 0;
      right: 0;
      width: 30px;
      height: 30px;
      border: 15px solid #7D1E18;
      border-bottom-color: #f2f4f5;
      border-right-color: #f2f4f5;
      background: #7D1E18;
    }
}

.content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    -webkit-transform: translateZ(50px);
    transform: translateZ(50px);
    text-shadow: 0px 0px 2px black;
    color: #ffffff;
    line-height: 1.2;
    font-size: 20px;
  }

/* Tablet: 2 por linha */
@media (max-width: 767px) {
  .front .content { font-size: 1.6rem; }
}

/* Celular: 1 por linha, card mais alto e fonte ajustada */
@media (max-width: 575px) {
  .flip-box { min-height: 180px; }
  .front .content { font-size: 1.5rem; }
}
