/* فایل: /components/css/single-post.css */
/* ============================================
   طراحی مدرن صفحه مقاله - تم #5B46F7
   ============================================ */

/* فونت و تنظیمات پایه */
@import url('/assets/fonts/vazir/vazir.css');

:root {
    --primary: #5B46F7;
    --primary-dark: #3B2BB5;
    --primary-light: #8B7BF9;
    --primary-glow: rgba(91, 70, 247, 0.2);
    --text-main: #1a1a2e;
    --text-light: #64748b;
    --bg-white: #ffffff;
    --bg-soft: #f8fafc;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 25px 50px -12px rgba(91, 70, 247, 0.25);
    --shadow-xl: 0 35px 60px -15px rgba(91, 70, 247, 0.3);
    --border-radius: 28px;
    --border-radius-sm: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'vazir', sans-serif;
    background: linear-gradient(135deg, #f5f7fe 0%, #eef2ff 100%);
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ============================================
   المان‌های متحرک پس‌زمینه
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(91, 70, 247, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(91, 70, 247, 0.04) 0%, transparent 50%),
        repeating-linear-gradient(45deg, rgba(91, 70, 247, 0.01) 0px, rgba(91, 70, 247, 0.01) 2px, transparent 2px, transparent 8px);
    pointer-events: none;
    z-index: 0;
}

.floating-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: #5B46F7;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: #8B7BF9;
    bottom: -80px;
    left: -80px;
    animation-delay: -5s;
}

.orb-3 {
    width: 180px;
    height: 180px;
    background: #3B2BB5;
    top: 50%;
    left: 30%;
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

/* ============================================
   هدر عمودی (Vertical Header)
   ============================================ */
.vertical-header {
    position: fixed;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(91, 70, 247, 0.1);
}

.header-icon i {
    font-size: 1.4rem;
    transition: 0.3s;
}

/* لوگو با کادر نئونی */
.header-icon.logo-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 8px 25px rgba(91, 70, 247, 0.35);
    position: relative;
    overflow: hidden;
}

.header-icon.logo-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: logoShine 3s infinite;
}

@keyframes logoShine {
    100% { transform: translateX(100%); }
}

.header-icon.logo-icon i {
    color: white;
    font-size: 1.6rem;
}

.header-icon:hover {
    transform: translateX(-6px) scale(1.05);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.header-icon.logo-icon:hover {
    transform: translateX(-6px) scale(1.05);
}

/* ریسپانسیو هدر عمودی */
@media (max-width: 900px) {
    .vertical-header {
        flex-direction: row;
        left: 20px;
        right: 20px;
        top: auto;
        bottom: 20px;
        transform: none;
        justify-content: center;
        gap: 12px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(20px);
        padding: 10px 20px;
        border-radius: 60px;
        box-shadow: var(--shadow-md);
        border: 1px solid rgba(91, 70, 247, 0.15);
    }
    
    .header-icon {
        width: 48px;
        height: 48px;
    }
    
    .header-icon:hover {
        transform: translateY(-4px) scale(1.05);
    }
}

/* ============================================
   کانتینر اصلی با کادر و سایه حرفه‌ای
   ============================================ */
.page-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 20px 40px;
    position: relative;
    z-index: 1;
}

/* کادر اصلی مقاله */
.content-area {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(91, 70, 247, 0.1);
    animation: fadeInUp 0.6s ease forwards;
}

.content-area:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   هدر مقاله (Hero)
   ============================================ */
.article-hero {
    position: relative;
    min-height: 380px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 0;
}

.article-hero:hover .hero-bg {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(91, 70, 247, 0.9), rgba(91, 70, 247, 0.2));
    z-index: 1;
}

.hero-data {
    position: relative;
    z-index: 2;
    padding: 50px 48px;
    color: white;
}

.hero-cat {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    margin-bottom: 20px;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-cat:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
    font-family: 'lalezar', 'vazir', sans-serif;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    opacity: 0.9;
}

.author-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    object-fit: cover;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-item i {
    font-size: 0.8rem;
        margin-left: 5px;
}

.meta-sep {
    opacity: 0.5;
}

/* ============================================
   بدنه مقاله
   ============================================ */
.article-body {
    padding: 48px;
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-main);
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2 {
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    padding-right: 1rem;
    border-right: 4px solid var(--primary);
    font-weight: 700;
}

.article-body h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.8rem;
    color: var(--primary-dark);
}

.article-body img {
    max-width: 100%;
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: var(--shadow-md);
}

.article-body ul, 
.article-body ol {
    margin: 1rem 0 1rem 1.5rem;
    padding-right: 1rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    border-right: 4px solid var(--primary);
    background: var(--bg-soft);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 16px;
    font-style: italic;
    color: var(--text-light);
}

.article-body code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ============================================
   سایدبار
   ============================================ */
.sidebar-area {
    position: sticky;
    top: 30px;
    align-self: start;
}

