/* =========================================================
   RaFi Bhai Home Page
   FINAL HOME CSS
   Header + Hero + Advertisement + Community Feed
========================================================= */


/* =========================================================
   1. HOME WRAPPER
========================================================= */

.rafi-home-step1 {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 0 24px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}


/* =========================================================
   2. REMOVE OLD WORDPRESS / BLOCKSY ELEMENTS
========================================================= */

body #header,
body #header.ct-header,
body #footer,
body #footer.ct-footer,
body .ct-sidebar,
body .addtoany_share_save_container,
body #post-3333 .hero-section {
    display: none !important;
}

body .ct-language-switcher,
body .ct-language,
body .language-switcher,
body .wpml-ls,
body .trp-language-switcher,
body [class*="language-switcher"],
body [class*="language_selector"],
body select[name*="language"],
body select[name*="lang"] {
    display: none !important;
}

body #main,
body #main-container,
body #main-container .ct-container,
body #content,
body .content-area,
body #post-3333,
body #post-3333 .ct-container,
body #post-3333 .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body #post-3333 .entry-content {
    padding: 0 !important;
}


/* =========================================================
   3. HEADER
========================================================= */

.rafi-home-header {
    width: 100%;
    min-height: 76px;
    padding: 10px 24px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    background: #ffffff;
    border-bottom: 1px solid #e8ebf0;
}


/* Brand */

.rafi-home-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 220px;
}


/* Logo */

.rafi-home-logo {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
}

.rafi-home-logo img {
    width: 48px;
    height: 48px;

    object-fit: contain;
    display: block;
}


/* Brand Text */

.rafi-home-brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rafi-home-brand-text strong {
    color: #111827;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 800;
}

.rafi-home-brand-text span {
    color: #6b7280;
    font-size: 11px;
    line-height: 1.2;
}


/* Navigation */

.rafi-home-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.rafi-home-nav a {
    display: inline-flex;
    align-items: center;

    padding: 9px 13px;

    border-radius: 9px;

    color: #374151;
    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition: all .2s ease;
}

.rafi-home-nav a:hover {
    background: #88ccee;
    color: #111827;
}


/* Header Actions */

.rafi-home-actions {
    min-width: 120px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;
}


/* =========================================================
   4. HERO
========================================================= */

.rafi-home-hero {
    position: relative;

    width: 100%;
    min-height: 430px;

    margin-top: 18px;

    border-radius: 24px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(59,130,246,.18),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(124,58,237,.16),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #0f172a,
            #172554 52%,
            #111827
        );

    box-shadow:
        0 18px 45px rgba(15,23,42,.12);
}


/* Decorative Circle */

.rafi-home-hero::before {
    content: "";

    position: absolute;

    width: 260px;
    height: 260px;

    border: 1px solid rgba(255,255,255,.10);

    border-radius: 50%;

    right: -70px;
    top: -80px;
}

.rafi-home-hero::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    border: 1px solid rgba(255,255,255,.08);

    border-radius: 50%;

    left: -50px;
    bottom: -70px;
}


/* Hero Content */

.rafi-home-hero-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 760px;

    padding: 55px 25px;

    box-sizing: border-box;

    text-align: center;
}


/* Eyebrow */

.rafi-home-eyebrow {
    margin-bottom: 15px;

    color: #93c5fd;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 2px;
}


/* Heading */

.rafi-home-hero h1 {
    margin: 0;

    color: #ffffff;

    font-size: clamp(38px, 5vw, 68px);

    line-height: 1.05;
    font-weight: 800;

    letter-spacing: -1.5px;
}

.rafi-home-hero h1 span {
    display: inline-block;

    background:
        linear-gradient(
            90deg,
            #60a5fa,
            #a78bfa
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}


/* Paragraph */

.rafi-home-hero p {
    max-width: 600px;

    margin: 22px auto 0;

    color: #cbd5e1;

    font-size: 18px;
    line-height: 1.7;
}


/* Hero Buttons */

.rafi-home-hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    margin-top: 30px;
}

