/* =============================================================
   Blog Filter Pro — Front-End Styles
   ============================================================= */

:root {
    --bfp-accent:      #2563eb;
    --bfp-accent-dark: #1d4ed8;
    --bfp-accent-light:#dbeafe;
    --bfp-text:        #1e293b;
    --bfp-text-muted:  #64748b;
	--bfp-text-desc:  #606060;
    --bfp-bg:          #ffffff;
    --bfp-bg-alt:      #f8fafc;
    --bfp-border:      #e2e8f0;
    --bfp-radius:      12px;
    --bfp-radius-sm:   8px;
    --bfp-radius-pill: 999px;
    --bfp-shadow:      0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
    --bfp-shadow-hover:0 4px 12px rgba(0,0,0,.1), 0 16px 40px rgba(0,0,0,.1);
    --bfp-transition:  .22s cubic-bezier(.4,0,.2,1);
    --bfp-heading-font:        'Kanit', sans-serif;
	--bfp-font:        'Montserrat', sans-serif;
}

.bfp-wrapper {
    font-family: var(--bfp-font);
    color: var(--bfp-text);
    -webkit-font-smoothing: antialiased;
}

/* ======================================================
   FILTER BAR
   ====================================================== */

.bfp-filter-bar {
    background: var(--bfp-bg);
    border: 1px solid var(--bfp-border);
    border-radius: var(--bfp-radius);
    padding: 20px 24px 16px;
    margin-bottom: 28px;
}

.bfp-filter-position-left .bfp-posts-area,
.bfp-filter-position-right .bfp-posts-area { display: flex; gap: 28px; }

.bfp-filter-position-left .bfp-filter-bar,
.bfp-filter-position-right .bfp-filter-bar {
    width: 260px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 80px;
}
.bfp-filter-position-left .bfp-filter-bar { order: -1; }
.bfp-filter-position-right .bfp-filter-bar { order: 1; }

.bfp-filter-position-left .bfp-posts-container,
.bfp-filter-position-right .bfp-posts-container { flex: 1; min-width: 0; }

/* When left/right: stack controls vertically */
.bfp-filter-position-left .bfp-filter-controls,
.bfp-filter-position-right .bfp-filter-controls { flex-direction: column; }

.bfp-filter-position-left .bfp-filter-group,
.bfp-filter-position-right .bfp-filter-group { width: 100%; }

.bfp-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 14px;
}

.bfp-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
    flex: 1;
}

.bfp-filter-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bfp-text);
}

/* Search */
.bfp-filter-search { flex: 2; min-width: 240px; }

.bfp-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.bfp-search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--bfp-text);
    pointer-events: none;
}

.bfp-search-input {
    width: 100%;
    padding: 9px 36px 9px 38px;
    border: 1.5px solid var(--bfp-border);
    border-radius: var(--bfp-radius-sm);
    font-size: 14px;
    color: var(--bfp-text);
    background: var(--bfp-bg-alt);
    transition: border-color var(--bfp-transition), box-shadow var(--bfp-transition);
    outline: none;
    font-family: var(--bfp-font);
}
.bfp-search-input:focus {
    border-color: var(--bfp-accent);
    box-shadow: 0 0 0 3px var(--bfp-accent-light);
    background: var(--bfp-bg);
}
.bfp-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--bfp-text);
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
}
.bfp-search-clear:hover { color: var(--bfp-text); }

/* Select */
.bfp-select {
    padding: 9px 32px 9px 12px;
    border: 1.5px solid var(--bfp-border);
    border-radius: var(--bfp-radius-sm);
    font-size: 14px;
    color: var(--bfp-text);
    background: var(--bfp-bg-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color var(--bfp-transition), box-shadow var(--bfp-transition);
    font-family: var(--bfp-font);
    width: 100%;
}
.bfp-select:focus {
    border-color: var(--bfp-accent);
    box-shadow: 0 0 0 3px var(--bfp-accent-light);
    background-color: var(--bfp-bg);
}

/* Layout switcher */
.bfp-layout-switcher { flex: 0; min-width: auto; }

.bfp-layout-btns {
    display: flex;
    gap: 4px;
    border: 1.5px solid var(--bfp-border);
    border-radius: var(--bfp-radius-sm);
    padding: 3px;
    background: var(--bfp-bg-alt);
}

.bfp-layout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--bfp-text);
    transition: all var(--bfp-transition);
}
.bfp-layout-btn svg { width: 14px; height: 14px; }
.bfp-layout-btn:hover { color: var(--bfp-text); background: var(--bfp-bg); }
.bfp-layout-btn.active {
    background: var(--bfp-accent);
    color: #fff;
}

