/*
 * books.css
 * Dr. Aprilia West — Books Page
 *
 * Covers: sticky book nav, book entry sections,
 *         cover layout, blurb quotes, reviews
 *         expand/collapse toggle.
 *
 * @package daw
 */

/* ─────────────────────────────────────────────
   STICKY BOOK NAVIGATION
   ───────────────────────────────────────────── */
.books-nav {
  background: var(--warm-white);
  padding: 0 var(--pad-x);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  position: sticky;
  top: 65px;
  z-index: 90;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  scrollbar-width: none;
}

.books-nav::-webkit-scrollbar {
  display: none;
}

.books-nav-item {
  font-family: var(--condensed);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 20px 24px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s;
  text-decoration: none;
  display: block;
}

.books-nav-item:hover {
  color: var(--text-dark);
}

.books-nav-item.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Scroll margin so sticky nav doesn't cover sections */
#book1, #book2, #book3, #book4 {
  scroll-margin-top: 130px;
}

/* ─────────────────────────────────────────────
   BOOK ENTRY SECTIONS
   ───────────────────────────────────────────── */
.book-entry {
  padding: 100px var(--pad-x);
}

.book-entry-inner {
  display: grid;
  gap: 80px;
  align-items: start;
}

.book-entry-inner.img-left {
  grid-template-columns: 2fr 3fr;
}

.book-entry-inner.img-right {
  grid-template-columns: 3fr 2fr;
}

/* Background variants */
.bg-warm { background: var(--warm-white); }
.bg-dark  { background: var(--black); }
.bg-off   { background: var(--off-white); }

/* ─────────────────────────────────────────────
   BOOK COVER
   ───────────────────────────────────────────── */
.book-cover-wrap {
  position: relative;
}

.book-cover-img {
  width: 100%;
  display: block;
}

.book-cover-img img {
  width: 100%;
  height: auto;
  display: block;
}

.book-cover-shadow {
  position: absolute;
  bottom: -20px;
  left: 10%; right: 10%;
  height: 40px;
  background: rgba(0,0,0,0.2);
  filter: blur(20px);
  border-radius: 50%;
}

/* ─────────────────────────────────────────────
   BOOK TEXT COLUMN
   ───────────────────────────────────────────── */
.book-num {
  font-family: var(--serif);
  font-size: 96px;
  font-weight: 300;
  line-height: 0.8;
  color: rgba(184,150,90,0.12);
  margin-bottom: 12px;
}

.bg-dark .book-num {
  color: rgba(184,150,90,0.08);
}

.book-title {
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.book-title em         { font-style: italic; color: var(--gold); }
.book-title-light      { color: var(--off-white); }
.book-title-light em   { color: var(--gold-light); }

.book-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  font-weight: 300;
  color: var(--text-light);
  margin-bottom: 28px;
  line-height: 1.5;
}

.book-subtitle-light {
  color: rgba(245,242,236,0.45);
}

.book-desc {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 18px;
}

.book-desc-light {
  color: rgba(245,242,236,0.6);
}

.bg-dark .book-desc {
  color: rgba(245,242,236,0.6);
}

.book-type-badge {
  display: inline-block;
  font-family: var(--condensed);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid rgba(184,150,90,0.3);
  color: var(--gold);
  margin-bottom: 20px;
}

/* ─────────────────────────────────────────────
   BLURB QUOTES
   ───────────────────────────────────────────── */
.book-blurbs {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book-blurb {
  padding: 16px 20px;
  background: rgba(184,150,90,0.04);
  border-left: 2px solid var(--border);
  transition: border-color 0.25s;
}

.book-blurb-dark {
  background: rgba(255,255,255,0.03);
  border-left: 2px solid rgba(184,150,90,0.12);
}

.book-blurb:hover,
.book-blurb-dark:hover {
  border-left-color: var(--gold);
}

.book-blurb-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  font-weight: 300;
  color: var(--text-dark);
  line-height: 1.55;
  margin-bottom: 8px;
}

.book-blurb-text-light {
  color: rgba(245,242,236,0.75);
}

.book-blurb-attr {
  font-family: var(--condensed);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.book-blurb-role {
  font-family: var(--condensed);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-top: 3px;
}

.book-blurb-role-light {
  color: rgba(245,242,236,0.6);
}

/* ─────────────────────────────────────────────
   REVIEWS EXPAND / COLLAPSE
   ───────────────────────────────────────────── */
.reviews-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--condensed);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color 0.25s;
}

.reviews-toggle:hover {
  color: var(--gold);
}

.reviews-toggle-light {
  color: rgba(245,242,236,0.35);
}

.reviews-toggle-light:hover {
  color: var(--gold-light);
}

.toggle-icon {
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s, background 0.25s;
  flex-shrink: 0;
}

.reviews-toggle.open .toggle-icon {
  transform: rotate(45deg);
}

.reviews-extra {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.16,1,0.3,1);
}

.reviews-extra.open {
  max-height: 4000px;
}

/* ─────────────────────────────────────────────
   CTA ROW
   ───────────────────────────────────────────── */
.book-cta-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .books-nav {
    padding: 0 var(--pad-x-md);
    top: 58px;
  }

  .book-entry {
    padding: 72px var(--pad-x-md);
  }

  .book-entry-inner.img-left,
  .book-entry-inner.img-right {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .book-entry-inner.img-right .book-cover-wrap {
    order: -1;
    max-width: 360px;
    margin: 0 auto;
  }

  .book-entry-inner.img-left .book-cover-wrap {
    max-width: 360px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .books-nav {
    padding: 0 var(--pad-x-sm);
    top: 55px;
  }

  .book-entry {
    padding: 56px var(--pad-x-sm);
  }

  .book-entry-inner.img-right .book-cover-wrap,
  .book-entry-inner.img-left .book-cover-wrap {
    max-width: 280px;
  }

  #book1, #book2, #book3, #book4 {
    scroll-margin-top: 110px;
  }
}
