/**
 * Naturalie Blog Layout — Styles
 * Design system based on NCC (Naturalie Conversational Checkout)
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
.nbl-blog-wrapper,
.nbl-single-post,
.nbl-search-results-wrapper {
    --nbl-primary: var(--nl-primary, #468664);
    --nbl-primary-light: var(--nl-primary-light, #deece4);
    --nbl-bg: var(--nl-bg, #f8f6f3);
    --nbl-surface: var(--nl-surface, #ffffff);
    --nbl-text: var(--nl-text, #333333);
    --nbl-text-muted: var(--nl-text-muted, #888888);
    --nbl-radius: var(--nl-radius, 14px);
    --nbl-radius-sm: var(--nl-radius-sm, 8px);
    --nbl-transition: 0.3s ease;
    --nbl-max-width: 1200px;
    --nbl-sidebar-width: 380px;
    --nbl-gap: 32px;
    --nbl-card-border: 2px solid #e0e0e0;

    font-family: var(--nl-font-family, inherit);
    font-size: var(--nl-font-size-base, 14px);
    color: var(--nbl-text);
    line-height: 1.6;
}

/* ============================================
   BLOG WRAPPER & LAYOUT
   ============================================ */
.nbl-blog-wrapper,
.nbl-search-results-wrapper {
    max-width: var(--nbl-max-width);
    margin: 0 auto;
    padding: 32px 16px;
    box-sizing: border-box;
}

.nbl-blog-layout {
    display: flex !important;
    gap: var(--nbl-gap);
    align-items: flex-start;
}

.nbl-blog-sidebar {
    width: var(--nbl-sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 32px;
    align-self: flex-start;
}

.nbl-blog-content {
    flex: 1;
    min-width: 0;
}

/* ============================================
   POST GRID
   ============================================ */
.nbl-post-grid {
    display: grid !important;
    gap: 24px !important;
}

.nbl-post-grid--1-cols { grid-template-columns: 1fr !important; }
.nbl-post-grid--2-cols { grid-template-columns: repeat(2, 1fr) !important; }
.nbl-post-grid--3-cols { grid-template-columns: repeat(3, 1fr) !important; }
.nbl-post-grid--4-cols { grid-template-columns: repeat(4, 1fr) !important; }

/* ============================================
   POST CARD
   ============================================ */
.nbl-post-card {
    background: var(--nbl-surface);
    border: var(--nbl-card-border);
    border-radius: var(--nbl-radius);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nbl-post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.nbl-post-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.nbl-post-card__image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--nbl-radius-sm) var(--nbl-radius-sm) 0 0;
    background: var(--nbl-bg);
}

.nbl-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nbl-post-card:hover .nbl-post-card__image img {
    transform: scale(1.03);
}

.nbl-post-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--nbl-bg) 0%, var(--nbl-primary-light) 100%);
}

.nbl-post-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--nbl-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.nbl-post-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nbl-post-card__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
    color: var(--nbl-text);
}

.nbl-post-card__excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: var(--nbl-text-muted);
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.nbl-post-card__meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--nbl-text-muted);
    margin-top: auto;
}

.nbl-post-card__footer {
    padding: 0 20px 20px;
}

/* ============================================
   BUTTONS
   ============================================ */
.nbl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--nbl-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, background 0.2s ease;
    text-decoration: none;
    border: 2px solid transparent;
    line-height: 1.4;
}

.nbl-btn--primary {
    background: var(--nbl-primary);
    color: #fff;
    border-color: var(--nbl-primary);
}

.nbl-btn--primary:hover {
    opacity: 0.9;
}

.nbl-btn--sm {
    padding: 8px 16px;
    font-size: 13px;
}

.nbl-btn--outline {
    background: transparent;
    color: var(--nbl-primary);
    border-color: var(--nbl-primary);
}

.nbl-btn--outline:hover {
    background: var(--nbl-primary-light);
}

/* ============================================
   SEARCH BAR
   ============================================ */
.nbl-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto 32px;
}

.nbl-search__form {
    position: relative;
}

