/* Shared book recommendation for the home page and course modules. */
:root .book-promo {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 24px 52px;
  min-width: 0;
  min-height: 440px;
  margin: var(--book-promo-margin, 0);
  padding: 42px 48px;
  border: 1px solid #d4b87355;
  border-radius: 14px;
  color: #fff;
  background: radial-gradient(ellipse at 18% 48%, #dcb35b16, transparent 46%), #181820;
  box-shadow: 0 18px 38px #2623331c, inset 0 1px 0 #fff7dc0d;
  scroll-margin-top: 110px;
}
.book-promo__art {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 300px;
  min-width: 0;
  padding: 6px 14px;
}
.book-promo__art::before, .book-promo__art::after { content: ""; position: absolute; pointer-events: none; }
.book-promo__art::before { z-index: -1; inset: 10% -2% 6%; border: 1px solid #d6b67940; border-radius: 18px; background: linear-gradient(145deg, #614b35, #37303b); box-shadow: 0 10px 28px #0002; transform: rotate(4deg); }
.book-promo__art::after { z-index: -2; inset: 4% -9%; border-radius: 50%; background: radial-gradient(ellipse, #edc97733, transparent 68%); filter: blur(12px); animation: book-promo-glow 12s ease-in-out infinite; }
.book-promo__art img { position: relative; display: block; width: min(100%, 270px); max-width: 100%; height: auto; border: 1px solid #d2b36f7a; border-radius: 2px; transform: rotate(-6deg); box-shadow: 6px 7px 0 #090a0f, 16px 20px 24px #0008; animation: book-promo-sway 8s ease-in-out infinite; }
.book-promo__copy { min-width: 0; grid-column: 2; grid-row: 1; align-self: end; }
:root .book-promo .book-promo__title { max-width: 26ch; margin: 0 0 20px; color: #fff8e9; font-size: clamp(1.7rem, 2.7vw, 2.25rem); font-weight: 750; line-height: 1.25; letter-spacing: -.035em; text-wrap: balance; }
.book-promo__accent { color: #edc977; }
.book-promo__description { max-width: 55ch; margin: 0; color: #c8c4c5; font-size: .94rem; line-height: 1.75; }
.book-promo__benefits { display: flex; flex-wrap: wrap; gap: 9px 22px; margin: 20px 0 0; padding: 0; list-style: none; color: #d8cfbd; font-size: .74rem; line-height: 1.6; }
.book-promo__benefits li::before { content: '·'; margin-right: 8px; color: #edc977; font-size: 1rem; }
.book-promo__action { display: flex; flex-direction: column; min-width: 0; grid-column: 2; grid-row: 2; align-self: start; align-items: flex-start; }
.book-promo__cta { min-width: 224px; }

@keyframes book-promo-sway {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-5px) rotate(-4.5deg); }
}
@keyframes book-promo-glow {
  0%, 100% { opacity: .45; transform: scale(.96); }
  50% { opacity: .8; transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .book-promo__art img { animation: none; transform: rotate(-6deg); }
  .book-promo__art::after { animation: none; opacity: .6; transform: none; }
}
@media (max-width: 900px) and (min-width: 601px) {
  :root .book-promo { grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 22px 30px; min-height: 0; padding: 32px 28px; }
  .book-promo__art { max-width: 210px; padding-inline: 10px; }
  :root .book-promo .book-promo__title { font-size: 1.7rem; }
}
@media (max-width: 600px) {
  :root .book-promo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 28px; min-height: 0; padding: 30px 24px; }
  .book-promo__art { grid-column: 1; grid-row: 1; width: min(100%, 234px); max-width: 100%; padding: 8px 14px; }
  .book-promo__art img { width: min(100%, 206px); }
  .book-promo__copy { grid-column: 1; grid-row: 2; }
  :root .book-promo .book-promo__title { margin-bottom: 17px; font-size: clamp(1.5rem, 5.8vw, 1.85rem); line-height: 1.3; }
  .book-promo__description { font-size: .88rem; }
  .book-promo__benefits { margin-top: 17px; }
  .book-promo__action { grid-column: 1; grid-row: 3; align-items: stretch; }
  .book-promo__cta { min-width: 0; width: 100%; }
}
