.goha-toc-box {
    margin: 30px 0 40px 0;
    border-radius: 14px;
    direction: rtl;
    font-family: inherit !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-sizing: border-box;
}

/* خيارات العرض (Width Options) */
.goha-toc-full-width {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.goha-toc-boxed {
    width: 100% !important;
    max-width: 720px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.goha-toc-auto {
    display: inline-block !important;
    min-width: 300px !important;
    max-width: 100% !important;
}

/* 1. الثيم المظلم الفخم (Dark Glass Luxury Theme) */
.goha-toc-modern-dark {
    background: linear-gradient(145deg, #0b0f19 0%, #111827 50%, #1e293b 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.goha-toc-modern-dark .goha-toc-header {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 14px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.goha-toc-heading {
    font-family: inherit !important;
    color: #fff !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px;
}

.goha-toc-count-badge {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    margin-right: 8px !important;
    font-family: inherit !important;
}

/* إجبار تصميم زر الفهرس حتى لا يخربه كلاس button التابع لقالب ووردبريس */
button.goha-toc-toggle-btn,
.goha-toc-toggle-btn {
    all: unset !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #e2e8f0 !important;
    border-radius: 50px !important;
    padding: 4px 12px 4px 8px !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    line-height: 1.4 !important;
    height: auto !important;
}

button.goha-toc-toggle-btn:hover,
.goha-toc-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.3) !important;
    border-color: #818cf8 !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.45) !important;
    transform: translateY(-1px) !important;
}

.toggle-icon-pill {
    width: 18px !important;
    height: 18px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
}

.goha-toc-toggle-btn:hover .toggle-icon-pill {
    background: #6366f1 !important;
}

.toggle-svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: block !important;
}

.goha-toc-toggle-btn.collapsed .toggle-svg {
    transform: rotate(180deg) !important;
}

.goha-toc-modern-dark .goha-toc-link {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    font-size: 0.88rem !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
}

.goha-toc-modern-dark .goha-toc-link:hover {
    color: #fff !important;
    background: rgba(99, 102, 241, 0.15) !important;
    transform: translateX(-4px) !important;
}

.goha-toc-modern-dark .goha-tbadge-num {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #818cf8 !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    min-width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
}

/* الأنماط الشاملة للأيقونات والنقاط الفخمة (Universal Luxury Bullet & Glow Dots) */
.goha-tbadge-bullet {
    display: inline-block !important;
    width: 9px !important;
    height: 9px !important;
    min-width: 9px !important;
    min-height: 9px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    background: #6366f1 !important;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.9), 0 0 16px rgba(129, 140, 248, 0.6) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

/* وميض ونبض خفيف للنقطة عند التمرير */
.goha-toc-link:hover .goha-tbadge-bullet {
    transform: scale(1.35) !important;
    background: #38bdf8 !important;
    box-shadow: 0 0 12px #38bdf8, 0 0 20px rgba(56, 189, 248, 0.8) !important;
}

/* المستويات الفرعية تأخذ نقاط أصغر متدرجة للترتيب البصري الفخم */
.goha-lvl-2 .goha-tbadge-bullet {
    width: 7px !important;
    height: 7px !important;
    min-width: 7px !important;
    min-height: 7px !important;
    opacity: 0.85 !important;
}

.goha-lvl-3 .goha-tbadge-bullet {
    width: 5px !important;
    height: 5px !important;
    min-width: 5px !important;
    min-height: 5px !important;
    opacity: 0.7 !important;
}

.goha-tbadge-arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #818cf8 !important;
    font-size: 0.75rem !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
}

.goha-toc-link:hover .goha-tbadge-arrow {
    transform: translateX(-4px) !important;
    color: #38bdf8 !important;
}

/* تخصيصات الثيم المظلم (Dark Glass) */
.goha-toc-modern-dark .goha-tbadge-bullet {
    background: #6366f1 !important;
    box-shadow: 0 0 10px #6366f1, 0 0 4px #818cf8 !important;
}

/* تخصيصات ثيم التدرج الملكي (Royal Gradient) */
.goha-toc-royal-gradient .goha-tbadge-bullet {
    background: #a5b4fc !important;
    box-shadow: 0 0 8px #a5b4fc, 0 0 14px rgba(165, 180, 252, 0.8) !important;
}

