/* ═══════════════════════════════════════════════════════
   book-detail.css — Canonical book detail page components
   Depends on style.css + methode.css for custom properties
   and shared components (hero-gradient, methode-section,
   badge, tag, btn--contact, btn--outline-primary, ...).
   ═══════════════════════════════════════════════════════ */


/* ─── Breadcrumb (lives inside .hero-gradient, so white-on-colour) ─── */

.book-breadcrumb {
  margin-bottom: var(--space-md);
}

.book-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.book-breadcrumb__item {
  display: flex;
  align-items: center;
}

.book-breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.book-breadcrumb a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.book-breadcrumb__current {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.8rem;
  font-weight: var(--fw-semibold);
}

.book-breadcrumb__sep {
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0.45rem;
  font-size: 0.85rem;
}


/* ─── Single-cover hero variant ─── */

.book-single__cover {
  width: 280px;
  max-width: 70%;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  object-fit: cover;
  transform: rotate(-4deg);
  transition: transform 0.35s ease;
}

.hero-gradient__image:hover .book-single__cover {
  transform: rotate(0deg) scale(1.03);
}

.hero-gradient__text .book-detail__hook-lead {
  color: #ffffff;
  font-weight: var(--fw-bold);
}


/* ─── Roadmap section header (page-level, not accordion) ─── */

.book-detail__roadmap .methode-section__header {
  text-align: left;
  margin-bottom: var(--space-lg);
}


/* ─── Section rhythm on detail pages ───
   Detail pages stack plain .methode-sections on the same dot grid, so the
   default padding (7rem bottom + 7rem top) doubled into ~14rem of empty
   space between sections. Keep a single gap. */

.book-detail-page main > .methode-section + .methode-section {
  padding-top: 0;
}

.book-detail-page .book-detail__grid:last-child,
.book-detail-page .book-detail__roadmap:last-child {
  margin-bottom: 0;
}


/* ─── Fact box: "Praktische informatie" ─── */

.book-fact-box {
  max-width: 780px;
  margin: 0 auto;
}

.book-fact-box__prices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.book-fact-box__price-card {
  background: #ffffff;
  border: 1.5px solid #e0e0e0;
  border-radius: 16px;
  padding: var(--space-lg);
  text-align: center;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.book-fact-box__price-card:hover {
  border-color: #bbb;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.book-fact-box__price-label {
  display: block;
  font-size: 0.85rem;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
}

.book-fact-box__price-value {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: var(--fw-bold);
  color: var(--color-text);
  line-height: 1.1;
}

.book-fact-box__price-vat {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text-light);
}

.book-fact-box__price-note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--color-text-light);
  line-height: 1.4;
}

.book-fact-box__meta {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.book-fact-box__isbn {
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.book-fact-box__mono {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.book-fact-box__uitvoering {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.book-fact-box__badge {
  margin-top: 0.6rem;
}

.book-fact-box__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}


/* ─── Crossref card ─── */

.book-crossref-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-xl);
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-lg);
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.book-crossref-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
  border-color: rgba(3, 120, 141, 0.3);
}

.book-crossref-card__cover img {
  display: block;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.book-crossref-card__name {
  font-size: 1.2rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.book-crossref-card__badge {
  margin-left: 0.5rem;
  vertical-align: middle;
}

.book-crossref-card__subtitle {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
  margin-bottom: 0.6rem;
}

.book-crossref-card__desc {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.book-crossref-card__cta {
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
}


/* ─── Series slider: "Meer uit deze reeks" ─── */

.book-series-slider {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0.25rem var(--space-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary-light) transparent;
}

.book-series-slider::-webkit-scrollbar {
  height: 6px;
}

.book-series-slider::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: 4px;
}

.book-series-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 12px;
  transition: transform 0.25s ease;
}

.book-series-card:hover {
  transform: translateY(-4px);
}

.book-series-card__cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
}

.book-series-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-series-card__label {
  font-size: 0.9rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  text-align: center;
}

.book-series-card__badge {
  font-size: 0.7rem;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  background: #fff;
  border: 1px solid var(--color-primary-light);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  text-align: center;
  white-space: nowrap;
}