.rafi-home-btn {
    display: inline-flex;

    min-height: 48px;

    padding: 0 22px;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    text-decoration: none;

    font-size: 15px;
    font-weight: 700;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.rafi-home-btn:hover {
    transform: translateY(-2px);
}


/* Primary */

.rafi-home-btn-primary {
    background: #ffffff;
    color: #111827;

    box-shadow:
        0 8px 22px rgba(0,0,0,.18);
}

.rafi-home-btn-primary:hover {
    background: #f8fafc;
}


/* Secondary */

.rafi-home-btn-secondary {
    background: rgba(255,255,255,.08);

    color: #ffffff;

    border:
        1px solid
        rgba(255,255,255,.25);
}

.rafi-home-btn-secondary:hover {
    background: rgba(255,255,255,.14);
}


/* =========================================================
   5. ADVERTISEMENT
========================================================= */

.rafi-home-ad {
    width: 100%;

    margin: 28px 0;

    padding: 0;

    box-sizing: border-box;
}

.rafi-home-ad-box {
    width: 100%;
    max-width: 970px;

    min-height: 250px;

    margin: 0 auto;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border:
        1px dashed
        #cbd5e1;

    border-radius: 12px;

    background: #f8fafc;

    color: #64748b;

    text-align: center;
}

.rafi-home-ad-label {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
}

.rafi-home-ad-size {
    margin-top: 8px;

    font-size: 14px;
    color: #64748b;
}

.rafi-home-ad-text {
    margin-top: 8px;

    font-size: 13px;
    color: #94a3b8;
}


/* =========================================================
   6. COMMUNITY FEED
========================================================= */

.rafi-home-community {
    width: 970px !important;
    max-width: 970px !important;

    margin: 45px auto 60px !important;

    padding: 0 !important;

    box-sizing: border-box !important;
}


/* Heading */

.rafi-home-community .rafi-feed-heading {
    width: 970px !important;
    max-width: 970px !important;

    margin: 0 auto 18px !important;

    padding: 0 !important;
}


/* Remove COMMUNITY label */

.rafi-home-community .rafi-feed-heading > span {
    display: none !important;
}


/* Heading */

.rafi-home-community .rafi-feed-heading h2 {
    margin: 0 0 4px !important;

    font-size: 20px !important;
    line-height: 1.3 !important;

    font-weight: 700 !important;

    color: #17213d !important;
}

.rafi-home-community .rafi-feed-heading p {
    margin: 0 !important;

    font-size: 11px !important;
    line-height: 1.4 !important;

    color: #64748b !important;
}


/* =========================================================
   REAL FEED
========================================================= */

.rafi-home-real-feed {
    width: 970px !important;
    max-width: 970px !important;

    margin: 0 auto !important;

    padding: 0 !important;

    box-sizing: border-box !important;
}


/* Remove duplicate internal heading */

.rafi-home-real-feed h1,
.rafi-home-real-feed h2 {
    display: none !important;
}


/* Force internal containers */

.rafi-home-real-feed > div,
.rafi-home-real-feed > section,
.rafi-home-real-feed > main {
    width: 100% !important;
    max-width: 970px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    box-sizing: border-box !important;
}


/* Nested containers */

.rafi-home-real-feed div {
    box-sizing: border-box !important;
}


/* =========================================================
   COMPOSER
========================================================= */

.rafi-home-real-feed .rafi-post-composer {
    width: 100% !important;
    max-width: 970px !important;

    margin: 0 auto 20px !important;

    box-sizing: border-box !important;
}


/* =========================================================
   POST CARD
========================================================= */

.rafi-home-real-feed article.rafi-post-card,
.rafi-home-real-feed .rafi-post-card {
    display: block !important;

    width: 100% !important;
    max-width: 970px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    box-sizing: border-box !important;

    background: #ffffff !important;

    border:
        1px solid
        #e2e5e9 !important;

    border-radius: 12px !important;

    overflow: hidden !important;
}


/* =========================================================
   POST IMAGE
========================================================= */

.rafi-home-real-feed .rafi-post-media {
    width: 100% !important;
    max-width: 970px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    overflow: hidden !important;

    background: #f5f6f7 !important;
}

.rafi-home-real-feed .rafi-post-media img,
.rafi-home-real-feed .rafi-post-image {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;

    margin: 0 auto !important;

    object-fit: contain !important;
}


/* =========================================================
   LIKE / COMMENT / SHARE
========================================================= */

.rafi-home-real-feed .rafi-post-actions {
    width: 100% !important;

    display: flex !important;

    align-items: center !important;
    justify-content: space-between !important;

    padding: 4px 8px !important;

    box-sizing: border-box !important;

    background: #ffffff !important;

    border-top:
        1px solid
        #e5e7eb !important;
}

.rafi-home-real-feed .rafi-post-actions > * {
    flex: 1 1 0 !important;

    width: 33.333% !important;

    min-width: 0 !important;
}

.rafi-home-real-feed .rafi-post-actions button,
.rafi-home-real-feed .rafi-post-actions a {
    width: 100% !important;

    min-height: 38px !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    border: 0 !important;

    background: transparent !important;

    font-size: 13px !important;

    cursor: pointer !important;
}


/* =========================================================
   HEADER PROFILE + NOTIFICATION
========================================================= */

.rafi-home-actions {
    min-width: 120px !important;

    display: flex !important;

    align-items: center !important;
    justify-content: flex-end !important;

    gap: 10px !important;
}


/* Notification */

.rafi-header-notification-wrap {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;
}

.rafi-home-notification {
    width: 42px !important;
    height: 42px !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    border-radius: 50% !important;

    background: #f5f7fa !important;

    text-decoration: none !important;

    font-size: 18px !important;

    transition:
        transform .2s ease,
        background .2s ease !important;
}

.rafi-home-notification:hover {
    background: #e9eef5 !important;

    transform: translateY(-1px) !important;
}


/* Profile wrapper */

.rafi-header-profile-wrap {
    display: flex !important;

    align-items: center !important;
}


/* Profile photo + name */

.rafi-header-user-profile {
    display: inline-flex !important;

    align-items: center !important;

    gap: 9px !important;

    height: 42px !important;

    padding: 2px 10px 2px 2px !important;

    border-radius: 24px !important;

    background: #f5f7fa !important;

    text-decoration: none !important;

    box-sizing: border-box !important;

    transition:
        background .2s ease,
        box-shadow .2s ease !important;
}

.rafi-header-user-profile img {
    width: 38px !important;
    height: 38px !important;

    min-width: 38px !important;
    max-width: 38px !important;

    border-radius: 50% !important;

    object-fit: cover !important;

    display: block !important;
}

.rafi-header-user-name {
    display: inline-block !important;

    color: #17213d !important;

    font-size: 14px !important;

    font-weight: 700 !important;

    line-height: 1 !important;

    white-space: nowrap !important;
}

.rafi-header-user-profile:hover {
    background: #eef2f7 !important;

    box-shadow:
        0 3px 10px rgba(15,23,42,.10) !important;
}


/* Login */

.rafi-header-login {
    display: inline-flex !important;

    align-items: center !important;

    gap: 6px !important;

    height: 40px !important;

    padding: 0 12px !important;

    border-radius: 20px !important;

    background: #f5f7fa !important;

    color: #17213d !important;

    text-decoration: none !important;

    font-size: 13px !important;

    font-weight: 700 !important;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    .rafi-home-community,
    .rafi-home-real-feed,
    .rafi-home-community .rafi-feed-heading {
        width: 100% !important;
        max-width: 100% !important;
    }

}


@media (max-width: 768px) {

    .rafi-home-step1 {
        width: 100% !important;
        max-width: 100% !important;

        padding-left: 10px;
        padding-right: 10px;
    }


    /* Header */

    .rafi-home-header {
        min-height: 68px;

        padding: 8px 14px;

        gap: 10px;
    }


    .rafi-home-brand {
        min-width: 0;

        gap: 8px;
    }


    .rafi-home-logo,
    .rafi-home-logo img {
        width: 40px;
        height: 40px;
    }


    .rafi-home-brand-text strong {
        font-size: 17px;
    }


    .rafi-home-brand-text span {
        display: none;
    }


    .rafi-home-nav {
        display: none;
    }


    .rafi-home-actions {
        min-width: auto !important;

        gap: 7px !important;
    }


    /* Hero */

    .rafi-home-hero {
        min-height: 480px;

        margin-top: 10px;

        border-radius: 18px;
    }


    .rafi-home-hero-content {
        padding: 45px 20px;
    }


    .rafi-home-eyebrow {
        font-size: 10px;

        letter-spacing: 1.5px;
    }


    .rafi-home-hero h1 {
        font-size: 42px;
    }


    .rafi-home-hero p {
        font-size: 16px;

        line-height: 1.6;
    }


    .rafi-home-hero-buttons {
        flex-direction: column;

        width: 100%;

        gap: 10px;
    }


    .rafi-home-btn {
        width: 100%;

        max-width: 300px;
    }


    /* Advertisement */

    .rafi-home-ad {
        margin: 20px 0;
    }


    .rafi-home-ad-box {
        min-height: 180px;
    }


    /* Community */

    .rafi-home-community {
        padding: 0 10px !important;

        margin-top: 30px !important;
    }


    .rafi-home-real-feed {
        width: 100% !important;
    }


    .rafi-home-real-feed .rafi-post-card {
        width: 100% !important;
    }


    /* Header Profile */

    .rafi-header-user-name {
        display: none !important;
    }


    .rafi-header-user-profile {
        width: 48px !important;

        height: 48px !important;

        padding: 0 !important;

        justify-content: Auto !important;
    }


    .rafi-home-notification {
        width: 38px !important;

        height: 38px !important;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .rafi-home-brand-text strong {
        font-size: 16px;
    }


    .rafi-home-hero {
        min-height: 450px;
    }


    .rafi-home-hero h1 {
        font-size: 36px;
    }


    .rafi-home-hero p {
        font-size: 15px;
    }


    .rafi-home-real-feed .rafi-post-actions button {
        font-size: 13px;
    }

}
/* =========================================================
   MOBILE FIX
   Remove WordPress / Theme Header
========================================================= */

@media (max-width: 768px) {

    /* Old WordPress / Blocksy mobile header */
    body .ct-header,
    body .ct-header-mobile,
    body .ct-header-main,
    body #header,
    body header.site-header {
        display: none !important;
    }

    /* Keep only our RaFi header */
    .rafi-home-header {
        display: flex !important;
    }

}


/* =========================================================
   COMMUNITY POST IMAGE FIX
========================================================= */

.rafi-home-real-feed .rafi-post-media {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    background: #f5f6f7 !important;
}

.rafi-home-real-feed .rafi-post-media img,
.rafi-home-real-feed img.rafi-post-image,
.rafi-home-real-feed .rafi-post-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    object-fit: contain !important;
}


/* Don't let mobile CSS hide post images */

@media (max-width: 768px) {

    .rafi-home-real-feed .rafi-post-media img,
    .rafi-home-real-feed img.rafi-post-image,
    .rafi-home-real-feed .rafi-post-image {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;

        width: 100% !important;
        height: auto !important;
        max-height: none !important;
    }

}
/* =========================================================
   RAFI HOME - REMOVE OLD WORDPRESS / BLOCKSY HEADER
========================================================= */

/* OLD THEME HEADER */
#header.ct-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* OLD MOBILE / OFFCANVAS HEADER */
#offcanvas.ct-panel.ct-header {
    display: none !important;
}

