/* Import fonts */
@import url('https://fonts.googleapis.com/css?family=Indie+Flower');
@import url('https://fonts.googleapis.com/css?family=Amatic+SC');

/* Apply handwriting fonts ONLY inside the book */
.card .details p {
  font-family: 'Indie Flower', cursive;
  font-size: 15px;
  line-height: 20px;
  transform: rotate(-10deg);
  padding: 0 0 0 20px;
}

.card .details h4 {
  font-family: 'Amatic SC', cursive;
  font-size: 26px;
  line-height: 1.2;
  text-align: center;
}

  h4 {
    font-size: 26px;
    line-height: 1.2;
    font-family: 'Amatic SC', cursive !important;
  }

  .color1 { color: #1BBC9B; }
  .color2 { color: #C0392B; }

  /* Book wrapper for responsiveness */
  .book-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
  }

  .card {
    position: relative;
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 4;
    background: #e0e1dc;
    transform-style: preserve-3d;
    transition: 1s;
    box-shadow: inset 100px 0 50px rgba(0,0,0,.3),
                10px 0 30px rgba(0,0,0,.3);
    border-radius: 6px;
  }

  .card:hover {
    transform: rotate(15deg) scale(1.1);
    box-shadow: inset 20px 0 50px rgba(0,0,0,.4),
                0 10px 50px rgba(0,0,0,.5);
  }

  .card:before {
    content:'';
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    background: #BAC1BA;
    transform: skewX(-45deg);
  }

  .card:after {
    content:'';
    position: absolute;
    top: 0;
    right: -5px;
    width: 5px;
    height: 100%;
    background: #92A29C;
    transform: skewY(-45deg);
  }

  .card .imgBox {
    width: 100%;
    height: 100%;
    position: relative;
    transform-origin: left;
    transition: .7s;
    overflow: hidden;
    border-radius: 6px;
  }

  .card .imgBox img {
    width: 100%;
    height: 100%;
    object-fit: fill;
  }

  .card .bark {
    position: absolute;
    background: #e0e1dc;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: .7s;
  }

  .card:hover .imgBox {
    transform: rotateY(-135deg);
  }

  .card:hover .bark {
    opacity: 1;
    transition: .6s;
    box-shadow: inset 200px 200px 80px rgba(0, 0, 0, .3);
  }

  /* RESTORED ORIGINAL INNER CONTENT STYLE */
  .card .details {
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    padding: 0 0 0 10px;
    z-index: -1;
    margin-top: 70px;
  }

  .card .details p {
    font-size: 15px;
    line-height: 5px;
    transform: rotate(-10deg);
    padding: 0 0 0 20px;
  }

  .card .details h4 {
    text-align: center;
  }

  .text-right { text-align: right; }

  /* Responsive Fixes */
  @media (max-width: 768px) {
    .card { max-width: 240px; }
    .card .details { margin-top: 50px; }
  }

  @media (max-width: 576px) {
      .card:hover .imgBox {
    transform: rotateY(-95deg);
  }
    .card { max-width: 220px; }
    .card .details p { font-size: 13px; }
    .card .details { margin-top: 10px; }
  }


  
