:root {
  --rb-navy:    #042b56;
  --rb-accent:  #4aa8ff;
  --rb-white:   #ffffff;
  --rb-muted:   #5a7a9a;
  --rb-border:  #e5e9f0;
  --rb-card-bg: #ffffff;
  --rb-page-bg: #f5f7fa;
}

*, *::before, *::after { box-sizing: border-box; }

img { max-width: 100%; display: block; }

.rb-page {
  background: var(--rb-page-bg);
  color: var(--rb-navy);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── BANNER ──────────────────────────────────────────── */
.rb-banner {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 80px) clamp(44px, 6vw, 80px);
  background: linear-gradient(135deg, #010d1f 0%, #021830 40%, #042d5a 75%, #063a72 100%);
}
.rb-banner::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 60px 60px;
}
.rb-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100,180,255,0.5), transparent);
}
.rb-banner-particles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.rb-banner-particles span {
  position: absolute; border-radius: 50%;
  background: rgba(100,180,255,0.4);
  animation: rbFloatDot linear infinite;
}
@keyframes rbFloatDot {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-120px) translateX(40px); opacity: 0; }
}
.rb-banner-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  animation: rbFadeUp 0.65s ease 0.05s both;
}
@keyframes rbFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rb-banner-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  color: #c8d8eb;
  font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 24px;
}
.rb-banner-tag::before {
  content: ''; width: 6px; height: 6px;
  background: #4caf82; border-radius: 50%; box-shadow: 0 0 8px #4caf82;
  flex-shrink: 0;
}
.rb-banner h1 {
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 400; color: var(--rb-white);
  line-height: 1.15; margin: 0; letter-spacing: -0.5px;
}
.rb-banner-intro {
  margin-top: 24px;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.85;
  color: rgba(200,216,235,0.85); max-width: 760px;
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px;
}

/* ── LAYOUT WRAPPER ──────────────────────────────────── */
.rb-wrap {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 64px);
}

/* ── SECTION LABELS & HEADINGS ───────────────────────── */
.rb-section-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: #118af2; margin-bottom: 12px;
}
.rb-section-label i { color: #118af2; }
.rb-section-heading {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700; color: var(--rb-navy);
  margin: 0 0 24px; letter-spacing: -0.3px;
}
.rb-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--rb-muted); margin-bottom: 10px;
}
.rb-meta span { display: inline-flex; align-items: center; gap: 5px; }
.rb-read-more {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: auto; padding-top: 16px;
  font-size: 14px; font-weight: 600; color: #1f5e9d;
  transition: gap .2s;
}
a:hover .rb-read-more { gap: 12px; }

/* ── TOP SECTION ─────────────────────────────────────── */
.rb-top-section { padding: clamp(32px, 4vw, 56px) 0 clamp(32px, 4vw, 56px); }
.rb-top-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
.rb-main-col { min-width: 0; }