.nbl-search__input {
    width: 100%;
    padding: 14px 20px;
    padding-right: 52px;
    background: var(--nbl-bg);
    border: 1px solid #ddd;
    border-radius: var(--nbl-radius-sm);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
}

.nbl-search__input:focus {
    outline: none;
    border-color: var(--nbl-primary);
    box-shadow: 0 0 0 3px rgba(70, 134, 100, 0.15);
}

.nbl-search__submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--nbl-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.nbl-search__submit:hover {
    color: var(--nbl-primary);
}

.nbl-search__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--nbl-surface);
    border: var(--nbl-card-border);
    border-radius: var(--nbl-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 100;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.nbl-search__dropdown.is-visible {
    display: block;
}

.nbl-search__result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--nbl-text);
    transition: background 0.15s ease;
}

.nbl-search__result:hover,
.nbl-search__result.is-highlighted {
    background: var(--nbl-primary-light);
}

.nbl-search__result-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--nbl-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.nbl-search__result-info {
    min-width: 0;
}

.nbl-search__result-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nbl-search__result-category {
    font-size: 12px;
    color: var(--nbl-text-muted);
}

.nbl-search__empty {
    padding: 20px;
    text-align: center;
    color: var(--nbl-text-muted);
    font-size: 14px;
}

/* ============================================
   CATEGORY FILTER
   ============================================ */
.nbl-category-filter {
    background: var(--nbl-surface);
    border: var(--nbl-card-border);
    border-radius: var(--nbl-radius);
    padding: 24px;
}

.nbl-category-filter__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--nbl-text);
}

.nbl-category-filter__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nbl-category-filter__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.nbl-category-filter__item:last-child {
    border-bottom: none;
}

.nbl-category-filter__link {
    color: var(--nbl-text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    flex: 1;
}

.nbl-category-filter__link:hover {
    color: var(--nbl-primary);
}

.nbl-category-filter__link.is-active {
    color: var(--nbl-primary);
    font-weight: 600;
}

.nbl-category-filter__count {
    background: var(--nbl-bg);
    color: var(--nbl-text-muted);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    flex-shrink: 0;
    margin-left: 8px;
}

.nbl-category-filter--desktop {
    display: block;
}

.nbl-category-filter--mobile {
    display: none;
}

.nbl-category-filter__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.nbl-category-filter__summary::-webkit-details-marker {
    display: none;
}

.nbl-category-filter__summary-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--nbl-text);
}

.nbl-category-filter__summary-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: var(--nbl-text-muted);
}

.nbl-category-filter--mobile[open] .nbl-category-filter__summary-chevron {
    transform: rotate(180deg);
}

/* ============================================
   SINGLE POST
   ============================================ */
.nbl-single-post {
    margin: 0;
    padding: 0;
}

.nbl-single-layout {
    display: flex !important;
    gap: var(--nbl-gap);
    max-width: var(--nbl-max-width);
    margin: 0 auto;
    padding: 48px 16px;
    justify-content: flex-start;
}

.nbl-single-content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 720px;
}

.nbl-single-sidebar {
    width: 280px;
    flex: 0 0 280px;
    position: sticky;
    top: 32px;
    align-self: flex-start;
}

/* ============================================
   POST HERO
   ============================================ */
.nbl-post-hero {
    position: relative;
    width: 100%;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    background-color: var(--nbl-bg);
}

.nbl-post-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

.nbl-post-hero__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--nbl-max-width);
    margin: 0 auto;
    padding: 48px 16px;
}

.nbl-post-hero__inner {
    max-width: 720px;
}

.nbl-post-hero__category {
    display: inline-block;
    background: var(--nbl-primary);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 16px;
    transition: opacity 0.2s ease;
}

.nbl-post-hero__category:hover {
    opacity: 0.9;
}

.nbl-post-hero__title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin: 0 0 16px;
}

.nbl-post-hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    flex-wrap: wrap;
}

.nbl-post-hero__author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nbl-post-hero__avatar {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.nbl-post-hero__separator {
    opacity: 0.6;
}

/* ============================================
   POST META
   ============================================ */
.nbl-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--nbl-text-muted);
    flex-wrap: wrap;
}

