/* ============================================
   zahhak-main.css — استایل کامل
   کتاب «ضحاک؛ بحران درونی قدرت»
   ============================================ */

/* ========== ریست پایه ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text);
    background-color: var(--color-bg);
}

/* ========== هدر کتاب ========== */
.book-header {
    background-color: var(--color-bg-dark);
    border-bottom: 2px solid var(--color-blood);
    padding: 1rem 0;
    position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px);
}
.book-header__inner {
    max-width: var(--container-max);
    margin: 0 auto; padding: 0 var(--container-padding);
    display: flex; align-items: center; justify-content: space-between;
}
.book-header__parent-link {
    display: flex; align-items: center; gap: 0.5rem;
    text-decoration: none; color: var(--color-text-light); transition: color 0.3s;
}
.book-header__parent-link:hover { color: var(--color-blood-light); }
.book-header__icon { width: 36px; height: 36px; }
.book-header__parent-text { font-family: var(--font-heading); font-size: var(--text-lg); font-weight: 700; }
.book-header__nav { display: flex; gap: 1.5rem; }
.book-header__nav-link {
    text-decoration: none; color: var(--color-text-light); font-size: var(--text-sm);
    transition: color 0.3s; border-bottom: 1px solid transparent;
}
.book-header__nav-link:hover { color: var(--color-blood-light); border-bottom-color: var(--color-blood-light); }
.book-header__nav-link--active { color: var(--color-blood-light) !important; border-bottom: 1px solid var(--color-blood-light) !important; }

/* ========== صفحهٔ فرود ========== */
.book-landing { max-width: var(--container-reading); margin: 0 auto; padding: 2rem var(--container-padding) 4rem; }

/* Hero */
.book-hero { text-align: center; padding: 4rem 0 3rem; }
.book-hero__ornament { font-size: 3rem; margin-bottom: 1rem; }
.book-hero__title {
    font-family: var(--font-heading); font-size: var(--text-5xl); font-weight: 900;
    color: var(--color-blood-light); letter-spacing: 0.25rem; margin-bottom: 0.5rem;
}
.book-hero__subtitle {
    font-family: var(--font-heading); font-size: var(--text-2xl);
    color: var(--color-crown-light); font-weight: 400; margin-bottom: 2rem;
}
.book-hero__divider {
    display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 2rem;
}
.book-hero__divider-line {
    width: 80px; height: 1px;
    background: linear-gradient(to right, transparent, var(--color-blood), transparent);
}
.book-hero__divider-symbol { color: var(--color-blood-light); font-size: 1.5rem; }
.book-hero__description {
    font-size: var(--text-lg); color: var(--color-text-light); line-height: var(--leading-loose);
    max-width: 650px; margin: 0 auto;
}
.book-hero__description strong { color: var(--color-blood-light); }

/* نقل‌قول میثاق */
.book-covenant {
    background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-dark));
    border: 1px solid var(--color-border); border-right: 4px solid var(--color-blood);
    border-radius: 8px; padding: 2rem; margin: 2rem 0 4rem; text-align: center;
}
.book-covenant__quote p {
    font-family: var(--font-heading); font-size: var(--text-xl);
    color: var(--color-text-light); font-style: italic; line-height: var(--leading-loose);
}
.book-covenant__quote strong { color: var(--color-blood-light); }

/* فهرست */
.book-toc { margin-bottom: 4rem; }
.book-toc__title {
    font-family: var(--font-heading); font-size: var(--text-3xl);
    color: var(--color-blood-light); text-align: center; margin-bottom: 1rem;
}
.book-toc__intro {
    text-align: center; color: var(--color-text-muted); max-width: 600px;
    margin: 0 auto 2.5rem; line-height: var(--leading-relaxed);
}
.book-toc__list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.book-toc__link {
    display: flex; align-items: center; gap: 1.5rem; padding: 1.25rem 1.5rem;
    background-color: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: 8px; text-decoration: none; transition: all 0.3s ease;
}
.book-toc__link:hover {
    border-color: var(--color-blood); background-color: var(--color-bg-hover);
    transform: translateX(-4px); box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.book-toc__number { font-family: var(--font-heading); font-size: var(--text-sm); color: var(--color-blood-light); min-width: 90px; text-align: center; }
.book-toc__chapter-title { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--color-text); flex: 1; }
.book-toc__question { font-size: var(--text-sm); color: var(--color-text-muted); font-style: italic; }

