/* =================================
   استایل محتوای کتاب و شعرها
   Book Content & Poetry Styles
   ================================= */

/* محتوای اصلی کتاب - Main Book Content */
.book-content-wrapper {
    font-family: 'Vazir', 'Tahoma', sans-serif;
    font-size: 1.15rem;
    line-height: 2.2;
    text-align: justify;
    color: #2c3e50;
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.book-content-wrapper p {
    margin-bottom: 1.8rem;
    text-indent: 1.5rem;
    line-height: 2.3;
}

.book-content-wrapper h3,
.book-content-wrapper h4,
.book-content-wrapper h5 {
    color: #3498db;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.6;
    text-indent: 0;
}

/* محتوای داخل آکاردئون فصل‌ها - Chapter Accordion Content */
.accordion-body {
    font-family: 'Vazir', 'Tahoma', sans-serif;
    font-size: 1.12rem;
    line-height: 2.3;
    text-align: justify;
    color: #2c3e50;
    padding: 2rem 2.5rem !important;
    background: #fafbfc;
}

.accordion-body p {
    margin-bottom: 1.8rem;
    text-indent: 1.5rem;
    line-height: 2.4;
}

.accordion-body h3,
.accordion-body h4,
.accordion-body h5 {
    color: #3498db;
    margin-top: 2rem;
    margin-bottom: 1.3rem;
    font-weight: 700;
    text-indent: 0;
}

/* استایل شعرها - Poetry Styles */
.poetry,
p.poetry {
    font-family: 'Vazir', 'Tahoma', sans-serif !important;
    font-size: 1.15rem !important;
    line-height: 2.5 !important;
    text-align: center !important;
    color: #1a252f !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 1.5rem !important;
    margin: 2.5rem 0 !important;
    border-right: 4px solid #3498db;
    border-left: 4px solid #3498db;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.15);
    text-indent: 0 !important;
    direction: rtl;
    font-weight: 500;
}

/* هر بیت شعر - Each Poetry Line */
.poetry br {
    display: block;
    content: "";
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
}

/* برای شعرهای داخل div - Poetry inside divs */
div.poetry {
    font-family: 'Vazir', 'Tahoma', sans-serif !important;
    font-size: 1.15rem !important;
    line-height: 2.5 !important;
    text-align: center !important;
    color: #1a252f !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 1.5rem !important;
    margin: 2.5rem 0 !important;
    border-right: 4px solid #3498db;
    border-left: 4px solid #3498db;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(52, 152, 219, 0.15);
    font-weight: 500;
}

/* محتوای فصل‌ها - Chapter Content */
.chapter-content {
    font-size: 1.12rem;
    line-height: 2.3;
    text-align: justify;
    color: #2c3e50;
}

.chapter-content p {
    margin-bottom: 1.8rem;
    text-indent: 1.5rem;
    line-height: 2.3;
}

.chapter-content h3 {
    color: #3498db;
    font-size: 1.6rem;
    margin: 2rem 0 1.5rem 0;
    font-weight: 700;
    text-indent: 0;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

/* استایل ویژه برای عنوان‌های کتاب - Special Book Titles */
.book-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2c3e50;
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* نقل قول‌ها - Blockquotes */
blockquote {
    font-size: 1.1rem;
    line-height: 2.1;
    color: #555;
    border-right: 4px solid #3498db;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f8f9fa;
    border-radius: 8px;
    font-style: italic;
}

/* لیست‌ها - Lists */
ul, ol {
    margin-right: 2rem;
    margin-bottom: 1.5rem;
    line-height: 2.2;
}

li {
    margin-bottom: 0.8rem;
}

/* تأکید متن - Text Emphasis */
strong, b {
    font-weight: 700;
    color: #2c3e50;
}

em, i {
    font-style: italic;
    color: #555;
}

/* فاصله بین بندها - Paragraph Spacing */
.content-section p + p {
    margin-top: 1.5rem;
}

/* استایل برای متن عربی - Arabic Text Style */
.arabic-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #27ae60;
    text-align: center;
    margin: 1.5rem 0;
}

/* عنوان فصل‌ها در آکاردئون - Chapter Titles in Accordion */
.accordion-button {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    padding: 1.2rem 1.5rem !important;
}

.accordion-button:not(.collapsed) {
    color: white !important;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3) !important;
}

/* Responsive - موبایل */
@media (max-width: 768px) {
    .book-content-wrapper {
        padding: 1.5rem;
        font-size: 1.05rem;
        line-height: 2;
    }

    .accordion-body {
        padding: 1.5rem 1rem !important;
        font-size: 1.05rem;
        line-height: 2.1;
    }

    .poetry,
    p.poetry,
    div.poetry {
        font-size: 1.05rem !important;
        line-height: 2.3 !important;
        padding: 1.5rem 1rem !important;
        margin: 1.5rem 0 !important;
    }

    .book-content-wrapper p,
    .accordion-body p,
    .chapter-content p {
        text-indent: 1rem;
        margin-bottom: 1.5rem;
    }

    .book-title {
        font-size: 1.4rem;
    }
}

/* Print Styles - برای چاپ */
@media print {
    .book-content-wrapper,
    .accordion-body {
        font-size: 12pt;
        line-height: 1.8;
        color: black;
    }

    .poetry,
    p.poetry,
    div.poetry {
        background: white;
        border: 2px solid #ccc;
        page-break-inside: avoid;
    }

    .accordion-button {
        background: white !important;
        color: black !important;
    }
}

/* بهبود خوانایی - Readability Improvements */
.book-content-wrapper,
.accordion-body,
.chapter-content {
    word-spacing: 0.1rem;
    letter-spacing: 0.02rem;
}

/* هایلایت متن انتخاب شده - Text Selection Highlight */
::selection {
    background: #3498db;
    color: white;
}

::-moz-selection {
    background: #3498db;
    color: white;
}

/* انیمیشن برای نمایش محتوا - Content Display Animation */
.accordion-collapse {
    transition: all 0.35s ease-in-out;
}

.accordion-body {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* بهبود scrollbar برای محتوای طولانی */
.accordion-body::-webkit-scrollbar {
    width: 8px;
}

.accordion-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.accordion-body::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

.accordion-body::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}