/* Tag cloud */
.bfp-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    /* padding-top: 14px; */
    /* border-top: 1px solid var(--bfp-border); */
    /* margin-top: 14px; */
}

.bfp-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    border-radius: var(--bfp-radius-pill);
    border: 1.5px solid var(--bfp-border);
    background: var(--bfp-bg);
    font-size: 13px;
    font-weight: 500;
    color: var(--bfp-text);
    cursor: pointer;
    transition: all var(--bfp-transition);
    font-family: var(--bfp-font);
}
.bfp-tag-pill:hover {
    border-color: var(--bfp-accent);
    color: var(--bfp-accent);
}
.bfp-tag-pill.active {
    background: var(--bfp-accent) !important;
    border-color: var(--bfp-accent) !important;
    color: #fff !important;
}
.bfp-tag-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: rgba(0,0,0,.1);
    font-size: 11px;
    font-weight: 600;
}
.bfp-tag-pill.active .bfp-tag-count { background: rgba(255,255,255,.25); }

/* Active filters */
.bfp-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bfp-accent-light);
    border-radius: var(--bfp-radius-sm);
    margin-bottom: 14px;
}
.bfp-active-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bfp-accent-dark);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.bfp-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.bfp-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--bfp-radius-pill);
    background: var(--bfp-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}
.bfp-chip-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    margin-left: 2px;
}
.bfp-chip-remove:hover { color: #fff; }
.bfp-clear-all {
    background: none;
    border: none;
    color: var(--bfp-accent-dark);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: var(--bfp-font);
}

/* Results meta */
.bfp-results-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--bfp-text);
    margin-top: 12px;
}
.bfp-results-sep { opacity: .4; }

/* ======================================================
   POSTS AREA & LOADING
   ====================================================== */

.bfp-posts-area { position: relative; }

.bfp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    font-size: 14px;
    color: var(--bfp-text-muted);
}

.bfp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--bfp-border);
    border-top-color: var(--bfp-accent);
    border-radius: 50%;
    animation: bfp-spin .7s linear infinite;
}
@keyframes bfp-spin { to { transform: rotate(360deg); } }

.bfp-no-posts {
    text-align: center;
    padding: 80px 20px;
    font-size: 16px;
    color: var(--bfp-text);
    grid-column: 1 / -1;
}

/* ======================================================
   POST CONTAINERS
   ====================================================== */

/* GRID */
.bfp-posts-container.bfp-layout-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}
.bfp-posts-container.bfp-layout-grid.bfp-cols-1 { grid-template-columns: 1fr; }
.bfp-posts-container.bfp-layout-grid.bfp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bfp-posts-container.bfp-layout-grid.bfp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bfp-posts-container.bfp-layout-grid.bfp-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* LIST */
.bfp-posts-container.bfp-layout-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.bfp-layout-list .bfp-card { flex-direction: row; }
.bfp-layout-list .bfp-card-thumb { width: 260px; flex-shrink: 0; border-radius: var(--bfp-radius) 0 0 var(--bfp-radius); }
.bfp-layout-list .bfp-card-thumb .bfp-thumb-img { height: 100% !important; width: 100%; border-radius: var(--bfp-radius) 0 0 var(--bfp-radius); }
.bfp-layout-list .bfp-card-body { padding: 24px; }

/* MASONRY */
.bfp-posts-container.bfp-layout-masonry {
    columns: 3;
    column-gap: 24px;
}
.bfp-layout-masonry .bfp-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 24px;
    display: block;
}

/* ======================================================
   POST CARD — Single-column design (matches screenshot)
   ====================================================== */

