/* LSP44 Blog Blocks v2 */

/* ══════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════ */
.lbb-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--fbdr, rgba(255,255,255,0.12));
    padding-bottom: 16px;
}
.lbb-fi {
    position: relative;
}
.lbb-fi-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 20px 6px 0;
    font-family: 'Degular Mono', 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--fval, #fff);
    white-space: nowrap;
    transition: opacity 0.2s;
    margin-right: 20px;
    border-right: 1px solid var(--fbdr, rgba(255,255,255,0.12));
}
.lbb-fi:last-child .lbb-fi-btn { border-right: none; }
.lbb-fi-btn:hover { opacity: 0.8; }
.lbb-fi-lbl {
    color: var(--flbl, rgba(255,255,255,0.45));
}
.lbb-fi-sep {
    color: var(--flbl, rgba(255,255,255,0.45));
    margin-right: 2px;
}
.lbb-fi-val { font-weight: 600; }
.lbb-fi-chev {
    stroke: var(--flbl, rgba(255,255,255,0.45));
    transition: transform 0.2s;
    flex-shrink: 0;
}
.lbb-fi.open .lbb-fi-chev { transform: rotate(180deg); }

/* Dropdown */
.lbb-fi-drop {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 160px;
    background: #0d0f14;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.lbb-fi.open .lbb-fi-drop { display: block; }
.lbb-fi-opt {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 10px 16px;
    font-family: 'Whitney', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.lbb-fi-opt:hover  { background: rgba(255,255,255,0.06); color: #fff; }
.lbb-fi-opt.active { color: #63B52D; }

/* Search input */
.lbb-fi-search { flex: 1; min-width: 160px; }
.lbb-fi-search-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 6px 14px;
    font-family: 'Degular Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.lbb-fi-search-input::placeholder { color: rgba(255,255,255,0.35); }
.lbb-fi-search-input:focus { border-color: rgba(255,255,255,0.3); }

/* Loading state */
.lbb-pg.lbb-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

.lbb-empty {
    padding: 24px; background: rgba(255,255,255,.05);
    border: 1px dashed rgba(255,255,255,.15); border-radius: 8px;
    color: rgba(255,255,255,.5); font-family: monospace; font-size: 12px; text-align: center;
}

/* ══════════════════════════════════════
   FEATURED POST
   ══════════════════════════════════════ */
.lbb-fp { width: 100%; overflow: hidden; border-radius: var(--fp-radius, 8px); }
.lbb-fp-inner {
    position: relative;
    min-height: var(--fp-min-h, 440px);
    background-size: cover; background-position: center;
    display: flex;
}
.lbb-fp-overlay {
    position: absolute; inset: 0;
    background: var(--fp-overlay, rgba(0,0,0,0.55));
}

/* Right-panel layout */
.lbb-fp-right-panel .lbb-fp-inner { align-items: stretch; }
.lbb-fp-right-panel .lbb-fp-panel {
    margin-left: auto;
    width: var(--fp-panel-w, 42%);
    background: var(--fp-panel-bg, rgba(0,0,0,0.65));
    padding: var(--fp-pv, 48px) var(--fp-ph, 40px);
    position: relative; z-index: 1;
    display: flex; flex-direction: column; justify-content: center;
}
.lbb-fp-right-panel .lbb-fp-cta { align-self: flex-end; margin-top: auto; padding-top: 8px; }

/* Bottom-left layout */
.lbb-fp-bottom-left .lbb-fp-inner { align-items: flex-end; }
.lbb-fp-bottom-left .lbb-fp-panel {
    position: relative; z-index: 1;
    padding: var(--fp-pv, 40px) var(--fp-ph, 48px);
    max-width: 640px;
}

/* ── Bottom-split layout (floating dark box left, CTA floating bottom-right) ── */
.lbb-fp-bottom-split .lbb-fp-inner { align-items: stretch; }
.lbb-fp-bottom-split .lbb-fp-panel {
    position: absolute;
    bottom: var(--fp-panel-inset, 20px);
    left: var(--fp-panel-inset, 20px);
    width: var(--fp-panel-w, 55%);
    background: var(--fp-panel-bg, rgba(20,22,26,0.78));
    padding: var(--fp-pv, 28px) var(--fp-ph, 32px);
    z-index: 2;
    border-radius: var(--fp-radius, 8px); /* all 4 corners rounded */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex; flex-direction: column; gap: 10px;
}
/* CTA floats at bottom-right, outside the box */
.lbb-fp-bottom-split .lbb-fp-cta {
    position: absolute;
    bottom: var(--fp-cta-bottom, 24px);
    right: var(--fp-cta-right, 24px);
    z-index: 3;
}

/* Typography */
.lbb-fp-meta {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: var(--fp-m-mb, 14px);
    font-family: var(--fp-m-fam, 'Degular Mono', monospace);
    font-size: var(--fp-m-size, 11px);
    color: var(--fp-m-color, rgba(255,255,255,.55));
    text-transform: var(--fp-m-transform, uppercase);
    letter-spacing: .1em;
}
.lbb-fp-cat { color: inherit; text-decoration: none; }
.lbb-fp-cat:hover { opacity: .75; }
.lbb-fp-sep { opacity: .4; }
.lbb-fp-title {
    font-family: var(--fp-t-fam, 'Whitney', sans-serif) !important;
    font-size: var(--fp-t-size, 32px) !important;
    font-weight: var(--fp-t-weight, 300) !important;
    color: var(--fp-t-color, #fff) !important;
    line-height: var(--fp-t-lh, 1.2) !important;
    text-transform: var(--fp-t-transform, none) !important;
    margin: 0 0 var(--fp-t-mb, 14px) !important;
}
.lbb-fp-title a { color: var(--fp-t-color, #fff) !important; text-decoration: none; }
.lbb-fp-title a:hover { opacity: .88; }
.lbb-fp-excerpt {
    font-family: var(--fp-e-fam, 'Whitney', sans-serif);
    font-size: var(--fp-e-size, 14px);
    color: var(--fp-e-color, rgba(255,255,255,.75));
    line-height: var(--fp-e-lh, 1.65);
    margin: 0 0 var(--fp-e-mb, 22px);
}
.lbb-fp-cta {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--fp-c-bg, #fff);
    color: var(--fp-c-color, #000);
    font-family: var(--fp-c-fam, 'Whitney', sans-serif);
    font-size: var(--fp-c-size, 13px);
    font-weight: var(--fp-c-weight, 500);
    padding: 10px 22px; border-radius: 5px;
    text-decoration: none; transition: opacity .2s;
}
.lbb-fp-cta:hover { opacity: .86; color: var(--fp-c-color, #000); }

/* ═══════════════════════════════════════════════
   RESPONSIVE — FEATURED POST
   ═══════════════════════════════════════════════ */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {

    /* All layouts: reduce min-height */
    .lbb-fp-inner { min-height: 360px !important; }

    /* Right panel → full-width panel stacks at bottom */
    .lbb-fp-right-panel .lbb-fp-panel {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 28px 28px !important;
    }

    /* Bottom-split → panel goes full width */
    .lbb-fp-bottom-split .lbb-fp-panel {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        width: calc(100% - 24px) !important;
    }
    /* CTA tucks inside bottom-split panel on tablet */
    .lbb-fp-bottom-split .lbb-fp-cta {
        bottom: 12px !important;
        right: 12px !important;
    }

    /* Tablet text sizes (use mobile vars if set, else scale down) */
    .lbb-fp-title   { font-size: calc(var(--fp-t-size-mob, 28px) * 1.1) !important; }
    .lbb-fp-excerpt { font-size: calc(var(--fp-e-size-mob, 16px) * 1.05) !important; }
    .lbb-fp-meta    { font-size: var(--fp-m-size-mob, 14px) !important; }
}

/* Mobile (≤ 540px) */
@media (max-width: 540px) {

    /* Taller card so image is visible above the panel */
    .lbb-fp-inner { min-height: 560px !important; }

    .lbb-fp-right-panel .lbb-fp-panel,
    .lbb-fp-bottom-left  .lbb-fp-panel {
        padding: 20px 18px !important;
    }

    /* bottom-split: compact box anchored to bottom, image fills above */
    .lbb-fp-bottom-split .lbb-fp-panel {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        width: calc(100% - 24px) !important;
        padding: 18px 18px 60px !important; /* bottom room for CTA */
    }
    /* Clamp excerpt to 3 lines so panel doesn't grow too tall */
    .lbb-fp-bottom-split .lbb-fp-excerpt {
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    .lbb-fp-bottom-split .lbb-fp-cta {
        bottom: 16px !important;
        right: 16px !important;
        padding: 9px 16px !important;
    }

    /* Mobile font sizes from attributes */
    .lbb-fp-title   { font-size: var(--fp-t-size-mob, 24px) !important; }
    .lbb-fp-excerpt { font-size: var(--fp-e-size-mob, 16px) !important; line-height: 1.55 !important; }
    .lbb-fp-meta    { font-size: var(--fp-m-size-mob, 14px) !important; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — POST GRID
   ═══════════════════════════════════════════════ */

/* Tablet: 2 columns */
@media (max-width: 900px) {
    .lbb-pg { grid-template-columns: repeat(2, 1fr) !important; }
    .lbb-pg-title   { font-size: calc(var(--pg-t-size-mob, 18px) * 1.05) !important; }
    .lbb-pg-date    { font-size: calc(var(--pg-d-size-mob, 14px) * 1.0) !important; }
}

/* Mobile: 1 column */
@media (max-width: 540px) {
    .lbb-pg { grid-template-columns: 1fr !important; }

    .lbb-pg-bottom {
        padding: 12px 14px !important;
    }
    .lbb-pg-title   { font-size: var(--pg-t-size-mob, 18px) !important; margin-bottom: 4px !important; }
    .lbb-pg-date    { font-size: var(--pg-d-size-mob, 14px) !important; }
    .lbb-pg-excerpt { font-size: var(--pg-e-size-mob, 14px) !important; }
    .lbb-pg-cta     { font-size: var(--pg-c-size-mob, 11px) !important; }
}

/* ══════════════════════════════════════
   POST GRID
   ══════════════════════════════════════ */
.lbb-pg {
    display: grid;
    grid-template-columns: repeat(var(--pg-cols, 3), 1fr);
    gap: var(--pg-gap, 16px);
}
.lbb-pg-link { display: block; text-decoration: none; }
.lbb-pg-image {
    position: relative;
    aspect-ratio: var(--pg-ratio, 4 / 3);
    min-height: var(--pg-min-h, 0px);
    background-size: cover; background-position: center;
    border-radius: var(--pg-radius, 8px);
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
}
.lbb-pg-overlay {
    position: absolute; inset: 0;
    background: var(--pg-overlay, rgba(0,0,0,.45));
    transition: background .3s;
}
.lbb-pg-link:hover .lbb-pg-overlay { filter: brightness(1.2); }

/* bottom section — holds meta row + title + excerpt + cta */
.lbb-pg-bottom {
    position: relative; z-index: 1;
    padding: var(--pg-bpv, 14px) var(--pg-bph, 16px);
    background: linear-gradient(to top, #000 0%, rgba(0,0,0,.95) 40%, rgba(0,0,0,.6) 70%, transparent 100%);
    margin-top: auto; /* push to card bottom */
}
/* date + category row above title */
.lbb-pg-meta-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: var(--pg-m-mb, 6px);
}
.lbb-pg-date {
    font-family: var(--pg-d-fam, 'Degular Mono', monospace);
    font-size: var(--pg-d-size, 10px);
    color: var(--pg-d-color, rgba(255,255,255,.65)) !important;
    text-transform: var(--pg-d-transform, uppercase);
    letter-spacing: .08em;
}
.lbb-pg-cat {
    font-family: var(--pg-d-fam, 'Degular Mono', monospace);
    font-size: 9px; letter-spacing: .05em; text-transform: uppercase;
    background: rgba(99,181,45,.2); color: #6DB13A !important;
    border-radius: 3px; padding: 2px 7px;
}
.lbb-pg-title {
    font-family: var(--pg-t-fam, 'Whitney', sans-serif) !important;
    font-size: var(--pg-t-size, 18px) !important;
    font-weight: var(--pg-t-weight, 400) !important;
    color: var(--pg-t-color, #fff) !important;
    line-height: var(--pg-t-lh, 1.3) !important;
    text-transform: var(--pg-t-transform, none) !important;
    margin: 0 0 var(--pg-t-mb, 6px) !important;
}
.lbb-pg-excerpt {
    font-family: var(--pg-e-fam, 'Whitney', sans-serif);
    font-size: var(--pg-e-size, 12px);
    color: var(--pg-e-color, rgba(255,255,255,.65));
    line-height: var(--pg-e-lh, 1.5);
    margin: 0 0 var(--pg-m-mb, 6px);
}
.lbb-pg-cta {
    font-family: var(--pg-c-fam, 'Degular Mono', monospace);
    font-size: var(--pg-c-size, 11px);
    font-weight: var(--pg-c-weight, 600);
    color: var(--pg-c-color, #63B52D);
    text-transform: var(--pg-c-transform, uppercase);
    letter-spacing: .08em;
    display: inline-flex; align-items: center; gap: 4px;
}

/* grid breakpoints handled above */
