@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap");

* {
  box-sizing: border-box;
}

.flipcard {
  width: 100%;
  height: 570px;
  perspective: 1500px;
  .content {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.75, 0, 0.85, 1);
  }
}

.more {
  display: none;

  &:checked ~ .content {
    transform: rotateY(180deg);
  }
}

.front,
.back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  border-radius: 16px;

  .inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5em;
    transform: translateZ(80px) scale(0.94);
  }
}

.front {
  display: flex;
  justify-content: end;
  align-items: end;
  background-color: #fff;
  background-size: cover;
  background-position: center center;
  &:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 16px;
    backface-visibility: hidden;
  }

  h2 {
    grid-row: 2;
    margin-bottom: 0.3em;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  }

  .rating {
    grid-row: 3;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    display: flex;
    flex-flow: row nowrap;
    i {
      margin: 0 1px;
    }
  }
}

.back {
  transform: rotateY(180deg);
  background-color: #0350c9;
  border: 2px solid rgb(240, 240, 240);

  .info {
    position: relative;
    display: flex;
    align-items: center;
    color: #000;
    grid-row: 3;
    &:not(:first-of-type):before {
      content: "";
      position: absolute;
      left: -0.9em;
      height: 18px;
      width: 1px;
      background-color: #ccc;
    }
    span {
      font-size: 2em;
      font-weight: 700;
    }
    i {
      &:before {
        background: linear-gradient(40deg, #000, rgb(67, 138, 243));

        -webkit-text-fill-color: transparent;
        -webkit-background-clip: text;
      }
      font-size: 1.2em;
    }
    .icon {
      margin-left: 0.3em;
      span {
        display: block;
        margin-top: -0.25em;
        font-size: 0.8em;
        font-weight: 600;
        white-space: nowrap;
      }
    }
  }

  .description {
    grid-row: 5;
    grid-column: 1/-1;
    font-size: 0.86em;
    border-radius: 5px;
    font-weight: 600;
    line-height: 1.4em;
    overflow: auto;
    color: #fff;
    padding-right: 10px;
  }

  .location,
  .price {
    color: #fafafa;
    font-family: "Plus Jakarta Sans";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
  }

  .price {
    grid-column: 3/-1;
    justify-self: right;
  }

  .button {
    grid-column: 1/-1;
    justify-self: center;
  }
}

.fbutton {
  cursor: pointer;
  display: flex;
  padding: 0 1.5em;
  height: 3em;
  line-height: 2.9em;
  min-width: 3em;
  background-color: transparent;
  border: solid 2px #fff;
  color: #fff;
  border-radius: 12px;
  text-align: center;
  transition: 0.3s ease-in-out;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.3);

  &:hover {
    background-color: #fff;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    text-shadow: none;
    color: #000;
  }

  &.return {
    line-height: 3em;
    color: #000;
    border-color:white;
    text-shadow: none;
    display: flex;
    &:hover {
      background-color: white;
      color: #0350c9;
      box-shadow: none;
    }
  }
}

.flipcard-ol-top {
  color: #dedede;
  font-family: "Plus Jakarta Sans";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 250%;
}

.flipcard-ol-bottom {
  color: #dedede;
  font-family: "Plus Jakarta Sans";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 250%;
  display: -webkit-box;
  -webkit-line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: nowrap;
  -webkit-box-direction: normal;
  -webkit-box-orient: vertical;
  padding-top: 16px;
}

.flipcard-ol-bottom {
    h1 {
        font-size: 24px;
    },

    ol {
        font-size: 16px;
    }
}

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: lighten(#000, 20%);
}
::-webkit-scrollbar-thumb:hover {
  background: #000;
}

.flipcard-readmore {
  border-radius: 8px;
  border: 1.5px solid #fff;
  background-color: transparent;
  width: 100%;
  height: 100%;
  color: #fff;
  font-family: "Plus Jakarta Sans";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  transition: all 200ms ease-in-out;
  &:hover {
    background-color: #fff;
    color: #0350c9;
    transition: all 200ms ease-in-out;
  }
}
