@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&display=swap");
.books-section {
position: relative;
padding: 114px 0px 160px 0px;
background-color: #FFFFFF;
font-family: "EB Garamond", serif;
}
.book-wrapper {
width: 900px;
position: relative;
justify-content: center;
margin: 0 auto;
column-count: 3;
column-gap: 30px;
padding: 4px;
}
.book-items {
position: relative;
cursor: default;
padding: 16px;
margin: 0;
display: grid;
break-inside: avoid;
}
.main-book-wrap {
position: relative;
}
.book-cover {
position: relative;
}
.book-cover .book-inside {
position: absolute;
width: 90%;
height: 96%;
top: 1%;
left: 16px;
border: 1px solid grey;
border-radius: 2px 6px 6px 2px;
background: white;
box-shadow: 10px 40px 40px -10px #00000030, inset -2px 0 0 grey,
inset -3px 0 0 #dbdbdb, inset -4px 0 0 white, inset -5px 0 0 #dbdbdb,
inset -6px 0 0 white, inset -7px 0 0 #dbdbdb, inset -8px 0 0 white,
inset -9px 0 0 #dbdbdb;
}
.book-cover .book-image {
line-height: 0;
position: relative;
border-radius: 2px 6px 6px 2px;
box-shadow: 6px 6px 18px -2px rgba(0, 0, 0, 0.2),
24px 28px 40px -6px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease-in-out;
transform: perspective(2000px) rotateY(-15deg) translateX(-10px) scaleX(0.94);
cursor: pointer;
}
.booksec-title{
position: relative;
padding-bottom: 100px;
color: #2C2D2A;
}
.booksec-title h3{
font-family: "EB Garamond", serif;
font-size: 100px;
font-weight: 400;
line-height: 1em;
transition-delay: 0.3s;
}
.booksec-title .subtitle{
font-family: "EB Garamond", serif;
font-weight: 400;
font-size: 32px;
margin-top: 14px;
margin-bottom: 60px;
transition-delay: 0.4s;
}
.book-description {
flex: 1;
/* Allows text to take space on the left /
max-width: 300px;
/ Set max width for text */
}
.book-description h3 {
font-size: 31px;
font-family: "EB Garamond", serif;
font-style: italic;
margin-bottom: 14px;
transition-delay: 0.2s;
}
.book-description p {
font-size: 14px;
line-height: 1.5;
margin-bottom: 24px;
letter-spacing: -0.01em;
transition-delay: 0.3s;
}
.book-image img {
grid-row: 1 / -1;
grid-column: 1;
width: 100%;
border-radius: 2px 6px 6px 2px;
}
.book-image:hover {
transform: perspective(2000px) rotateY(0deg) translateX(0px) scaleX(1);
transform-style: preserve-3d;
box-shadow: 6px 6px 12px -1px rgba(0, 0, 0, 0.1),
20px 14px 16px -6px rgba(0, 0, 0, 0.1);
}
.effect {
position: absolute;
width: 20px;
height: 100%;
margin-left: 16px;
top: 0;
border-left: 2px solid #00000010;
background-image: linear-gradient(90deg,
rgba(255, 255, 255, 0.2) 0%,
rgba(255, 255, 255, 0) 100%);
transition: all 0.5s ease;
z-index: 5;
}
.book-cover .light {
width: 90%;
height: 100%;
position: absolute;
border-radius: 3px;
background-image: linear-gradient(90deg,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 0.2) 100%);
top: 0;
right: 0;
opacity: 0.1;
transition: all 0.5s ease;
z-index: 2;
}
.book-image:hover .effect {
margin-left: 14px;
}


/** RESPONSIVE CSS **/

@media only screen and (max-width: 767px) {
  .book-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center books horizontally */
    padding: 0 10px;
    column-count: initial; /* Disable columns */
  }

  .book-items {
    width: 100%;
    padding-bottom: 40px;
    text-align: center;
    overflow: visible;
  }

  .book-cover {
    display: inline-block;
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
  }

  /* Keep your existing .book-image, .book-description, etc. */
}

/* Mobile Devices */
@media only screen and (max-width: 767px) {
  .book-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .book-items {
    width: 100%;
    max-width: 360px; /* Prevents images from being too wide */
    margin: 0 auto;
    padding-bottom: 40px;
    text-align: center;
    overflow: visible;
    box-sizing: border-box;
  }

  .book-cover {
    width: 100%;
    max-width: 100%;
    display: block;
    margin: 0 auto;
  }

  .book-image img {
    width: 100%;
    height: auto;
    display: block;
  }

  .book-cover .book-image {
    transform: none;
    box-shadow: 4px 4px 12px -2px rgba(0, 0, 0, 0.15);
  }
}

/* Smaller Mobile Devices */
@media only screen and (max-width: 480px) {
   /* ... 480px styles ... */
   .booksec-title h3 { font-size: 36px; }
   .booksec-title .subtitle { font-size: 18px; }
   .book-cover { width: 90%; }
}