/* ============================================================
   Custom Blog Filter v2.1 — cbf-style.css
   Font: Poppins | Border-radius: 0 | Colors via CSS vars
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&display=swap');

:root {
     --cbf-font:   'Poppins', sans-serif;
    --cbf-fs:     16px;
    --cbf-bg:     #f5f5f5;
    --cbf-text:   #1f1f1f;
    --cbf-active: #c8973a;
    --cbf-accent: #1b3a5c;
    --cbf-blue:   #1b3a5c;
}

.cbf-wrapper * { box-sizing: border-box; font-family: var(--cbf-font); }


/* ============================================================
   INLINE BAR
   ============================================================ */
.cbf-inline-wrapper {
    display: block;
    width: 100%;
    padding: 0 16px;
    border-radius: 0;
    margin-bottom: 40px;
}

.cbf-inline-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    min-height: 60px;
    color: #1f1f1f;
}

/* "Refine By:" label */
.cbf-inline-label {
    font-size: var(--cbf-fs);
    font-weight: 500;
    font-family: var(--cbf-font);
    letter-spacing: 0.02em;
    color: #1f1f1f;
    text-transform: capitalize;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Dropdown wrapper */
.cbf-inline-dropdown {
    position: relative;
    flex-shrink: 0;
}

/* Dropdown trigger button */


/* Dropdown trigger button — default state */
.cbf-inline-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 10px 20px;
    margin: 0;
    background: transparent;
    border: 2px solid #1b3a5c;
    border-radius: 0;
    color: #1b3a5c;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--cbf-font);
    letter-spacing: 0.02em;
    text-transform: capitalize;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

/* Hover + open state */
.cbf-inline-btn:hover,
.cbf-inline-dropdown.open .cbf-inline-btn {
    background: #1b3a5c;
    color: #ffffff !important;
}

.cbf-inline-btn:hover .cbf-chevron,
.cbf-inline-dropdown.open .cbf-chevron {
    color: #ffffff;
}

/* Active state — filter selected */
.cbf-inline-btn--active {
    background: #1b3a5c;
    border-color: #1b3a5c;
    color: #ffffff;
}

.cbf-inline-btn--active:hover {
    background: #1b3a5c;
    border-color: #1b3a5c;
    color: #ffffff;
}

/* Active option in dropdown */
.cbf-inline-option.active {
    background: #f0f4f8;
    color: #1b3a5c;
    font-weight: 600;
}

/* Filter submit button */
.cbf-inline-filter-btn {
    height: 50px;
    padding: 0 28px;
    margin: 0;
    background: #1b3a5c;
    color: #ffffff;
    border: 2px solid #1b3a5c;
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--cbf-font);
    letter-spacing: 0.02em;
    text-transform: capitalize;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.cbf-inline-filter-btn:hover { 
    opacity: 0.85; 
}

/* Apply dates button */
.cbf-dates-apply {
    width: 100%;
    height: 40px;
    background: #1b3a5c;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: var(--cbf-fs);
    font-weight: 600;
    font-family: var(--cbf-font);
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.15s;
}

.cbf-dates-apply:hover { opacity: 0.85; }

/* Clear button */
.cbf-inline-clear {
    height: 34px;
    padding: 0 16px;
    margin: 0;
    background: transparent;
    border: 1px solid rgba(27,58,92,0.3);
    border-radius: 0;
    color: #1b3a5c;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--cbf-font);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    margin-left: auto;
}

.cbf-inline-clear:hover {
    background: rgba(27,58,92,0.08);
}

/* Pagination */
.cbf-page-btn:hover { 
    border-color: #1b3a5c; 
    color: #1b3a5c; 
    background: #f0f4f8; 
}

.cbf-page-btn.cbf-page-active { 
    background: #1b3a5c; 
    border-color: #1b3a5c; 
    color: #fff; 
}

/* Read more link */
.cbf-read-more { 
    color: #1b3a5c; 
}

/* Category badge */
.cbf-post-cat {
    color: #1b3a5c;
    background: rgba(27,58,92,0.08);
}

/* Tag links */
.cbf-row-tag-link {
    color: #c8973a;
}

/* Locked badge */
.cbf-inline-btn--locked {
    cursor: default;
    pointer-events: none;
    background: #fff;
    border-color: #c8973a;
    color: #ffffff;
}

/* Chevron */
.cbf-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s, color 0.15s;
    color: inherit;
}

