/* ============================================
   MODERN DOCUMENTATION LAYOUT
   ============================================ */

/* Article Container - Documentation Style */
.long-article-sections {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Cairo', sans-serif;
    /* Keep grid in LTR to ensure sidebar is on the left, content on right */
    direction: ltr;
}

/* Main Content Area */
.article-main-content {
    min-width: 0;
    padding-bottom: 80px;
}

[dir="rtl"] .article-main-content {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] .article-main-content {
    direction: ltr;
    text-align: left;
}

/* Sticky Section Navigator */
.section-indicator {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .section-indicator {
    direction: rtl;
    text-align: right;
    padding: 0 20px 0 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

[dir="ltr"] .section-indicator {
    direction: ltr;
    text-align: left;
    padding: 0 0 0 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Removed specific override as it's handled above */

.section-indicator-header {
    font-size: 14px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-indicator-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-indicator-item {
    position: relative;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .section-indicator-item {
    border-right: 3px solid transparent;
}

[dir="ltr"] .section-indicator-item {
    border-left: 3px solid transparent;
}

.section-indicator-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.section-indicator-item.active {
    background: rgba(102, 126, 234, 0.1);
}

[dir="rtl"] .section-indicator-item.active {
    border-right-color: #667eea;
}

[dir="ltr"] .section-indicator-item.active {
    border-left-color: #667eea;
}

.section-indicator-text {
    font-size: 15px;
    font-weight: 500;
    font-family: 'Cairo', sans-serif;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
    line-height: 1.5;
}

.section-indicator-item.active .section-indicator-text {
    color: #667eea;
    font-weight: 700;
}

.section-indicator-item:hover .section-indicator-text {
    color: rgba(255, 255, 255, 0.9);
}


/* ARTICLE CONTENT STYLING */

.section-content {
    scroll-margin-top: 120px;
    padding: 64px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-content:first-child {
    padding-top: 0;
}

.section-content:last-child {
    border-bottom: none;
}

/* Typography */
.section-content h2,
.section-content h3,
.section-content h4,
.section-content p {
    font-family: 'Cairo', sans-serif;
    color: #fff;
}

[dir="rtl"] .section-content h2,
[dir="rtl"] .section-content h3,
[dir="rtl"] .section-content h4,
[dir="rtl"] .section-content p {
    text-align: right;
    direction: rtl;
}

[dir="ltr"] .section-content h2,
[dir="ltr"] .section-content h3,
[dir="ltr"] .section-content h4,
[dir="ltr"] .section-content p {
    text-align: left;
    direction: ltr;
}

.section-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.3;
}

.section-content h3 {
    font-size: 26px;
    font-weight: 700;
    color: #667eea;
    margin-top: 48px;
    margin-bottom: 20px;
}

.section-content h4 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 16px;
}

.section-content p {
    font-size: 17px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

/* Lists */
.section-content ul,
.section-content ol {
    margin: 24px 0;
    padding: 0;
}

[dir="rtl"] .section-content ul,
[dir="rtl"] .section-content ol {
    direction: rtl;
}

[dir="ltr"] .section-content ul,
[dir="ltr"] .section-content ol {
    direction: ltr;
}

.section-content li {
    position: relative;
    margin-bottom: 16px;
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    list-style: none;
}

[dir="rtl"] .section-content li {
    padding-right: 28px;
    text-align: right;
}

[dir="ltr"] .section-content li {
    padding-left: 28px;
    text-align: left;
}

/* Bullet points */
[dir="rtl"] .section-content ul li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 2px;
}

[dir="ltr"] .section-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 2px;
}

/* Numbers */
.section-content ol {
    counter-reset: item;
}

.section-content ol li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: rgba(102, 126, 234, 0.2);
    color: #a5b4fc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

[dir="rtl"] .section-content ol li::before {
    right: 0;
}

[dir="ltr"] .section-content ol li::before {
    left: 0;
}

/* Callouts */
.callout {
    padding: 24px;
    border-radius: 12px;
    margin: 32px 0;
    background: rgba(255, 255, 255, 0.03);
}

[dir="rtl"] .callout {
    border-right: 4px solid;
    direction: rtl;
    text-align: right;
}

[dir="ltr"] .callout {
    border-left: 4px solid;
    direction: ltr;
    text-align: left;
}

.callout.info {
    border-right-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.callout.warning {
    border-right-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .long-article-sections {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .section-indicator {
        position: relative;
        top: 0;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0 0 20px 0;
        margin-bottom: 30px;
    }

    [dir="rtl"] .section-indicator {
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0 0 20px 0;
    }
}

/* ============================================
   FEEDBACK COMPONENT
   ============================================ */
.article-feedback-container {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[dir="rtl"] .article-feedback-container {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] .article-feedback-container {
    direction: ltr;
    text-align: left;
}

.feedback-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    font-family: 'Cairo', sans-serif;
}

.feedback-buttons {
    display: flex;
    gap: 12px;
}

.feedback-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Cairo', sans-serif;
}

.feedback-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.feedback-btn.yes:hover {
    border-color: #22c55e;
    color: #22c55e;
}

.feedback-btn.no:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.feedback-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #22c55e;
    font-size: 13px;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}