/* ================================================================
   PoliticalLeaderPortal - HOME BRAND BAR v9
   Compact warm-white middle header.
   Owns ONLY:
   - Brand image
   - Visitor counter
   - Become a Member
   - Suggestion CTA

   Changes v9:
   - Brandbar background matched with logo artwork
   - Become a Member text cropping fixed
   - CTA dimensions rebalanced
   - Responsive sizing improved
   ================================================================ */


/* ================================================================
   1. MAIN BRAND BAR
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar {
    height: 84px;
    min-height: 84px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Matches the warm/off-white background of the logo image */
    background-color: #fffaf5;
    border: 0;
    border-bottom: 1px solid #eee5dd;
}


/* ================================================================
   2. INNER LAYOUT
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar__inner {
    width: 100%;
    max-width: none;
    height: 84px;
    min-height: 84px;
    margin: 0;
    padding: 0 28px 0 30px;
    display: grid;
    /*
        Left  = Sangeet Som branding
        Right = Visitor + Member + Suggestion
    */
    grid-template-columns: minmax(430px, 1fr) auto;
    align-items: center;
    gap: 24px;
    /* Must match parent so logo image merges naturally */
    background-color: #f7f7f1;
    box-sizing: border-box;
}


/* ================================================================
   3. BRAND IDENTITY
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar__identity {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    align-items: center;
    color: inherit;
    background: transparent;
    text-decoration: none;
    overflow: visible;
}

    .public-home-layout .home-app-header .campaign-brandbar__identity:hover,
    .public-home-layout .home-app-header .campaign-brandbar__identity:focus {
        color: inherit;
        background: transparent;
        text-decoration: none;
    }


/* Main Sangeet Som image */
.public-home-layout .home-app-header .campaign-brandbar__brand-image {
    display: block;
    width: 470px;
    max-width: 100%;
    height: 74px;
    margin: 0;
    padding: 0;
    object-fit: contain;
    object-position: left center;
    background: transparent;
    border: 0;
}


/* ================================================================
   4. RIGHT ACTION CLUSTER
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar__actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
}


/* Decorative diamond not required */
.public-home-layout .home-app-header .campaign-brandbar__diamond {
    display: none;
}


/* ================================================================
   5. VISITOR COUNTER
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar__visitor {
    flex: 0 0 142px;
    width: 142px;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    color: #333a40;
    background: #ffffff;
    border: 1px solid #eee7e2;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(72, 54, 39, .08);
    box-sizing: border-box;
    overflow: hidden;
}


/* Visitor icon */
.public-home-layout .home-app-header .campaign-brandbar__visitor-icon {
    flex: 0 0 auto;
    color: #ef660d;
    font-size: 18px;
    line-height: 1;
}


/* Visitor copy */
.public-home-layout .home-app-header .campaign-brandbar__visitor-copy {
    min-width: 0;
    display: grid;
    align-content: center;
    line-height: 1;
}


    /* Visitor small label */
    .public-home-layout .home-app-header .campaign-brandbar__visitor-copy > small {
        margin: 0 0 3px;
        color: #6f777c;
        font-size: 9px;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
    }


/* Remove nested homepage hit counter layout */
.public-home-layout .home-app-header .campaign-brandbar__visitor .home-hit-counter-section,
.public-home-layout .home-app-header .campaign-brandbar__visitor .home-hit-counter-card {
    display: contents;
    margin: 0;
    padding: 0;
    background: transparent;
}


    /* Hide extra counter caption */
    .public-home-layout .home-app-header .campaign-brandbar__visitor .home-hit-counter-card > span {
        display: none;
    }


    /* Actual count */
    .public-home-layout .home-app-header .campaign-brandbar__visitor .home-hit-counter-card > strong {
        margin: 0;
        padding: 0;
        color: #20272c;
        font-size: 16px;
        font-weight: 800;
        line-height: 1;
        white-space: nowrap;
    }


