/* ─────────────────────────────────────────────────────────────────────────────
   Riback Articles — Stylesheet
   Brand: Montserrat (headings) / Open Sans (body)
   Colors: #CD0000 (accent), #000000 (primary), #4B4B4B (body text)
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Reset & Base ────────────────────────────────────────────────────────── */

.riback-articles-body *,
.riback-article-body * {
    box-sizing: border-box;
}

/* ── Articles Index ──────────────────────────────────────────────────────── */

.rb-articles-main {
    background: #ffffff;
    min-height: 60vh;
    padding: 48px 0 80px;
}

/* Prevent theme header from overlapping heading on mobile */
@media (max-width: 768px) {
    .rb-articles-main {
        padding-top: 80px;
    }
}

@media (max-width: 480px) {
    .rb-articles-main {
        padding-top: 100px;
    }
}

.rb-articles-container {
    width: 100%;
    padding: 0 5%;
}

.rb-articles-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #000000;
    margin: 0 0 40px 0;
    letter-spacing: -0.01em;
}

/* ── Article Grid ────────────────────────────────────────────────────────── */

.rb-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 900px) {
    .rb-articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    .rb-articles-grid { grid-template-columns: 1fr; }
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.rb-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s ease;
}

.rb-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.10);
}

.rb-card-image-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #f0f0f0;
}

.rb-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.rb-card:hover .rb-card-img {
    transform: scale(1.03);
}

.rb-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.rb-card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rb-card-source {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #9a9a9a;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.rb-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.35;
    margin: 0 0 12px;
}

.rb-card-title a {
    color: inherit;
    text-decoration: none;
}

.rb-card-title a:hover {
    color: #CD0000;
}

.rb-card-excerpt {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.875rem;
    color: #4B4B4B;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 48px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.875rem;
    color: #4B4B4B;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.page-numbers.current {
    background: #CD0000;
    color: #ffffff;
    border-color: #CD0000;
}

.page-numbers:hover:not(.current) {
    border-color: #CD0000;
    color: #CD0000;
}

.rb-page-num { font-weight: 600; }

.rb-no-articles {
    font-family: 'Open Sans', sans-serif;
    color: #4B4B4B;
    font-size: 1rem;
}

/* ── Single Article ──────────────────────────────────────────────────────── */

.rb-single-main {
    background: #ffffff;
    min-height: 60vh;
    padding: 40px 0 80px;
}

.rb-single-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
    align-items: start;
}

@media (max-width: 860px) {
    .rb-single-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ── Back Link ───────────────────────────────────────────────────────────── */

.rb-back-link {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.875rem;
    color: #4B4B4B;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 6px;
}

.rb-back-link:hover { color: #CD0000; }

.rb-back-accent {
    width: 36px;
    height: 3px;
    background: #CD0000;
    margin-bottom: 28px;
}

/* ── Article Header ──────────────────────────────────────────────────────── */

.rb-single-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.25;
    margin: 0 0 18px;
}

.rb-single-subheadline {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.05rem;
    color: #4B4B4B;
    line-height: 1.6;
    margin: 0 0 20px;
}

.rb-single-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.rb-single-author,
.rb-single-date {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    color: #4B4B4B;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rb-single-author svg,
.rb-single-date svg {
    stroke: #CD0000;
    flex-shrink: 0;
}

.rb-single-source-badge {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff;
    background: #CD0000;
    padding: 3px 8px;
    border-radius: 2px;
}

.rb-single-divider {
    height: 1px;
    background: #e5e5e5;
    margin-bottom: 28px;
}

/* ── Featured Image ──────────────────────────────────────────────────────── */

.rb-single-featured-image {
    margin-bottom: 28px;
    border-radius: 4px;
    overflow: hidden;
}

.rb-single-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Body Content ────────────────────────────────────────────────────────── */

.rb-single-body {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: #1A1A1A;
    line-height: 1.75;
}

.rb-single-body p {
    margin: 0 0 1.25em;
}

.rb-single-body h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #000000;
    margin: 2em 0 0.6em;
}

.rb-single-body h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #000000;
    margin: 1.75em 0 0.5em;
}

.rb-single-body blockquote {
    border-left: 3px solid #CD0000;
    padding: 4px 0 4px 20px;
    margin: 1.5em 0;
    color: #4B4B4B;
    font-style: italic;
}

.rb-single-body a {
    color: #CD0000;
    text-decoration: underline;
}

.rb-single-body ul,
.rb-single-body ol {
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}

.rb-single-body li {
    margin-bottom: 0.4em;
}

/* ── CMSWire CTA ─────────────────────────────────────────────────────────── */

.rb-read-full-btn {
    display: inline-block;
    margin-top: 28px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    background: #CD0000;
    padding: 12px 24px;
    border-radius: 3px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.15s ease;
}

.rb-read-full-btn:hover {
    background: #a50000;
    color: #ffffff;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.rb-single-sidebar {
    position: sticky;
    top: 100px;
}

.rb-sidebar-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #000000;
    margin: 0 0 18px;
    border-bottom: 2px solid #CD0000;
    padding-bottom: 10px;
}

.rb-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rb-sidebar-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
}

.rb-sidebar-item:hover .rb-sidebar-item-title {
    color: #CD0000;
}

.rb-sidebar-thumb {
    width: 72px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    background: #f0f0f0;
}

.rb-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rb-sidebar-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.rb-sidebar-item-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1A1A1A;
    line-height: 1.4;
    margin: 0;
    transition: color 0.15s;
}

.rb-sidebar-view-more {
    display: inline-block;
    margin-top: 20px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #CD0000;
    text-decoration: none;
    border: 1px solid #CD0000;
    padding: 6px 14px;
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
}

.rb-sidebar-view-more:hover {
    background: #CD0000;
    color: #ffffff;
}