/* روش‌شناسی (صفحهٔ فرود) */
.book-methodology {
    background-color: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: 12px; padding: 2.5rem; margin-bottom: 3rem;
}
.book-methodology__title { font-family: var(--font-heading); font-size: var(--text-2xl); color: var(--color-blood-light); margin-bottom: 1.5rem; text-align: center; }
.book-methodology__text { color: var(--color-text-light); line-height: var(--leading-relaxed); margin-bottom: 1.25rem; }
.book-methodology__more { color: var(--color-blood-light); text-decoration: none; font-weight: 600; }
.book-methodology__more:hover { opacity: 0.7; }

/* دعوت */
.book-invitation { text-align: center; padding: 3rem 0; border-top: 1px solid var(--color-border); }
.book-invitation__title { font-family: var(--font-heading); font-size: var(--text-2xl); color: var(--color-blood-light); margin-bottom: 1.5rem; }
.book-invitation__text { color: var(--color-text-light); line-height: var(--leading-loose); max-width: 600px; margin: 0 auto 1.5rem; }
.book-invitation__signature, .signature { font-family: var(--font-heading); font-size: var(--text-xl); color: var(--color-blood-light); font-weight: 700; margin-top: 1.5rem; text-align: center; }

/* ========== استایل‌های مشترک فصل‌ها ========== */
.chapter-header { text-align: center; padding: 3rem 0 2rem; border-bottom: 1px solid var(--color-border); margin-bottom: 3rem; }
.chapter-header__khan {
    display: inline-block; font-family: var(--font-heading); font-size: var(--text-sm);
    color: var(--color-blood-light); letter-spacing: 0.25rem; margin-bottom: 0.75rem;
    border: 1px solid var(--color-blood-light); padding: 0.25rem 1rem; border-radius: 20px;
}
.chapter-header__title { font-family: var(--font-heading); font-size: var(--text-4xl); font-weight: 900; color: var(--color-text); margin-bottom: 0.75rem; }
.chapter-header__question { font-size: var(--text-lg); color: var(--color-text-muted); font-style: italic; }

.chapter-section { margin-bottom: 3rem; }
.chapter-section h2 { font-family: var(--font-heading); font-size: var(--text-2xl); color: var(--color-blood-light); margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--color-border); }
.chapter-section h3 { font-family: var(--font-heading); font-size: var(--text-xl); color: var(--color-text); margin-bottom: 1rem; }
.chapter-section p { color: var(--color-text-light); line-height: var(--leading-loose); margin-bottom: 1.25rem; }
.chapter-section strong { color: var(--color-text); }

.method-note {
    background-color: var(--color-bg-card); border: 1px solid var(--color-border);
    border-right: 4px solid var(--color-blood-light); border-radius: 8px;
    padding: 1.25rem 1.5rem; margin-bottom: 2rem; font-size: var(--text-sm);
    color: var(--color-text-muted); line-height: var(--leading-relaxed);
}
.method-note strong { color: var(--color-blood-light); }

.feature-card { background-color: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.5rem; margin-bottom: 1.25rem; }
.feature-card h3 { color: var(--color-blood-light); margin-bottom: 0.75rem; }

.feature-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; font-size: var(--text-sm); }
.feature-table thead { background-color: var(--color-bg-dark); }
.feature-table th { padding: 0.75rem 1rem; text-align: right; color: var(--color-blood-light); font-weight: 600; border-bottom: 2px solid var(--color-blood); }
.feature-table td { padding: 0.75rem 1rem; color: var(--color-text-light); border-bottom: 1px solid var(--color-border); line-height: var(--leading-relaxed); }
.feature-table tbody tr:hover { background-color: var(--color-bg-hover); }

.chapter-question {
    background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-dark));
    border: 1px solid var(--color-border); border-right: 4px solid var(--color-blood);
    border-radius: 8px; padding: 1.5rem; margin: 2rem 0;
}
.chapter-question p { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--color-text-light); line-height: var(--leading-loose); margin-bottom: 0; }

.insight-box {
    background: linear-gradient(135deg, var(--color-bg-dark), var(--color-bg-card));
    border: 1px solid var(--color-blood); border-radius: 12px; padding: 2rem; margin: 2rem 0; text-align: center;
}
.insight-box h3 { font-family: var(--font-heading); font-size: var(--text-xl); color: var(--color-blood-light); margin-bottom: 1rem; }
.insight-box p { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--color-text-light); line-height: var(--leading-loose); margin-bottom: 0; }

