/* ===== Books Page (Theme-matched) ===== */

.books-container{
  width: min(1140px, calc(100% - 32px));
  margin-inline: auto;
}

/* HERO */
.books-hero{
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* header overlay safe */
  padding: 140px 0 90px;
}

.books-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.18));
}

.books-hero .books-container{
  position: relative;
  z-index: 1;
}

.books-hero-kicker{
  margin: 0 0 12px 0;
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 700;
}

.books-hero-title{
  margin: 0;
  font-size: 64px;
  font-weight: 900;
  line-height: 1.05;
  color: #fff;
}

.books-hero-sub{
  margin: 14px 0 0 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,.78);
}

/* SECTIONS */
.books-sec{ padding: 80px 0; }

.books-sec--list{ background: #ffffff; }

/* Book item */
.book-row{
  row-gap: 22px;
  align-items: center;
}

.book-cover{
  background: #f3f6fb;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 22px 55px rgba(16,19,25,.10);
  position: relative;
}

.book-cover img{
  width: 100%;
  display: block;
  border-radius: 16px;
  object-fit: cover;
}

.book-cover--soon img{
  opacity: .92;
  filter: grayscale(.15);
}

.book-soon-badge{
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  background: rgba(16,19,25,.90);
  color: #fff;
}

.book-kicker{
  margin: 0 0 10px 0;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(16,19,25,.60);
}

.book-title{
  margin: 0 0 12px 0;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.15;
  color: #101319;
}

.book-muted{
  font-weight: 700;
  color: rgba(16,19,25,.55);
}

.book-text{
  margin: 0 0 14px 0;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(16,19,25,.72);
}

.book-text--muted{
  color: rgba(16,19,25,.60);
}

.book-subhead{
  margin: 14px 0 10px 0;
  font-weight: 900;
  color: #101319;
}

.book-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Pills */
.book-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;

  background: #eef2f6;
  color: #101319;
  border: 1px solid rgba(16,19,25,.10);
}

.book-pill:hover{
  background: #e5eaf1;
}

.book-pill--primary{
  background: linear-gradient(135deg, #101319, #2b313c);
  color: #fff;
  border-color: rgba(255,255,255,.10);
}

.book-pill--primary:hover{
  background: linear-gradient(135deg, #0f1218, #252b35);
}

/* Divider line between books */
.book-divider{
  height: 1px;
  background: rgba(16,19,25,.10);
  margin: 40px 0;
}

/* ===== Featured Grid (theme matched) ===== */
.books-sec--grid{
  color: #fff;
  background: linear-gradient(135deg, #101319, #17202b, #2b313c);
  padding: 90px 0;
}

.grid-kicker{
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: rgba(255,255,255,.70);
}

.grid-title{
  margin: 10px 0 8px 0;
  text-align: center;
  font-size: 44px;
  font-weight: 900;
  line-height: 1.12;
}

.grid-sub{
  margin: 0 0 30px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.70);
}

.grid-row{
  row-gap: 18px;
}

/* Card */
.grid-card{
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 18px 55px rgba(0,0,0,.25);
  text-decoration: none;
  color: #fff;
  aspect-ratio: 3 / 5;
}

.grid-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: .92;
}

.grid-card::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.55));
}

.grid-tag{
  position: absolute;
  left: 14px;
  bottom: 46px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.12);
}

.grid-name{
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  font-size: 18px;
  font-weight: 900;
}

/* Ghost card (no image) */
.grid-card--ghost{
  display: grid;
  place-items: end start;
  padding: 14px;
}

.grid-card--ghost::after{ display:none; }
.grid-card--ghost .grid-tag,
.grid-card--ghost .grid-name{
  position: static;
}

.grid-card--ghost .grid-tag{ margin-bottom: 8px; }

.grid-card:hover{ transform: translateY(-2px); transition: transform .18s ease; }

/* Responsive */
@media (max-width: 991.98px){
  .books-hero-title{ font-size: 48px; }
  .books-hero{ padding: 120px 0 80px; min-height: 380px; }
  .books-sec{ padding: 65px 0; }
  .book-title{ font-size: 28px; }
  .grid-title{ font-size: 34px; }
}

@media (max-width: 575.98px){
  .books-container{ width: calc(100% - 22px); }
  .books-hero-title{ font-size: 38px; }
  .books-hero{ padding: 110px 0 70px; min-height: 340px; }
  .grid-title{ font-size: 28px; }
}