/* books.css — статьи-подборки книг о финансах. Использует переменные shared.css (свет/тёмная тема). */

/* ---- Компактная, ненавязчивая маркировка рекламы (ФЗ-38) ---- */
.ad-label {
  text-transform: none; font-style: normal;
  font-size: 12px; line-height: 1.5; color: var(--text-muted);
  border-left: 2px solid var(--border); padding: 2px 0 2px 12px; margin: 0 0 30px;
  letter-spacing: 0; font-weight: 400;
}
.ad-label * { text-transform: none; letter-spacing: 0; }
.ad-label .ad-badge {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
}
.ad-label a { color: var(--text-soft); text-decoration: underline; }
.ad-label .erid { opacity: .85; }

/* ---- Вступление статьи ---- */
.books-lead { font-size: 16px; line-height: 1.7; color: var(--text-soft); margin: 0 0 8px; }

/* ---- Блок одной книги (формат статьи) ---- */
.book-item { padding: 30px 0; border-bottom: 1px solid var(--border-soft); }
.book-item:last-child { border-bottom: none; }
.book-item h2 {
  font-size: 22px; line-height: 1.3; margin: 0 0 3px; letter-spacing: -.01em; scroll-margin-top: 90px;
}
.book-item .book-author { font-size: 14px; color: var(--text-muted); margin: 0 0 14px; }
.book-sell p { font-size: 15.5px; line-height: 1.72; color: var(--text); margin: 0 0 14px; }

/* Витрина книги в конце блока: обложка + кнопка */
.book-offer {
  display: flex; gap: 16px; align-items: center; margin-top: 18px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.book-offer .book-cover {
  flex: none; width: 72px; height: 108px; border-radius: 7px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.book-offer .book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-offer-body { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.book-offer-title { font-size: 13.5px; color: var(--text-soft); line-height: 1.4; }
.book-offer-title b { color: var(--text); font-weight: 700; }
.book-offer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.book-age {
  flex: none; font-size: 11px; font-weight: 700; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px;
}
.book-buy {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 14px;
  padding: 9px 18px; border-radius: var(--radius-sm); text-decoration: none;
  transition: var(--transition); white-space: nowrap;
}
.book-buy:hover { background: var(--primary-dark); }
.book-erid { font-size: 11px; color: var(--text-muted); }

@media (max-width: 560px){
  .book-offer { flex-direction: row; align-items: flex-start; }
  .book-offer .book-cover { width: 60px; height: 90px; }
  .book-item h2 { font-size: 20px; }
}

/* ---- FAQ ---- */
.book-faq { margin-top: 40px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 16px; margin-bottom: 10px; background: var(--surface); }
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 15.5px; color: var(--text); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "＋"; color: var(--primary); font-weight: 700; margin-right: 8px; }
.faq-item[open] summary::before { content: "－"; }
.faq-a { font-size: 14.5px; line-height: 1.6; color: var(--text-soft); margin-top: 10px; }

/* ---- Оглавление (быстрые ссылки на книги) ---- */
.book-toc { margin: 4px 0 26px; padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); }
.book-toc-title { font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); font-weight: 700; margin-bottom: 10px; }
.book-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.book-toc li { margin-bottom: 6px; font-size: 14px; }
.book-toc a { color: var(--text-soft); text-decoration: none; }
.book-toc a:hover { color: var(--primary-dark); text-decoration: underline; }
@media (max-width: 560px){ .book-toc ol { columns: 1; } }