/* Top-aligned so the tile lines up with the covers, not with cover + label */
.book-series-card--overview {
  justify-content: flex-start;
}

.book-series-card--overview .book-series-card__overview-text {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: var(--space-sm);
  border-radius: 8px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
  font-size: 0.92rem;
  line-height: 1.4;
  transition: background 0.25s ease;
}

.book-series-card--overview:hover .book-series-card__overview-text {
  background: var(--color-primary);
  color: #ffffff;
}


/* ─── Flipbook placeholder ─── */

/* Overview links land on #flipbook; keep the section heading clear of the fixed header */
#flipbook {
  scroll-margin-top: calc(var(--header-height, 72px) + 7.5rem);
}

.flipbook-placeholder {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  border: 2px dashed rgba(3, 120, 141, 0.35);
  background: var(--color-primary-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  text-align: center;
  padding: var(--space-lg);
}

.flipbook-placeholder__cover {
  width: 120px;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  object-fit: cover;
}

.flipbook-placeholder__text {
  font-size: 0.95rem;
  color: var(--color-text-light);
  max-width: 320px;
  line-height: 1.6;
}


/* ─── Inkijkexemplaar (flipbook viewer) ───
   assets/flipbook in its light theme, tinted with the stream colours. Until
   js/inkijk.js loads it, the cover stands in at the same size. */

.inkijk__viewer {
  max-width: 1100px;
  /* Fits whole under the fixed header, toolbar included */
  height: clamp(460px, calc(100vh - var(--header-height) - 3rem), 760px);
  margin: 0 auto;
  border-radius: var(--card-border-radius);
  background: var(--color-primary-light);
  overflow: hidden;
}

/* Extra attribute selector: flipbook.css loads later and sets these on .fb[data-fb-theme="light"] */
.inkijk__viewer .fb[data-fb-theme] {
  --fb-bg: var(--color-primary-light);
  --fb-bar: #ffffff;
  --fb-fg: var(--color-text);
  --fb-focus: var(--color-primary);
  --fb-cta-bg: var(--color-primary);
  --fb-cta-fg: #ffffff;
  --fb-radius: var(--card-border-radius);
  --fb-font: var(--font-family);
}

/* Narrower viewers: the toolbar overflows. Drop the zoom slider first, then the
   +/- buttons on phones; pinch and double-tap still zoom */
@container (max-width: 879px) {
  .inkijk__viewer .fb-zoom-range {
    display: none;
  }
}

.inkijk__viewer .fb.is-compact .fb-zoom {
  display: none;
}

.inkijk__start {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  height: 100%;
  padding: var(--space-lg) var(--space-md);
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--color-text);
  cursor: pointer;
}

.inkijk__poster {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 100%;
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  object-fit: contain;
  transition: transform 0.3s var(--ease-out);
}

.inkijk__start:hover .inkijk__poster {
  transform: rotate(-2deg) scale(1.02);
}

.inkijk__start-label {
  flex: none;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: var(--fw-semibold);
}

.inkijk__viewer.is-loading .inkijk__start {
  cursor: progress;
}

.inkijk__viewer.is-loading .inkijk__start-label {
  opacity: 0.6;
}


/* ─── Flipbook "binnenkort" panel ───
   Solid white card (no text-shield). Left: a stack of loose pages behind
   the cover that fans open on hover, plus a round release stamp. Right:
   schedule, newsletter sign-up, LinkedIn nudge. */

.flipbook-soon {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  max-width: 980px;
  margin: 0 auto;
  background: #ffffff;
  border: 1.5px solid #e0e0e0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.flipbook-soon__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 55%),
    var(--color-primary-light);
}

.flipbook-soon__book {
  position: relative;
  width: 170px;
  aspect-ratio: 3 / 4;
}

.flipbook-soon__cover,
.flipbook-soon__page {
  position: absolute;
  inset: 0;
  border-radius: 6px 10px 10px 6px;
}

.flipbook-soon__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s var(--ease-out);
}

.flipbook-soon__page {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
}

/* Faint text lines on the loose pages */
.flipbook-soon__page::before {
  content: '';
  position: absolute;
  inset: 18% 14% 22% 18%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.07) 0 2px,
    transparent 2px 9px
  );
}