/* ========== ناوبری فصل ========== */
.chapter-nav { display: flex; align-items: center; justify-content: space-between; padding: 2rem 0; border-top: 1px solid var(--color-border); margin-top: 3rem; gap: 1rem; }
.chapter-nav__empty { flex: 1; }
.chapter-nav__up { color: var(--color-text-muted); text-decoration: none; font-size: var(--text-sm); transition: color 0.3s; }
.chapter-nav__up:hover { color: var(--color-blood-light); }
.chapter-nav__prev, .chapter-nav__next {
    flex: 1; display: flex; flex-direction: column; text-decoration: none;
    padding: 0.75rem 1rem; background-color: var(--color-bg-card);
    border: 1px solid var(--color-border); border-radius: 8px; transition: all 0.3s;
}
.chapter-nav__prev { align-items: flex-start; }
.chapter-nav__next { align-items: flex-end; }
.chapter-nav__prev:hover, .chapter-nav__next:hover { border-color: var(--color-blood); background-color: var(--color-bg-hover); }
.chapter-nav__label { font-size: var(--text-xs); color: var(--color-text-muted); }
.chapter-nav__title { font-family: var(--font-heading); font-size: var(--text-base); color: var(--color-text); }
.chapter-nav__arrow { font-size: var(--text-lg); color: var(--color-blood-light); }

/* ========== فصل ۱: جدول زمانی روایت ========== */
.narrative-timeline { display: flex; flex-direction: column; gap: 1.5rem; margin: 2rem 0; }
.narrative-step { display: flex; gap: 1.25rem; align-items: flex-start; }
.narrative-step__number {
    flex-shrink: 0; width: 40px; height: 40px; background-color: var(--color-blood);
    color: #fff; font-family: var(--font-heading); font-weight: 900;
    font-size: var(--text-xl); display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.narrative-step__content { background-color: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.25rem 1.5rem; flex: 1; }
.narrative-step__content h3 { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--color-blood-light); margin-bottom: 0.5rem; }
.narrative-step__content p { color: var(--color-text-light); line-height: var(--leading-relaxed); margin-bottom: 0; }
.narrative-step__content strong { color: var(--color-text); }

/* ========== فصل ۲: کارت‌های دلیل ========== */
.reason-stack { display: flex; flex-direction: column; gap: 1.25rem; margin: 1.5rem 0; }
.reason-card {
    display: flex; gap: 1.25rem; background-color: var(--color-bg-card);
    border: 1px solid var(--color-border); border-radius: 8px;
    padding: 1.5rem; align-items: flex-start;
}
.reason-card__number {
    flex-shrink: 0; width: 36px; height: 36px; background-color: var(--color-blood);
    color: #fff; font-family: var(--font-heading); font-weight: 900;
    font-size: var(--text-lg); display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.reason-card__content h3 { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--color-blood-light); margin-bottom: 0.5rem; }
.reason-card__content p { color: var(--color-text-light); line-height: var(--leading-relaxed); margin-bottom: 0; }