.bfp-card {
    background: var(--bfp-bg);
    border-radius: var(--bfp-radius);
    overflow: hidden;
    transition: box-shadow var(--bfp-transition), transform var(--bfp-transition);
}

/* Card styles via container class */
.bfp-card-shadow .bfp-card { box-shadow: var(--bfp-shadow); }
.bfp-card-shadow .bfp-card:hover { transform: translateY(-2px); box-shadow: var(--bfp-shadow-hover); }
.bfp-card-border .bfp-card { border: 1.5px solid var(--bfp-border); }
.bfp-card-border .bfp-card:hover { border-color: var(--bfp-accent); }
.bfp-card-flat  .bfp-card { background: var(--bfp-bg-alt); }
.bfp-card-flat  .bfp-card:hover { background: var(--bfp-bg); }

/* Inner wrapper — adds padding and structure */
.bfp-card-inner {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ---- Title (above image, bold, large) ---- */
.bfp-card-header {
    margin-bottom: 14px;
}
.bfp-card-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -.01em;
}
.bfp-card-title a {
    text-decoration: none;
    color: var(--bfp-text);
    transition: color var(--bfp-transition);
}
.bfp-card-title a:hover { color: var(--bfp-accent); }

/* ---- Thumbnail (below title, full width) ---- */
.bfp-card-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 0px;
    margin-bottom: 16px;
}
.bfp-card-thumb[data-ratio="16/9"] { aspect-ratio: auto; }
.bfp-card-thumb[data-ratio="4/3"]  { aspect-ratio: auto; }
.bfp-card-thumb[data-ratio="3/2"]  { aspect-ratio: auto; }
.bfp-card-thumb[data-ratio="1/1"]  { aspect-ratio: auto; }


.bfp-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}
.bfp-card:hover .bfp-thumb-img { transform: scale(1.03); }

.bfp-cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: var(--bfp-radius-pill);
    background: var(--bfp-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .06em;
    transition: background var(--bfp-transition);
}
.bfp-cat-badge:hover { background: var(--bfp-accent-dark); color: #fff; }

/* ---- Card body ---- */
.bfp-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* ---- Date row with calendar icon (screenshot style) ---- */
.bfp-card-date-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--bfp-text);
}
.bfp-date-icon {
    flex-shrink: 0;
    color: var(--bfp-text);
}
.bfp-meta-date {
    font-size: 13px;
    color: var(--bfp-text);
}
.bfp-meta-sep { opacity: .35; }
.bfp-meta-author {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--bfp-text);
    font-weight: 500;
    transition: color var(--bfp-transition);
}
.bfp-meta-author:hover { color: var(--bfp-accent); }
.bfp-meta-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}
.bfp-meta-comments { display: flex; align-items: center; gap: 3px; }

/* ---- Excerpt ---- */
.bfp-card-excerpt {
    font-size: 16px;
    line-height: 1.7;
    color: var(--bfp-text);
    margin: 0;
	font-weight:500;
}

/* ---- Bottom row: tags LEFT, read more RIGHT (screenshot layout) ---- */
.bfp-card-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding-top: 4px;
}

/* ---- Tags (outline pill style with # prefix, matches screenshot) ---- */
.bfp-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}
.bfp-inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--bfp-radius-pill);
    background: transparent;
    border: 1.5px solid var(--bfp-accent);
    font-size: 12px;
    font-weight: 500;
    color: var(--bfp-accent);
    cursor: pointer;
    transition: all var(--bfp-transition);
    font-family: var(--bfp-heading-font);
    letter-spacing: .01em;
}
.bfp-inline-tag:hover {
    background: var(--bfp-accent);
    color: #fff;
}

/* ---- Read More pill button (matches screenshot: dark filled, uppercase) ---- */
.bfp-read-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border-radius: var(--bfp-radius-pill);
    background-color: #C70F2E !important;
	color: #FFF;
    font-family: Kanit;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    text-align: center !important;
    letter-spacing: .07em;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;    
}
.bfp-read-more-btn:hover {
    background: linear-gradient(180deg, #C70F2E 0%, #610716 100%);
    color: #fff;
}

/* Keep old .bfp-read-more for any legacy references */
.bfp-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bfp-accent);
    text-decoration: none;
}
.bfp-read-more:hover { color: var(--bfp-accent-dark); }