/* ================================================================
   6. SHARED CTA BASE
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar__member,
.public-home-layout .home-app-header .campaign-brandbar__suggestion {
    flex: 0 0 auto;
    height: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 9px rgba(50, 50, 50, .10);
    cursor: pointer;
    box-sizing: border-box;
    overflow: visible;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}


/* ================================================================
   7. MEMBER BUTTON
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar__member {
    /*
        Previous 124px was too small and clipped:
        "Become a Member" -> "Become a Mem"
    */
    width: 154px;
    min-width: 154px;
    background: linear-gradient( 180deg, #ff6508 0%, #f35a00 100% );
}


/* ================================================================
   8. SUGGESTION BUTTON
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar__suggestion {
    width: 138px;
    min-width: 138px;
    background: linear-gradient( 180deg, #16833f 0%, #0f7135 100% );
}


    /* ================================================================
   9. CTA HOVER
   ================================================================ */

    .public-home-layout .home-app-header .campaign-brandbar__member:hover,
    .public-home-layout .home-app-header .campaign-brandbar__member:focus,
    .public-home-layout .home-app-header .campaign-brandbar__suggestion:hover,
    .public-home-layout .home-app-header .campaign-brandbar__suggestion:focus {
        color: #ffffff;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 6px 12px rgba(50, 50, 50, .14);
        filter: brightness(.98);
    }


/* ================================================================
   10. CTA ICONS
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar__member-icon,
.public-home-layout .home-app-header .campaign-brandbar__suggestion-icon {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
}


/* ================================================================
   11. CTA TEXT WRAPPER
   ================================================================ */

.public-home-layout .home-app-header .campaign-brandbar__member-copy,
.public-home-layout .home-app-header .campaign-brandbar__suggestion-copy {
    min-width: 0;
    width: auto;
    display: grid;
    align-content: center;
    text-align: left;
    line-height: 1;
    overflow: visible;
}


    /* ================================================================
   12. CTA MAIN TEXT
   ================================================================ */

    .public-home-layout .home-app-header .campaign-brandbar__member-copy strong,
    .public-home-layout .home-app-header .campaign-brandbar__suggestion-copy strong {
        display: block;
        margin: 0;
        padding: 0;
        color: #ffffff;
        font-family: "Noto Sans Devanagari", "Mangal", "Nirmala UI", Arial, sans-serif;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.05;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
    }


    /* Make English member text fit comfortably */
    .public-home-layout .home-app-header .campaign-brandbar__member-copy strong {
        font-family: Inter, Arial, sans-serif;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: -.1px;
    }


    /* ================================================================
   13. CTA SECONDARY TEXT
   ================================================================ */

    .public-home-layout .home-app-header .campaign-brandbar__member-copy small,
    .public-home-layout .home-app-header .campaign-brandbar__suggestion-copy small {
        display: block;
        margin: 3px 0 0;
        padding: 0;
        color: rgba(255, 255, 255, .96);
        font-family: Arial, sans-serif;
        font-size: 7px;
        font-weight: 700;
        line-height: 1;
        letter-spacing: .1px;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
    }


/* ================================================================
   14. LARGE TABLET / SMALL DESKTOP
   ================================================================ */