/* ========== فصل ۳: کارت‌های لایه ========== */
.layer-card {
    display: flex; gap: 1.25rem; background-color: var(--color-bg-card);
    border: 1px solid var(--color-border); border-radius: 8px;
    padding: 1.5rem; margin-bottom: 1.25rem; align-items: flex-start;
}
.layer-card__number {
    flex-shrink: 0; width: 36px; height: 36px; background-color: var(--color-serpent);
    color: #fff; font-family: var(--font-heading); font-weight: 900;
    font-size: var(--text-lg); display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.layer-card__content h3 { color: var(--color-serpent-light); margin-bottom: 0.75rem; font-size: var(--text-lg); }
.layer-card__content p { color: var(--color-text-light); line-height: var(--leading-relaxed); margin-bottom: 0; }

/* ========== فصل ۴: کارت‌های مرحله ========== */
.stage-card {
    background-color: var(--color-bg-card); border: 1px solid var(--color-border);
    border-radius: 12px; margin-bottom: 2rem; overflow: hidden;
}
.stage-card--deception { border-right: 4px solid var(--color-crown-light); }
.stage-card--kiss { border-right: 4px solid var(--color-blood); }
.stage-card--devour { border-right: 4px solid var(--color-serpent-light); }
.stage-card__header {
    background: linear-gradient(135deg, var(--color-bg-dark), var(--color-bg-card));
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--color-border);
}
.stage-card__number {
    display: inline-block; font-family: var(--font-heading); font-size: var(--text-xs);
    letter-spacing: 0.2rem; margin-bottom: 0.5rem; padding: 0.15rem 0.75rem; border-radius: 20px;
}
.stage-card--deception .stage-card__number { color: var(--color-crown-light); border: 1px solid var(--color-crown-light); }
.stage-card--kiss .stage-card__number { color: var(--color-blood-light); border: 1px solid var(--color-blood-light); }
.stage-card--devour .stage-card__number { color: var(--color-serpent-light); border: 1px solid var(--color-serpent-light); }
.stage-card__header h3 { font-family: var(--font-heading); font-size: var(--text-xl); margin-bottom: 0; }
.stage-card--deception .stage-card__header h3 { color: var(--color-crown-light); }
.stage-card--kiss .stage-card__header h3 { color: var(--color-blood-light); }
.stage-card--devour .stage-card__header h3 { color: var(--color-serpent-light); }
.stage-card__body { padding: 1.5rem; }
.stage-card__question { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 700; margin-bottom: 0.75rem; }
.stage-card__body > p { color: var(--color-text-light); line-height: var(--leading-relaxed); margin-bottom: 1.25rem; }
.stage-card__analysis { background-color: var(--color-bg-dark); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.stage-card__analysis h4 { color: var(--color-text); font-size: var(--text-sm); margin-bottom: 0.5rem; }
.stage-card__analysis p { color: var(--color-text-muted); font-size: var(--text-sm); line-height: var(--leading-relaxed); margin-bottom: 0; }
.stage-card__sign { background-color: var(--color-bg-dark); border-radius: 8px; padding: 1rem 1.25rem; }
.stage-card__sign h4 { color: var(--color-blood-light); font-size: var(--text-sm); margin-bottom: 0.5rem; }
.stage-card__sign p { color: var(--color-text-muted); font-size: var(--text-sm); font-style: italic; line-height: var(--leading-relaxed); margin-bottom: 0; }

/* ========== صفحات about و bibliographies ========== */
.claim-box { background-color: var(--color-bg-card); border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem; }
.claim-box--has { border-right: 4px solid var(--color-blood); }
.claim-box--hasnot { border-right: 4px solid var(--color-crown-light); }
.claim-box h3 { font-family: var(--font-heading); font-size: var(--text-lg); margin-bottom: 1rem; }
.claim-box--has h3 { color: var(--color-blood-light); }
.claim-box--hasnot h3 { color: var(--color-crown-light); }
.claim-box ul { list-style: none; padding: 0; }
.claim-box li { color: var(--color-text-light); line-height: var(--leading-loose); padding: 0.3rem 0; }
.claim-box li::before { content: '▹ '; color: var(--color-blood-light); }

.method-layer { background-color: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.method-layer h3 { font-family: var(--font-heading); font-size: var(--text-base); color: var(--color-blood-light); margin-bottom: 0.5rem; }
.method-layer p { color: var(--color-text-muted); line-height: var(--leading-relaxed); margin-bottom: 0; }

.biblio-list { list-style: none; padding: 0; }
.biblio-list li { color: var(--color-text-light); line-height: var(--leading-loose); padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); }
.biblio-list li:last-child { border-bottom: none; }
.biblio-list strong { color: var(--color-text); }
.biblio-list em { color: var(--color-text-muted); font-style: italic; }

/* ========== فوتر ========== */
.book-footer { background-color: var(--color-bg-dark); border-top: 2px solid var(--color-blood); padding: 2rem 0; text-align: center; }
.book-footer__inner { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-padding); display: flex; flex-direction: column; gap: 0.75rem; }
.book-footer__motto { font-family: var(--font-heading); font-size: var(--text-lg); color: var(--color-blood-light); }
.book-footer__parent { font-size: var(--text-sm); color: var(--color-text-muted); }
.book-footer__parent a { color: var(--color-blood-light); text-decoration: none; }
.book-footer__license { font-size: var(--text-xs); color: var(--color-text-muted); }
.book-footer__license a { color: var(--color-text-muted); text-decoration: underline; }

/* ========== واکنش‌گرایی ========== */
@media (max-width: 768px) {
    .book-hero__title { font-size: var(--text-3xl); }
    .book-hero__subtitle { font-size: var(--text-xl); }
    .book-toc__link { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .book-toc__number { text-align: right; }
    .book-header__inner { flex-direction: column; gap: 0.75rem; }
}
@media (max-width: 480px) {
    :root { --container-padding: 1rem; }
    .book-hero { padding: 2rem 0 1.5rem; }
    .book-hero__title { font-size: var(--text-2xl); }
}