.cbf-inline-dropdown.open .cbf-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.cbf-inline-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 210px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    z-index: 9999;
    overflow: hidden;
    animation: cbf-panel-in 0.13s ease;
}

@keyframes cbf-panel-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cbf-inline-dropdown.open .cbf-inline-panel { display: block; }

.cbf-inline-option {
    padding: 11px 16px;
    font-size: var(--cbf-fs);
    font-family: var(--cbf-font);
    color: #374151;
    cursor: pointer;
    transition: background 0.1s;
}

.cbf-inline-option:hover { background: #f3f4f6; }

.cbf-inline-option.active {
    background: #fff8ee;
    color: var(--cbf-accent);
    font-weight: 600;
}

/* Dates panel */
.cbf-inline-panel--dates {
    min-width: 250px;
    padding: 18px;
}

.cbf-dates-row { margin-bottom: 14px; }

.cbf-dates-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--cbf-font);
    color: #6b7280;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.cbf-dates-input {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 0;
    font-size: var(--cbf-fs);
    font-family: var(--cbf-font);
    color: #111827;
    outline: none;
}

.cbf-dates-input:focus { border-color: var(--cbf-accent); }

.cbf-dates-apply {
    width: 100%;
    height: 40px;
    background: var(--cbf-blue);
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: var(--cbf-fs);
    font-weight: 600;
    font-family: var(--cbf-font);
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.15s;
    letter-spacing: 0.02em;
}

.cbf-dates-apply:hover { opacity: 0.85; }

/* Filter submit button */
.cbf-inline-filter-btn {
    height: 50px;
    padding: 0 28px;
    margin: 0;
    background: var(--cbf-accent);
    color: #ffffff;
    border: 2px solid var(--cbf-accent);
    border-radius: 0;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--cbf-font);
    letter-spacing: 0.02em;
    text-transform: capitalize;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.cbf-inline-filter-btn:hover { opacity: 0.85; }

/* Clear button */
.cbf-inline-clear {
    height: 34px;
    padding: 0 16px;
    margin: 0;
    background: transparent;
    border: 1px solid rgba(31,31,31,0.3);
    border-radius: 0;
    color: #1f1f1f;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--cbf-font);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    margin-left: auto;
}

.cbf-inline-clear:hover {
    background: rgba(31,31,31,0.08);
}


/* ============================================================
   PANEL STYLE (vertical card)
   ============================================================ */
.cbf-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 28px 24px;
    margin-bottom: 40px;
    max-width: 900px;
}

.cbf-field-group { margin-bottom: 24px; }

.cbf-label {
    display: block;
    font-size: var(--cbf-fs);
    font-weight: 600;
    font-family: var(--cbf-font);
    color: #111827;
    margin-bottom: 8px;
}

.cbf-sublabel {
    display: block;
    font-size: var(--cbf-fs);
    font-weight: 500;
    font-family: var(--cbf-font);
    color: #374151;
    margin-bottom: 6px;
    margin-top: 12px;
}

.cbf-sublabel:first-of-type { margin-top: 0; }

.cbf-select-wrap { position: relative; }

.cbf-select {
    width: 100%;
    height: 46px;
    padding: 0 36px 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 0;
    background: #ffffff;
    font-size: var(--cbf-fs);
    font-family: var(--cbf-font);
    color: #374151;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.cbf-select:focus { border-color: var(--cbf-accent); }

.cbf-select-wrap::after {
    content: '';
    pointer-events: none;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #6b7280;
}

.cbf-date-input {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 0;
    background: #ffffff;
    font-size: var(--cbf-fs);
    font-family: var(--cbf-font);
    color: #111827;
    outline: none;
    transition: border-color 0.15s;
}

.cbf-date-input:focus { border-color: var(--cbf-accent); }

.cbf-search-wrap { position: relative; }

.cbf-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #9ca3af;
    pointer-events: none;
}

