/* =====================================================================
   Synobiz — Blog single + listing styles
   ===================================================================== */

/* ---------- Single post layout ---------- */
.blog-single {
    padding: 70px 0 100px;
}

.blog-single .row.slidebar-stickiy-container {
    --bs-gutter-x: 50px;
}

/* article column */
.blog-article {
    max-width: 820px;
}

.blog-hero {
    margin: 0 0 30px;
    border-radius: 20px;
    overflow: hidden;
}

.blog-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary-color);
    background: var(--primary-light-color);
    border-radius: 999px;
    padding: 6px 14px;
}

.blog-title {
    font-size: 38px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--tj-color-heading-primary);
    margin: 0 0 18px;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin: 0 0 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e6efef;
    font-size: 14px;
    color: var(--tj-color-text-body);
}

.blog-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.blog-meta i {
    color: var(--primary-color);
    font-size: 15px;
}

/* ---------- Article body typography ---------- */
.blog-content {
    font-size: 16.5px;
    line-height: 1.8;
    color: var(--tj-color-text-body);
}

.blog-content>*:first-child {
    margin-top: 0;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: var(--tj-color-heading-primary);
    font-weight: 700;
    line-height: 1.3;
    scroll-margin-top: 110px;
    /* so anchored headings aren't hidden under the sticky header */
}

.blog-content h2 {
    font-size: 26px;
    margin: 40px 0 16px;
}

.blog-content h3 {
    font-size: 21px;
    margin: 32px 0 14px;
}

.blog-content h4 {
    font-size: 18px;
    margin: 26px 0 12px;
}

.blog-content p {
    margin: 0 0 18px;
}

.blog-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-content a:hover {
    color: var(--secondary-color);
}

.blog-content ul,
.blog-content ol {
    margin: 0 0 20px;
    padding-left: 22px;
}

.blog-content li {
    margin: 8px 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 10px 0 24px;
}

.blog-content blockquote {
    margin: 26px 0;
    padding: 18px 24px;
    border-left: 4px solid var(--primary-color);
    background: var(--primary-light-color);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--tj-color-heading-primary);
}

.blog-content figure {
    margin: 0 0 24px;
    max-width: 100%;
}

/* tables (comparison tables are common in these posts) */
.blog-content table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 8px 0 26px;
    font-size: 15px;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #e6efef;
}

.blog-content table td,
.blog-content table th {
    border: 1px solid #e6efef;
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

.blog-content table tr:first-child td,
.blog-content table th {
    background: var(--tj-color-heading-primary);
    color: #fff;
    font-weight: 600;
}

.blog-content table tr:nth-child(even) td {
    background: #f6fafa;
}

/* wrap wide tables so they scroll instead of breaking the layout */
.blog-content .table-scroll {
    overflow-x: auto;
    margin: 8px 0 26px;
}

.blog-content .table-scroll table {
    margin: 0;
}

/* ---------- FAQ accordion (theme .tj-faq inside the article) ---------- */
.blog-content .blog-faq {
    margin: 14px 0 8px;
}

.blog-content .blog-faq .faq-title {
    font-size: 17px;
}

.blog-content .blog-faq .accordion-body.faq-text p:last-child {
    margin-bottom: 0;
}

/* ---------- Tags + share (below article) ---------- */
.blog-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin-top: 36px;
    padding-top: 26px;
    border-top: 1px solid #e6efef;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-tags a {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-color);
    background: var(--primary-light-color);
    border-radius: 999px;
    padding: 6px 14px;
    text-decoration: none;
    transition: .3s;
}

.blog-tags a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ---------- Sidebar / sticky TOC ---------- */
.slidebar-stickiy {
    position: relative;
}

.blog-widget {
    background: #fff;
    border: 1px solid #e6efef;
    border-radius: 18px;
    padding: 24px 22px;
    margin-bottom: 24px;
}

.blog-widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 700;
    color: var(--tj-color-heading-primary);
}

.blog-widget-title i {
    color: var(--primary-color);
}

/* Table of Contents */
.blog-toc {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--primary-light-color);
}

.blog-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid #e6efef;
}

.blog-toc__list li {
    margin: 0;
}

.blog-toc__list a {
    display: block;
    padding: 7px 0 7px 16px;
    margin-left: -2px;
    border-left: 2px solid transparent;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tj-color-text-body);
    text-decoration: none;
    transition: color .25s ease, border-color .25s ease;
}

.blog-toc__list a.lvl-3 {
    padding-left: 30px;
    font-size: 13.5px;
}

.blog-toc__list a:hover {
    color: var(--primary-color);
}

.blog-toc__list a.is-active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.blog-toc-empty {
    font-size: 14px;
    color: var(--tj-color-text-body);
}

/* sidebar CTA */
.blog-cta {
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--tj-color-heading-primary), #14383c);
    border: none;
}

.blog-cta h4 {
    color: #fff;
    font-size: 19px;
    margin: 0 0 8px;
}

.blog-cta p {
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
    margin: 0 0 18px;
}

.blog-cta .tj-primary-btn {
    margin-top: 0;
}

/* ---------- Listing grid ---------- */
.blog-list {
    padding: 30px 0 60px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6efef;
    border-radius: 18px;
    overflow: hidden;
    transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 46px rgba(9, 153, 153, .14);
    border-color: transparent;
}

.blog-card-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--primary-light-color);
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.06);
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 22px 24px;
}

.blog-card-cat {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.blog-card-title {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    margin: 0 0 10px;
}

.blog-card-title a {
    color: var(--tj-color-heading-primary);
    transition: color .3s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--tj-color-text-body);
    margin: 0 0 16px;
}

.blog-card-meta {
    margin-top: auto;
    font-size: 13px;
    color: var(--tj-color-text-body);
}

/* search box on listing */
.blog-search {
    max-width: 460px;
    margin: 0 auto 46px;
    position: relative;
}

.blog-search input {
    width: 100%;
    padding: 14px 46px 14px 20px;
    border: 1px solid #e6efef;
    border-radius: 999px;
    font-size: 15px;
    outline: none;
    transition: border-color .3s ease;
}

.blog-search input:focus {
    border-color: var(--primary-color);
}

.blog-search i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.blog-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--tj-color-text-body);
}

/* ---------- Pagination ---------- */
.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}

.blog-pagination .page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e6efef;
    border-radius: 10px;
    background: #fff;
    color: var(--tj-color-heading-primary);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.blog-pagination .page-btn:hover:not(:disabled):not(.is-active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.blog-pagination .page-btn.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 10px 20px rgba(9, 153, 153, .25);
}

.blog-pagination .page-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.blog-pagination .page-btn.dots {
    border: none;
    background: none;
    box-shadow: none;
    cursor: default;
    min-width: 24px;
    padding: 0 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .blog-title {
        font-size: 30px;
    }

    /* sidebar drops below the article on tablet/mobile — no pinning */
    .blog-toc {
        max-height: none;
    }
}

@media (max-width: 575px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-title {
        font-size: 26px;
    }

    .blog-content {
        font-size: 16px;
    }
}
