/**
 * home.css — RefreshBalance Premium Homepage
 * Fine-tuned design: hero, stats, articles, feature cards, CTA band.
 */

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
    --rb-hue: 0deg;
    --rb-bg: #f8f9fc;
    --rb-white: #ffffff;
    --rb-dark: #0d0f1a;
    --rb-mid: #4a5168;
    --rb-violet: #7c3aed;
    --rb-teal: #0d9488;
    --rb-rose: #e11d48;
    --rb-amber: #d97706;
    --rb-indigo: #4f46e5;
    --rb-shadow-card: 0 4px 24px -6px rgba(13, 15, 26, 0.08);
    --rb-shadow-lift: 0 16px 48px -12px rgba(124, 58, 237, 0.18);
    --rb-radius-card: 22px;
    --rb-transition: 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Global wrapper ─────────────────────────────────────────── */
.rb-home-wrap {
    background: var(--rb-bg);
    overflow-x: hidden;
}

/* ─── Container ─────────────────────────────────────────────── */
.rb-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Gradient text ─────────────────────────────────────────── */
.rb-grad {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #0d9488 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* No hue-rotate: keeps the violet→teal brand colours fixed */
}

/* ─── Scroll Reveals ─────────────────────────────────────────── */
.rb-anim {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--rb-transition), transform 0.7s var(--rb-transition);
}

.rb-anim.rb-visible {
    opacity: 1;
    transform: none;
}

.rb-anim-d1 {
    transition-delay: 0.08s;
}

.rb-anim-d2 {
    transition-delay: 0.16s;
}

.rb-anim-d3 {
    transition-delay: 0.24s;
}

.rb-anim-d4 {
    transition-delay: 0.32s;
}

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.rb-hero {
    position: relative;
    background:
        linear-gradient(160deg, #f5f3ff 0%, #eef2ff 30%, #e0e7ff 65%, #fef3f8 100%);
    overflow: hidden;
    padding: 1.5rem 1rem 0;
    text-align: center;
}

@media (min-width: 900px) {
    .rb-hero {
        padding: 2.5rem 2rem 0;
    }
}

/* Hero content wrapper */
.rb-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

/* Floating orbs */
.rb-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    transition: transform 0.8s ease;
}

.rb-orb-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent 65%);
    top: -15%;
    left: -8%;
    filter: blur(60px);
}

.rb-orb-2 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.12), transparent 65%);
    top: 10%;
    right: -5%;
    filter: blur(50px);
}

.rb-orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(225, 29, 72, 0.07), transparent 65%);
    bottom: 30%;
    left: 45%;
    filter: blur(40px);
}

/* Chip */
.rb-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 1.1rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rb-indigo);
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.08);
}

.rb-chip-dot {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: chip-pulse 2.2s ease-in-out infinite;
}

@keyframes chip-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(1.6);
    }
}

/* Heading */
.rb-hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--rb-dark);
    margin: 0 auto 1.4rem;
    max-width: 18ch;
}

/* Subtitle */
.rb-hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--rb-mid);
    line-height: 1.7;
    max-width: 52ch;
    margin: 0 auto 2.2rem;
}

/* CTAs */
.rb-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.rb-btn-pry {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.875rem 2.25rem;
    background: linear-gradient(135deg, var(--rb-violet), var(--rb-indigo));
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 8px 24px -4px rgba(124, 58, 237, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rb-btn-pry:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -6px rgba(124, 58, 237, 0.5);
}

.rb-btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2.25rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    color: var(--rb-dark);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1.5px solid rgba(13, 15, 26, 0.1);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.rb-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(13, 15, 26, 0.2);
}

/* Trust strip */
.rb-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.2rem;
    margin-bottom: 1rem;
}

.rb-trust-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
}

.rb-trust-logo {
    font-size: 0.8rem;
    font-weight: 800;
    color: #6b7280;
}

.rb-trust-sep {
    color: #d1d5db;
    font-size: 0.8rem;
}

/* ECG wave at hero bottom — flush with no gap */
.rb-hero-divider {
    position: relative;
    z-index: 10;
    margin-top: -28px;
    line-height: 0;
    overflow: visible;
    pointer-events: none;
}

.rb-hero-divider svg {
    display: block;
    width: 100%;
    height: 50px;
}

/* ECG Line Animation */
.rb-ecg-line {
    /* Full line is rendered solid. The gradient itself is animated via SVG animateTransform */
    filter: drop-shadow(0 0 4px rgba(124, 58, 237, 0.4));
}

/* ════════════════════════════════════════════════════════════
   STATS BAR
   ════════════════════════════════════════════════════════════ */