/* Card animations */
.bfp-card.bfp-anim-fade  { opacity: 0; animation: bfpFadeIn  .4s ease forwards; }
.bfp-card.bfp-anim-slide { opacity: 0; transform: translateY(20px); animation: bfpSlideIn .4s ease forwards; }
.bfp-card.bfp-anim-zoom  { opacity: 0; transform: scale(.95); animation: bfpZoomIn .35s ease forwards; }

@keyframes bfpFadeIn  { to { opacity: 1; } }
@keyframes bfpSlideIn { to { opacity: 1; transform: translateY(0); } }
@keyframes bfpZoomIn  { to { opacity: 1; transform: scale(1); } }

/* ---- LIST layout override ---- */
.bfp-layout-list .bfp-card-inner {
    flex-direction: row;
    gap: 0;
    padding: 0;
    align-items: stretch;
}
.bfp-layout-list .bfp-card-header {
    display: none; /* title shown inside body for list */
}
.bfp-layout-list .bfp-card-thumb {
    width: 280px;
    flex-shrink: 0;
    border-radius: var(--bfp-radius) 0 0 var(--bfp-radius);
    margin-bottom: 0;
    aspect-ratio: unset;
    min-height: 180px;
}
.bfp-layout-list .bfp-card-thumb .bfp-thumb-img {
    height: 100%;
    border-radius: var(--bfp-radius) 0 0 var(--bfp-radius);
}
.bfp-layout-list .bfp-card-body {
    padding: 22px 24px;
}
/* Show title inside body for list layout */
.bfp-layout-list .bfp-card-body::before {
    display: none;
}
.bfp-layout-list .bfp-card-title-in-body {
    display: block;
}

/* ---- MASONRY layout ---- */
.bfp-posts-container.bfp-layout-masonry {
    columns: 3;
    column-gap: 20px;
}
.bfp-layout-masonry .bfp-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 20px;
    display: block;
}

.bfp-load-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
}

.bfp-load-more-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    border-radius: var(--bfp-radius-pill) !important;
    padding: 9px 22px;
	border:none;
    background-color: #C70F2E !important;
	color: #FFF; 
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    text-align: center !important;
    letter-spacing: .07em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
	font-family: var(--bfp-heading-font);
	transition:none !important;
}
.bfp-load-more-btn:hover {
    background: linear-gradient(180deg, #C70F2E 0%, #610716 100%) !important;
	color:#FFF !important;
	transition:none !important;
}
.bfp-load-more-btn:disabled {
    background: var(--bfp-border);
    color: var(--bfp-text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.bfp-lm-count { font-size: 12px; font-weight: 400; opacity: .8;display:none; }


.bfp-progress-bar {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: var(--bfp-border);
    border-radius: 2px;
    overflow: hidden;
}
.bfp-progress-fill {
    height: 100%;
    background: var(--bfp-accent);
    border-radius: 2px;
    transition: width .4s ease;
}

/* ======================================================
   MODAL / LIGHTBOX
   ====================================================== */

.bfp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
    animation: bfpFadeIn .2s ease;
}

.bfp-modal-wrap {
    background: var(--bfp-bg);
    border-radius: var(--bfp-radius);
    width: 100%;
    max-width: 780px;
    position: relative;
    animation: bfpSlideIn .25s ease;
    box-shadow: 0 25px 80px rgba(0,0,0,.4);
    margin: auto;
}

.bfp-modal-close {
    position: sticky;
    top: 16px;
    float: right;
    margin: 16px 16px -50px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.07);
    cursor: pointer;
    color: var(--bfp-text);
    transition: background var(--bfp-transition);
    z-index: 10;
}
.bfp-modal-close svg { width: 18px; height: 18px; }
.bfp-modal-close:hover { background: rgba(0,0,0,.15); }

.bfp-modal-body { padding: 0; }

/* ======================================================
   SINGLE POST (inside modal or standalone)
   ====================================================== */

.bfp-single-hero { overflow: hidden; border-radius: var(--bfp-radius) var(--bfp-radius) 0 0; }
.bfp-single-hero-img { width: 100%; max-height: 420px; object-fit: cover; display: block; }

.bfp-single-header { padding: 28px 36px 0; }

.bfp-single-cats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.bfp-single-cat {
    padding: 4px 12px;
    border-radius: var(--bfp-radius-pill);
    background: var(--bfp-accent-light);
    color: var(--bfp-accent-dark);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.bfp-single-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 18px;
    color: var(--bfp-text);
}

.bfp-single-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bfp-border);
    margin-bottom: 0;
}
.bfp-single-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bfp-single-meta-info { flex: 1; }
.bfp-single-author { display: block; font-weight: 600; font-size: 14px; }
.bfp-single-date-read { font-size: 13px; color: var(--bfp-text-muted); }
.bfp-single-permalink {
    color: var(--bfp-text-muted);
    padding: 8px;
    border-radius: 8px;
    transition: all var(--bfp-transition);
    display: flex;
}
.bfp-single-permalink:hover { background: var(--bfp-bg-alt); color: var(--bfp-accent); }