.nbl-post-meta__author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nbl-post-meta__avatar {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.nbl-post-meta__separator {
    opacity: 0.6;
}

/* ============================================
   ENTRY CONTENT
   ============================================ */
.nbl-entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--nbl-text);
}

.nbl-entry-content > * {
    margin-bottom: 1.5em;
}

.nbl-entry-content h2,
.nbl-entry-content h3,
.nbl-entry-content h4 {
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.4;
    color: var(--nbl-text);
}

.nbl-entry-content h2 {
    font-size: 24px;
    font-weight: 600;
}

.nbl-entry-content h3 {
    font-size: 20px;
    font-weight: 600;
}

.nbl-entry-content h4 {
    font-size: 18px;
    font-weight: 600;
}

.nbl-entry-content p {
    margin-bottom: 1.5em;
}

.nbl-entry-content a {
    color: var(--nbl-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.nbl-entry-content a:hover {
    opacity: 0.8;
}

.nbl-entry-content ul,
.nbl-entry-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.nbl-entry-content li {
    margin-bottom: 0.5em;
}

.nbl-entry-content blockquote {
    border-left: 4px solid var(--nbl-primary);
    padding-left: 20px;
    margin: 2em 0;
    font-style: italic;
    color: var(--nbl-text-muted);
}

.nbl-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--nbl-radius-sm);
}

.nbl-entry-content figure {
    margin: 2em 0;
}

.nbl-entry-content figcaption {
    font-size: 13px;
    color: var(--nbl-text-muted);
    text-align: center;
    margin-top: 8px;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.nbl-toc {
    background: #ffffff;
    border: var(--nbl-card-border);
    border-radius: var(--nbl-radius);
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.nbl-toc__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 18px;
    color: var(--nbl-text);
}

.nbl-toc__title svg {
    flex-shrink: 0;
    color: var(--nbl-primary);
}

.nbl-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nbl-toc__item {
    margin: 0;
    padding: 0;
}

.nbl-toc__item--level-3 {
    padding-left: 16px;
}

.nbl-toc__link {
    display: block;
    padding: 6px 0;
    color: var(--nbl-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    border-left: 2px solid transparent;
    padding-left: 12px;
    margin-left: -14px;
}

.nbl-toc__link:hover {
    color: var(--nbl-primary);
}

.nbl-toc__link.is-active {
    color: var(--nbl-primary);
    border-left-color: var(--nbl-primary);
    font-weight: 500;
}

/* ============================================
   TABLE OF CONTENTS — MOBILE ACCORDION
   ============================================ */
.nbl-toc-mobile {
    display: none;
}

.nbl-toc-desktop {
    display: block;
}

.nbl-toc__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.nbl-toc__summary::-webkit-details-marker {
    display: none;
}

.nbl-toc__summary-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--nbl-text);
}

.nbl-toc__summary-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: var(--nbl-text-muted);
}

.nbl-toc-mobile[open] .nbl-toc__summary-chevron {
    transform: rotate(180deg);
}

/* ============================================
   MOBILE LAYOUT — OVERFLOW FIXES
   ============================================ */
html {
    overflow-x: hidden;
}

body {
    max-width: 100vw;
}

.nbl-single-post,
.nbl-entry-content {
    max-width: 100%;
    min-width: 0;
}

.nbl-single-layout {
    max-width: var(--nbl-max-width);
    min-width: 0;
}

.nbl-single-content {
    max-width: 720px;
    min-width: 0;
}

.nbl-entry-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.nbl-entry-content img,
.nbl-entry-content video,
.nbl-entry-content iframe,
.nbl-entry-content embed,
.nbl-entry-content object {
    max-width: 100%;
    height: auto;
}

.nbl-entry-content table:not(.nbl-table) {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.nbl-entry-content pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
}

/* ============================================
   SOURCES ACCORDION
   ============================================ */
.nbl-sources-accordion {
    margin: 32px 0;
    background: var(--nbl-surface);
    border: var(--nbl-card-border);
    border-radius: var(--nbl-radius);
    overflow: hidden;
}