.cbf-search-input {
    width: 100%;
    height: 46px;
    padding: 0 12px 0 38px;
    border: 1px solid #d1d5db;
    border-radius: 0;
    background: #ffffff;
    font-size: var(--cbf-fs);
    font-family: var(--cbf-font);
    color: #111827;
    outline: none;
    transition: border-color 0.15s;
}

.cbf-search-input:focus { border-color: var(--cbf-accent); }

.cbf-button-row { display: flex; gap: 16px; margin-top: 28px; }

.cbf-btn {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 0;
    font-size: var(--cbf-fs);
    font-weight: 600;
    font-family: var(--cbf-font);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
}

.cbf-btn-reset {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.cbf-btn-reset:hover { background: #f3f4f6; }

.cbf-btn-filter { background: var(--cbf-accent); color: #ffffff; }
.cbf-btn-filter:hover { opacity: 0.85; }


/* ============================================================
   POSTS GRID
   ============================================================ */
.cbf-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

.cbf-post-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.cbf-post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }

.cbf-post-thumb { display: block; overflow: hidden; aspect-ratio: 16/9; }
.cbf-post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.cbf-post-card:hover .cbf-post-thumb img { transform: scale(1.04); }

.cbf-post-body { padding: 20px; }
.cbf-post-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }

.cbf-post-cat {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--cbf-font);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cbf-accent);
    background: #fff8ee;
    padding: 2px 8px;
    border-radius: 0;
}

