.uffizio-single-post {
    min-height: 100vh;
    overflow: visible;
    padding-top: 100px;
}

.uffizio-single-post .three-column-layout {
    display: grid;
    grid-template-columns: 220px 1fr 250px;
    gap: 40px;
    padding-top: 50px;
    padding-bottom: 100px;
    align-items: start;
}

.uffizio-single-post .three-column-layout.two-column-mode {
    grid-template-columns: 1fr 350px;
}


.uffizio-single-post .sticky-part {
    position: sticky;
    top: 100px;
    z-index: 100;
    height: auto;
}

.uffizio-single-post .left-part,
.uffizio-single-post .right-part {
    /* padding-top: 20px; */
    border-radius: 12px;
}

.uffizio-single-post .table-title {
    font-weight: 600;
    font-size: 20px;
    padding-bottom: 16px;
    letter-spacing: -0.3px;
    color: var(--uffizio-text-primary);
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.uffizio-single-post .table-title:hover {
    color: var(--uffizio-color-accent);
}

/* TOC List */
.uffizio-single-post .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 1;
}

body.cat-ebooks .uffizio-hs-container {
    border: 1px solid #ddd;
    background: #fff !important;
    box-shadow: 0 12px 30px 0 #dedede;
}

.uffizio-single-post .toc-list::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e5e5;
    z-index: 1;
}

.uffizio-single-post .toc-container.collapsed .toc-list {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.uffizio-single-post .toc-list>li {
    margin-bottom: 0;
}

/* H2 Accordion Button */
.uffizio-single-post .accordion-toggle {
    all: unset;
    display: block;
    width: 100%;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 600;
    color: var(--uffizio-text-primary);
    transition: all 0.2s ease;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.uffizio-single-post .accordion-toggle .toggle-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.uffizio-single-post .accordion-toggle .toggle-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Rotate icon when expanded */
.uffizio-single-post li:has(.toc-sublist.expanded) .toggle-icon {
    transform: rotate(180deg);
}

.uffizio-single-post .accordion-toggle:hover {
    color: var(--uffizio-color-accent);
    background: rgba(0, 87, 255, 0.02);
}

/* Active H2 Button */
.uffizio-single-post .accordion-toggle.active {
    color: var(--uffizio-text-secondary) !important;
    font-weight: 900;
    background: rgba(0, 87, 255, 0.05);
}

.uffizio-single-post .accordion-toggle.active::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--uffizio-color-accent);
    z-index: 2;
}

/* H3 Sublist */
.uffizio-single-post .toc-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.uffizio-single-post .toc-sublist.expanded {
    max-height: 1000px;
    /* Large enough to fit content */
}

.uffizio-single-post .toc-sublist li {
    margin: 0;
    padding: 0;
}

.uffizio-single-post .toc-sublist a {
    display: block;
    padding: 8px 15px 8px 20px;
    color: var(--uffizio-text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    position: relative;
}

.uffizio-single-post .toc-sublist a::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    width: 8px;
    height: 1px;
    background: #e5e5e5;
}

.uffizio-single-post .toc-sublist a:hover {
    color: var(--uffizio-color-accent);
    background: rgba(0, 87, 255, 0.02);
}

.uffizio-single-post .toc-sublist a.active {
    color: var(--uffizio-color-accent) !important;
    font-weight: 800;
    background: rgba(0, 87, 255, 0.05);
}

.uffizio-single-post .toc-sublist a.active::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--uffizio-color-accent);
    z-index: 2;
}

.uffizio-single-post .toc-link.level-2.no-sub-items {
    padding: 10px 15px;
    font-size: 12px;
    /* font-weight: 600; */
    color: var(--uffizio-text-primary);
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    position: relative;
}

.uffizio-single-post .toc-link.level-2.no-sub-items:hover {
    color: var(--uffizio-color-accent);
    background: rgba(0, 87, 255, 0.02);
}

.uffizio-single-post .toc-link.level-2.no-sub-items.active {
    color: var(--uffizio-text-secondary) !important;
    font-weight: 900;
    background: rgba(0, 87, 255, 0.05);
}

.uffizio-single-post .toc-link.level-2.no-sub-items.active::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--uffizio-color-accent);
    z-index: 2;
}

.single-post-hubspot-form #hs-blog-form {
    width: 50%;
    margin: 2% auto;
    padding: 50px;
    border: 1px solid #ddd;
    border-radius: 16px;
    background-color: white;

}

.single-post-form-wrapper {
    background-color: #F0F3FB;
}

.single-post-hubspot-form .hubspot-form-description,
.single-post-hubspot-form .hubspot-form-title {
    text-align: center;
}

.single-post-hubspot-form {
    padding: 100px 50px;

}



.uffizio-single-post .middle-part {
    min-height: 100vh;
}