.sidebar-widget {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(91, 70, 247, 0.1);
    transition: 0.3s;
}

.sidebar-widget:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-right: 12px;
    border-right: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--primary);
    font-size: 1rem;
        margin-left: 8px;
}

.mini-post {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    transition: 0.3s;
}
.mini-post small i {
    font-size: 0.7rem;
    margin-left: 3px;
}
.mini-post:hover {
    background: var(--bg-soft);
    transform: translateX(-4px);
}

.mini-post img {
    width: 65px;
    height: 65px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.mini-post h5 {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: 600;
}

.mini-post a {
    text-decoration: none;
    color: var(--text-main);
    transition: 0.2s;
}

.mini-post a:hover {
    color: var(--primary);
}

.toc-box {
    background: rgba(91, 70, 247, 0.03);
    border: 1px solid rgba(91, 70, 247, 0.15);
}

.toc-box ul {
    padding-right: 20px;
    margin: 0;
}

.toc-box li {
    list-style: circle;
    margin-bottom: 10px;
}

.toc-box a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.85rem;
    transition: 0.2s;
}

.toc-box a:hover {
    color: var(--primary);
    padding-right: 4px;
}

/* ============================================
   نوار پیشرفت مطالعه
   ============================================ */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 10000;
    transition: width 0.1s ease;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* ============================================
   کامنت‌ها
   ============================================ */
.comments-section {
    padding: 32px 48px 48px;
    border-top: 1px solid rgba(91, 70, 247, 0.1);
    background: var(--bg-white);
}

/* ============================================
   ریسپانسیو
   ============================================ */