.goha-toc-royal-gradient .goha-toc-link:hover .goha-tbadge-bullet {
    background: #38bdf8 !important;
    box-shadow: 0 0 12px #38bdf8, 0 0 20px rgba(56, 189, 248, 0.9) !important;
}

.goha-toc-royal-gradient .goha-tbadge-arrow {
    color: #c7d2fe !important;
}

/* تخصيصات ثيم الياقوتي المخملي (Ruby Crimson) */
.goha-toc-ruby-crimson .goha-tbadge-bullet {
    background: #f43f5e !important;
    box-shadow: 0 0 10px #f43f5e, 0 0 18px rgba(244, 63, 94, 0.8) !important;
}

.goha-toc-ruby-crimson .goha-toc-link:hover .goha-tbadge-bullet {
    background: #fb7185 !important;
    box-shadow: 0 0 14px #fb7185, 0 0 24px rgba(251, 113, 133, 0.95) !important;
}

.goha-toc-ruby-crimson .goha-tbadge-arrow {
    color: #fb7185 !important;
}

/* تخصيصات الثيم الفاتح (Clean Light) */
.goha-toc-minimal-light .goha-tbadge-bullet {
    background: #4f46e5 !important;
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.5) !important;
}

.goha-toc-minimal-light .goha-toc-link:hover .goha-tbadge-bullet {
    background: #4338ca !important;
    box-shadow: 0 0 10px rgba(67, 56, 202, 0.7) !important;
}

.goha-toc-minimal-light .goha-tbadge-arrow {
    color: #4f46e5 !important;
}

/* 2. ثيم التدرج الملكي (Royal Gradient Theme) */
.goha-toc-royal-gradient {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 20px 45px rgba(49, 46, 129, 0.35) !important;
}

.goha-toc-royal-gradient .goha-toc-header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goha-toc-royal-gradient .goha-toc-heading {
    color: #fff !important;
    font-size: 1.15rem;
    font-weight: 800;
}

.goha-toc-royal-gradient .goha-toc-count-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #e0e7ff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin-right: 10px;
}

.goha-toc-royal-gradient .goha-toc-link {
    color: #e0e7ff !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.goha-toc-royal-gradient .goha-toc-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-5px);
}

.goha-toc-royal-gradient .goha-tbadge-num {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    min-width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

/* 3. الثيم الفاتح الناصع (Clean Modern Light) */
.goha-toc-minimal-light {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04) !important;
}