.single_post_title {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.single-post-breadcrumb {
    padding: 30px 0 0;
    font-size: 14px;
}

.single-post-breadcrumb a {
    color: var(--uffizio-color-primary);
    text-decoration: underline;
    text-underline-offset: 2px !important;
    transition: color 0.3s ease;
    text-decoration: none;
}

.single-post-breadcrumb a:hover {
    color: var(--uffizio-color-accent);
}


.uffizio-single-post .post-meta-line {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-top: 10px;
    padding-bottom: 30px;
    font-size: 15px;
    color: #292d34;
}

.post-meta-line span {
    position: relative;
    display: flex;
    align-items: center;
}

.post-meta-line span:not(:first-child)::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background-color: var(--uffizio-color-accent);
}

.single-post-featured-image img {
    height: auto;
    width: 100%;
    max-width: 810px;
    object-fit: cover;
    background: #f0f0f0;
    border-radius: 16px;
}

.single-post-content {
    margin-top: 30px;
}

.single-post-content hr {
    border: none;
    height: 1px;
    background: #e5e5e5;
    margin: 50px 0;
}

.single-post-content img {
    margin: 40px 0 !important;
    border-radius: 12px;
    max-height: 540px;
    object-fit: contain;
    width: 100%;
    max-width: 100%;
    vertical-align: middle;
    border-style: none;
}

.uffizio-single-post h3 {
    font-family: var(--uffizio-font-body) !important;
    font-size: 28px;
    font-weight: 600;
    line-height: 38px;
    text-transform: none;
}

.uffizio-single-post .middle-part ul {
    margin: 20px 0;
    padding-left: 20px;
}

.uffizio-single-post .middle-part ul li {
    font-size: 16px;
    line-height: 150%;
    padding: 0 0 0 30px;
    margin: 10px 0;
}

.single-post-content>ul>li {
    position: relative;
    padding-left: 30px;
    list-style: none;
}

.single-post-content>ul>li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 15px;
    height: 15px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="none" viewBox="0 0 15 15"><path fill="%230057ff" stroke="%230057ff" stroke-width=".5" d="M13.85 2.171a.527.527 0 0 0-.746 0L6.774 8.5 4.49 6.013a.527.527 0 0 0-.746-.031.53.53 0 0 0-.03.747l2.655 2.892a.53.53 0 0 0 .377.17h.012c.14 0 .273-.055.372-.153l6.719-6.719a.53.53 0 0 0 0-.748Z"/><path fill="%230057ff" stroke="%230057ff" stroke-width=".5" d="M13.722 6.74a.53.53 0 0 0-.527.528c0 3.287-2.667 5.96-5.945 5.96s-5.945-2.673-5.945-5.96 2.667-5.96 5.945-5.96a.528.528 0 0 0 0-1.058c-3.86 0-7 3.148-7 7.018s3.14 7.018 7 7.018 7-3.148 7-7.018a.53.53 0 0 0-.528-.529Z"/></svg>');
    background-size: cover;
    background-repeat: no-repeat;
}

.single-post-content ul li ol {
    list-style: decimal inside;
    margin-top: 10px;
    margin-left: 0;
    padding-left: 25px;
}

.single-post-content ul li ol li {
    position: relative;
    padding-left: 0;
}