/* Prose content */
.bfp-single-content {
    padding: 28px 36px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--bfp-text);
}
.bfp-prose p { margin: 0 0 1.2em; }
.bfp-prose h2 { font-size: 22px; font-weight: 700; margin: 1.5em 0 .6em; }
.bfp-prose h3 { font-size: 18px; font-weight: 700; margin: 1.4em 0 .5em; }
.bfp-prose a { color: var(--bfp-accent); }
.bfp-prose img { max-width: 100%; border-radius: 8px; margin: 1em 0; }
.bfp-prose blockquote { border-left: 3px solid var(--bfp-accent); margin: 1.5em 0; padding: .8em 1.2em; background: var(--bfp-accent-light); border-radius: 0 8px 8px 0; }
.bfp-prose ul, .bfp-prose ol { margin: .8em 0 .8em 1.5em; }
.bfp-prose li { margin: .3em 0; }
.bfp-prose code { font-size: .9em; background: var(--bfp-bg-alt); padding: 2px 6px; border-radius: 4px; }
.bfp-prose pre { background: #1e293b; color: #e2e8f0; padding: 1.2em; border-radius: 8px; overflow-x: auto; margin: 1em 0; }

/* Single tags */
.bfp-single-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 0 36px 20px;
}
.bfp-single-tags-label { font-size: 13px; font-weight: 600; color: var(--bfp-text-muted); }
.bfp-single-tag {
    padding: 4px 12px;
    border-radius: var(--bfp-radius-pill);
    background: var(--bfp-bg-alt);
    border: 1px solid var(--bfp-border);
    font-size: 12px;
    color: var(--bfp-text-muted);
}