.goha-toc-minimal-light .goha-toc-header {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goha-toc-minimal-light .goha-toc-heading {
    color: #0f172a !important;
    font-size: 1.15rem;
    font-weight: 800;
}

.goha-toc-minimal-light .goha-toc-count-badge {
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 10px;
}

.goha-toc-minimal-light .goha-toc-toggle-btn {
    background: #fff;
    border: 1.5px solid #cbd5e1;
    color: #475569;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.goha-toc-minimal-light .goha-toc-toggle-btn:hover {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.goha-toc-minimal-light .goha-toc-link {
    color: #334155 !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.goha-toc-minimal-light .goha-toc-link:hover {
    color: #4f46e5 !important;
    background: #f1f5f9;
    transform: translateX(-5px);
}

.goha-toc-minimal-light .goha-tbadge-num {
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    min-width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

/* 4. ثيم الياقوتي المخملي الأحمر (Ruby Crimson Luxury Theme) للمواقع ذات الهوية الحمراء */
.goha-toc-ruby-crimson {
    background: linear-gradient(135deg, #180308 0%, #3f0713 50%, #881337 100%) !important;
    border: 1px solid rgba(244, 63, 94, 0.35) !important;
    box-shadow: 0 18px 40px rgba(136, 19, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.goha-toc-ruby-crimson .goha-toc-header {
    background: rgba(0, 0, 0, 0.25) !important;
    border-bottom: 1px solid rgba(244, 63, 94, 0.25) !important;
    padding: 14px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.goha-toc-ruby-crimson .goha-toc-heading {
    color: #fff !important;
    font-family: inherit !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
}

.goha-toc-ruby-crimson .goha-toc-count-badge {
    background: rgba(244, 63, 94, 0.22) !important;
    color: #fecdd3 !important;
    border: 1px solid rgba(244, 63, 94, 0.45) !important;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    margin-right: 8px !important;
    font-family: inherit !important;
}

.goha-toc-ruby-crimson .goha-toc-toggle-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(244, 63, 94, 0.35) !important;
    color: #ffe4e6 !important;
}

.goha-toc-ruby-crimson .goha-toc-toggle-btn:hover {
    background: rgba(244, 63, 94, 0.35) !important;
    border-color: #fb7185 !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.55) !important;
}

.goha-toc-ruby-crimson .goha-toc-toggle-btn:hover .toggle-icon-pill {
    background: #e11d48 !important;
}

.goha-toc-ruby-crimson .goha-toc-link {
    color: #ffe4e6 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 7px 12px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    font-size: 0.88rem !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
}

.goha-toc-ruby-crimson .goha-toc-link:hover {
    color: #fff !important;
    background: rgba(225, 29, 72, 0.22) !important;
    transform: translateX(-4px) !important;
}

.goha-toc-ruby-crimson .goha-tbadge-num {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fb7185 !important;
    border: 1px solid rgba(244, 63, 94, 0.4) !important;
    min-width: 22px !important;
    height: 22px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    font-family: inherit !important;
}

/* القائمة والشجرة الداخلية */
.goha-toc-list-wrap {
    padding: 16px 20px 22px 20px;
}

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

.goha-toc-item {
    all: unset !important;
    display: list-item !important;
    list-style: none !important;
    list-style-type: none !important;
    margin: 4px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* تنظيف تام لأي علامات صح أو ترقيم يفرضه القالب عبر before أو after */
.goha-toc-item::before,
.goha-toc-item::after,
.goha-toc-link::before,
.goha-toc-link::after {
    display: none !important;
    content: none !important;
}

a.goha-toc-link,
.goha-toc-link {
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

span.goha-tbadge-num,
.goha-tbadge-num {
    line-height: 1 !important;
    box-sizing: border-box !important;
}

.goha-tbadge-text {
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
}

.goha-lvl-1 {
    margin-right: 0 !important;
}

.goha-lvl-2 {
    margin-right: 28px !important;
    opacity: 0.95;
    font-size: 0.93em;
}

.goha-lvl-3 {
    margin-right: 50px !important;
    opacity: 0.85;
    font-size: 0.88em;
}

.goha-toc-icon {
    font-size: 1.25rem;
    margin-left: 6px;
}

/* ==========================================================================
   التوافق التام مع الموبايل وجميع أحجام الشاشات (Responsive Mobile Design)
   ========================================================================== */

@media screen and (max-width: 768px) {
    .goha-toc-box {
        margin: 25px 0 35px 0 !important;
        border-radius: 12px !important;
    }

    .goha-toc-header {
        padding: 14px 18px !important;
        flex-wrap: wrap;
        gap: 10px;
    }

    .goha-toc-heading {
        font-size: 1.02rem !important;
    }

    .goha-toc-count-badge {
        padding: 2px 8px !important;
        font-size: 0.7rem !important;
        margin-right: 6px !important;
    }

    .goha-toc-list-wrap {
        padding: 12px 14px 16px 14px !important;
    }

    .goha-toc-link {
        padding: 8px 10px !important;
        font-size: 0.9rem !important;
        gap: 10px !important;
    }

    .goha-lvl-2 {
        margin-right: 18px !important;
    }

    .goha-lvl-3 {
        margin-right: 30px !important;
    }

    .goha-tbadge-num {
        min-width: 24px !important;
        height: 24px !important;
        font-size: 0.75rem !important;
        border-radius: 6px !important;
    }
}

@media screen and (max-width: 480px) {
    .goha-toc-box {
        margin: 20px 0 28px 0 !important;
        border-radius: 10px !important;
    }

    .goha-toc-header {
        padding: 12px 14px !important;
    }

    .goha-toc-title-wrap {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .goha-toc-heading {
        font-size: 0.95rem !important;
    }

    .goha-toc-toggle-btn {
        padding: 4px 10px !important;
        font-size: 0.75rem !important;
    }

    .goha-toc-link {
        padding: 7px 8px !important;
        font-size: 0.85rem !important;
        line-height: 1.5;
    }

    .goha-lvl-2 {
        margin-right: 12px !important;
    }

    .goha-lvl-3 {
        margin-right: 20px !important;
    }
}