/* ── FEATURED CARD ───────────────────────────────────── */
.rb-featured-link { display: block; text-decoration: none; color: inherit; }
.rb-featured-card {
  background: var(--rb-card-bg);
  border: 1px solid var(--rb-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(4,43,86,0.06);
  transition: box-shadow .22s, transform .22s;
}
.rb-featured-card:hover {
  box-shadow: 0 8px 32px rgba(4,43,86,0.12);
  transform: translateY(-3px);
}
.rb-featured-img {
  width: 100%;
  overflow: hidden;
  background: #f1f5f9;
}
.rb-featured-img img {
  width: 100%; height: 340px;
  object-fit: cover; display: block;
}
.rb-img-ph {
  width: 100%; min-height: 200px;
  background: linear-gradient(145deg, #edf2f8, #e2eaf5);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; color: #94a3b8;
}
.rb-featured-body {
  padding: clamp(16px, 2.5vw, 28px);
  display: flex; flex-direction: column;
}
.rb-featured-title {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700; color: var(--rb-navy);
  line-height: 1.3; margin: 0 0 10px; letter-spacing: -0.2px;
}
.rb-featured-excerpt {
  font-size: 14px; line-height: 1.75; color: #4a6580; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── MOST POPULAR SIDEBAR ────────────────────────────── */
.rb-sidebar-col {
  position: sticky;
  top: 88px;
  align-self: start;
  min-width: 0;
}
.rb-sidebar-card { background: transparent; border: none; box-shadow: none; overflow: hidden; }
.rb-popular-list { display: flex; flex-direction: column; gap: 10px; }
.rb-popular-item {
  display: flex; flex-direction: column;
  border: 1px solid var(--rb-border);
  border-radius: 10px; overflow: hidden;
  text-decoration: none; color: inherit;
}
.rb-pop-thumb {
  width: 100%; height: 130px;
  overflow: hidden; background: #edf2f8;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rb-pop-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.rb-pop-thumb-ph { font-size: 26px; color: #94a3b8; }
.rb-pop-rank {
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, #042b56, #1f5e9d);
  color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.rb-popular-item-body { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 5px; }
.rb-popular-item-title {
  font-size: 12px; font-weight: 600; color: var(--rb-navy);
  line-height: 1.45; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rb-popular-item-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 11px; color: var(--rb-muted);
}
.rb-popular-item-meta span { display: inline-flex; align-items: center; gap: 3px; }

/* ── NEW BLOG TRENDS ─────────────────────────────────── */
.rb-latest-inline { margin-top: 40px; }

/* ── BLOG CARD GRID ──────────────────────────────────── */
.rb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.rb-card {
  display: flex; flex-direction: column;
  background: var(--rb-card-bg);
  border: 1px solid var(--rb-border);
  border-radius: 14px; overflow: hidden;
  text-decoration: none; color: inherit;
  box-shadow: 0 1px 6px rgba(4,43,86,0.04);
  transition: box-shadow .22s, transform .22s;
  min-width: 0;
}
.rb-card:hover {
  box-shadow: 0 8px 24px rgba(4,43,86,0.10);
  transform: translateY(-4px);
}
.rb-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.rb-card-img-ph {
  width: 100%; height: 200px;
  background: linear-gradient(145deg, #edf2f8, #e2eaf5);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: #94a3b8; flex-shrink: 0;
}
.rb-card-body {
  padding: 14px 16px 18px;
  display: flex; flex-direction: column; flex: 1;
}
.rb-card-title {
  font-size: 15px; font-weight: 600; color: var(--rb-navy);
  line-height: 1.4; margin: 0 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── WEEKLY PICKS ────────────────────────────────────── */
.rb-weekly { padding: 40px 0 clamp(40px, 5vw, 72px); }

/* ── SHARED PAGINATION ───────────────────────────────── */
#rbSharedPagination {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--rb-border);
}

/* ── EMPTY STATE ─────────────────────────────────────── */
.rb-empty {
  text-align: center; padding: 60px 20px; color: #94a3b8;
  grid-column: 1 / -1;
}
.rb-empty i { font-size: 38px; margin-bottom: 14px; display: block; }
.rb-empty p { font-size: 15px; margin: 0; }

/* ── PAGINATION ──────────────────────────────────────── */
.rb-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 32px; flex-wrap: wrap;
}
.rb-pg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border-radius: 9px; border: 1.5px solid var(--rb-border);
  background: #fff; color: var(--rb-navy);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .18s;
}
.rb-pg-btn:hover,
.rb-pg-btn.active { background: var(--rb-navy); color: #fff; border-color: var(--rb-navy); }
.rb-pg-ellipsis {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; font-size: 14px; color: var(--rb-muted);
}

/* ── RESPONSIVE ──────────────────────────────────────── */

/* Large desktop (1280–1500px) */
@media (max-width: 1500px) {
  .rb-top-grid { grid-template-columns: 1fr 280px; gap: 28px; }
}

/* Laptop (1024–1280px) — sidebar narrower, cards 2-col */
@media (max-width: 1280px) {
  .rb-top-grid { grid-template-columns: 1fr 260px; gap: 24px; }
  .rb-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

/* Tablet landscape (860–1024px) */
@media (max-width: 1024px) {
  .rb-top-grid { grid-template-columns: 1fr 240px; gap: 20px; }
  .rb-pop-thumb { height: 110px; }
}

/* Tablet portrait (768–860px) — sidebar drops below */
@media (max-width: 860px) {
  .rb-top-grid { grid-template-columns: 1fr; gap: 24px; }
  .rb-sidebar-col { position: static; }
  .rb-popular-list { flex-direction: row; flex-wrap: wrap; }
  .rb-popular-item { width: calc(50% - 5px); }
  .rb-pop-thumb { height: 120px; }
}

/* Tablet (640–768px) */
@media (max-width: 768px) {
  .rb-top-section { padding: 32px 0; }
  .rb-weekly { padding: 32px 0 40px; }
  .rb-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .rb-featured-body { padding: 18px 20px 22px; }
  .rb-featured-title { font-size: 18px; }
  .rb-section-heading { margin-bottom: 18px; }
  #rbSharedPagination { margin-top: 32px; padding-top: 24px; }
}

/* Large phone (480–640px) */
@media (max-width: 640px) {
  .rb-grid { grid-template-columns: 1fr; gap: 14px; }
  .rb-popular-item { width: 100%; }
  .rb-pop-thumb { height: 160px; }

  .rb-banner-intro { margin-top: 16px; padding-top: 16px; }
}

/* Phone (380–480px) */
@media (max-width: 480px) {
  .rb-featured-body { padding: 14px 16px 18px; }
  .rb-featured-title { font-size: 17px; }
  .rb-featured-excerpt { font-size: 13px; }
  .rb-card-body { padding: 12px 14px 16px; }
  .rb-card-title { font-size: 14px; }
  .rb-pg-btn { min-width: 34px; height: 34px; font-size: 13px; }
  .rb-banner-tag { font-size: 10px; letter-spacing: 1.5px; }
  .rb-img-ph { min-height: 160px; font-size: 32px; }
}

/* Small phone (<380px) */
@media (max-width: 380px) {
  .rb-top-grid { gap: 16px; }
  .rb-featured-body { padding: 12px 14px 16px; }
  .rb-featured-title { font-size: 16px; }
  .rb-card-body { padding: 10px 12px 14px; }
  .rb-read-more { font-size: 13px; }
  .rb-meta { gap: 6px; font-size: 11px; }
  .rb-pagination { gap: 4px; }
  .rb-pg-btn { min-width: 30px; height: 30px; padding: 0 8px; font-size: 12px; }
}