.nbl-sources-accordion__details {
    display: block;
}

.nbl-sources-accordion__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--nbl-text);
    list-style: none;
    user-select: none;
    transition: background 0.2s ease;
}

.nbl-sources-accordion__summary::-webkit-details-marker {
    display: none;
}

.nbl-sources-accordion__summary:hover {
    background: var(--nbl-bg);
}

.nbl-sources-accordion__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--nbl-radius-sm);
    background: var(--nbl-primary-light);
    color: var(--nbl-primary);
    flex-shrink: 0;
}

.nbl-sources-accordion__chevron {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: var(--nbl-text-muted);
}

.nbl-sources-accordion__details[open] .nbl-sources-accordion__chevron {
    transform: rotate(180deg);
}

.nbl-sources-accordion__content {
    padding: 0 24px 24px;
}

.nbl-sources-accordion__list {
    margin: 0;
    padding-left: 1.5em;
    font-size: 14px;
    line-height: 1.7;
    color: var(--nbl-text);
}

.nbl-sources-accordion__item {
    margin-bottom: 8px;
    padding-left: 4px;
}

.nbl-sources-accordion__item:last-child {
    margin-bottom: 0;
}

.nbl-sources-accordion__item a {
    color: var(--nbl-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================
   HIGHLIGHT BOXES
   ============================================ */
.nbl-highlight {
    display: flex;
    gap: 16px;
    padding: 24px;
    margin: 2em 0;
    border-radius: var(--nbl-radius);
    border-left: 4px solid var(--nbl-primary);
    background: var(--nbl-bg);
}

.nbl-highlight__icon {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--nbl-primary);
}

.nbl-highlight__content {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
}

.nbl-highlight__content > *:first-child {
    margin-top: 0;
}

.nbl-highlight__content > *:last-child {
    margin-bottom: 0;
}

.nbl-highlight--info {
    border-left-color: #8fbfa3;
    background: #f0f7f3;
}

.nbl-highlight--info .nbl-highlight__icon {
    color: #5a9e7a;
}

.nbl-highlight--warning {
    border-left-color: #d4a84b;
    background: #fdf8e8;
}

.nbl-highlight--warning .nbl-highlight__icon {
    color: #a08020;
}

.nbl-highlight--tip {
    border-left-color: #7ab897;
    background: #e8f5ed;
}

.nbl-highlight--tip .nbl-highlight__icon {
    color: #3d8b63;
}

.nbl-highlight--fact {
    border-left-color: #468664;
    background: #edf5f0;
}

.nbl-highlight--fact .nbl-highlight__icon {
    color: #3d7559;
}

/* ============================================
   AUTHOR BOX
   ============================================ */
.nbl-author-box {
    display: flex;
    gap: 20px;
    padding: 28px;
    background: var(--nbl-surface);
    border: var(--nbl-card-border);
    border-radius: var(--nbl-radius);
    margin: 48px 0;
}

.nbl-author-box__avatar-wrap {
    flex-shrink: 0;
}

.nbl-author-box__avatar {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.nbl-author-box__content {
    flex: 1;
}

.nbl-author-box__name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--nbl-text);
}

.nbl-author-box__name a {
    color: var(--nbl-primary);
    text-decoration: none;
}

.nbl-author-box__name a:hover {
    text-decoration: underline;
}

.nbl-author-box__bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--nbl-text-muted);
    margin: 0;
}

/* ============================================
   BACK LINK
   ============================================ */
.nbl-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--nbl-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    transition: opacity 0.2s ease;
}

.nbl-back-link:hover {
    opacity: 0.8;
}

.nbl-back-link svg {
    flex-shrink: 0;
}

/* ============================================
   RELATED POSTS SLIDER
   ============================================ */
.nbl-related-posts {
    margin: 48px 0;
    padding-top: 32px;
    border-top: 1px solid #eee;
}

.nbl-related-posts__title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 24px;
    color: var(--nbl-text);
}

.nbl-related-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nbl-related-slider__track {
    flex: 1;
    overflow: hidden;
}