/* Author bio */
.bfp-single-author-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 0 36px 24px;
    padding: 20px;
    background: var(--bfp-bg-alt);
    border-radius: var(--bfp-radius);
    border: 1px solid var(--bfp-border);
}
.bfp-author-card-avatar { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.bfp-author-card-name { font-weight: 700; margin-bottom: 4px; }
.bfp-author-card-bio { font-size: 13px; color: var(--bfp-text-muted); line-height: 1.55; margin: 0; }

/* Share bar */
.bfp-share-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 36px 24px;
}
.bfp-share-label { font-size: 13px; font-weight: 600; color: var(--bfp-text-muted); }
.bfp-share-btn {
    padding: 6px 14px;
    border-radius: var(--bfp-radius-pill);
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--bfp-border);
    background: var(--bfp-bg);
    color: var(--bfp-text-muted);
    cursor: pointer;
    transition: all var(--bfp-transition);
    text-decoration: none;
    font-family: var(--bfp-font);
    display: inline-flex;
    align-items: center;
}
.bfp-share-btn:hover { border-color: var(--bfp-accent); color: var(--bfp-accent); }
.bfp-share-twitter:hover  { border-color: #000; color: #000; }
.bfp-share-facebook:hover { border-color: #1877f2; color: #1877f2; }
.bfp-share-linkedin:hover { border-color: #0077b5; color: #0077b5; }

/* ======================================================
   COMMENTS
   ====================================================== */

.bfp-comments-section {
    padding: 0 36px 36px;
    border-top: 1px solid var(--bfp-border);
    margin-top: 8px;
}
.bfp-comments-title {
    font-size: 20px;
    font-weight: 700;
    padding-top: 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.bfp-comments-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 13px;
    background: var(--bfp-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* Comment item */
.bfp-comment {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bfp-border);
    animation: bfpFadeIn .3s ease;
}
.bfp-comment:last-child { border-bottom: none; margin-bottom: 0; }

.bfp-comment-avatar-wrap img.bfp-comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.bfp-comment-body { flex: 1; }
.bfp-comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}
.bfp-comment-author { font-weight: 700; font-size: 14px; }
.bfp-comment-date { font-size: 12px; color: var(--bfp-text-muted); }
.bfp-comment-content { font-size: 14px; line-height: 1.65; }
.bfp-comment-content p { margin: 0 0 .5em; }
.bfp-comment-reply-btn {
    background: none;
    border: none;
    color: var(--bfp-accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 6px;
    font-family: var(--bfp-font);
}
.bfp-comment-reply-btn:hover { text-decoration: underline; }

/* Load more comments */
.bfp-load-comments-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
    padding: 12px;
    border: 1.5px dashed var(--bfp-border);
    border-radius: var(--bfp-radius-sm);
    background: none;
    color: var(--bfp-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--bfp-transition);
    margin-bottom: 24px;
    font-family: var(--bfp-font);
}
.bfp-load-comments-btn:hover { border-color: var(--bfp-accent); color: var(--bfp-accent); background: var(--bfp-accent-light); }
.bfp-lc-count { font-size: 12px; font-weight: 400; opacity: .7; }

/* Comment form */
.bfp-comment-form-wrap {
    background: var(--bfp-bg-alt);
    border: 1px solid var(--bfp-border);
    border-radius: var(--bfp-radius);
    padding: 24px;
    margin-top: 24px;
}
.bfp-form-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; }
.bfp-form-row { margin-bottom: 14px; }
.bfp-form-row-half { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bfp-form-field { display: flex; flex-direction: column; gap: 5px; }
.bfp-form-label { font-size: 12px; font-weight: 600; color: var(--bfp-text-muted); }
.bfp-required { color: #ef4444; }

.bfp-form-input,
.bfp-form-textarea {
    padding: 9px 13px;
    border: 1.5px solid var(--bfp-border);
    border-radius: var(--bfp-radius-sm);
    font-size: 14px;
    color: var(--bfp-text);
    background: var(--bfp-bg);
    transition: border-color var(--bfp-transition), box-shadow var(--bfp-transition);
    outline: none;
    font-family: var(--bfp-font);
    width: 100%;
}
.bfp-form-input:focus,
.bfp-form-textarea:focus {
    border-color: var(--bfp-accent);
    box-shadow: 0 0 0 3px var(--bfp-accent-light);
}
.bfp-form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.bfp-char-count {
    font-size: 11px;
    color: var(--bfp-text-muted);
    text-align: right;
    margin-top: 4px;
}

.bfp-form-submit-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.bfp-submit-comment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--bfp-radius-pill);
    background: var(--bfp-accent);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--bfp-transition), transform var(--bfp-transition);
    font-family: var(--bfp-font);
}
.bfp-submit-comment:hover { background: var(--bfp-accent-dark); transform: translateY(-1px); }
.bfp-submit-comment:disabled { background: var(--bfp-border); color: var(--bfp-text-muted); cursor: not-allowed; transform: none; }

.bfp-submit-notice { font-size: 13px; }
.bfp-submit-notice.success { color: #16a34a; }
.bfp-submit-notice.error   { color: #dc2626; }

.bfp-reply-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bfp-accent-light);
    border-radius: var(--bfp-radius-sm);
    font-size: 13px;
    margin-bottom: 12px;
    color: var(--bfp-accent-dark);
}
.bfp-cancel-reply {
    background: none;
    border: none;
    color: var(--bfp-accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-family: var(--bfp-font);
    margin-left: auto;
}

.bfp-logged-in-notice {
    padding: 10px 14px;
    background: var(--bfp-bg-alt);
    border: 1px solid var(--bfp-border);
    border-radius: var(--bfp-radius-sm);
    font-size: 13px;
    color: var(--bfp-text-muted);
    margin-bottom: 14px;
}

/* ======================================================
   CONTENT WRAP — main listing + sidebar layout
   ====================================================== */

.bfp-content-wrap {
    display: block;
}
.bfp-content-wrap.bfp-has-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: flex-start;
}

/* ======================================================
   SIDEBAR — Related / Recent Posts
   ====================================================== */

.bfp-sidebar {
    position: sticky;
    top: 88px;
    align-self: flex-start;
}

.bfp-sidebar-inner {
    background: var(--bfp-bg);
    border: 1px solid var(--bfp-border);
    border-radius: var(--bfp-radius);
    overflow: hidden;
}

.bfp-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px !important;
    font-weight: 600 !important;
    color: var(--bfp-text);
    padding: 14px 18px;
    border-bottom: 1px solid var(--bfp-border);
    margin: 0;
    background: var(--bfp-bg-alt);
}
.bfp-sidebar-title-icon {
    color: var(--bfp-accent);
    flex-shrink: 0;
}