.flipbook-soon__page--1 { transform: translate(10px, 4px) rotate(4deg); }
.flipbook-soon__page--2 { transform: translate(20px, 8px) rotate(8deg); }
.flipbook-soon__page--3 { transform: translate(30px, 12px) rotate(12deg); }

.flipbook-soon:hover .flipbook-soon__page--1 { transform: translate(18px, 2px) rotate(7deg); }
.flipbook-soon:hover .flipbook-soon__page--2 { transform: translate(36px, 6px) rotate(14deg); }
.flipbook-soon:hover .flipbook-soon__page--3 { transform: translate(54px, 10px) rotate(21deg); }
.flipbook-soon:hover .flipbook-soon__cover { transform: rotate(-3deg) translateX(-6px); }

.flipbook-soon__stamp {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: var(--fw-bold);
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transform: rotate(-10deg);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7);
}

.flipbook-soon__body {
  padding: var(--space-xl) var(--space-lg);
}

.flipbook-soon__kicker {
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.flipbook-soon__title {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.flipbook-soon__text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

/* Release schedule: three dots on a line, current year highlighted */
.flipbook-soon__schedule {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin-bottom: var(--space-lg);
}

.flipbook-soon__schedule::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: calc(33.333% - 6px);
  height: 2px;
  background: var(--color-primary-light);
}

.flipbook-soon__step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-right: var(--space-xs);
}

.flipbook-soon__step-dot {
  width: 14px;
  height: 14px;
  margin-bottom: 0.45rem;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--color-primary);
}

.flipbook-soon__step-label {
  font-size: 0.85rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
}

.flipbook-soon__step-date {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.flipbook-soon__step.is-current .flipbook-soon__step-dot {
  background: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.flipbook-soon__step.is-current .flipbook-soon__step-label,
.flipbook-soon__step.is-current .flipbook-soon__step-date {
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

.flipbook-soon__form-label {
  font-size: 0.9rem;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.flipbook-soon__linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.flipbook-soon__linkedin svg {
  flex-shrink: 0;
  color: #0a66c2;
}

.flipbook-soon__review {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.flipbook-soon__review a {
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
}

.flipbook-soon__linkedin:hover {
  color: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
  .flipbook-soon__cover,
  .flipbook-soon__page,
  .inkijk__poster {
    transition: none;
  }
}


/* ─── Responsive ─── */

@media (max-width: 1200px) {
  /* Section padding shrinks here; a single gap would feel cramped */
  .book-detail-page main > .methode-section + .methode-section {
    padding-top: var(--space-md);
  }

  .book-crossref-card {
    grid-template-columns: 120px 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .book-fact-box__prices {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  .book-crossref-card {
    grid-template-columns: 1fr;
    max-width: 320px;
    text-align: center;
  }

  .book-crossref-card__cover {
    max-width: 140px;
    margin: 0 auto;
  }

  .book-series-card {
    flex-basis: 130px;
  }

  .book-breadcrumb__list {
    font-size: 0.75rem;
  }

  .flipbook-placeholder {
    aspect-ratio: 3 / 4;
    padding: var(--space-md);
  }

  /* Single-page mode on phones: height follows one book page at full width
     (pages are 595 × 765 pt; gutter + viewer padding 2 × 28px, plus toolbar), capped to the screen */
  .inkijk__viewer {
    height: min(calc(1.29 * (100vw - 88px) + 130px), calc(100svh - var(--header-height) - 2rem));
  }

  .flipbook-soon {
    grid-template-columns: 1fr;
  }

  .flipbook-soon__visual {
    padding: var(--space-lg) var(--space-md) var(--space-xl);
  }

  .flipbook-soon__book {
    width: 130px;
  }

  .flipbook-soon__stamp {
    width: 78px;
    height: 78px;
    font-size: 0.6rem;
  }

  .flipbook-soon__body {
    padding: var(--space-lg) var(--space-md);
  }
}

/* Review-copy line under the fact box actions */
.book-fact-box__review {
  margin-top: var(--space-md);
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.book-fact-box__review a {
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
}
