/* Extra styles for «مكتبة الوعي الأنثوي» (maktaba.html). Shelf + book colours are in style.css. */

.topbar { position: static; }   /* scrolls away with the page (the main page's bar stays pinned) */
.topbar .stars { color: #ffd36b; }
.hero h1 { margin-top: 6px; }
.hero .lead { color: var(--ink); max-width: 360px; margin: 10px auto 0; line-height: 1.7; text-wrap: balance; }
.hero .lead b { color: var(--red); }
/* what the nine guides cover, as small tags */
.topics { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 6px; margin-top: 14px; }   /* 2 × 2 on phones */
.topics li { text-align: center; }
.topics li { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px 4px; font-size: 13px; font-weight: 800; line-height: 1.4; color: var(--ink); }
.hero .shelf-wrap { margin-top: 44px; }   /* room for the sticker under the lead line */

/* rating summary above the reviews (the other place is the top banner) */
.rating-sum { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -4px auto 4px; }
.rating-sum > b { font: 800 46px/1 var(--num); color: var(--red); }
.rating-sum div { display: grid; text-align: start; line-height: 1.5; font-size: var(--fs-sm); color: var(--muted); }
.rating-sum .stars { font-size: 21px; letter-spacing: 1px; }

/* "per guide" line under the price */
.per-line { font-size: var(--fs-sm); color: var(--muted); margin: -4px 0 16px; }
.per-line b { color: var(--ink); }

/* "updates by email": 4th item of the trust rows + note under the guides */
.books .to-main { color: inherit; text-decoration: none; }   /* still a link to the main page, no underline (user) */
.books .to-main:hover { color: var(--red); }
/* 4 trust items: 2 × 2, a divider only between the two items of a row */
.assure { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; row-gap: 8px; }
.assure li + li { border-inline-start: 0; }
.assure li:nth-child(even) { border-inline-start: 1px solid #e6bcc1; }

.updates {
  max-width: 520px; margin: 18px auto 0; padding: 14px 16px; text-align: center; line-height: 1.7; font-size: var(--fs-sm);
  color: var(--muted); border: 2px dashed var(--line); border-radius: 16px;
}
.updates b { display: block; color: var(--red); font-size: var(--fs-md); }

/* what's inside */
.group { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 28px 0 14px; font: 800 var(--fs-lg)/1.4 Tajawal, sans-serif; text-align: center; }
h2 + .group { margin-top: 0; }
.group span { font-size: var(--fs-xs); color: #fff; background: var(--red); border-radius: 99px; padding: 3px 10px 2px; white-space: nowrap; }
.group + .sub { margin-top: -8px; }
.books { display: grid; gap: 10px; max-width: 520px; margin: 0 auto; }
.books li { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); }
.books b { display: block; font-size: 16px; line-height: 1.5; }
.books p { font-size: var(--fs-sm); line-height: 1.6; color: var(--muted); margin-top: 2px; }
.books .tag { font: 800 11px/1 Tajawal, sans-serif; color: var(--red); background: var(--bg); border-radius: 99px; padding: 4px 8px 3px; white-space: nowrap; vertical-align: 2px; }
.mini {  /* small cover: hinge on the right like the big book */
  flex: none; width: 58px; aspect-ratio: 3 / 4.2; padding: 4px; border-radius: 2px 5px 5px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font: 700 11px/1.35 "Aref Ruqaa", var(--display); color: var(--t);
  background: linear-gradient(270deg, #00000030 0, #0000 6%, #ffffff2e 9%, #0000 13%), var(--c);
  box-shadow: -3px 4px 8px #0000002e;
}
.mini i { font: 800 5.5px/1 Tajawal, sans-serif; font-style: normal; letter-spacing: .2em; direction: ltr; opacity: .8; margin-bottom: 5px; }

/* buyers' reviews (from their emails): cards keep their own height, quote mark instead of stars */
.lib-reviews { align-items: flex-start; }
.lib-reviews blockquote { position: relative; padding-top: 30px; line-height: 1.75; font-size: var(--fs-sm); }
.lib-reviews blockquote::before { content: "”"; position: absolute; top: 2px; inset-inline-start: 16px; font: 800 44px/1 Georgia, serif; color: var(--red); opacity: .25; }

.offer-title { font: 700 26px/1.3 var(--display); color: var(--red); }
.offer-sub { font-size: var(--fs-sm); color: var(--muted); margin: 2px 0 14px; }

@media (max-width: 340px) {
  .shelf { --sh: 170px; }
  .spine { font-size: 12px; }
  .mini { width: 50px; }
}
@media (min-width: 860px) {
  .hero .lead { margin-inline: 0; max-width: 400px; }
  .hero .topics { display: flex; justify-content: flex-start; }   /* one row on desktop */
  .hero .shelf-wrap { grid-column: 2; grid-row: 1 / span 7; max-width: 440px; width: 100%; margin: 0 auto; }
  .hero .shelf { --sh: 300px; gap: 4px; }
  .hero .spine { flex-basis: calc(var(--w) * 1.3); font-size: 17px; }
  .hero .spine::after { font-size: 10px; bottom: 24px; }
  .hero .shelf-wrap .sticker { width: 96px; height: 96px; font-size: 16px; top: -30px; right: -18px; left: auto; }
  .books { max-width: 760px; grid-template-columns: 1fr 1fr; }
  .books li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .group + .sub { margin-bottom: 18px; }
  .lib-reviews { display: grid; grid-template-columns: 1fr 1fr; max-width: 760px; }
  .lib-reviews blockquote:first-child { grid-column: 1 / -1; }   /* 5 reviews: 1 wide + 2×2 */
}