.nbl-related-slider__slides {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.nbl-related-posts__card {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 0;
    background: var(--nbl-surface);
    border: var(--nbl-card-border);
    border-radius: var(--nbl-radius);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.nbl-related-posts__card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.nbl-related-posts__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.nbl-related-posts__image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.nbl-related-posts__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nbl-related-posts__card:hover .nbl-related-posts__image img {
    transform: scale(1.03);
}

.nbl-related-posts__body {
    padding: 16px;
}

.nbl-related-posts__card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
    color: var(--nbl-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nbl-related-posts__excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: var(--nbl-text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nbl-slider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--nbl-primary);
    background: var(--nbl-surface);
    color: var(--nbl-primary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.nbl-slider-btn:hover {
    background: var(--nbl-primary);
    color: #fff;
}

.nbl-slider-btn:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.nbl-slider-btn.is-hidden {
    display: none;
}

.nbl-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.nbl-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    transition: background 0.2s ease;
}

.nbl-slider-dot.is-active {
    background: var(--nbl-primary);
}

/* ============================================
   SOCIAL SHARE
   ============================================ */
.nbl-social-share {
    margin: 48px 0;
    padding-top: 32px;
    border-top: 1px solid #eee;
}

.nbl-social-share__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--nbl-text);
}

.nbl-social-share__buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nbl-social-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--nbl-radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    color: #fff;
    border: none;
    cursor: pointer;
}

.nbl-social-share__btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.nbl-social-share__btn--x { background: #000; }
.nbl-social-share__btn--facebook { background: #1877f2; }
.nbl-social-share__btn--linkedin { background: #0a66c2; }
.nbl-social-share__btn--pinterest { background: #bd081c; }
.nbl-social-share__btn--whatsapp { background: #25d366; }
.nbl-social-share__btn--email { background: var(--nbl-text-muted); }

/* ============================================
   PAGINATION
   ============================================ */
.nbl-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.nbl-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    margin: 0 4px;
    border-radius: var(--nbl-radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--nbl-text);
    background: var(--nbl-surface);
    border: var(--nbl-card-border);
    transition: all 0.2s ease;
}

.nbl-pagination .page-numbers:hover {
    background: var(--nbl-primary-light);
    border-color: var(--nbl-primary);
    color: var(--nbl-primary);
}

.nbl-pagination .page-numbers.current {
    background: var(--nbl-primary);
    border-color: var(--nbl-primary);
    color: #fff;
}

/* ============================================
   LOAD MORE
   ============================================ */
.nbl-load-more-wrap {
    margin-top: 32px;
    text-align: center;
}

.nbl-load-more-wrap .nbl-btn {
    min-width: 200px;
}

.nbl-load-more-wrap .nbl-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* ============================================
   NO RESULTS
   ============================================ */
.nbl-no-results {
    text-align: center;
    padding: 48px 20px;
    color: var(--nbl-text-muted);
    font-size: 16px;
}

.nbl-no-results h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--nbl-text);
}

/* ============================================
   SEARCH RESULTS HEADER
   ============================================ */
.nbl-search-results-header {
    text-align: center;
    margin-bottom: 32px;
}

.nbl-search-results-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--nbl-text);
}

.nbl-search-results-title span {
    color: var(--nbl-primary);
}

.nbl-search-results-count {
    font-size: 14px;
    color: var(--nbl-text-muted);
    margin: 0;
}

/* ============================================
   RESPONSIVE TABLES
   ============================================ */

/* NBL Tables — clean, no TablePress dependencies */
.nbl-entry-content .nbl-table,
.nbl-table {
    display: table;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2em 0;
    font-size: 15px;
    line-height: 1.6;
    background: #ffffff;
    border: var(--nbl-card-border);
    border-radius: var(--nbl-radius);
    overflow: hidden;
    box-sizing: border-box;
}

.nbl-table thead {
    display: table-header-group;
}

.nbl-entry-content .nbl-table th,
.nbl-entry-content .nbl-table td,
.nbl-table th,
.nbl-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    border-top: none;
    border-left: none;
    border-right: none;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: left;
    background: transparent;
    font-size: 15px;
    line-height: 1.6;
    white-space: normal;
    min-width: 0;
    box-sizing: border-box;
}