.rb-stats-bar {
    background: var(--rb-white);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 1.25rem 2rem;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.rb-stat {
    text-align: center;
    padding: 0 2.5rem;
}

.rb-stat-div {
    width: 1px;
    height: 32px;
    background: rgba(0, 0, 0, 0.07);
}

.rb-num {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #0d9488 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.rb-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rb-indigo);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.3rem;
}

/* ════════════════════════════════════════════════════════════
   SHARED SECTION STYLES
   ════════════════════════════════════════════════════════════ */
.rb-section {
    padding: 4.5rem 0;
}

.rb-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.rb-section-label-wrap {
    text-align: center;
    margin-bottom: 2.5rem;
}

.rb-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--rb-indigo);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.6rem;
}

.rb-section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.7rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--rb-dark);
    line-height: 1.12;
    margin: 0;
}

/* Live badge */
.rb-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--rb-rose);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.rb-live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--rb-rose);
    border-radius: 50%;
    animation: blink 1.8s infinite;
    display: none;
    /* Already inserted as "●" text */
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px rgba(225, 29, 72, 0.8);
    }

    50% {
        opacity: 0.2;
        box-shadow: none;
    }
}

/* View all link */
.rb-viewall {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--rb-indigo);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}

.rb-arrow {
    margin-left: 0.35rem;
    transition: transform 0.2s ease;
}

.rb-viewall:hover {
    color: var(--rb-dark);
}

.rb-viewall:hover .rb-arrow {
    transform: translateX(5px);
}

/* Articles section background */
.rb-section-articles {
    background: var(--rb-white);
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

/* Article grid (rendered by shortcode) */
.rb-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}

.rb-article-card {
    display: block;
    text-decoration: none;
    background: var(--rb-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px -2px rgba(13, 15, 26, 0.05);
    border: 1px solid rgba(13, 15, 26, 0.06);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.rb-article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px -8px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.2);
}

.rb-article-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}

.rb-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
    display: block;
}

.rb-article-card:hover .rb-article-image img {
    transform: scale(1.05);
}

/* Gradient placeholder for articles without images */
.rb-article-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0fdf4 50%, #fff7ed 100%);
    position: absolute;
    inset: 0;
}

.rb-placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.7;
}

.rb-placeholder-cat {
    font-size: 0.72rem;
    font-weight: 700;
    color: #7c3aed;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    padding: 0 1rem;
}

.rb-article-card .rb-article-content {
    padding: 1.25rem 1.4rem 1.5rem;
}

.rb-article-card .rb-article-content h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rb-dark);
    margin: 0 0 0.45rem;
    line-height: 1.42;
    transition: color 0.2s ease;
}

.rb-article-card:hover .rb-article-content h3 {
    color: var(--rb-violet);
}

.rb-article-card .rb-article-content p {
    font-size: 0.83rem;
    color: var(--rb-mid);
    margin: 0;
    line-height: 1.6;
}

/* ════════════════════════════════════════════════════════════
   FEATURE CARDS
   ════════════════════════════════════════════════════════════ */
.rb-section-features {
    background: var(--rb-bg);
    content-visibility: auto;
    contain-intrinsic-block-size: auto 500px;
}

.rb-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.75rem;
}

