/*
 * Reference Banner Styles
 * Designed to match the reference layout for blog detail pages
 */

.reference-banner {
    background: linear-gradient(219.84deg, #EAECFF 39.82%, #F6ECFC 126.01%);
  	 padding: 40px 0 15px 0;
}

.reference-banner .rbc-container>.breadcrumb {
    margin-bottom: 30px;
    font-size: 14px;
    white-space: normal !important;
    word-wrap: break-word !important;
    display: block !important;
    line-height: 1.5 !important;
    overflow: visible !important;
    height: auto !important;
    text-overflow: clip !important;
    margin-top: 0 !important;
}

.reference-banner .banner-inner {
    display: flex;
    align-items: center;
    gap: 40px;
}

.banner-left {
    flex: 0 0 45%;
    max-width: 45%;
}

.banner-right {
    flex: 0 0 55%;
    max-width: 55%;
}

.banner-left .rb-iwrap {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.banner-left img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.banner-right .entry-cat {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4b6fff;
    font-size: 14px;
}

.banner-right .single-entry-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

.banner-right .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-right .author-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.banner-right .meta-sep {
    color: #ccc;
}

.banner-cta {
    display: flex;
    gap: 15px;
}

.btn-premium {
    display: inline-block;
    padding: 12px 28px;
    background-color: #35386b;
    color: #fff !important;
    border-radius: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(53, 56, 107, 0.3);
}

.btn-premium:hover {
    background-color: #2a2d56;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(53, 56, 107, 0.4);
}

/* Mobile Responsiveness */
@media(min-width:767px) {
    .single-left-section {
        width: 220px;
        max-width: 220px;
        padding-right: 0;
    }
}

@media(min-width:991px) {
    .rbc-content-section .rbc-content {
        flex: 0 0 73%;
        width: 73%;
        max-width: 73%;
    }

    .rbc-content-section .rbc-sidebar {
        width: 200px;
        max-width: 200px;
        padding-left: 0;
    }

    .blogDetailContent.rb-p20-gutter {
        padding-left: 0px;
        padding-right: 0px;
    }
}

@media (min-width: 1200px) {
    .single-left-section {
        width: 290px;
        max-width: 290px;
    }

    .single-left-section #ez-toc-container {
        max-width: 260px !important;
        max-height: calc(100vh - 120px) !important;
        padding-bottom: 20px !important;
        overflow-y: auto !important;
    }

    .rbc-content-section .rbc-content {
        flex: 0 0 76%;
        width: 76%;
        max-width: 76%;
    }

    .single-left-section #ez-toc-container ul.ez-toc-list li a {
        font-size: 13px !important;
    }

    .single-left-section #ez-toc-container .ez-toc-title-container .ez-toc-title {
        margin-bottom: 18px;
        display: block;
        text-align: center;
    }
}
@media (min-width:992px){
.reference-banner {
    padding: 100px 15px 55px 15px;
}
}
@media(min-width:1400px) {
    .rbc-content-section .rbc-content {
        flex: 0 0 79%;
        width: 79%;
        max-width: 79%;
    }
}

@media(min-width:1500px) {
    .rbc-content-section .rbc-content {
        flex: 0 0 82%;
        width: 82%;
        max-width: 82%;
        padding-right: 25px;
    }

    .single-left-section #ez-toc-container {
        max-width: 300px !important;
        padding: 15px 17px !important;
        max-height: calc(100vh - 120px) !important;
        padding-bottom: 30px !important;
        overflow-y: auto !important;
    }

    .single-left-section {
        width: 340px;
        max-width: 340px;
    }

    .single-left-section #ez-toc-container ul.ez-toc-list li a {
        font-size: 16px !important;
    }
}

@media (max-width: 991px) {
    .reference-banner .rbc-container>.breadcrumb {
        text-align: left;
        margin-bottom: 20px;
    }

    .reference-banner .banner-inner {
        flex-direction: column;
        text-align: left;
    }

    .banner-left,
    .banner-right {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .banner-right .single-entry-meta {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .banner-cta {
        justify-content: flex-start;
    }

}

/* Ensure sidebar is visible and sticky behavior is preserved */
.rbc-sidebar {
    opacity: 1 !important;
    visibility: visible !important;
}

.sidebar-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
}

.reference-banner {
    position: relative;
    z-index: 10;
}

/* Sidebar TOC Styles */
.single-left-section #ez-toc-container {
    width: 100% !important;
    max-width: 200px;
    margin-bottom: 30px;
    padding: 15px 0 15px 10px !important;
    border: 1px solid #e1e1e1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-height: calc(100vh - 140px) !important; 
    /* Set max-height to match viewport height with offset */
    overflow-y: auto !important; 
    overflow-x: hidden !important;
    scrollbar-width: thin;
    scrollbar-color: #888 transparent;
    scroll-behavior: smooth;
    padding-bottom: 30px !important
}

.single-left-section #ez-toc-container::-webkit-scrollbar {
    width: 3px !important;
    display: block !important;
}

.single-left-section #ez-toc-container::-webkit-scrollbar-track {
    background: transparent !important;
    border-radius: 10px;
}

.single-left-section #ez-toc-container::-webkit-scrollbar-thumb {
    background: #ccc !important;
    border-radius: 10px;
}

.single-left-section #ez-toc-container::-webkit-scrollbar-thumb:hover {
    background: #888 !important;
}

.single-left-section #ez-toc-container .ez-toc-title-container {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    text-align: center;
}

.single-left-section #ez-toc-container .ez-toc-title-container .ez-toc-title {
    font-size: 15px !important;
    font-weight: 700;
}

.single-left-section #ez-toc-container ul.ez-toc-list {
    padding-left: 0 !important;
    padding-right: 15px !important;
    /* Added padding back here */
    /* padding-bottom: 30px !important; */
    margin-bottom: 0;
}

.single-left-section #ez-toc-container ul.ez-toc-list li {
    margin-bottom: 8px;
    list-style: none !important;
    font-size: 12px;
    line-height: 1.4;
}

.single-left-section #ez-toc-container ul.ez-toc-list li a {
    color: #444;
    text-decoration: none;
    display: block;
}

.single-left-section #ez-toc-container ul.ez-toc-list li a:hover {
    color: #35386b;
}

.single-left-section #ez-toc-container .ez-toc-pull-right {
    display: none !important;
}

/* Adjust social share position if needed */
.single-left-section .single-left-share {
    margin-top: 10px;
}

/* Fix Featured Image Cropping */
.p-feat,
.p-wrap .rb-iwrap,
.p-list .col-left .rb-iwrap,
.p-grid .p-feat .rb-iwrap,
.rb-ires {
    height: auto !important;
    padding-bottom: 0 !important;
}

.p-feat:before,
.rb-iwrap:before,
.rb-ires:before {
    display: none !important;
}

.p-feat img,
.rb-iwrap img,
.rb-ires img {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
}

/* Ensure consistent alignment in grids if images have different heights */
.grid-holder,
.rbc-grid {
    align-items: flex-start !important;
}

/* TOC Scroll Spy Base & Active State */
.single-left-section #ez-toc-container ul.ez-toc-list li a {
    transition: color 0.6s ease-in-out, text-shadow 0.6s ease-in-out !important;
    display: block;
}

.single-left-section #ez-toc-container ul.ez-toc-list li a.active-toc-item {
    color: #35386b !important;
    font-weight: 600 !important;
    background: none !important;
}

.single-left-section #ez-toc-container ul.ez-toc-list li {
    padding-left: 8px;
    border-left: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.single-left-section #ez-toc-container ul.ez-toc-list li.active-parent {
    border-left-color: #35386b;
}