.nbl-entry-content .nbl-table th,
.nbl-table th {
    background: var(--nbl-primary);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    padding: 14px 16px;
    font-size: 14px;
}

.nbl-table tbody tr:last-child td {
    border-bottom: none;
}

.nbl-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.nbl-table tbody tr:hover {
    background: #f5f9f7;
}

/* Mobile: compact list layout (Option A) */
@media (max-width: 767px) {
    .nbl-entry-content .nbl-table,
    .nbl-table {
        border: none;
        border-radius: 0;
        background: transparent;
        margin: 1em 0;
    }

    .nbl-table thead {
        display: none !important;
    }

    .nbl-table tbody tr {
        display: block;
        border-bottom: 1px solid #f0f0f0;
        padding: 8px 0;
        background: transparent !important;
    }

    .nbl-table tbody tr:last-child {
        border-bottom: none;
    }

    .nbl-entry-content .nbl-table td,
    .nbl-table td {
        display: flex;
        justify-content: flex-start;
        align-items: baseline;
        padding: 4px 0;
        border: none;
        gap: 0;
        font-size: 14px;
        line-height: 1.5;
    }

    .nbl-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--nbl-primary);
        flex: 0 0 40%;
        max-width: 140px;
        padding-right: 12px;
        font-size: 13px;
    }

    .nbl-table td > * {
        flex: 1 1 auto;
    }
}

/* ============================================
   TABLE PAGINATION
   ============================================ */
.nbl-table-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding: 12px;
    font-size: 14px;
}

.nbl-table-pagination__prev,
.nbl-table-pagination__next {
    color: var(--nbl-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--nbl-radius-sm);
    transition: background 0.2s ease;
}

.nbl-table-pagination__prev:hover,
.nbl-table-pagination__next:hover {
    background: var(--nbl-primary-light);
}

.nbl-table-pagination__prev--disabled,
.nbl-table-pagination__next--disabled {
    color: var(--nbl-text-muted);
    cursor: default;
}

.nbl-table-pagination__info {
    color: var(--nbl-text-muted);
    font-size: 13px;
}

/* ============================================
   TABLE LAYOUT VARIANTS
   ============================================ */

/* —— CARDS —— Desktop */
.nbl-entry-content .nbl-table--cards th,
.nbl-table--cards th {
    background: var(--nbl-primary-light);
    color: var(--nbl-primary);
}

/* —— CARDS —— Mobile: card layout with border/padding */
@media (max-width: 767px) {
    .nbl-entry-content .nbl-table--cards,
    .nbl-table--cards {
        border: none;
        background: transparent;
    }

    .nbl-table--cards thead {
        display: none !important;
    }

    .nbl-table--cards tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e8e8e8;
        border-radius: var(--nbl-radius);
        padding: 0;
        background: #fff;
        overflow: hidden;
    }

    .nbl-table--cards tbody tr:first-child {
        background: var(--nbl-primary-light);
    }

    .nbl-table--cards tbody tr:nth-child(even) {
        background: #fff;
    }

    .nbl-table--cards tbody tr:hover {
        background: #f5f9f7;
    }

    .nbl-entry-content .nbl-table--cards td,
    .nbl-table--cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        border-bottom: 1px solid #e8e8e8;
        gap: 12px;
        text-align: right;
        font-size: 14px;
        background: transparent;
    }

    .nbl-table--cards td:first-child {
        background: var(--nbl-primary-light);
    }

    .nbl-table--cards td:last-child {
        border-bottom: none;
    }

    .nbl-table--cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--nbl-primary);
        text-align: left;
        flex-shrink: 0;
        font-size: 13px;
    }
}

/* —— MINIMAL —— Desktop: no border, no green header */
.nbl-entry-content .nbl-table--minimal,
.nbl-table--minimal {
    border: none;
    border-radius: 0;
    background: transparent;
}