.rb-card {
    background: var(--rb-white);
    border-radius: var(--rb-radius-card);
    padding: 2.25rem 2rem 2rem;
    box-shadow: var(--rb-shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform var(--rb-transition), box-shadow var(--rb-transition), background 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Per-card coloured gradient hover backgrounds */
.rb-card:nth-child(1):hover {
    background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
    box-shadow: 0 20px 48px -12px rgba(124, 58, 237, 0.2);
    transform: translateY(-7px);
}

.rb-card:nth-child(2):hover {
    background: linear-gradient(145deg, #f0fdf9 0%, #ccfbf1 100%);
    box-shadow: 0 20px 48px -12px rgba(13, 148, 136, 0.2);
    transform: translateY(-7px);
}

.rb-card:nth-child(3):hover {
    background: linear-gradient(145deg, #fff1f2 0%, #ffe4e6 100%);
    box-shadow: 0 20px 48px -12px rgba(225, 29, 72, 0.15);
    transform: translateY(-7px);
}

.rb-card:nth-child(4):hover {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: 0 20px 48px -12px rgba(217, 119, 6, 0.18);
    transform: translateY(-7px);
}

.rb-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.ic-violet {
    background: rgba(124, 58, 237, 0.1);
}

.ic-teal {
    background: rgba(13, 148, 136, 0.1);
}

.ic-rose {
    background: rgba(225, 29, 72, 0.1);
}

.ic-amber {
    background: rgba(217, 119, 6, 0.1);
}

.rb-tag {
    display: inline-block;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.9rem;
}

.tag-violet {
    color: var(--rb-violet);
    background: rgba(124, 58, 237, 0.1);
}

.tag-teal {
    color: var(--rb-teal);
    background: rgba(13, 148, 136, 0.1);
}

.tag-rose {
    color: var(--rb-rose);
    background: rgba(225, 29, 72, 0.1);
}

.tag-amber {
    color: var(--rb-amber);
    background: rgba(217, 119, 6, 0.1);
}

.rb-card h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--rb-dark);
    margin: 0 0 0.6rem;
}

.rb-card p {
    font-size: 0.875rem;
    color: var(--rb-mid);
    line-height: 1.65;
    margin: 0 0 1.2rem;
    flex: 1;
}

.rb-card-link {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--rb-indigo);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rb-card-link:hover {
    color: var(--rb-dark);
}

/* ════════════════════════════════════════════════════════════
   CTA SECTION — light background, vibrant card
   ════════════════════════════════════════════════════════════ */
.rb-cta-section {
    background: linear-gradient(135deg, #0d1526 0%, #1e0a3c 50%, #0d1526 100%);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-block-size: auto 400px;
}

.rb-cta-card {
    background: linear-gradient(135deg, #6d28d9 0%, #2563eb 50%, #0d9488 100%);
    border-radius: 28px;
    padding: 3.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 20px 60px -12px rgba(109, 40, 217, 0.35);
    position: relative;
    overflow: hidden;
}

.rb-cta-orb {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
    top: -40%;
    right: 5%;
    filter: blur(40px);
    pointer-events: none;
}

.rb-cta-orb-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
    bottom: -30%;
    left: 20%;
}

.rb-cta-text {
    position: relative;
    z-index: 2;
}

.rb-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

/* Animated gradient shimmer button */
@keyframes shimmer-slide {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

.rb-btn-white {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.9rem 2.2rem;
    background: linear-gradient(90deg,
            #7c3aed 0%, #4f46e5 25%, #0d9488 50%, #4f46e5 75%, #7c3aed 100%);
    background-size: 300% auto;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 20px -4px rgba(124, 58, 237, 0.5);
    animation: shimmer-slide 4s linear infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.rb-btn-white::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
            transparent 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: shimmer-slide 2s ease-in-out infinite;
}

.rb-btn-white:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px -6px rgba(124, 58, 237, 0.65);
}

.rb-btn-outline-white {
    display: inline-flex;
    padding: 0.85rem 2rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.rb-btn-outline-white:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .rb-stats-bar {
        gap: 1rem;
    }

    .rb-stat {
        padding: 0 1.5rem;
    }

    .rb-stat-div {
        height: 30px;
    }
}

/* ════════════════════════════════════════════════════════════
   MOBILE SPECIFIC HOME — Premium App-Like UI
   ════════════════════════════════════════════════════════════ */
.rb-mobile-home { display: none; }
.rb-desktop-home { display: block; }




/* --- Option C: Premium Mobile Home Components --- */

/* Compact purple gradient header */
.rb-mhome-topbar-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 60%, #0891b2 100%);
}
.rb-mhome-brand-v2 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
}
.rb-mhome-search-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.rb-mhome-search-icon-btn:active { background: rgba(255,255,255,0.28); }

/* Search bar row (purple gradient background continues) */

/* Quick action pills — single horizontal scroll row */
.rb-mhome-actions-scroll {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.875rem 1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}
.rb-mhome-actions-scroll::-webkit-scrollbar { display: none; }
.rb-mhome-action-pill {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    background: var(--pill-bg, #f5f3ff);
    border-radius: 100px;
    padding: 0.4rem 0.8rem 0.4rem 0.4rem;
    min-height: 44px;
    text-decoration: none;
    flex-shrink: 0;
    color: var(--pill-color, #7c3aed);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: transform 0.15s;
}
.rb-mhome-action-pill:active { transform: scale(0.95); }
.rb-mhome-action-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Feed section header */
.rb-mhome-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem 0.5rem;
    background: #f8fafc;
}
.rb-mhome-feed-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}
.rb-mhome-feed-all {
    font-size: 0.78rem;
    font-weight: 600;
    color: #7c3aed;
    text-decoration: none;
}

/* 2-column vertical article grid */
.rb-mhome-feed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding: 0.65rem 0.65rem 2rem;
    background: #f8fafc;
}
.rb-mhome-feed-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.07);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.18s;
}
.rb-mhome-feed-card:active { transform: scale(0.97); }
.rb-mhome-feed-img {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.rb-mhome-feed-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rb-mhome-img-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}
.rb-mhome-feed-cat,
.rb-mhome-article-cat,
.rb-placeholder-cat,
.rb-article-card .rb-article-content > span {
    display: none !important;
}
.rb-mhome-feed-title {
    font-family: 'Plus Jakarta Sans', 'Noto Sans Sinhala', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.55rem 0.6rem 0.65rem;
    padding: 0;
    line-height: 1.42;
    flex: 0 0 auto;
}

