/* Breadcrumb */
.blog-entry-header .breadcrumb {
    justify-content: center;
}

.blog-entry-header .breadcrumb .breadcrumb-link,
.blog-entry-header .breadcrumb a.breadcrumb-link {
    color: var(--rp-darker-grey);
}

.blog-entry-header h1 {
    color: var(--rp-headlines);
    margin: 18px 0;
}

/* Meta */

.blog-meta {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    justify-content: center;
    align-items: center;
}


.blog-meta a,
.blog-meta .byline,
.min-read,
.posted-on-span {
    color: var(--rp-headlines) !important;
    font-size: var(--paragraph-xs-size);
    line-height: var(--paragraph-xs-line);
    font-weight: var(--weight-bold);
    text-decoration: none;
    text-transform: uppercase;
    padding: 4px 12px;
}

.blog-meta ul.post-tags {
    list-style: none;
    display: flex;
    gap: 12px;
    padding: 0;
    margin: 0;
}

.blog-meta ul.post-tags span,
.blog-meta ul.post-tags li {
    display: flex;
}

.blog-meta ul.post-tags li a {
    background-color: var(--rp-pale-cyan);
    padding: 4px 12px;
    border-radius: 100px;
}

/* Content */

.single-post-template {
    overflow-x: hidden;
}

.single-post-template .post-thumbnail {
    margin-bottom: 48px;
}

.single-post-template .post-thumbnail img,
.single-post-template .blog-content img {
    max-width: 100%;
    width: initial;
    border-radius: 24px;
}

.blog-content {
    display: flex;
    gap: 48px;
    padding-bottom: 0px;
    min-height: 500px;
}


.blog-content .blog-inner {
    margin: 0 auto;
    max-width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scroll on the whole content area */
}

.toc-title {
    margin: 0 18px 18px 18px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-item {
    display: flex;
    text-decoration: none;
    color: var(--rp-darker-grey) !important;
    padding: 4px 18px;
}

.toc-item::before {
    content: '-';
    margin-right: 4px;
}

.toc-item:hover,
.toc-item.is-active {
    background-color: var(--rp-pale-cyan);
}

.toc-item.level-1 {
    margin-left: 0;
}

.toc-item.level-2 {
    margin-left: 1rem;
}

.toc-item.level-3 {
    margin-left: 2rem;
}

.related-post-sidebar {
    flex: 0 0 283px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.related-post-item {
    display: flex;
    gap: 22px;
    border-bottom: 1px solid #C8C8C8;
    padding-bottom: 18px;
}

.related-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-post-thumbnail {
    flex: 0 0 109px;
}


.related-post-thumbnail img {
    width: 100%;
    height: auto;
    max-width: 109px !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0 !important;
}

.related-post-title {
    font-family: var(--font-family);
    font-weight: var(--weight-bold);
    font-size: var(--paragraph-sm-size);
    line-height: var(--paragraph-sm-line);
}

h4.related-post-title a {
    color: var(--rp-black);
    text-decoration: none;
}

.related-posts-slider .slick-slide {
    margin: 0 10px;
}

.related-posts-slider .slick-list {
    margin: 0 -10px;
}

.related-post-header {
    align-items: center !important;
    margin-bottom: 28px !important;
}

.related-post-header h2 {
    color: var(--rp-headlines);
    margin-bottom: 0px;
}

.related-posts-section.posts-slider-section {
    background: transparent;
    padding-top: 0;
    padding-bottom: 90px;
}

.related-posts-section.posts-slider-section .slick-prev-custom,
.related-posts-section.posts-slider-section .slick-next-custom {
    border-radius: 0px !important;
    width: 40px !important;
    height: 40px !important;
}


.blog-content h2 {
    font-weight: 700;
    font-size: 34px;
    line-height: 42px;
}

.blog-content h3 {
    font-weight: 700;
    font-size: 24px;
    line-height: 32px;
}

.blog-content h4 {
    font-weight: 700;
    font-size: 20px;
    line-height: 28px;
}

.blog-content p {
    font-size: 18px;
    line-height: 30px;
}

.blog-content ul,
.blog-content ol {
    font-size: 18px;
    line-height: 30px;
    margin-left: 0;
}

.blog-content ul li::marker {
    font-size: 14px;
}

.responsive-table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 2rem !important;
}

/* Fallback: if JS doesn't wrap the table, allow the table itself to scroll */
.blog-inner>table {
    display: block !important;
    max-width: 100% !important;
    overflow-x: auto !important;
}

.blog-content table {
    display: table !important;
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
    margin-bottom: 0px !important;
}

.blog-inner figure.wp-block-table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.blog-content table th,
.blog-content table td {
    min-width: 300px !important;
    width: 300px !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    padding: 12px !important;
    border: 1px solid #eee !important;
    text-align: left !important;
    line-height: 1.5 !important;
}

@media (max-width: 1200px) {

    .blog-content {
        flex-wrap: wrap;
    }

    .blog-content .related-post-sidebar {
        flex: 0 0 100%;
        margin-bottom: 50px;
    }

    .related-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    .related-post-item:last-child {
        border-bottom: 1px solid #C8C8C8;
    }
}

@media (max-width: 1024px) and (min-width: 768px) {
    .single-post-template {
        padding-top: 0px !important;
    }
}

@media (max-width: 768px) {
    .blog-meta {
        flex-wrap: wrap;

        justify-content: space-between;
    }

    .single-post-template {
        padding-top: 0px !important;
    }

    .blog-meta ul.post-tags {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .blog-content {
        flex-direction: column;
    }

    .blog-content h2 {
        font-size: 24px;
        line-height: 32px;
    }

    .blog-content h3 {
        font-size: 20px;
        line-height: 28px;
    }

    .blog-content h4 {
        font-size: 18px;
        line-height: 26px;
    }

    .blog-content p {
        font-size: 16px;
        line-height: 24px;
    }

    .blog-content ul,
    .blog-content ol {
        font-size: 16px;
        line-height: 24px;
    }

    .related-post-item:last-child {
        border-bottom: 0;
    }
}

.table-of-contents-sidebar {
    position: relative;
    overflow: visible;
    min-height: 100px;
}

.toc-sticky {
    width: 100%;
    overflow-y: auto;
}