.single-post-content img {
    width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

.single-post-content a {
    text-decoration: underline;
}

.single-post-content p {
    color: var(--uffizio-text-secondary) !important;
}

/* ----------------------------------------------------
   BLOG SEARCH WIDGET (Optimized + Responsive)
----------------------------------------------------- */

.blog-search-widget {
    background: linear-gradient(135deg, #3B9FF3 0%, #5DB0FF 100%);
    background-image:
        linear-gradient(135deg, #3B9FF3 0%, #5DB0FF 100%),
        repeating-linear-gradient(45deg, transparent 0 10px, rgba(255, 255, 255, 0.03) 10px 20px),
        repeating-linear-gradient(-45deg, transparent 0 10px, rgba(255, 255, 255, 0.03) 10px 20px);
    background-blend-mode: normal;
    border-radius: 10px;
    padding: 16px 20px 20px;
    box-shadow: 0 4px 12px rgba(59, 159, 243, 0.25);
}

.search-widget-title {
    color: #fff;
    font-size: 16px !important;
    font-weight: 600;
    margin: 0 0 16px;
    line-height: 1.4;
}

.blog-search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: box-shadow .25s ease;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(59, 159, 243, 0.25);
}

.blog-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    background: transparent;
}

.blog-search-input::placeholder {
    color: #999;
}

.blog-search-button {
    background: var(--uffizio-color-accent);
    border: none;
    margin-right: 4px;
    padding: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s ease, transform .2s ease;
    flex-shrink: 0;
}

.blog-search-button:hover {
    background: #2868a8;
    transform: scale(1.03);
}

.blog-search-button svg {
    color: #fff;
    width: 20px;
    height: 20px;
}

/* ----------------------------------------------------
   AJAX DROPDOWN
----------------------------------------------------- */

.search-wrapper-ajax {
    position: relative;
    width: 100%;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 100;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    margin-top: -1px;
}

.search-results-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.search-results-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-results-dropdown li {
    border-bottom: 1px solid #f1f1f1;
}

.search-results-dropdown li:last-child {
    border-bottom: none;
}

.search-results-dropdown a {
    display: block;
    padding: 12px 16px;
    color: var(--uffizio-text-primary);
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
    font-size: 14px;
}

.search-results-dropdown a:hover {
    background: #f5f5f5;
    color: var(--uffizio-color-primary);
}

/* ==============================
   LEGACY SHORTCODE STYLES
   ============================== */

.uffizio-legacy-row {
    margin-bottom: 30px;
}

.uffizio-legacy-column {
    margin-bottom: 20px;
}

.uffizio-legacy-heading {
    margin-bottom: 15px;
    font-family: var(--uffizio-font-heading);
    color: var(--uffizio-text-primary);
}

.uffizio-legacy-text {
    margin-bottom: 20px;
    line-height: 1.6;
}

.uffizio-legacy-text p {
    margin-bottom: 15px;
}

.uffizio-legacy-text p:last-child {
    margin-bottom: 0;
}

.uffizio-legacy-single-image {
    margin-bottom: 25px;
}

.uffizio-legacy-single-image img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
}

.uffizio-legacy-single-image a:hover img {
    transform: translateY(-5px);
}

