/* ==========================================================================
   Blog Listing Template CSS
   Namespaced under .rb-blog to avoid clashing with existing theme styles
   ========================================================================== */

.rb-blog {
    --rb-navy: #06061a;
    --rb-navy-2: #0a0a2e;
    --rb-cobalt: #1414c8;
    --rb-lime: #3dffb0;
    --rb-lime-dim: #2bcf8e;
    --rb-cream: #f5f4f0;
    --rb-ink: #0d1030;
    --rb-ink-2: #111827;
    --rb-muted: #6b7280;
    --rb-line-lt: #e8e6e0;
    --rb-line-dk: rgba(255, 255, 255, 0.09);
    color: var(--rb-ink-2);
    background: #fff;
}

.rb-blog *,
.rb-blog *::before,
.rb-blog *::after {
    box-sizing: border-box;
}
.rb-blog {
    background: var(--rb-cream);
}
.rb-blog-wrap {
    max-width: 600px;
}
.rb-accent { color: var(--rb-lime); }

/* ---- Hero ---- */
/* .rb-blog-head {
    color: #fff;
} */

/* ---- Tags / pills ---- */
.rb-tag {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 50px;
}
.rb-tag-opinion { background: var(--rb-lime); color: var(--rb-navy); }
.rb-tag-case { background: var(--rb-cobalt); color: #fff; }
.rb-tag-guide { background: #eef0f4; color: var(--rb-cobalt); border: 1px solid #dfe3ea; }
.rb-tag-platform { background: rgba(20, 20, 200, .1); color: var(--rb-cobalt); }

/* ---- Featured post ---- */
.rb-featured-section { background: var(--rb-cream); }

.rb-featured-link { text-decoration: none; display: block; }
.rb-featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 40px;
    align-items: center;
    background: #fff;
    border: 1px solid var(--rb-line-lt);
    border-radius: 20px;
    overflow: hidden;
}
.rb-featured .rb-img {
    background: linear-gradient(140deg, var(--rb-cobalt), var(--rb-navy));
    background-size: cover;
    background-position: center;
    min-height: 340px;
    height: 100%;
}
.rb-featured .rb-body { padding: 40px 44px 40px 8px; }
.rb-featured h2 { margin: 14px 0 12px; font-size: clamp(24px, 2.6vw, 32px); }
.rb-featured p {
    color: var(--rb-muted);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}
@media (max-width: 820px) {
    .rb-featured { grid-template-columns: 1fr; }
    .rb-featured .rb-img { min-height: 200px; }
    .rb-featured .rb-body { padding: 28px 28px 32px; }
}

.rb-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--rb-muted);
    flex-wrap: wrap;
}
.rb-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #c9ccd6;
}

/* ---- Category filter ---- */
.rb-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 36px;
}
.rb-fbtn {
    font-size: 14px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 50px;
    border: 1.5px solid var(--rb-line-lt);
    background: #fff;
    color: var(--rb-muted);
    cursor: pointer;
    transition: .15s;
}
.rb-fbtn.active,
.rb-fbtn:hover {
    background: var(--rb-navy);
    color: var(--rb-lime);
    border-color: var(--rb-navy);
}
.rb-fbtn:disabled { opacity: .6; cursor: wait; }

/* ---- Post grid ---- */
.rb-posts-section { background: var(--rb-cream); }
.rb-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    min-height: 200px;
    position: relative;
}
@media (max-width: 900px) { .rb-posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .rb-posts { grid-template-columns: 1fr; } }

.rb-post {
    background: #fff;
    border: 1px solid var(--rb-line-lt);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}
.rb-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(13, 16, 48, .1);
}
.rb-post .rb-img {
    height: 170px;
    background: linear-gradient(140deg, #12123a, #0a0a2e);
    background-size: cover;
    background-position: center;
}
.rb-post .rb-body {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
}
.rb-post h3 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--rb-ink);
    margin: 14px 0 8px;
}
.rb-post p {
    line-height: 1.6;
    color: #6b7280;
}
.rb-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 0;
    color: var(--rb-muted);
}

/* ---- Pagination ---- */
.rb-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.rb-pagination a,
.rb-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 50px;
    border: 1.5px solid var(--rb-line-lt);
    color: var(--rb-ink-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.rb-pagination a:hover { border-color: var(--rb-navy); color: var(--rb-navy); }
.rb-pagination .current {
    background: var(--rb-navy);
    color: var(--rb-lime);
    border-color: var(--rb-navy);
}

/* ---- Newsletter ---- */
.rb-news-section { background: var(--rb-cream); }
.rb-news {
    background: var(--rb-navy);
    border-radius: 20px;
    padding: 44px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.rb-news h2 { color: #fff; font-size: 26px; }
.rb-news p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    margin-top: 8px;
    max-width: 420px;
}
.rb-news form { display: flex; gap: 10px; flex-wrap: wrap; }
.rb-news input {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50px;
    padding: 14px 20px;
    color: #fff;
    font-size: 14px;
    min-width: 240px;
}
.rb-news input::placeholder { color: rgba(255, 255, 255, 0.8); }
@media (max-width: 767px) {
    .rb-filter {
        gap: 5px;
        margin: 0 0 30px;
    }
    .rb-fbtn {
        font-size: 12px;
        padding: 6px 15px;
    }
}