.nbl-entry-content .nbl-table--minimal th,
.nbl-table--minimal th {
    background: transparent;
    color: var(--nbl-text);
    font-weight: 600;
    border-bottom: 2px solid var(--nbl-primary);
    padding: 10px 16px;
}

.nbl-entry-content .nbl-table--minimal tbody tr:nth-child(even),
.nbl-table--minimal tbody tr:nth-child(even) {
    background: transparent;
}

.nbl-entry-content .nbl-table--minimal tbody tr:hover,
.nbl-table--minimal tbody tr:hover {
    background: #fafafa;
}

/* —— MINIMAL —— Mobile: compact list, muted labels */
@media (max-width: 767px) {
    .nbl-entry-content .nbl-table--minimal,
    .nbl-table--minimal {
        margin: 1em 0;
    }

    .nbl-table--minimal thead {
        display: none !important;
    }

    .nbl-table--minimal tbody tr {
        display: block;
        border-bottom: 1px solid #f0f0f0;
        padding: 8px 0;
        background: transparent !important;
    }

    .nbl-table--minimal tbody tr:last-child {
        border-bottom: none;
    }

    .nbl-entry-content .nbl-table--minimal td,
    .nbl-table--minimal td {
        display: flex;
        justify-content: flex-start;
        align-items: baseline;
        padding: 4px 0;
        border: none;
        gap: 0;
        font-size: 14px;
        line-height: 1.5;
    }

    .nbl-table--minimal td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--nbl-text-muted);
        flex: 0 0 40%;
        max-width: 140px;
        padding-right: 12px;
        font-size: 13px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes nbl-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nbl-post-card {
    animation: nbl-fade-in 0.4s ease both;
}

.nbl-post-card:nth-child(1) { animation-delay: 0s; }
.nbl-post-card:nth-child(2) { animation-delay: 0.05s; }
.nbl-post-card:nth-child(3) { animation-delay: 0.1s; }
.nbl-post-card:nth-child(4) { animation-delay: 0.15s; }
.nbl-post-card:nth-child(5) { animation-delay: 0.2s; }
.nbl-post-card:nth-child(6) { animation-delay: 0.25s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .nbl-post-grid--3-cols { grid-template-columns: repeat(2, 1fr) !important; }
    .nbl-post-grid--4-cols { grid-template-columns: repeat(2, 1fr) !important; }
    .nbl-related-posts__card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .nbl-blog-layout {
        flex-direction: column !important;
    }

    .nbl-blog-sidebar {
        width: 100% !important;
        position: static;
        order: -1;
        margin-bottom: 24px;
    }

    .nbl-post-grid--2-cols,
    .nbl-post-grid--3-cols,
    .nbl-post-grid--4-cols {
        grid-template-columns: 1fr !important;
    }

    .nbl-single-layout {
        flex-direction: column !important;
        padding: 16px;
        margin: 0 auto;
    }

    .nbl-single-sidebar {
        display: none;
    }

    .nbl-post-hero {
        min-height: 300px;
    }

    .nbl-post-hero__title {
        font-size: 24px;
    }

    .nbl-related-posts__card {
        flex: 0 0 calc(50% - 10px);
    }

    .nbl-slider-btn {
        display: none;
    }

    .nbl-related-slider__slides {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .nbl-related-posts__card {
        scroll-snap-align: start;
    }

    .nbl-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .nbl-toc-mobile {
        display: block;
    }

    .nbl-toc-desktop {
        display: none;
    }

    .nbl-category-filter--mobile {
        display: block;
    }

    .nbl-category-filter--desktop {
        display: none;
    }
}

@media (max-width: 480px) {
    .nbl-post-hero__title {
        font-size: 20px;
    }

    .nbl-entry-content {
        font-size: 15px;
    }

    .nbl-entry-content h2 {
        font-size: 20px;
    }

    .nbl-entry-content h3 {
        font-size: 18px;
    }

    .nbl-highlight {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }

    .nbl-highlight__icon {
        align-self: flex-start;
    }

    .nbl-social-share__buttons {
        justify-content: center;
    }

    .nbl-social-share__btn {
        flex: 1;
        min-width: calc(50% - 4px);
    }
}