@media (max-width: 1199.98px) {

    .public-home-layout .home-app-header .campaign-brandbar__inner {
        padding-inline: 20px;
        grid-template-columns: minmax(365px, 1fr) auto;
        gap: 12px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__brand-image {
        width: 390px;
        height: 65px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__visitor {
        flex-basis: 128px;
        width: 128px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__member {
        width: 140px;
        min-width: 140px;
        padding-inline: 10px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__suggestion {
        width: 124px;
        min-width: 124px;
        padding-inline: 9px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__member-copy strong {
        font-size: 11px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__suggestion-copy strong {
        font-size: 12px;
    }
}


/* ================================================================
   15. TABLET
   ================================================================ */

@media (max-width: 991.98px) {

    .public-home-layout .home-app-header .campaign-brandbar,
    .public-home-layout .home-app-header .campaign-brandbar__inner {
        height: 72px;
        min-height: 72px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__inner {
        padding: 0 14px;
        grid-template-columns: 1fr auto;
        gap: 10px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__brand-image {
        width: 315px;
        height: 58px;
    }


    /*
        Hide Visitor + Suggestion on tablet.
        Keep Member CTA visible.
    */
    .public-home-layout .home-app-header .campaign-brandbar__visitor,
    .public-home-layout .home-app-header .campaign-brandbar__suggestion {
        display: none;
    }


    .public-home-layout .home-app-header .campaign-brandbar__member {
        width: 136px;
        min-width: 136px;
        height: 40px;
        min-height: 40px;
        padding: 0 10px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__member-copy strong {
        font-size: 11px;
    }
}


/* ================================================================
   16. MOBILE
   ================================================================ */

@media (max-width: 575.98px) {

    .public-home-layout .home-app-header .campaign-brandbar,
    .public-home-layout .home-app-header .campaign-brandbar__inner {
        height: 64px;
        min-height: 64px;
    }


    .public-home-layout .home-app-header .campaign-brandbar__inner {
        grid-template-columns: 1fr;
        padding-inline: 10px;
    }


    /* Mobile navbar handles actions separately */
    .public-home-layout .home-app-header .campaign-brandbar__actions {
        display: none;
    }


    .public-home-layout .home-app-header .campaign-brandbar__brand-image {
        width: min(100%, 285px);
        height: 52px;
    }
}


/* ================================================================
   FINAL DESKTOP CTA FIX - v11
   Force full "Become a Member" label to stay inside the button.
   Keep this block at the VERY END of the file.
   ================================================================ */

@media (min-width: 992px) {

    .public-home-layout .home-app-header .campaign-brandbar__actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 12px !important;
        overflow: visible !important;
    }

    .public-home-layout .home-app-header .campaign-brandbar__member {
        width: 190px !important;
        min-width: 190px !important;
        max-width: 190px !important;
        flex: 0 0 190px !important;
        height: 46px !important;
        min-height: 46px !important;
        padding: 0 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 9px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .public-home-layout .home-app-header .campaign-brandbar__suggestion {
        width: 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
        flex: 0 0 170px !important;
        height: 46px !important;
        min-height: 46px !important;
        padding: 0 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 9px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .public-home-layout .home-app-header .campaign-brandbar__member-icon,
    .public-home-layout .home-app-header .campaign-brandbar__suggestion-icon {
        width: 27px !important;
        min-width: 27px !important;
        max-width: 27px !important;
        flex: 0 0 27px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 19px !important;
        line-height: 1 !important;
    }

    .public-home-layout .home-app-header .campaign-brandbar__member-copy,
    .public-home-layout .home-app-header .campaign-brandbar__suggestion-copy {
        min-width: 0 !important;
        width: auto !important;
        max-width: calc(100% - 36px) !important;
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

        .public-home-layout .home-app-header .campaign-brandbar__member-copy strong {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            color: #fff !important;
            font-family: Inter, Arial, sans-serif !important;
            font-size: 13px !important;
            font-weight: 800 !important;
            line-height: 1.05 !important;
            letter-spacing: -.15px !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: clip !important;
            box-sizing: border-box !important;
        }

        .public-home-layout .home-app-header .campaign-brandbar__suggestion-copy strong {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            font-size: 13px !important;
            font-weight: 800 !important;
            line-height: 1.05 !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: clip !important;
            box-sizing: border-box !important;
        }

        .public-home-layout .home-app-header .campaign-brandbar__member-copy small,
        .public-home-layout .home-app-header .campaign-brandbar__suggestion-copy small {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            margin: 3px 0 0 !important;
            padding: 0 !important;
            font-size: 7px !important;
            line-height: 1 !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: clip !important;
            box-sizing: border-box !important;
        }
}

/* Medium screens: still keep complete label visible */
@media (min-width: 992px) and (max-width: 1199.98px) {

    .public-home-layout .home-app-header .campaign-brandbar__member {
        width: 176px !important;
        min-width: 176px !important;
        max-width: 176px !important;
        flex-basis: 176px !important;
    }

    .public-home-layout .home-app-header .campaign-brandbar__suggestion {
        width: 155px !important;
        min-width: 155px !important;
        max-width: 155px !important;
        flex-basis: 155px !important;
    }

    .public-home-layout .home-app-header .campaign-brandbar__member-copy strong,
    .public-home-layout .home-app-header .campaign-brandbar__suggestion-copy strong {
        font-size: 12px !important;
    }
}