.bfp-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bfp-sidebar-item {
    border-bottom: 1px solid var(--bfp-border);
}
.bfp-sidebar-item:last-child {
    border-bottom: none;
}

.bfp-sidebar-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    text-decoration: none;
    color: var(--bfp-text);
    transition: background var(--bfp-transition);
}
.bfp-sidebar-link:hover {
    background: var(--bfp-bg-alt);
}
.bfp-sidebar-link:hover .bfp-sidebar-item-title {
    color: var(--bfp-accent);
}

/* Thumbnail */
.bfp-sidebar-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    width: 70px;
    height: 56px;
    border-radius: 7px;
    overflow: hidden;
}
.bfp-sidebar-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.bfp-sidebar-link:hover .bfp-sidebar-thumb {
    transform: scale(1.06);
}
.bfp-sidebar-thumb-placeholder {
    background: var(--bfp-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bfp-text-muted);
    width: 70px;
    height: 56px;
}
.bfp-sidebar-cat {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: var(--bfp-accent);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    overflow: hidden;
    max-width: calc(100% - 8px);
    text-overflow: ellipsis;
}

/* Info column */
.bfp-sidebar-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 2px;
}
.bfp-sidebar-item-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    color: var(--bfp-text);
    transition: color var(--bfp-transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
	padding-bottom:0px !important;
}
.bfp-sidebar-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.bfp-sidebar-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--bfp-text-muted);
}
.bfp-sidebar-date svg { flex-shrink: 0; }
.bfp-sidebar-read {
    font-size: 11px;
    color: var(--bfp-accent);
    font-weight: 600;
    background: var(--bfp-accent-light);
    padding: 1px 6px;
    border-radius: var(--bfp-radius-pill);
}

/* View all link */
.bfp-sidebar-view-all {
    /* display: flex; */
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--bfp-accent);
    text-decoration: none;
    border-top: 1px solid var(--bfp-border);
    background: var(--bfp-bg-alt);
    transition: background var(--bfp-transition), color var(--bfp-transition);
    letter-spacing: .03em;
    text-transform: uppercase;
}
.bfp-sidebar-view-all:hover {
    background: var(--bfp-accent);
    color: #fff;
}

/* ======================================================
   MODAL inner layout — post content + sidebar
   ====================================================== */

.bfp-modal-inner {
    display: flex;
    align-items: flex-start;
    min-height: 0;
}
.bfp-modal-body {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    max-height: 85vh;
}
.bfp-modal-sidebar {
    width: 260px;
    flex-shrink: 0;
    border-left: 1px solid var(--bfp-border);
    background: var(--bfp-bg-alt);
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 0 var(--bfp-radius) var(--bfp-radius) 0;
}
.bfp-modal-sidebar .bfp-sidebar-inner {
    border: none;
    border-radius: 0;
    background: transparent;
}
.bfp-modal-sidebar .bfp-sidebar-title {
    background: var(--bfp-bg);
    border-bottom: 1px solid var(--bfp-border);
    position: sticky;
    top: 0;
    z-index: 2;
}
.bfp-modal-has-sidebar {
    max-width: 1020px;
}

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