/* Remove space left by old header */
#main-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* OUR RAFI HEADER MUST STAY */
.rafi-home-step1 .rafi-home-header {
    display: flex !important;
    visibility: visible !important;
}

/* =========================================================
   RaFi Home - FINAL COMMUNITY + RIGHT SIDEBAR LAYOUT
   ========================================================= */

.rafi-home-content-layout {
    width: 100%;
    max-width: 1180px;
    margin: 30px auto 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
    box-sizing: border-box;
}

.rafi-home-main-column {
    min-width: 0;
}

.rafi-home-main-column .rafi-home-community {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rafi-home-main-column .rafi-home-community .rafi-feed-heading {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 16px !important;
}

.rafi-home-main-column .rafi-home-real-feed {
    width: 100% !important;
    max-width: none !important;
}

.rafi-home-main-column .rafi-home-real-feed > div,
.rafi-home-main-column .rafi-home-real-feed > section,
.rafi-home-main-column .rafi-home-real-feed > main {
    width: 100% !important;
    max-width: none !important;
}

.rafi-home-main-column .rafi-home-real-feed .rafi-post-composer,
.rafi-home-main-column .rafi-home-real-feed article.rafi-post-card,
.rafi-home-main-column .rafi-home-real-feed .rafi-post-card {
    width: 100% !important;
    max-width: none !important;
}

/* Right sidebar */

.rafi-home-sidebar {
    width: 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rafi-sidebar-card {
    width: 100%;
    box-sizing: border-box;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(15,23,42,.06);
}

.rafi-sidebar-card-title {
    margin: 0 0 14px;
    color: #17213d;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 800;
}

.rafi-sidebar-ad-box {
    width: 100%;
    min-height: 250px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
}

.rafi-sidebar-ad-box span {
    font-size: 13px;
    font-weight: 600;
}

.rafi-sidebar-ad-box strong {
    margin-top: 8px;
    color: #475569;
    font-size: 14px;
}

.rafi-sidebar-ad-box small {
    margin-top: 7px;
    color: #94a3b8;
    font-size: 11px;
}

.rafi-sidebar-post-list {
    display: flex;
    flex-direction: column;
}

.rafi-sidebar-post-item {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f4;
    color: #17213d;
    text-decoration: none;
}

.rafi-sidebar-post-item:first-child {
    padding-top: 0;
}

.rafi-sidebar-post-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.rafi-sidebar-post-item:hover .rafi-sidebar-post-text strong {
    color: #2563eb;
}

.rafi-sidebar-post-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rafi-sidebar-post-text strong {
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
    transition: color .2s ease;
}

.rafi-sidebar-post-text small {
    color: #98a2b3;
    font-size: 10px;
    line-height: 1.3;
}

.rafi-sidebar-empty {
    color: #98a2b3;
    font-size: 12px;
}

.rafi-sidebar-description {
    margin: 0 0 15px;
    color: #667085;
    font-size: 12px;
    line-height: 1.65;
}

.rafi-sidebar-primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    box-sizing: border-box;
    border-radius: 9px;
    background: #172b55;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

.rafi-sidebar-primary-btn:hover {
    background: #0d6efd;
    color: #ffffff;
    transform: translateY(-1px);
}

.rafi-sidebar-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rafi-sidebar-category-list a {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 20px;
    background: #f3f6fa;
    color: #344054;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease;
}

.rafi-sidebar-category-list a:hover {
    background: #e8efff;
    color: #2563eb;
}

/* The old full-width ad is no longer used on Home */
.rafi-home-content-layout + * {
    box-sizing: border-box;
}

/* Desktop: make the feed use the space left by the sidebar */
@media (min-width: 1001px) {
    .rafi-home-content-layout .rafi-home-real-feed .rafi-post-media,
    .rafi-home-content-layout .rafi-home-real-feed .rafi-post-media img,
    .rafi-home-content-layout .rafi-home-real-feed .rafi-post-image {
        max-width: 100% !important;
    }
}

/* Tablet */
@media (max-width: 1000px) {
    .rafi-home-content-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 20px;
        padding: 0 10px;
    }

    .rafi-home-sidebar {
        width: 280px;
    }
}

/* Mobile: feed first, sidebar below */
@media (max-width: 768px) {
    .rafi-home-content-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        margin: 25px auto 45px;
        padding: 0 10px;
        gap: 24px;
    }

    .rafi-home-main-column,
    .rafi-home-sidebar {
        width: 100%;
        max-width: 100%;
    }

    .rafi-home-sidebar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .rafi-sidebar-card {
        padding: 16px;
    }

    .rafi-sidebar-ad-box {
        min-height: 180px;
    }
}

