/* ═══════════════════════════════════════════════════════════════
   RifGlow Blog Pro — v2.2.0
   Editorial typography — Playfair Display + Source Serif 4
   ═══════════════════════════════════════════════════════════════ */

/* Reset theme interference */
.rfbp-wrap,
.rfbp-wrap * {
    box-sizing: border-box;
}
.rfbp-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.rfbp-hero {
    text-align: center;
    padding: 56px 20px 36px;
    border-bottom: 3px double #1a1a1a;
    margin-bottom: 36px;
}
.rfbp-hero-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 3.2rem;
    font-weight: 900;
    color: #1a1a1a;
    margin: 0 0 14px;
    letter-spacing: -0.015em;
    line-height: 1.15;
}
.rfbp-hero-sub {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    color: #555;
    margin: 0;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* ── Search ─────────────────────────────────────────────────────── */
.rfbp-search {
    margin: 0 auto 28px;
    max-width: 640px;
}
.rfbp-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #d0d0d0;
    border-radius: 4px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.rfbp-search-box:focus-within {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.08);
}
.rfbp-search-icon {
    width: 18px;
    height: 18px;
    color: #999;
    flex-shrink: 0;
}
.rfbp-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px;
    font-size: 1rem;
    background: transparent;
    color: #1a1a1a;
    font-family: 'Source Serif 4', Georgia, serif;
}
.rfbp-search-input::placeholder {
    color: #999;
    font-style: italic;
}
.rfbp-search-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Inter', -apple-system, sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.rfbp-search-btn:hover {
    background: #333;
}

/* ── Category Filters ───────────────────────────────────────────── */
.rfbp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0 auto 36px;
    max-width: 800px;
}
.rfbp-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 3px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: #555;
    background: #f5f5f0;
    border: 1px solid #e0e0d8;
    transition: all 0.2s;
    cursor: pointer;
}
.rfbp-cat-btn:hover {
    background: #eaeae2;
    color: #1a1a1a;
    text-decoration: none;
}
.rfbp-cat-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}
.rfbp-cat-btn.active .rfbp-cat-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.rfbp-cat-count {
    font-size: 0.7rem;
    background: #e0e0d8;
    color: #777;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 600;
}

/* ── Results info ───────────────────────────────────────────────── */
.rfbp-results-info {
    text-align: center;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 28px;
}
.rfbp-clear-filters {
    color: #1a1a1a;
    text-decoration: underline;
    margin-left: 12px;
    font-weight: 500;
}
.rfbp-clear-filters:hover {
    color: #555;
}

/* ── Post Grid ──────────────────────────────────────────────────── */
.rfbp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* ── Card ───────────────────────────────────────────────────────── */
.rfbp-card {
    background: #fff;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid #e8e8e0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.rfbp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Card image */
.rfbp-card-img-link {
    text-decoration: none;
    display: block;
}
.rfbp-card-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f0;
    position: relative;
}
.rfbp-card-img img,
.rfbp-card-img .rfbp-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.rfbp-card:hover .rfbp-card-img img,
.rfbp-card:hover .rfbp-card-img .rfbp-thumb {
    transform: scale(1.04);
}
.rfbp-card-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}
.rfbp-placeholder-icon {
    width: 48px;
    height: 48px;
    color: #ccc;
}

/* Card body */
.rfbp-card-body {
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Category label */
.rfbp-card-cat {
    display: inline-block;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #b91c1c;
    background: transparent;
    padding: 0;
    text-decoration: none;
    margin-bottom: 10px;
    align-self: flex-start;
    transition: color 0.2s;
}
.rfbp-card-cat:hover {
    color: #7f1d1d;
    text-decoration: none;
}

/* Title */
.rfbp-card-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
    color: #1a1a1a;
}
.rfbp-card-title a {
    color: inherit;
    text-decoration: none;
}
.rfbp-card-title a:hover {
    color: #333;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Excerpt */
.rfbp-card-excerpt {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.7;
    margin: 0 0 18px;
    flex: 1;
}

/* Meta */
.rfbp-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    color: #999;
    padding-top: 14px;
    border-top: 1px solid #eee;
    letter-spacing: 0.02em;
}
.rfbp-card-date {
    font-weight: 500;
}
.rfbp-card-read {
    font-weight: 500;
}

/* ── Pagination ─────────────────────────────────────────────────── */
.rfbp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 48px;
    flex-wrap: wrap;
}
.rfbp-page-item a,
.rfbp-page-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 3px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.rfbp-page-item a {
    color: #555;
    background: #f5f5f0;
    border: 1px solid #e0e0d8;
}
.rfbp-page-item a:hover {
    background: #eaeae2;
    color: #1a1a1a;
}
.rfbp-page-item .current {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #1a1a1a;
}
.rfbp-page-item .dots {
    color: #999;
    background: transparent;
    border: none;
}

/* ── Empty state ────────────────────────────────────────────────── */
.rfbp-empty {
    text-align: center;
    padding: 64px 20px;
    color: #777;
}
.rfbp-empty-icon {
    width: 64px;
    height: 64px;
    color: #ccc;
    margin-bottom: 20px;
}
.rfbp-empty h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    color: #1a1a1a;
    margin: 0 0 8px;
}
.rfbp-empty p {
    font-family: 'Source Serif 4', Georgia, serif;
    margin: 0 0 24px;
}
.rfbp-empty .rfbp-search-btn {
    display: inline-block;
    text-decoration: none;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .rfbp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}
@media (max-width: 640px) {
    .rfbp-hero-title {
        font-size: 2.2rem;
    }
    .rfbp-hero-sub {
        font-size: 1rem;
    }
    .rfbp-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .rfbp-card-img {
        height: 200px;
    }
    .rfbp-cats {
        gap: 6px;
    }
    .rfbp-cat-btn {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    .rfbp-search-box {
        flex-wrap: wrap;
    }
    .rfbp-search-input {
        min-width: 0;
    }
}

/* ── Override theme styles ──────────────────────────────────────── */
.rfbp-wrap h1,
.rfbp-wrap h2,
.rfbp-wrap h3 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}
.rfbp-wrap a {
    text-decoration: none;
}
.rfbp-wrap img {
    max-width: 100%;
    height: auto;
}

/* Hide original page title if theme shows it */
.page-id-10 .page-header,
.page-id-10 .entry-title:not(.rfbp-card-title):not(.rfbp-hero-title) {
    display: none;
}

/* Remove default entry padding from theme */
.page-id-10 .entry-content {
    padding: 0;
}
.page-id-10 .content-area {
    max-width: 100%;
}