@media (max-width: 1024px) {
    .bfp-posts-container.bfp-layout-grid.bfp-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .bfp-posts-container.bfp-layout-masonry { columns: 2; }
    .bfp-content-wrap.bfp-has-sidebar { grid-template-columns: 1fr 260px; gap: 20px; }
    .bfp-modal-sidebar { width: 220px; }
}

@media (max-width: 900px) {
    /* Sidebar drops below posts on tablet */
    .bfp-content-wrap.bfp-has-sidebar { grid-template-columns: 1fr; }
    .bfp-sidebar { position: static; }
    .bfp-sidebar-list { display: grid; grid-template-columns: repeat(2, 1fr); }
    .bfp-sidebar-item:nth-child(odd) { border-right: 1px solid var(--bfp-border); }
    /* Modal sidebar collapses */
    .bfp-modal-inner { flex-direction: column; }
    .bfp-modal-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--bfp-border); border-radius: 0 0 var(--bfp-radius) var(--bfp-radius); max-height: 300px; }
    .bfp-modal-sidebar .bfp-sidebar-list { display: grid; grid-template-columns: repeat(2, 1fr); }
    .bfp-modal-body { max-height: none; }
}

@media (max-width: 768px) {
    .bfp-posts-container.bfp-layout-grid.bfp-cols-3,
    .bfp-posts-container.bfp-layout-grid.bfp-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .bfp-layout-list .bfp-card-inner { flex-direction: column; }
    .bfp-layout-list .bfp-card-header { display: block; padding: 16px 20px 0; }
    .bfp-layout-list .bfp-card-thumb { width: 100%; border-radius: var(--bfp-radius-sm); margin: 12px 0 0; min-height: auto; }
    .bfp-layout-list .bfp-card-thumb .bfp-thumb-img { border-radius: var(--bfp-radius-sm); height: 200px; }
    .bfp-layout-list .bfp-card-body { padding: 14px 20px 20px; }
    .bfp-filter-position-left .bfp-posts-area,
    .bfp-filter-position-right .bfp-posts-area { flex-direction: column; }
    .bfp-filter-position-left .bfp-filter-bar,
    .bfp-filter-position-right .bfp-filter-bar { width: 100%; position: static; }
    .bfp-single-header, .bfp-single-content, .bfp-single-tags,
    .bfp-single-author-card, .bfp-share-bar, .bfp-comments-section { padding-left: 20px; padding-right: 20px; }
    .bfp-single-title { font-size: 22px; }
    .bfp-form-row-half { grid-template-columns: 1fr; }
    .bfp-modal-overlay { padding: 0; align-items: flex-end; }
    .bfp-modal-wrap { border-radius: var(--bfp-radius) var(--bfp-radius) 0 0; max-height: 92vh; overflow-y: auto; }
    .bfp-card-bottom-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .bfp-read-more-btn { align-self: flex-end; }
    .bfp-sidebar-list { grid-template-columns: 1fr; }
    .bfp-sidebar-item:nth-child(odd) { border-right: none; }
}

@media (max-width: 480px) {
    .bfp-posts-container.bfp-layout-grid.bfp-cols-2,
    .bfp-posts-container.bfp-layout-grid.bfp-cols-3,
    .bfp-posts-container.bfp-layout-grid.bfp-cols-4 { grid-template-columns: 1fr; }
    .bfp-posts-container.bfp-layout-masonry { columns: 1; }
    .bfp-filter-controls { flex-direction: column; }
    .bfp-filter-group { min-width: 100%; }
    .bfp-modal-sidebar .bfp-sidebar-list { grid-template-columns: 1fr; }
}

/* ======================================================
   PRINT: inject stored custom CSS at the end
   ====================================================== */
<?php
$custom_css = BFP_Settings::get( 'custom_css', '' );
if ( $custom_css ) {
    echo "\n/* === User Custom CSS === */\n" . $custom_css;
}
?>
