.imran-toc-card {
    width: 300px;
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 10px 28px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    margin-top: 30px;
}

.imran-toc-card.auto-toc {
    padding: 20px 20px 0px 20px;
}



/* Header */
.imran-toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* Icon */
.imran-toc-icon {
    width: 34px;
    height: 34px;
    background: #FD8802;
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon animation */
.toc-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Title */
.imran-toc-title {
    font-size: 18px;
    font-weight: 600;
    color: #FD8802;
}

/* List */
.imran-toc-list {
    list-style: none;
    padding: 0;
    margin-top: 16px;
    counter-reset: toc-counter;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 1;
}

/* Items */
.imran-toc-list li {
    display: flex;
    align-items: flex-start;   /* top align */
    gap: 12px;
    margin-bottom: 14px;
}
/* .imran-toc-list li::before {
    margin-top: 2px; 
} */

/* Fix text alignment & wrapping */
.imran-toc-list a {
    display: block;
    line-height: 1.45;
    padding-top: 2px; /* visual balance */
}

/* Number */
.imran-toc-list li::before {
    counter-increment: toc-counter;
    content: counter(toc-counter);

    width: 28px;
    height: 28px;
    flex: 0 0 28px;        /* 🔑 prevents stretching */
    
    border-radius: 50%;
    background: #f4f4f4;
    color: #555;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;       /* 🔑 vertical centering fix */

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    margin-top: 4px;
}


/* Links */
.imran-toc-list a {
    color: #555;
    text-decoration: none;
    font-size: 15px;
}

.imran-toc-list a:hover {
    color: #FD8802;
}

/* Collapsed state */
.imran-toc-card.collapsed .imran-toc-list {
    max-height: 0;
    opacity: 0;
}

.imran-toc-card.collapsed .toc-icon {
    transform: rotate(-90deg);
}

/* Hide ONLY auto-insert TOC on desktop */
@media (min-width: 769px) {
    .imran-toc-card.auto-toc {
        display: none !important;
    }
}
.imran-toc-card.auto-toc {
    max-width: 100%;
    width: 100%;
}


/* Mobile auto TOC: collapsed by default */


/* ===============================
   DEFAULT STATE: AUTO TOC CLOSED
================================ */

/* Only when NOT opened yet */
.imran-toc-card.auto-toc:not(.opened) .imran-toc-list {
    max-height: 0;
    opacity: 0;
}

/* Icon default direction */
.imran-toc-card.auto-toc:not(.opened) .toc-icon {
    transform: rotate(-90deg);
}

/* ===============================
   COLLAPSED STATE (CLICK)
================================ */

.imran-toc-card.collapsed .imran-toc-list {
    max-height: 0;
    opacity: 0;
}

.imran-toc-card.collapsed .toc-icon {
    transform: rotate(-90deg);
}
/* Reduce gap when TOC is closed */
.imran-toc-card.collapsed .imran-toc-list {
    margin-top: 0;
}

/* Smooth spacing when open */
.imran-toc-list {
    margin-top: 16px;
}
@media only screen and (max-width: 767px) {
.sidebar-toc-special-imran{
	display:none;
}
}