/*
 * Books page styles for Safer Choices
 * Save as /css/books.css
 */

.books-hero {
  position: relative;
  width: 100%;
  height: 460px;
  overflow: hidden;
  background: #cfd7da;
}

.books-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.books-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(16, 38, 56, 0.76) 0%,
    rgba(16, 38, 56, 0.42) 48%,
    rgba(16, 38, 56, 0.10) 100%
  );
}

.books-hero-copy {
  position: absolute;
  left: max(28px, calc((100% - var(--max-width)) / 2 + 28px));
  top: 50%;
  transform: translateY(-50%);
  width: min(620px, 75%);
  color: #fff;
}

.books-hero-copy .eyebrow {
  color: #fff;
}

.books-hero-copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 6vw, 70px);
  font-weight: 500;
  line-height: 1.02;
}

.books-intro {
  max-width: 930px;
  margin: 58px auto 0;
  padding: 0 28px;
}

.books-intro h2 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.15;
}

.books-intro p {
  margin: 0 0 22px;
  color: #314355;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.7;
}

.books-grid {
  max-width: var(--max-width);
  margin: 54px auto 80px;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch;
}

.book-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(28, 46, 59, 0.06);
}

.book-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--cream);
}

.book-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-content {
  padding: 28px;
}

.book-content h2 {
  margin: 0 0 5px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
}

.book-author {
  margin: 0 0 18px !important;
  color: var(--gold) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.book-content p {
  margin: 0 0 18px;
  color: #40515f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
}

.book-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .books-grid {
    grid-template-columns: 1fr 1fr;
  }

  .books-hero {
    height: 400px;
  }
}

@media (max-width: 650px) {
  .books-hero {
    height: 350px;
  }

  .books-hero-copy {
    left: 18px;
    width: calc(100% - 36px);
  }

  .books-hero-copy h1 {
    font-size: 42px;
  }

  .books-intro,
  .books-grid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .books-intro p {
    font-size: 18px;
  }

  .books-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .book-content {
    padding: 24px;
  }
}
