/* Book pages (BEM FAQ) */
:root {
  --bem-accent: #16a085;
  --bem-grad-from: #16a085;
  --bem-grad-to: #1abc9c;
  --bem-ink: #333;
  --bem-muted: #666;
  --bem-bg: #f8f9fa;
}

body.book-bem {
  background: var(--bem-bg);
}

.book-hero {
  margin-top: 80px;
  background: linear-gradient(135deg, var(--bem-grad-from) 0%, var(--bem-grad-to) 100%);
  color: #fff;
  padding: 56px 20px;
  text-align: center;
}

.book-hero h1 {
  font-size: 2.4rem;
  margin: 0 0 12px;
  font-weight: 700;
}

.book-hero p {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 760px;
  margin: 0 auto;
}

.book-hero__image {
  max-width: 320px;
  margin: 28px auto 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.book-hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

.book-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 20px;
}

.book-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.book-intro {
  padding: 28px;
  margin-bottom: 34px;
}

.book-intro h2 {
  color: var(--bem-ink);
  margin: 0 0 10px;
}

.book-intro p {
  color: var(--bem-muted);
  line-height: 1.8;
  margin: 0;
}

.book-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.book-stat {
  text-align: center;
  padding: 18px;
  background: var(--bem-bg);
  border-radius: 10px;
}

.book-stat__num {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--bem-accent);
  line-height: 1;
}

.book-stat__label {
  color: var(--bem-muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.book-toc__title {
  font-size: 1.75rem;
  color: var(--bem-ink);
  margin: 0 0 18px;
}

.book-toc {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.book-toc__item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 15px;
  text-decoration: none;
  color: var(--bem-ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-toc__item:hover,
.book-toc__item:focus-within{
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.book-toc__num {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bem-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.book-toc__content {
  flex: 1;
}

.book-toc__content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.book-toc__content p {
  margin: 0;
  color: var(--bem-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.book-toc__meta {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--bem-accent);
}

.book-toc__arrow {
  color: #cfcfcf;
  font-size: 1.15rem;
  transition: color 0.2s ease;
}

.book-toc__item:hover .book-toc__arrow,
.book-toc__item:focus-within .book-toc__arrow{
  color: var(--bem-accent);
}

.book-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 42px 0 10px;
}

.book-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Part pages */
.book-article {
  max-width: 860px;
  margin: 100px auto 40px;
  padding: 0 20px;
}

.book-breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.book-breadcrumbs a {
  color: var(--primary-color);
  text-decoration: none;
}

.book-breadcrumbs a:hover,
.book-breadcrumbs a:focus-within{
  text-decoration: underline;
}

.book-part-hero {
  background: linear-gradient(135deg, var(--bem-grad-from) 0%, var(--bem-grad-to) 100%);
  color: #fff;
  border-radius: 15px;
  padding: 36px;
  margin-bottom: 22px;
}

.book-part-hero__meta {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 10px;
}

.book-part-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.book-part-image {
  margin: 0 0 24px;
}

.book-part-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}

.faq-item {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 18px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.faq-item h2 {
  color: var(--bem-accent);
  font-size: 1.1rem;
  margin: 0 0 14px;
}

.faq-item p {
  margin: 0 0 14px;
  color: #555;
  line-height: 1.8;
}

.faq-item p:last-child {
  margin-bottom: 0;
}

.faq-item ul,
.faq-item ol {
  margin: 14px 0;
  padding-left: 22px;
  color: #555;
}

.faq-item li {
  margin-bottom: 10px;
}

.book-nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.book-nav__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  color: var(--bem-ink);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex: 1;
  min-width: 200px;
}

.book-nav__btn:hover,
.book-nav__btn:focus-within{
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.book-nav__btn--next {
  justify-content: flex-end;
  text-align: right;
}

.book-nav__small {
  font-size: 0.85rem;
  color: var(--bem-muted);
}

.book-nav__title {
  font-weight: 600;
  color: var(--bem-accent);
}

.book-footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 28px 20px;
  margin-top: 60px;
}

@media (max-width: 768px) {
  .book-hero {
    padding: 40px 15px;
    margin-top: 70px;
  }
  .book-hero h1 {
    font-size: 1.85rem;
  }
  .book-hero p {
    font-size: 1rem;
  }
  .book-hero__image {
    max-width: 210px;
  }
  .book-intro {
    padding: 22px 18px;
  }
  .book-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .book-toc__item {
    padding: 18px 16px;
  }
  .book-toc__num {
    width: 40px;
    height: 40px;
  }
  .book-article {
    margin-top: 86px;
  }
  .book-part-hero {
    padding: 24px;
  }
  .book-part-hero h1 {
    font-size: 1.5rem;
  }
  .faq-item {
    padding: 20px;
  }
  .book-nav__btn {
    min-width: 100%;
  }
}

