/* docs.css - استایل صفحه مستندات */

:root {
    --sidebar-width: 280px;
    --header-height: 70px;
    --sidebar-bg: #f8f9fa;
    --active-color: #e7f1ff;
    --primary-color: #007bff;
}

body {
    background-color: #f4f7f6;
    overflow-x: hidden;
}

/* کانتینر اصلی که سایدبار و محتوا را نگه می‌دارد */
.docs-wrapper {
    display: flex;
    min-height: calc(100vh - 70px); /* ارتفاع کل منهای هدر */
    position: relative;
}

/* --- استایل سایدبار --- */
.docs-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-left: 1px solid #dee2e6;
    position: sticky; /* چسبیدن به بالا هنگام اسکرول */
    top: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 20px 0;
    flex-shrink: 0; /* جلوگیری از کوچک شدن */
}

.sidebar-header h3 {
    padding: 0 25px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #333;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.docs-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-right: 4px solid transparent;
}

.doc-link i {
    margin-left: 10px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: #888;
}

.doc-link:hover {
    background-color: #fff;
    color: var(--primary-color);
}

.doc-link.active {
    background-color: #fff;
    color: var(--primary-color);
    border-right-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.doc-link.active i {
    color: var(--primary-color);
}

/* --- استایل بخش محتوا --- */
.docs-content {
    flex-grow: 1;
    padding: 40px;
    background-color: #fff;
    max-width: 100%;
}

/* استایل محتوای لود شده */
.doc-article h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.doc-article p {
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
    text-align: justify;
}

.doc-article h2 {
    font-size: 1.5rem;
    color: #007bff;
    margin-top: 40px;
    margin-bottom: 15px;
}

.doc-article ul {
    margin-right: 20px;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* استایل ویدیو آپارات */
.aparat-video {
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.aparat-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- رسپانسیو (موبایل) --- */
.mobile-menu-toggle {
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    cursor: pointer;
    font-family: inherit;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    display: none;
}
/* استایل عکس‌های داخل مستندات */
.doc-image {
    display: block;
    max-width: 100%;       /* عکس بزرگتر از صفحه نشود */
    height: auto;          /* نسبت ارتفاع حفظ شود */
    margin: 20px auto;     /* فاصله از بالا و پایین + وسط‌چین */
    border-radius: 8px;    /* گوشه‌های گرد */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* سایه نرم */
    border: 1px solid #eee; /* قاب نازک */
}
strong.red{
    color:#df2525;
}
strong.green{
    color:#18dd39;
}
@media (max-width: 900px) {
    .docs-sidebar {
        position: fixed;
        right: -280px; /* مخفی کردن در راست */
        top: 0;
        height: 100vh;
        z-index: 100;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .docs-sidebar.open {
        right: 0;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .mobile-menu-toggle {
        display: inline-block;
    }
    
    .docs-content {
        padding: 20px;
    }
}