.uffizio-missing-image {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* ----------------------------------------------------
   RESPONSIVE (MOBILE FRIENDLY)
----------------------------------------------------- */

@media (max-width: 480px) {
    .blog-search-widget {
        padding: 20px 16px;
    }

    .blog-search-input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .blog-search-button {
        padding: 10px 14px;
    }
}

/* -----------------------------------------------------
   RELATED POSTS SLIDER
----------------------------------------------------- */
.related-post {
    margin-top: 60px;
    padding-bottom: 100px;
    overflow: hidden;
}

.related-post h2 {
    margin-bottom: 30px;
    font-size: 32px;
}

.related-posts-slider {
    padding-bottom: 40px;
    /* Space for pagination */
}

.related-posts-slider .swiper-slide {
    height: auto;
}

.related-posts-slider .ucp-item {
    height: 100%;
}

.swiper-pagination-bullet-active {
    background: var(--uffizio-color-accent) !important;
}


.uffizio-single-post .uffizio-gradient-pattern-two {
    margin-top: 40px;
    margin-bottom: 100px;
    border-radius: 16px;
    padding-top: 80px;
    padding-bottom: 100px;
}

/* .single-post-newsletter .wrapper {
    width: 60%;
    margin: auto;
}

.single-post-newsletter .newsletter-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--uffizio-text-white);
}

.single-post-newsletter .newsletter-description {
    font-size: 17px;
    color: var(--uffizio-text-white);
    letter-spacing: .5px;
    line-height: 30px;
    margin-bottom: 50px;
}

.single-post-newsletter .tnp-submit {
    background: var(--uffizio-text-white);
    color: var(--uffizio-color-accent);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 18px;
    cursor: pointer;
    font-family: var(--uffizio-font-heading);
}

.single-post-newsletter .tnp-subscription {
    border: 1px solid var(--uffizio-color-accent);
    border-radius: 10px;
    background: #0e2e6470;
    padding: 7px 7px;
}

.single-post-newsletter .tnp-subscription form {
    display: grid;
    grid-template-columns: 1fr 180px;
    align-items: center;
}

.single-post-newsletter .tnp-email {
    background: none;
    border: none;
    color: var(--uffizio-text-white) !important;
}

.single-post-newsletter .tnp-email::placeholder {
    color: var(--uffizio-text-white) !important;
}

.single-post-newsletter .tnp-email:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
} */


.related-post-header .related-title {
    font-size: 26px;
    line-height: 100%;
    font-weight: 600;
    color: var(--uffizio-text-primary);
    font-family: var(--uffizio-font-body) !important;
}

.related-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

/* Arrow styling (optional) */
.related-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-nav .swiper-button-prev,
.related-nav .swiper-button-next {
    position: static;
    margin: 0;
    width: 40px;
    height: 40px;
    border: 1px solid #000000;
    border-radius: 50%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.related-nav .swiper-button-prev:after,
.related-nav .swiper-button-next:after {
    color: var(--uffizio-text-secondary);
    font-size: 14px;
    font-weight: bolder;
    text-shadow: 1px 0 0 currentColor, -1px 0 0 currentColor, 0 1px 0 currentColor, 0 -1px 0 currentColor;
    transform: none !important;
    line-height: 1;
    display: block;
    transition: color 0.3s, text-shadow 0.3s;
}

.related-nav .swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.related-nav .swiper-button-disabled:after {
    color: #666666;
    text-shadow: none;
}

.related-nav .swiper-button-prev:hover,
.related-nav .swiper-button-next:hover,
.related-nav .swiper-button-prev:focus,
.related-nav .swiper-button-next:focus,
.related-nav .swiper-button-prev:active,
.related-nav .swiper-button-next:active {
    background-color: var(--uffizio-color-accent);
    border-color: var(--uffizio-color-accent);
    outline: none;
}

.related-nav .swiper-button-prev:hover:after,
.related-nav .swiper-button-next:hover:after,
.related-nav .swiper-button-prev:focus:after,
.related-nav .swiper-button-next:focus:after,
.related-nav .swiper-button-prev:active:after,
.related-nav .swiper-button-next:active:after {
    color: #ffffff;
    text-shadow: 1px 0 0 currentColor, -1px 0 0 currentColor, 0 1px 0 currentColor, 0 -1px 0 currentColor;
    font-size: 14px;
    font-weight: bolder;
}

/* -------------------------------------------------------------------------
   RESPONSIVE LAYOUT FIXES
------------------------------------------------------------------------- */

.uffizio-single-post .middle-part {
    min-width: 0;
    /* Prevent grid blowout from large content */
}

/* Tablet & Mobile Landscape */
@media screen and (max-width: 1024px) {

    .uffizio-single-post .three-column-layout,
    .uffizio-single-post .three-column-layout.two-column-mode {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 40px;
        padding-bottom: 60px;
    }

    .uffizio-single-post .left-part,
    .uffizio-single-post .right-part {
        width: 100%;
        position: static;
    }

    .uffizio-single-post .sticky-part {
        position: static;
    }

    /* Adjust related posts */
    .related-post {
        margin-top: 40px;
    }
}

/* Mobile Portrait */
@media screen and (max-width: 768px) {
    .uffizio-single-post {
        padding-top: 60px;
    }

    .single_post_title {
        font-size: 30px;
        line-height: 1.3;
    }

    .uffizio-single-post .post-meta-line {
        flex-wrap: wrap;
        gap: 15px;
        padding-bottom: 20px;
    }

    .post-meta-line span:not(:first-child)::before {
        display: none;
    }

    /* Newsletter Responsive */
    /* .single-post-newsletter .wrapper {
        width: 100%;
        padding: 0 20px;
    }

    .single-post-newsletter .tnp-subscription form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .single-post-newsletter .tnp-field-button,
    .single-post-newsletter .tnp-submit {
        width: 100%;
    } */

    .uffizio-single-post .three-column-layout {
        gap: 20px;
    }

    .single-post-content img {
        margin: 20px 0 !important;
        height: auto;
    }
}

/* .single-post-content li ul {
    list-style: disc;
} */

.single-post-content ul li {
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    position: relative;
    padding-left: 28px;
}

.single-post-content ul li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 15px;
    height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15'%3E%3Cpath fill='%230057ff' stroke='%230057ff' stroke-width='.5' d='M13.85 2.171a.527.527 0 0 0-.746 0L6.774 8.5 4.49 6.013a.527.527 0 0 0-.746-.031.53.53 0 0 0-.03.747l2.655 2.892a.53.53 0 0 0 .377.17h.012c.14 0 .273-.055.372-.153l6.719-6.719a.53.53 0 0 0 0-.748Z'/%3E%3Cpath fill='%230057ff' stroke='%230057ff' stroke-width='.5' d='M13.722 6.74a.53.53 0 0 0-.527.528c0 3.287-2.667 5.96-5.945 5.96s-5.945-2.673-5.945-5.96 2.667-5.96 5.945-5.96a.528.528 0 0 0 0-1.058c-3.86 0-7 3.148-7 7.018s3.14 7.018 7 7.018 7-3.148 7-7.018a.53.53 0 0 0-.528-.529Z'/%3E%3C/svg%3E");
    background-size: 15px;
    background-repeat: no-repeat;
}


.uffizio-also-read-container {

    background-color: #f0f0f0;
    border-color: #0000;
    box-shadow: 0 5px 0 #d4d4d4;
    color: #9d9d9e;
    border-radius: 4px;
    padding: 30px 30px;
    margin: 20px 0;
}

.uffizio-also-read-container p {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 18px;
    color: #333;
}

.uffizio-also-read-container .also-read-link {
    color: #007bff;
    /* The bright blue from your image */
    text-decoration: none;
    font-weight: bold;
}

.uffizio-also-read-container .also-read-link:hover {
    text-decoration: underline;
}