/* =========================================================
   Keep the original Hero clean above the new layout
   ========================================================= */

.rafi-home-hero {
    margin-bottom: 0 !important;
}
/* =========================================================
   RaFi Bhai - Full Width Fix at 100% Browser Zoom
   ========================================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Main site wrappers */
#outer-wrapper,
.outer-wrapper,
#content-wrapper,
.content-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Blogger/theme row style wrappers */
.row,
.main-wrapper,
.main-container,
.site-container {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* RaFi Header */
.rafi-header,
.rafi-site-header,
.rafi-header-inner {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Welcome Banner */
.rafi-home-hero {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Community + Sidebar */
.rafi-home-content-layout {
    width: calc(100% - 40px) !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Make feed use available space */
.rafi-home-main-column {
    min-width: 0;
    width: 100%;
}

/* Sidebar remains fixed */
.rafi-home-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* Desktop */
@media (min-width: 1200px) {

    .rafi-home-content-layout {
        grid-template-columns: minmax(0, 1fr) 300px !important;
        gap: 28px !important;
    }
}

/* Large screen */
@media (min-width: 1400px) {

    .row,
    .main-wrapper,
    .main-container,
    .site-container,
    .rafi-header,
    .rafi-site-header,
    .rafi-header-inner,
    .rafi-home-hero,
    .rafi-home-content-layout {
        max-width: 1400px !important;
    }

    .rafi-home-content-layout {
        width: calc(100% - 60px) !important;
    }
}

/* Tablet */
@media (max-width: 1000px) {

    .row,
    .main-wrapper,
    .main-container,
    .site-container {
        max-width: 100% !important;
        width: 100% !important;
    }

    .rafi-home-content-layout {
        width: calc(100% - 30px) !important;
    }
}

/* Mobile */
@media (max-width: 768px) {

    .rafi-home-content-layout {
        width: calc(100% - 20px) !important;
        max-width: 100% !important;
    }

    .rafi-home-sidebar {
        width: 100% !important;
    }
}
/* =========================================================
   RaFi Home - Compact Layout
   Reduce top space + banner size
   ========================================================= */

/* Home page overall */
body.home,
body.page-template-page-home,
body.home-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Main Home wrapper */
.rafi-home,
.rafi-home-page,
.rafi-home-wrapper {
    margin-top: 10px !important;
    padding-top: 0 !important;
}

/* Header: remove unnecessary top gap */
body.home .rafi-header,
body.home .rafi-site-header,
body.home .rafi-header-inner {
    margin-top: 10px !important;
}

/* =========================================================
   Welcome Banner
   ========================================================= */

.rafi-home-hero {
    width: calc(100% - 40px) !important;
    max-width: 1400px !important;

    height: 300px !important;
    min-height: 300px !important;

    margin: 12px auto 22px !important;
    padding: 0 !important;

    border-radius: 22px !important;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

/* Hero inner content */
.rafi-home-hero-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 25px 30px !important;
    box-sizing: border-box;
    text-align: center;
}

/* Small heading */
.rafi-home-hero .eyebrow,
.rafi-home-hero .hero-eyebrow,
.rafi-home-hero small {
    font-size: 12px !important;
    margin-bottom: 12px !important;
}

/* Main Welcome title */
.rafi-home-hero h1 {
    font-size: clamp(42px, 5vw, 72px) !important;
    line-height: 1.05 !important;
    margin: 8px 0 14px !important;
}

/* Subtitle */
.rafi-home-hero p {
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin: 0 0 20px !important;
}

/* Hero buttons */
.rafi-home-hero a,
.rafi-home-hero button {
    padding: 10px 18px !important;
    font-size: 13px !important;
}

/* =========================================================
   Community Feed + Sidebar
   ========================================================= */

.rafi-home-content-layout {
    width: calc(100% - 40px) !important;
    max-width: 1400px !important;

    margin: 0 auto !important;

    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 300px !important;
    gap: 24px !important;

    align-items: start !important;
}

/* Feed */
.rafi-home-main-column {
    min-width: 0 !important;
    width: 100% !important;
}

/* Sidebar */
.rafi-home-sidebar {
    width: 300px !important;
    max-width: 300px !important;
}

/* Community Feed heading */
.rafi-post-feed {
    margin-top: 0 !important;
}

.rafi-feed-header {
    margin-bottom: 10px !important;
}

.rafi-feed-header h2 {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    font-size: 18px !important;
}

/* Composer */
.rafi-post-composer {
    margin-bottom: 12px !important;
}

/* Post cards */
.rafi-post-card,
.rafi-profile-post-card {
    margin-bottom: 16px !important;
}

/* =========================================================
   Desktop large screen
   ========================================================= */

@media (min-width: 1200px) {

    .rafi-home-hero {
        height: 300px !important;
        min-height: 300px !important;
    }

    .rafi-home-hero h1 {
        font-size: 68px !important;
    }
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1000px) {

    .rafi-home-hero {
        width: calc(100% - 30px) !important;
        height: 280px !important;
        min-height: 280px !important;
    }

    .rafi-home-content-layout {
        width: calc(100% - 30px) !important;
        grid-template-columns: minmax(0, 1fr) 280px !important;
        gap: 18px !important;
    }

    .rafi-home-sidebar {
        width: 280px !important;
        max-width: 280px !important;
    }

    .rafi-home-hero h1 {
        font-size: 48px !important;
    }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 768px) {

    .rafi-home-hero {
        width: calc(100% - 20px) !important;
        height: 260px !important;
        min-height: 260px !important;
        margin-top: 8px !important;
        margin-bottom: 16px !important;
        border-radius: 16px !important;
    }

    .rafi-home-hero h1 {
        font-size: 38px !important;
    }

    .rafi-home-hero p {
        font-size: 14px !important;
    }

    .rafi-home-content-layout {
        width: calc(100% - 20px) !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .rafi-home-sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }
}
/* =========================================================
   RaFi Home FINAL - FULL WIDTH + COMPACT HERO
   Break out from WordPress parent container
   ========================================================= */

/* Home wrapper */
.rafi-home-step1 {
    width: calc(100vw - 40px) !important;
    max-width: none !important;

    margin-left: 50% !important;
    margin-right: 0 !important;
    transform: translateX(-50%) !important;

    padding-left: 0 !important;
    padding-right: 0 !important;

    box-sizing: border-box !important;
}

/* Header full width */
.rafi-home-step1 .rafi-home-header {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;

    padding-left: 24px !important;
    padding-right: 24px !important;
}

/* =========================================================
   Welcome Banner 
   ========================================================= */

.rafi-home-step1 .rafi-home-hero {
    width: 100% !important;
    max-width: none !important;

    height: 300px !important;
    min-height: 300px !important;

    margin-top: 12px !important;
    margin-bottom: 24px !important;

    border-radius: 20px !important;
}

/* Banner content */
.rafi-home-step1 .rafi-home-hero-content {
    max-width: 1000px !important;
    padding: 25px 30px !important;
}

/* Banner title */
.rafi-home-step1 .rafi-home-hero h1 {
    font-size: clamp(42px, 4.5vw, 64px) !important;
    line-height: 1.05 !important;
    margin: 0 !important;
}

/* Banner subtitle */
.rafi-home-step1 .rafi-home-hero p {
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin-top: 14px !important;
}

/* Buttons */
.rafi-home-step1 .rafi-home-hero-buttons {
    margin-top: 20px !important;
}

.rafi-home-step1 .rafi-home-btn {
    min-height: 42px !important;
    padding: 0 18px !important;
    font-size: 13px !important;
}

/* =========================================================
   Community Feed + Right Sidebar
   ========================================================= */

.rafi-home-step1 .rafi-home-content-layout {
    width: 100% !important;
    max-width: none !important;

    margin: 0 0 50px !important;

    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        300px !important;

    gap: 28px !important;

    box-sizing: border-box !important;
}

/* Main Feed */
.rafi-home-step1 .rafi-home-main-column {
    width: 100% !important;
    min-width: 0 !important;
}

/* Community section */
.rafi-home-step1 .rafi-home-community {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Feed heading */
.rafi-home-step1 .rafi-feed-heading {
    width: 100% !important;
    margin: 0 0 12px !important;
}

/* Feed */
.rafi-home-step1 .rafi-home-real-feed {
    width: 100% !important;
    max-width: none !important;
}

/* Post wrapper */
.rafi-home-step1 .rafi-home-real-feed > *,
.rafi-home-step1 .rafi-home-real-feed .rafi-post-card,
.rafi-home-step1 .rafi-home-real-feed article {
    max-width: none !important;
}

/* =========================================================
   Right Sidebar
   ========================================================= */

.rafi-home-step1 .rafi-home-sidebar {
    width: 300px !important;
    max-width: 300px !important;
    min-width: 300px !important;
}

/* =========================================================
   Large Monitor
   ========================================================= */

@media (min-width: 1400px) {

    .rafi-home-step1 {
        width: calc(100vw - 60px) !important;
    }

    .rafi-home-step1 .rafi-home-hero {
        height: 300px !important;
        min-height: 300px !important;
    }

    .rafi-home-step1 .rafi-home-content-layout {
        grid-template-columns:
            minmax(0, 1fr)
            320px !important;

        gap: 30px !important;
    }

    .rafi-home-step1 .rafi-home-sidebar {
        width: 320px !important;
        max-width: 320px !important;
        min-width: 320px !important;
    }
}

/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1000px) {

    .rafi-home-step1 {
        width: calc(100vw - 30px) !important;
    }

    .rafi-home-step1 .rafi-home-content-layout {
        grid-template-columns:
            minmax(0, 1fr)
            280px !important;

        gap: 18px !important;
    }

    .rafi-home-step1 .rafi-home-sidebar {
        width: 280px !important;
        max-width: 280px !important;
        min-width: 280px !important;
    }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 768px) {

    .rafi-home-step1 {
        width: calc(100vw - 20px) !important;
    }

    .rafi-home-step1 .rafi-home-hero {
        height: 260px !important;
        min-height: 260px !important;
    }

    .rafi-home-step1 .rafi-home-hero h1 {
        font-size: 38px !important;
    }

    .rafi-home-step1 .rafi-home-content-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .rafi-home-step1 .rafi-home-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

/* =========================================================
   RaFi Bhai HOME - FINAL 100% WIDTH FIX
   Fix: content was still trapped inside WordPress parent
   ========================================================= */

/* Break Home completely out of the narrow WordPress content area */
.rafi-home-step1 {
    width: 100vw !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}

/* Do NOT inherit the old 1120/1280px parent limitation */
.rafi-home-step1,
.rafi-home-step1 * {
    box-sizing: border-box;
}

/* Header */
.rafi-home-step1 .rafi-home-header {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Welcome banner */
.rafi-home-step1 .rafi-home-hero {
    width: 100% !important;
    max-width: none !important;
    height: 220px !important;
    min-height: 220px !important;
    margin: 8px 0 16px !important;
}

/* Keep hero text compact */
.rafi-home-step1 .rafi-home-hero-content {
    max-width: 1050px !important;
    padding: 20px 30px !important;
}

.rafi-home-step1 .rafi-home-hero h1 {
    font-size: clamp(42px, 4.2vw, 64px) !important;
    margin: 0 !important;
}

.rafi-home-step1 .rafi-home-hero p {
    margin-top: 8px !important;
    font-size: 16px !important;
}

.rafi-home-step1 .rafi-home-hero-buttons {
    margin-top: 18px !important;
}

/* Feed + right sidebar */
.rafi-home-step1 .rafi-home-content-layout {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 50px !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 28px !important;
}

/* Feed must use all remaining space */
.rafi-home-step1 .rafi-home-main-column {
    width: 100% !important;
    min-width: 0 !important;
}

.rafi-home-step1 .rafi-home-community,
.rafi-home-step1 .rafi-home-real-feed {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.rafi-home-step1 .rafi-home-real-feed > div,
.rafi-home-step1 .rafi-home-real-feed > section,
.rafi-home-step1 .rafi-home-real-feed > main,
.rafi-home-step1 .rafi-home-real-feed .rafi-post-composer,
.rafi-home-step1 .rafi-home-real-feed .rafi-post-card,
.rafi-home-step1 .rafi-home-real-feed article {
    width: 100% !important;
    max-width: none !important;
}

/* Sidebar */
.rafi-home-step1 .rafi-home-sidebar {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 320px !important;
}

/* Large screens */
@media (min-width: 1400px) {
    .rafi-home-step1 {
        padding-left: 28px !important;
        padding-right: 28px !important;
    }

    .rafi-home-step1 .rafi-home-content-layout {
        grid-template-columns: minmax(0, 1fr) 320px !important;
        gap: 30px !important;
    }
}

/* Tablet */
@media (max-width: 1000px) {
    .rafi-home-step1 {
        width: 100vw !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .rafi-home-step1 .rafi-home-content-layout {
        grid-template-columns: minmax(0, 1fr) 280px !important;
        gap: 18px !important;
    }

    .rafi-home-step1 .rafi-home-sidebar {
        width: 280px !important;
        min-width: 280px !important;
        max-width: 280px !important;
    }

    .rafi-home-step1 .rafi-home-hero {
        height: 270px !important;
        min-height: 270px !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .rafi-home-step1 {
        width: 100vw !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .rafi-home-step1 .rafi-home-hero {
        height: 250px !important;
        min-height: 250px !important;
        margin-top: 8px !important;
    }

    .rafi-home-step1 .rafi-home-hero h1 {
        font-size: 38px !important;
    }

    .rafi-home-step1 .rafi-home-content-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }

    .rafi-home-step1 .rafi-home-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

/* Prevent accidental horizontal clipping by the theme */
html,
body {
    overflow-x: visible !important;
}


/* =========================================================
   FINAL TOP SPACE TUNING
   Move Home content upward and remove excessive blank space
   ========================================================= */

.rafi-home-step1 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Home header closer to the top */
.rafi-home-step1 .rafi-home-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Reduce the gap between header and welcome banner */
.rafi-home-step1 .rafi-home-hero {
    margin-top: 8px !important;
}

/* If the theme's main wrapper adds top spacing, cancel it only on Home */
body:has(.rafi-home-step1) {
    padding-top: 0 !important;
}

body:has(.rafi-home-step1) #page,
body:has(.rafi-home-step1) .site,
body:has(.rafi-home-step1) .site-content,
body:has(.rafi-home-step1) .content-area {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* =========================================================
   FINAL HERO DESCRIPTION POSITION FIX
   Keep the full description centered on desktop
   ========================================================= */

.rafi-home-step1 .rafi-home-hero p {
    width: 100% !important;
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

/* Mobile: allow the description to wrap naturally */
@media (max-width: 768px) {
    .rafi-home-step1 .rafi-home-hero p {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
}
/* =========================================================
   FINAL FIX - REMOVE TOP BLACK BAR / EMPTY SPACE
   ========================================================= */

/* Remove theme top/header wrappers */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
}

body #header,
body #header.ct-header,
body .ct-header,
body .ct-header-main,
body .ct-header-middle,
body .ct-header-bottom,
body .site-header,
body header.site-header {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Remove any theme top spacing */
body:has(.rafi-home-step1),
body:has(.rafi-home-step1) #page,
body:has(.rafi-home-step1) #main,
body:has(.rafi-home-step1) #main-container,
body:has(.rafi-home-step1) .site,
body:has(.rafi-home-step1) .site-content,
body:has(.rafi-home-step1) .content-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Home starts at the very top */
.rafi-home-step1 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Do NOT pull it upward anymore */
@media (min-width: 769px) {
    .rafi-home-step1 {
        top: 0 !important;
        position: relative;
    }
}

@media (max-width: 768px) {
    .rafi-home-step1 {
        top: 0 !important;
        position: relative;
    }
}
/* =========================================================
   REMOVE WORDPRESS ADMIN BAR FROM RAFI HOME
   ========================================================= */

html {
    margin-top: 0 !important;
}

html body.admin-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#wpadminbar {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

body.admin-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.admin-bar .rafi-home-step1 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
/* =========================================================
   FINAL FIX - REMOVE REMAINING TOP SPACE
   ========================================================= */

@media (min-width: 769px) {

    .rafi-home-step1 {
        position: relative !important;
        top: -60px !important;
    }

}
/* =========================================================
   RAFI HEADER - STICKY TOP
   Stay visible while scrolling
   ========================================================= */

.rafi-home-step1 .rafi-home-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;

    background: #ffffff !important;
    width: 100% !important;

    box-shadow: 0 2px 10px rgba(0,0,0,.08) !important;
}


/* =========================================================
   RAFI HOME - MOBILE HERO CONTENT FINAL
   Keep compact banner, prevent top text from clipping
   ========================================================= */

@media (max-width: 768px) {

    .rafi-home-step1 .rafi-home-hero {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .rafi-home-step1 .rafi-home-hero-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 14px !important;
        transform: translateY(-2px);
    }

    .rafi-home-step1 .rafi-home-hero h1 {
        font-size: 27px !important;
        line-height: 1.02 !important;
        margin: 0 0 5px !important;
    }

    .rafi-home-step1 .rafi-home-hero p {
        font-size: 10.5px !important;
        line-height: 1.3 !important;
        margin-top: 5px !important;
    }

    .rafi-home-step1 .rafi-home-eyebrow,
    .rafi-home-step1 .rafi-home-hero .eyebrow,
    .rafi-home-step1 .rafi-home-hero .hero-eyebrow,
    .rafi-home-step1 .rafi-home-hero small {
        font-size: 7.5px !important;
        line-height: 1.2 !important;
        letter-spacing: .8px !important;
        margin-bottom: 5px !important;
        white-space: nowrap !important;
    }

    .rafi-home-step1 .rafi-home-hero-buttons {
        margin-top: 8px !important;
        gap: 5px !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .rafi-home-step1 .rafi-home-btn {
        min-height: 31px !important;
        max-width: 220px !important;
        width: 100% !important;
        padding: 0 12px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 420px) {

    .rafi-home-step1 .rafi-home-hero-content {
        padding: 8px 12px !important;
        transform: translateY(-4px);
    }

    .rafi-home-step1 .rafi-home-hero h1 {
        font-size: 25px !important;
    }

    .rafi-home-step1 .rafi-home-hero p {
        font-size: 10px !important;
    }

    .rafi-home-step1 .rafi-home-hero-buttons {
        margin-top: 6px !important;
    }
}

/* =========================================================
   HELP & SUPPORT
   Home-only support entry for account/content problems.
========================================================= */
.rafi-home-help-link {
    white-space: nowrap;
}

.rafi-help-support-card {
    scroll-margin-top: 96px;
}

.rafi-help-support-text {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.rafi-help-support-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
    color: #475569;
    font-size: 12px;
    line-height: 1.4;
}

.rafi-help-support-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    box-sizing: border-box;
    border-radius: 10px;
    background: #172554;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

.rafi-help-support-button:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .rafi-help-support-card {
        order: 1;
    }

    .rafi-home-help-link {
        display: none !important;
    }
}

/* =========================================================
   MOBILE BLOG ACCESS
   Keep only the Blog navigation item visible on mobile.
   Desktop / tablet navigation remains unchanged.
========================================================= */
@media (max-width: 768px) {
    .rafi-home-nav {
        display: flex !important;
        align-items: center;
        gap: 4px;
        margin-left: auto;
    }

    .rafi-home-nav a {
        display: none !important;
    }

    .rafi-home-nav a:nth-child(2) {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        height: 32px;
        padding: 0 8px !important;
        border-radius: 8px;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1;
    }

    /* Blog: text only, with a small colored accent underneath */
    .rafi-home-nav a:nth-child(2)::before {
        content: none !important;
        display: none !important;
    }

    .rafi-home-nav a:nth-child(2) {
        position: relative;
        padding-bottom: 7px !important;
    }

    .rafi-home-nav a:nth-child(2)::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 2px;
        width: 22px;
        height: 3px;
        transform: translateX(-50%);
        border-radius: 3px;
        background: #3b82f6;
    }
}


/* =========================================================
   MOBILE ONLY - Reduce gap below Welcome Banner
   Keep 770px+ layout unchanged.
========================================================= */
@media (max-width: 768px) {
    .rafi-home-step1 .rafi-home-hero {
        margin-bottom: -50px !important;
    }

    .rafi-home-step1 .rafi-home-content-layout {
        margin-top: 0 !important;
    }
}

/* =========================================================
   RaFi Home - Remove Twenty Twenty-Five Duplicate Header
   and Extra Top Spacing
   ========================================================= */

body.home .wp-site-blocks > header.wp-block-template-part {
    display: none !important;
}

body.home .wp-site-blocks > main {
    margin-top: 0 !important;
}

body.home .wp-site-blocks > main > .wp-block-group {
    padding-top: 0 !important;
}


/* RaFi Home - Remove Twenty Twenty-Five top main spacing */
body.home main.wp-block-group.has-global-padding {
    margin-top: 0 !important;
}


/* =========================================================
   RaFi Home - FINAL DESKTOP LAYOUT OVERRIDE
   Balanced Community Feed + Help & Support
   ========================================================= */

.rafi-home-step1 .rafi-home-content-layout {
    width: calc(100% - 40px) !important;
    max-width: 1500px !important;
    margin: 20px auto 50px !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 350px !important;
    gap: 28px !important;
    align-items: start !important;
    box-sizing: border-box !important;
}

.rafi-home-step1 .rafi-home-main-column {
    width: 100% !important;
    min-width: 0 !important;
}

.rafi-home-step1 .rafi-home-sidebar {
    width: 350px !important;
    min-width: 350px !important;
    max-width: 350px !important;
}

@media (max-width: 1000px) {
    .rafi-home-step1 .rafi-home-content-layout {
        width: calc(100% - 30px) !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .rafi-home-step1 .rafi-home-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}
/* =========================================================
   RaFi Home Feed - Single Image FULL FILL
   No empty space - image fills the complete holder
   ========================================================= */

.rafi-home-real-feed .rafi-post-media.rafi-post-media-count-1 {
    width: 100% !important;
    height: 450px !important;

    min-height: 450px !important;
    max-height: 450px !important;

    padding: 0 !important;
    margin: 0 !important;

    overflow: hidden !important;

    display: block !important;
    position: relative !important;

    background: #f3f4f6 !important;
}

.rafi-home-real-feed .rafi-post-media.rafi-post-media-count-1 > .rafi-post-image {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    min-width: 100% !important;
    min-height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center center !important;
}
@media (max-width: 600px) {

    .rafi-home-real-feed .rafi-post-media.rafi-post-media-count-1 {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
    }

}