.cbf-post-date { font-size: 12px; font-family: var(--cbf-font); color: #9ca3af; }

.cbf-post-title {
    font-size: var(--cbf-fs);
    font-weight: 600;
    font-family: var(--cbf-font);
    line-height: 1.4;
    margin: 0 0 10px;
}

.cbf-post-title a { color: #111827; text-decoration: none; transition: color 0.15s; }
.cbf-post-title a:hover { color: var(--cbf-accent); }

.cbf-post-excerpt { font-size: 14px; font-family: var(--cbf-font); color: #6b7280; line-height: 1.6; margin: 0 0 16px; }

.cbf-post-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid #f3f4f6; }

.cbf-post-author { font-size: 12px; font-family: var(--cbf-font); color: #9ca3af; }

.cbf-read-more { font-size: 13px; font-weight: 600; font-family: var(--cbf-font); color: var(--cbf-accent); text-decoration: none; transition: opacity 0.15s; }
.cbf-read-more:hover { opacity: 0.75; }

.cbf-no-posts { text-align: center; padding: 60px 20px; background: #f9fafb; border: 1px dashed #d1d5db; border-radius: 0; }
.cbf-no-posts p { font-size: var(--cbf-fs); font-family: var(--cbf-font); color: #6b7280; margin: 0; }

/* Pagination */
.cbf-pagination { display: flex; justify-content: center; gap: 6px; padding: 24px 0 10px; }

.cbf-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 0;
    font-size: 14px;
    font-family: var(--cbf-font);
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.cbf-page-btn:hover { border-color: var(--cbf-accent); color: var(--cbf-accent); background: #fff8ee; }
.cbf-page-btn.cbf-page-active { background: var(--cbf-accent); border-color: var(--cbf-accent); color: #fff; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media ( max-width: 768px ) {
    .cbf-form { padding: 20px 14px; }
    .cbf-button-row { flex-direction: column; }
    .cbf-posts-grid { grid-template-columns: 1fr; }

    .cbf-inline-wrapper { padding: 0; }
    .cbf-inline-form { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; }
    .cbf-inline-label { padding: 0 16px; }
    .cbf-inline-btn { width: 100%; justify-content: space-between; }
    .cbf-inline-panel { left: 0; right: 0; width: 100%; }
    .cbf-inline-filter-btn { width: 100%; }
    .cbf-inline-clear { margin-left: 0; width: 100%; height: 42px; }
}


/* ============================================================
   LIST LAYOUT — editorial style matching reference screenshot
   Structure per row:
     [top bar: thin line + "Category · Tag"]
     [left 38%: big title + author]  [center 20%: thumb]  [right 42%: excerpt]
   ============================================================ */

.cbf-posts-list {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

/* Each article row */
.cbf-post-row {
    padding: 28px 0 36px;
    border-bottom: 1px solid #e0e0e0;
}

.cbf-post-row:first-child {
    border-top: none;
    padding-top: 0;
}

/* ── Top bar: separator line + meta labels ── */
.cbf-row-topbar {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 0;
}

.cbf-row-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--cbf-font);
    font-size: 12px;
    font-weight: 400;
    color: #888;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
}

/* Plain category label (no link, gray) */
.cbf-row-cat-plain {
    color: #888;
    font-weight: 400;
    font-family: var(--cbf-font);
    font-size: 12px;
    text-transform: none;
}

/* Tag link (colored accent) */
.cbf-row-tag-link {
    color: var(--cbf-accent);
    font-weight: 500;
    font-family: var(--cbf-font);
    font-size: 12px;
    text-decoration: none;
    transition: opacity 0.15s;
}

.cbf-row-tag-link:hover {
    opacity: 0.7;
}

/* Dot separator */
.cbf-row-dot {
    color: #ccc;
    font-size: 10px;
    line-height: 1;
}

/* ── Three-column body ── */
.cbf-row-body {
    display: grid;
    grid-template-columns: 38fr 20fr 42fr;
    gap: 40px;
    align-items: start;
}

/* Left: title + author */
.cbf-row-left {
  display: flex;
    flex-direction: column;
	gap: 14px;
    justify-content: space-between;
    height: 100%;
}

.cbf-row-title {
    font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 700 !important;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: #111;
    letter-spacing: -0.01em;
}

.cbf-row-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
	font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 700 !important;
}

.cbf-row-title a:hover {
    color: var(--cbf-accent);
}

.cbf-row-author {
    font-family: var(--cbf-font);
    font-size: 13px;
    color: #999;
    margin: 0;
    font-weight: 400;
	 margin-top: auto;
}

/* Center: thumbnail */
.cbf-row-center {
    display: flex;
    align-items: flex-start;
}

.cbf-row-thumb {
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #f3f4f6;
}

.cbf-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cbf-row-thumb:hover img {
    transform: scale(1.03);
}

/* Right: excerpt */
.cbf-row-right {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.cbf-row-excerpt-text {
    font-family: var(--cbf-font);
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    margin: 0;
    font-weight: 400;
}

/* Remove all hover effects from grid cards */
.cbf-post-card {
    transition: none;
}
.cbf-post-card:hover {
    box-shadow: none;
    transform: none;
}

/* ── Responsive ── */
@media ( max-width: 960px ) {
    .cbf-row-body {
        grid-template-columns: 1fr 160px;
        grid-template-rows: auto auto;
        gap: 24px;
    }
    .cbf-row-right {
        grid-column: 1 / -1;
        padding-top: 0;
    }
    .cbf-row-center {
        align-items: flex-start;
    }
    .cbf-row-thumb {
        aspect-ratio: 3 / 4;
    }
}

@media ( max-width: 600px ) {
    .cbf-row-body {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .cbf-row-thumb {
        aspect-ratio: 16 / 9;
    }
    .cbf-row-title {
        font-size: 18px;
    }
}

/* Locked tag badge — shown when default_tag is set via shortcode */
.cbf-inline-btn--locked {
    cursor: default;
    pointer-events: none;
    opacity: 1;
    border-style: solid;
    border-color: var(--cbf-accent);
    color: var(--cbf-accent);
}


.cbf-row-title a {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
}

.cbf-read-more-btn {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1b3a5c;
  border: 1px solid #1b3a5c;
  padding: 6px 14px;
  border-radius: 4px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.cbf-read-more-btn:hover {
  background: #1b3a5c;
  color: #fff !important;
  text-decoration: none !important;
}