/* Articles horizontal scroll */
.rb-mhome-articles-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 1.25rem 1rem;
    scrollbar-width: none;
}
.rb-mhome-articles-scroll::-webkit-scrollbar { display: none; }

.rb-mhome-article-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    border: 1px solid rgba(0,0,0,0.04);
    flex-shrink: 0;
    width: 220px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}
.rb-mhome-article-img {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    position: relative;
    overflow: hidden;
}
.rb-mhome-article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.rb-mhome-img-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}
.rb-mhome-article-body {
    padding: 0.875rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.rb-mhome-article-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.42;
}
.rb-mhome-article-read {
    font-size: 0.72rem;
    color: #7c3aed;
    font-weight: 600;
    margin-top: auto;
}

@media (max-width: 768px) {
    .rb-desktop-home {
        display: none !important;
    }

    .rb-mobile-home {
        display: block;
        padding: 0;
    }

    .rb-mobile-header {
        margin-bottom: 1.5rem;
    }

    .rb-mobile-greeting {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .rb-mobile-icon {
        font-size: 2rem;
    }

    .rb-mh-title {
        font-size: 1.25rem;
        font-weight: 700;
        margin: 0;
        color: #0f172a;
    }

    .rb-mh-sub {
        font-size: 0.85rem;
        color: #64748b;
        margin: 0;
    }

    .rb-mobile-quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .rb-mq-action {
        background: #ffffff;
        border-radius: 16px;
        padding: 1.25rem 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        text-decoration: none;
        color: #334155;
        font-weight: 600;
        font-size: 0.9rem;
        box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
        border: 1px solid rgba(255,255,255,0.5);
    }

    .rb-mq-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        background: var(--mq-color);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }

    .rb-section {
        padding: 2rem 0;
    }

    .rb-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .rb-cta-card {
        flex-direction: column;
        padding: 2rem 1.25rem;
        text-align: center;
    }

    .rb-cta-buttons {
        justify-content: center;
    }

    /* Horizontal scroll for feature cards */
    .rb-cards-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
        margin-right: -1.25rem;
        padding-right: 1.25rem;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        margin-top: 1.25rem;
    }
    
    .rb-cards-grid::-webkit-scrollbar {
        display: none;
    }
    
    .rb-card {
        min-width: 280px;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    
    /* Horizontal scroll for articles */
    .rb-section-articles .rb-tools-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
        margin-right: -1.25rem;
        padding-right: 1.25rem;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        margin-top: 1.25rem !important;
    }
    
    .rb-section-articles .rb-tools-grid::-webkit-scrollbar {
        display: none;
    }
    
    .rb-section-articles .rb-article-card {
        min-width: 280px;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .rb-container {
        padding: 0;
    }

    .rb-hero {
        padding: 1.5rem 1.25rem 0;
    }

    .rb-hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .rb-btn-pry,
    .rb-btn-ghost {
        width: 100%;
        justify-content: center;
    }

  .rb-article-card {
    border-radius: 16px;
  }

  .rb-section-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }
}

/* Afrikaans (/af/) Language Portal Specific Styling override */
html[lang="af"] .rb-mhome-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0f766e 100%) !important;
}

html[lang="af"] .rb-btn-pry {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important;
    box-shadow: 0 8px 24px -4px rgba(30, 58, 138, 0.4) !important;
}

html[lang="af"] .rb-btn-pry:hover {
    box-shadow: 0 14px 32px -6px rgba(30, 58, 138, 0.5) !important;
}

html[lang="af"] .rb-num {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0f766e 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

html[lang="af"] .rb-nav-cta {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6) !important;
    box-shadow: 0 4px 14px -2px rgba(30, 58, 138, 0.4) !important;
}

html[lang="af"] .rb-nav-cta:hover {
    box-shadow: 0 8px 20px -4px rgba(30, 58, 138, 0.5) !important;
}

html[lang="af"] .rb-hero {
    background: linear-gradient(160deg, #f1f5f9 0%, #e2e8f0 40%, #cbd5e1 75%, #f1f5f9 100%) !important;
}

html[lang="af"] .rb-grad {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0f766e 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}