/* General Styles */
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f4f7fb;
}

h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 3rem;
  text-align: center;
  margin: 0.6rem 0;
  color: #333;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

/* Books Section */
.books-section {
  padding: 3rem 4rem;
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #f0f4f8);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  transition: transform 0.3s ease;
}

/* Book Card Styles */
.book-card {
  position: relative;
  /* background-color: #fff; */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
  border: 4px solid rgb(149, 148, 148);
}

.book-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}
.book-card {
  display: flex;
  align-items: center;
  flex-direction: column;
}
.book-card img {
  width: 140%;
  /* height: 320px; */
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.book-card:hover img {
  /* opacity: 0.85; */
}

.book-info {
  /* padding: 1rem; */
  text-align: center;
}

.book-info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: #333;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.book-info h3:hover {
  color: #f26c4f;
}

.book-info p {
  font-size: 1rem;
  color: #777;
  line-height: 1.5;
  font-weight: 400;
  transition: color 0.3s ease;
}

.book-info p:hover {
  color: #f26c4f;
}

/* Hover Effects */
/* .book-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
} */

/* .book-card:hover::after {
  opacity: 1;
} */

/* Footer */
.footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 2.1rem;
  font-size: 1rem;
  font-family: "Roboto", sans-serif;
}

.footer p {
  margin: 0;
  font-weight: 500;
  text-transform: uppercase;
}

/* Responsive Design */
@media (max-width: 1024px) {
  h2 {
    font-size: 2.8rem;
  }

  .book-card img {
    height: 280px;
  }

  .book-info h3 {
    font-size: 1.3rem;
  }

  .book-info p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }
  h2 {
    font-size: 2rem;
  }

  .book-card {
    width: 90%;
    height: auto; /* Allow height to adjust automatically */
    background-color: transparent;
    /* box-shadow: none; */
    border: 3px solid rgb(149, 148, 148);
  }

  .book-card img {
    height: auto; /* Let the height be determined by the aspect ratio */
    max-height: 400px; /* Set a max height to avoid distortion */
  }
  .book-info {
    padding: 0;
  }
  .book-info h3 {
    font-size: 1.2rem;
  }

  .book-info p {
    font-size: 0.9rem;
  }
}

/* @media (max-width: 480px) {
  .books-section {
    padding: 3rem 1rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .book-card img {
    height: auto;
    max-height: 300px;
  }

  .book-info h3 {
    font-size: 1.1rem;
  }

  .book-info p {
    font-size: 0.8rem;
  }
} */

@media (max-width: 360px) {
  .book-card img {
    height: auto;
    max-height: 250px;
    object-fit: contain;
  }
}
