/* =========================================================================
   Exam Master - PC Edition | User Guide & Documentation Stylesheet
   Enterprise Documentation Portal (RTL Layout)
   ========================================================================= */

:root {
    --doc-primary: #2563eb;
    --doc-primary-dark: #1d4ed8;
    --doc-primary-light: #eff6ff;
    --doc-bg: #f8fafc;
    --doc-sidebar-bg: #ffffff;
    --doc-card-bg: #ffffff;
    --doc-border: #e2e8f0;
    --doc-text: #0f172a;
    --doc-text-muted: #64748b;
    --doc-sidebar-width: 320px;
    --header-height: 72px;
}

body.guide-body {
    background-color: var(--doc-bg);
    color: var(--doc-text);
    font-family: var(--font-ar);
    line-height: 1.75;
    padding-top: var(--header-height);
}

/* Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    width: 0%;
    z-index: 2000;
    transition: width 0.1s ease;
}

/* Guide Header */
.guide-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--doc-border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.guide-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.guide-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guide-brand img {
    height: 38px;
    border-radius: 8px;
}

.guide-brand-text h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--doc-text);
    line-height: 1.1;
}

.guide-brand-text span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--doc-primary);
    background: var(--doc-primary-light);
    padding: 2px 8px;
    border-radius: 6px;
}

.guide-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Guide Main Layout */
.guide-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
}

/* =========================================================================
   Sidebar Navigation
   ========================================================================= */
.guide-sidebar {
    width: var(--doc-sidebar-width);
    height: calc(100vh - var(--header-height));
    position: sticky;
    top: var(--header-height);
    background: var(--doc-sidebar-bg);
    border-left: 1px solid var(--doc-border);
    padding: 24px 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-search-box {
    position: relative;
    margin-bottom: 20px;
}

.sidebar-search-input {
    width: 100%;
    padding: 10px 38px 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--doc-border);
    font-family: var(--font-ar);
    font-size: 0.875rem;
    background: #f8fafc;
    transition: var(--transition);
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--doc-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sidebar-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--doc-text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.sidebar-group {
    margin-bottom: 24px;
}

.sidebar-group-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--doc-text-muted);
    margin-bottom: 10px;
    padding: 0 10px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--doc-text-muted);
    transition: var(--transition);
}

.sidebar-link .link-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-link:hover {
    color: var(--doc-primary);
    background: var(--doc-primary-light);
}

.sidebar-link.active {
    color: var(--doc-primary);
    background: var(--doc-primary-light);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--doc-primary);
}

/* =========================================================================
   Documentation Content Area
   ========================================================================= */
.guide-content {
    flex: 1;
    padding: 40px 48px 100px;
    max-width: 960px;
    background: #ffffff;
    min-width: 0;
}

.doc-chapter {
    padding-bottom: 64px;
    margin-bottom: 64px;
    border-bottom: 1px solid var(--doc-border);
}

.doc-chapter:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.chapter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--doc-primary-light);
    color: var(--doc-primary);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.chapter-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--doc-text);
    margin-bottom: 16px;
    line-height: 1.3;
}

.chapter-intro {
    font-size: 1.1rem;
    color: var(--doc-text-muted);
    line-height: 1.8;
    margin-bottom: 32px;
}

.doc-section-h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--doc-text);
    margin: 36px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-p {
    font-size: 1rem;
    color: #334155;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Step-by-Step List */
.step-guide-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 28px 0;
}

.step-card {
    background: #f8fafc;
    border: 1px solid var(--doc-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.step-number {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--doc-primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.step-body {
    flex: 1;
}

.step-body h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--doc-text);
    margin-bottom: 8px;
}

.step-body p {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 12px;
    line-height: 1.65;
}

/* Callout Boxes */
.doc-callout {
    padding: 18px 22px;
    border-radius: 12px;
    margin: 24px 0;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-right: 4px solid transparent;
}

.callout-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
}

.callout-content h5 {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.callout-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.callout-tip {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

.callout-tip .callout-content h5 { color: #15803d; }

.callout-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.callout-info .callout-content h5 { color: #1d4ed8; }

.callout-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

.callout-warning .callout-content h5 { color: #b45309; }

/* Screenshots Inside Documentation */
.doc-image-card {
    margin: 28px 0;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--doc-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.doc-image-header {
    background: #f1f5f9;
    padding: 8px 16px;
    border-bottom: 1px solid var(--doc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-image-dots {
    display: flex;
    gap: 6px;
}

.doc-image-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.doc-image-card img {
    width: 100%;
    cursor: zoom-in;
    transition: var(--transition);
}

.doc-image-card img:hover {
    opacity: 0.97;
}

.doc-image-caption {
    padding: 12px 18px;
    background: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--doc-text-muted);
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

/* Feature Tables in Docs */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9rem;
}

.doc-table th, .doc-table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--doc-border);
}

.doc-table th {
    background: #f8fafc;
    font-weight: 800;
    color: var(--doc-text);
}

.doc-table tr:hover {
    background: #f8fafc;
}

/* Responsive Doc Layout */
@media (max-width: 1024px) {
    .guide-sidebar {
        position: fixed;
        right: -100%;
        top: var(--header-height);
        z-index: 1500;
        box-shadow: var(--shadow-hero);
        transition: var(--transition);
    }
    .guide-sidebar.active {
        right: 0;
    }
    .guide-content {
        padding: 32px 24px;
    }
}
