.toc-content .content-section {
    margin-bottom: 45px;
    scroll-margin-top: 150px;
}

/* Primary Section Headings (TOC Items Level 1) */
.toc-content .content-section-title,
.toc-content .content-section > h2 {
    font-size: 1.75rem; /* ~28px */
    font-weight: 800;
    color: #19221e;
    line-height: 1.35;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

/* Secondary Section Headings (Level 2) */
.toc-content .content-section-subtitle,
.toc-content .content-section > h3 {
    font-size: 1.4rem; /* ~22.4px */
    font-weight: 700;
    color: #272c2a;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.85rem;
}

/* Tertiary Section Headings (Level 3) */
.toc-content .content-section-subsubtitle,
.toc-content .content-section > h4 {
    font-size: 1.22rem; /* ~19.5px */
    font-weight: 600;
    color: #374151;
    line-height: 1.4;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Rich Text Subheadings inside .content */
.content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #19221e;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.35;
}

.content h3 {
    font-size: 1.38rem;
    font-weight: 700;
    color: #272c2a;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.content h4 {
    font-size: 1.22rem; /* ~19.5px */
    font-weight: 700;
    color: #19221e;
    margin-top: 1.4rem;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.content-subheading,
.content h3.content-subheading {
    font-size: 1.35rem; /* ~22px */
    font-weight: 700;
    color: #19221e;
    margin-top: 2rem !important;
    margin-bottom: 0.65rem !important;
    line-height: 1.4;
    display: block;
}

.content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.1rem;
    margin-bottom: 0.5rem;
}

.content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
}

/* Paragraph and Body Typography */
.content p,
.package__content p {
    font-size: 1.05rem; /* ~16.8px */
    line-height: 1.85;
    color: #333333;
    margin-bottom: 1rem;
}

/* Hyperlinks inside Article & Content */
.content a,
.package__content a {
    color: #0d6efd !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1.5px !important;
    text-underline-offset: 3px !important;
    text-decoration-color: rgba(13, 110, 253, 0.45) !important;
    font-weight: 500 !important;
    transition: color 0.2s ease, text-decoration-color 0.2s ease !important;
}

.content a:hover,
.content a:focus,
.package__content a:hover,
.package__content a:focus {
    color: #0a58ca !important;
    text-decoration-color: #0a58ca !important;
}

/* Hide any completely empty paragraphs */
.content p:empty,
.package__content p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
}

/* Proper HTML list styling (overriding global list-style: none reset in style.css) */
.content ul,
.package__content ul {
    list-style-type: disc !important;
    padding-left: 2rem !important;
    margin-top: 0.75rem !important;
    margin-bottom: 1.25rem !important;
}

.content ul li,
.package__content ul li {
    list-style-type: inherit !important;
    display: list-item !important;
    padding-left: 0.25rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.75 !important;
    color: #333333 !important;
}

.content ol,
.package__content ol {
    list-style-type: decimal !important;
    padding-left: 2rem !important;
    margin-top: 0.75rem !important;
    margin-bottom: 1.25rem !important;
}

.content ol li,
.package__content ol li {
    list-style-type: inherit !important;
    display: list-item !important;
    padding-left: 0.25rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.75 !important;
    color: #333333 !important;
}

/* Nested lists */
.content ul ul,
.content ol ul {
    list-style-type: circle !important;
    padding-left: 1.5rem !important;
    margin-top: 0.35rem !important;
    margin-bottom: 0.35rem !important;
}

.content ul ul li,
.content ol ul li {
    list-style-type: inherit !important;
}

.toc-container {
    position: relative;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(11, 60, 93, 0.4),
        0 -1px 2px rgba(11, 60, 93, 0.04);
}

.toc-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.toc-list {
    list-style-type: none;
    padding-left: 0;
    max-height: 80vh;
    overflow-x: auto;
    overflow-y: auto;
}

.toc-list ul {
    list-style-type: none;
}

.toc-list li {
    list-style-type: none;
}

.toc-link {
    text-decoration: none;
    color: #1f1a17;
    transition: color 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 2px;
}

.toc-link:focus,
.toc-link:hover,
.toc-link span:focus,
.toc-link span:hover {
    color: var(--color-hover) !important;
}

.toc-list .toc-item .toc-link {
    font-size: 16px;
    font-weight: 600;
}

.toc-list .toc-item .toc-link.toc-link-active {
    font-weight: 700;
}

.toc-level-1 {
    margin-left: 0;
}

.toc-level-2 {
    margin-left: 20px;
}

.toc-level-3 {
    margin-left: 30px;
}

.toc-item.toc-level-1 {
    margin-top: 4px;
}

.toc-item.toc-level-2 {
    margin-top: 2px;
}

.toc-item.toc-level-3 {
    margin-top: 0;
}

.toc-level-2 .toc-link span {
    color: #299b76;
    font-size: 15px;
}

.toc-level-3 .toc-link span {
    color: #686868;
    font-size: 14px;
}

/* ==========================================================================
   Content Tables: Original Grid Design (Full-Width & Auto Column Sizing)
   ========================================================================== */
.content,
.package__content {
    overflow-x: auto;
}

.content table,
.package__content table,
.blog-card table,
.details-section table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    margin: 1.5rem 0 !important;
    background: #ffffff !important;
    border: 1px solid #000000 !important;
}

/* Table Cells: Classic clean borders like before */
.content table th,
.content table td,
.package__content table th,
.package__content table td,
.blog-card table th,
.blog-card table td,
.details-section table th,
.details-section table td {
    padding: 10px 16px !important;
    border: 1px solid #000000 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #111111 !important;
    vertical-align: top !important;
    width: auto !important; /* Overrides inline fixed widths like 180px, 306px */
    height: auto !important;
    background: transparent !important;
    word-break: normal !important;
}

/* Remove paragraph margins inside table cells */
.content table td p,
.content table th p,
.package__content table td p,
.package__content table th p,
.blog-card table td p,
.blog-card table th p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit !important;
}

/* Table Header Row */
.content table thead th,
.content table tr:first-child td,
.content table tr:first-child th,
.package__content table thead th,
.package__content table tr:first-child td,
.package__content table tr:first-child th,
.blog-card table thead th,
.blog-card table tr:first-child td,
.blog-card table tr:first-child th {
    font-weight: 700 !important;
    color: #000000 !important;
    vertical-align: top !important;
}

.content table tr:first-child td strong,
.package__content table tr:first-child td strong {
    color: #000000 !important;
    font-weight: 700 !important;
}

/* Two-column Key/Value Tables: column widths according to data */
.content table tr td:first-child:nth-last-child(2),
.package__content table tr td:first-child:nth-last-child(2) {
    width: 32% !important;
}

.content table tr td:nth-child(2):nth-last-child(1),
.package__content table tr td:nth-child(2):nth-last-child(1) {
    width: 68% !important;
}

/* Remove extra margin on list items containing paragraphs */
.content ul li > p,
.content ol li > p,
.package__content ul li > p,
.package__content ol li > p {
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
}

/* Responsive Content Images (prevents overflow in mobile views) */
.content img,
.package__content img,
.editor-content img,
.blog-card img,
.details-section img {
    max-width: 100% !important;
    height: auto !important;
    display: inline-block;
}

/* Mobile responsive table and media display */
@media (max-width: 768px) {
    .content table,
    .package__content table,
    .editor-content table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .content img,
    .package__content img,
    .editor-content img,
    .blog-card img,
    .details-section img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: cover;
    }
}