@media (max-width: 1100px) {
    .page-container {
        margin: 30px auto;
        padding: 15px 25px;
    }
    
    .hero-data {
        padding: 40px 35px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .article-body {
        padding: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 900px) {
    .page-container {
        grid-template-columns: 1fr !important;
        margin-right: auto !important;
        padding: 15px 20px;
        gap: 25px;
    }
    
    .sidebar-area {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .sidebar-widget:first-child {
        grid-column: 1 / -1;
    }
    
    .hero-data {
        padding: 35px 25px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .article-body {
        padding: 28px;
        font-size: 0.95rem;
    }
    
    .article-body h2 {
        font-size: 1.3rem;
    }
    
    .article-body h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 650px) {
    .page-container {
        padding: 12px 15px;
        margin: 20px auto;
    }
    
    .hero-data {
        padding: 25px 20px;
    }
    
    .hero-title {
        font-size: 1.3rem;
    }
    
    .hero-meta {
        font-size: 0.7rem;
        gap: 10px;
    }
    
    .auth-img {
        width: 28px;
        height: 28px;
    }
    
    .article-body {
        padding: 20px;
        font-size: 0.9rem;
        line-height: 1.8;
    }
    
    .article-body h2 {
        font-size: 1.2rem;
        margin: 1.5rem 0 0.8rem;
    }
    
    .sidebar-area {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sidebar-widget {
        padding: 18px;
    }
    
    .mini-post img {
        width: 50px;
        height: 50px;
    }
    
    .mini-post h5 {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.1rem;
    }
    
    .hero-cat {
        font-size: 0.65rem;
        padding: 4px 12px;
    }
    
    .article-body {
        padding: 16px;
        font-size: 0.85rem;
    }
    
    .widget-title {
        font-size: 0.95rem;
    }
}

/* ============================================
   انیمیشن‌های اضافه
   ============================================ */
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-widget {
    animation: slideIn 0.4s ease forwards;
    animation-delay: calc(var(--order, 0) * 0.1s);
}

.sidebar-widget:nth-child(1) { --order: 1; }
.sidebar-widget:nth-child(2) { --order: 2; }
.sidebar-widget:nth-child(3) { --order: 3; }



/* ============================================
   فهرست مطالب پیشرفته
   ============================================ */

.toc-wrapper {
    margin: 35px 0 45px;
    position: relative;
}

.toc-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    border: 1px solid rgba(91, 70, 247, 0.12);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.toc-container:hover {
    box-shadow: 0 12px 40px rgba(91, 70, 247, 0.12);
    border-color: rgba(91, 70, 247, 0.2);
}

.toc-header {
    background: linear-gradient(120deg, #5B46F7, #7C3AED);
    padding: 18px 24px;
    position: relative;
    overflow: hidden;
}

.toc-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    animation: tocRotate 20s linear infinite;
}

@keyframes tocRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.toc-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.toc-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toc-title i {
    font-size: 1.8rem;
    color: white;
    background: rgba(255,255,255,0.15);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.toc-title h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
}

.toc-title span {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.8);
    display: block;
    margin-top: 4px;
}

.toc-actions {
    display: flex;
    gap: 10px;
}

.toc-expand-btn,
.toc-collapse-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.toc-expand-btn:hover,
.toc-collapse-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.toc-progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.2);
    position: relative;
    margin-top: 15px;
}

.toc-progress-fill {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.toc-body {
    padding: 20px 24px;
    max-height: 450px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.toc-body::-webkit-scrollbar {
    width: 5px;
}

.toc-body::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.toc-body::-webkit-scrollbar-thumb {
    background: #5B46F7;
    border-radius: 10px;
}

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

.toc-sublist {
    list-style: none;
    padding-right: 20px;
    margin-top: 8px;
    margin-bottom: 5px;
}

.toc-item {
    margin: 6px 0;
    opacity: 0;
    transform: translateX(15px);
    animation: tocFadeIn 0.4s ease forwards;
    animation-delay: calc(var(--order, 0) * 0.02s);
}

@keyframes tocFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: #334155;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.toc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(91,70,247,0.08), transparent);
    transition: width 0.3s ease;
    border-radius: 14px;
}

.toc-link:hover::before {
    width: 100%;
}

.toc-link:hover {
    background: rgba(91, 70, 247, 0.05);
    transform: translateX(-5px);
    color: #5B46F7;
}

.toc-link.active {
    background: rgba(91, 70, 247, 0.1);
    color: #5B46F7;
    border-right: 3px solid #5B46F7;
}

.toc-bullet {
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

.toc-number {
    font-weight: 600;
    color: #5B46F7;
    min-width: 38px;
    font-size: 0.85rem;
    font-family: monospace;
}

.toc-text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
}

.toc-time {
    font-size: 0.7rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 30px;
    white-space: nowrap;
}

.toc-link:hover .toc-time {
    background: #e2e8f0;
}

/* سطوح مختلف */
.toc-level-3 .toc-text {
    font-size: 0.85rem;
    font-weight: 400;
}

.toc-level-3 .toc-bullet {
    font-size: 0.8rem;
}

.toc-level-4 .toc-text {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.85;
}

.toc-level-4 .toc-bullet {
    font-size: 0.7rem;
}

.toc-footer {
    padding: 12px 24px;
    border-top: 1px solid rgba(91, 70, 247, 0.1);
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #64748b;
}

.toc-stats {
    display: flex;
    gap: 20px;
}

.toc-stats i {
    margin-left: 5px;
}

.toc-back-to-top {
    background: none;
    border: none;
    color: #5B46F7;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}

.toc-back-to-top:hover {
    background: rgba(91, 70, 247, 0.1);
}

/* دکمه شناور برای موبایل */
.toc-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #5B46F7, #7C3AED);
    border-radius: 26px;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(91, 70, 247, 0.4);
    transition: all 0.3s;
}

.toc-fab:hover {
    transform: scale(1.1);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .toc-fab {
        display: flex;
    }
    
    .toc-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 100vh;
        z-index: 1000;
        margin: 0;
        transition: right 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    .toc-wrapper.open {
        right: 0;
    }
    
    .toc-container {
        border-radius: 0;
        height: 100%;
        overflow-y: auto;
    }
    
    .toc-header {
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .toc-body {
        max-height: calc(100vh - 180px);
    }
    
    .toc-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .toc-actions {
        align-self: flex-end;
    }
    
    .toc-time {
        display: none;
    }
}

@media (min-width: 769px) {
    .toc-wrapper {
        display: block !important;
    }
}

/* اسکرول نرم */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* هایلایت موقت هنگام کلیک */
@keyframes tocFlash {
    0% { background: rgba(91, 70, 247, 0.2); }
    100% { background: transparent; }
}

.toc-highlight {
    animation: tocFlash 1s ease;
}
/* اضافه کردن به single-post.css */

/* کلاس‌های فهرست مدرن */
.advanced-toc,
.toc-modern {
    margin: 30px 0 40px;
}

.toc-modern .toc-card,
.advanced-toc .toc-card {
    background: white;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.toc-modern .toc-header,
.advanced-toc .toc-header {
    background: linear-gradient(135deg, #4D96FF, #2563EB);
    padding: 18px 24px;
    color: white;
}

.toc-modern .toc-body,
.advanced-toc .toc-body {
    padding: 20px 24px;
    max-height: 450px;
    overflow-y: auto;
}

/* کلاس‌های فهرست کلاسیک */
.toc-classic {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin: 30px 0;
}

.toc-classic h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

/* کلاس‌های فهرست مینیمال */
.toc-minimal {
    margin: 30px 0;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.toc-minimal .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* اطمینان از کار کردن لینک‌ها در همه استایل‌ها */
.advanced-toc .toc-link,
.toc-modern .toc-link,
.toc-classic .toc-link,
.toc-minimal .toc-link {
    cursor: pointer;
    text-decoration: none;
}

.advanced-toc .toc-link:hover,
.toc-modern .toc-link:hover,
.toc-classic .toc-link:hover,
.toc-minimal .toc-link:hover {
    text-decoration: none;
}

/* مخفی کردن فهرست تکراری */
.toc-wrapper.hidden {
    display: none;
}