
/* =========================================================
   BPP Projects Mobile Premium V3.7
   Scope: /projects only
   Desktop/tablet >= 768px remains unchanged.
   ========================================================= */

@media (max-width: 767px) {
    html:has(.bppp2) {
        overflow-x: hidden !important;
    }

    body:has(.bppp2) {
        overflow-x: hidden !important;
        padding-bottom: 92px !important;
    }

    /* ---------------------------------------------
       HERO
       --------------------------------------------- */
    .bppp2 .bppp2-container {
        width: calc(100% - 24px) !important;
        max-width: none !important;
    }

    .bppp2 .bppp2-hero {
        min-height: auto !important;
    }

    .bppp2 .bppp2-hero__inner {
        min-height: auto !important;
        padding: 22px 0 32px !important;
    }

    .bppp2 .bppp2-breadcrumb {
        margin-bottom: 10px !important;
        font-size: 10px !important;
    }

    .bppp2 .bppp2-eyebrow {
        margin-bottom: 6px !important;
        font-size: 9px !important;
        letter-spacing: .08em !important;
    }

    .bppp2 .bppp2-hero h1 {
        max-width: 100% !important;
        margin: 0 0 8px !important;
        font-size: 28px !important;
        line-height: 1.06 !important;
        letter-spacing: -.035em !important;
    }

    .bppp2 .bppp2-hero p {
        max-width: 100% !important;
        margin: 0 !important;
        font-size: 12px !important;
        line-height: 1.5 !important;
    }

    .bppp2 .bppp2-hero__art {
        display: none !important;
    }

    /* ---------------------------------------------
       MAIN SHELL
       --------------------------------------------- */
    .bppp2 .bppp2-market {
        padding-bottom: 24px !important;
    }

    .bppp2 .bppp2-shell {
        display: block !important;
        margin-top: -14px !important;
        padding: 10px !important;
        border-radius: 20px !important;
        box-shadow: 0 14px 34px rgba(17, 70, 48, .08) !important;
    }

    .bppp2 .bppp2-results {
        min-width: 0 !important;
    }

    /* ---------------------------------------------
       MOBILE TOOLBAR
       --------------------------------------------- */
    .bppp2 .bppp2-toolbar {
        min-height: 54px !important;
        margin-bottom: 12px !important;
        padding: 7px !important;
        gap: 7px !important;
        border-radius: 14px !important;
        background: #fff !important;
        border: 1px solid #deebe4 !important;
        box-shadow: none !important;
    }

    .bppp2 .bppp2-toolbar > * {
        min-width: 0 !important;
    }

    .bppp2 .bppp2-result-count {
        flex: 1 1 auto !important;
        padding-left: 5px !important;
        font-size: 10px !important;
        white-space: nowrap !important;
    }

    .bppp2 .bppp2-view-switch {
        display: none !important;
    }

    .bppp2 .bppp2-per-page {
        display: none !important;
    }

    .bppp2 .bppp2-sort {
        flex: 0 0 auto !important;
        min-width: 94px !important;
        height: 38px !important;
        padding: 0 8px !important;
        border-radius: 10px !important;
        font-size: 9px !important;
    }

    .bpp-projects-mobile-filter-btn-v37 {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        flex: 0 0 auto !important;
        min-width: 82px !important;
        height: 38px !important;
        padding: 0 10px !important;
        border: 1px solid #0aa35d !important;
        border-radius: 10px !important;
        background: #0a9f5b !important;
        color: #fff !important;
        font: inherit !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        cursor: pointer !important;
        box-shadow: 0 7px 14px rgba(7, 148, 85, .14) !important;
    }

    .bpp-projects-mobile-filter-btn-v37 svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* ---------------------------------------------
       FILTER DRAWER
       --------------------------------------------- */
    .bppp2 .bppp2-sidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        z-index: 10040 !important;
        width: min(90vw, 370px) !important;
        max-width: 370px !important;
        height: 100dvh !important;
        overflow-y: auto !important;
        margin: 0 !important;
        padding: 70px 14px 26px !important;
        background: #f7fbf9 !important;
        border: 0 !important;
        border-radius: 0 !important;
        transform: translateX(105%) !important;
        transition: transform .28s ease !important;
        box-shadow: -18px 0 46px rgba(13, 65, 44, .18) !important;
        overscroll-behavior: contain !important;
    }

    body.bpp-projects-filter-open-v37 .bppp2 .bppp2-sidebar {
        transform: translateX(0) !important;
    }

    body.bpp-projects-filter-open-v37 {
        overflow: hidden !important;
    }

    .bpp-projects-filter-overlay-v37 {
        position: fixed !important;
        inset: 0 !important;
        z-index: 10030 !important;
        display: none !important;
        background: rgba(3, 28, 19, .46) !important;
        backdrop-filter: blur(2px) !important;
    }

    body.bpp-projects-filter-open-v37 .bpp-projects-filter-overlay-v37 {
        display: block !important;
    }

    .bpp-projects-filter-drawer-head-v37 {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        z-index: 10050 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: min(90vw, 370px) !important;
        height: 58px !important;
        padding: 0 16px !important;
        background: #fff !important;
        border-bottom: 1px solid #dce9e2 !important;
        transform: translateX(105%) !important;
        transition: transform .28s ease !important;
    }

    body.bpp-projects-filter-open-v37 .bpp-projects-filter-drawer-head-v37 {
        transform: translateX(0) !important;
    }

    .bpp-projects-filter-drawer-head-v37 strong {
        color: #123127 !important;
        font-size: 15px !important;
        font-weight: 900 !important;
    }

    .bpp-projects-filter-close-v37 {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        border: 1px solid #d8e6de !important;
        border-radius: 50% !important;
        background: #f5faf7 !important;
        color: #0a6f46 !important;
        font-size: 22px !important;
        line-height: 1 !important;
        cursor: pointer !important;
    }

    .bppp2 .bppp2-filter {
        padding: 18px !important;
        border-radius: 17px !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .bppp2 .bppp2-filter__header {
        display: none !important;
    }

    /* ---------------------------------------------
       ONE CARD PER ROW — PHONE
       --------------------------------------------- */
    .bppp2 .bppp2-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
    }

    .bppp2 .bppp2-card {
        width: 100% !important;
        border-radius: 17px !important;
        overflow: hidden !important;
        border: 1px solid #dde9e2 !important;
        box-shadow: 0 7px 20px rgba(18, 68, 47, .07) !important;
        transform: none !important;
    }

    .bppp2 .bppp2-card:hover {
        transform: none !important;
    }

    .bppp2 .bppp2-card__media {
        height: 215px !important;
        min-height: 215px !important;
        border-radius: 0 !important;
    }

    .bppp2 .bppp2-card__media img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    .bppp2 .bppp2-card__body {
        padding: 14px 14px 0 !important;
    }

    .bppp2 .bppp2-card__title {
        margin: 0 0 5px !important;
        font-size: 15px !important;
        line-height: 1.25 !important;
        font-weight: 900 !important;
        letter-spacing: -.015em !important;
    }

    .bppp2 .bppp2-card__location {
        margin-bottom: 11px !important;
        font-size: 10px !important;
        line-height: 1.35 !important;
    }

    .bppp2 .bppp2-card__metrics {
        grid-template-columns: repeat(4, minmax(0,1fr)) !important;
        gap: 2px !important;
        margin: 0 0 12px !important;
        padding: 9px 5px !important;
        border-radius: 10px !important;
    }

    .bppp2 .bppp2-card__metrics > div {
        min-width: 0 !important;
        justify-content: center !important;
        gap: 3px !important;
    }

    .bppp2 .bppp2-card__metrics strong {
        font-size: 10px !important;
    }

    .bppp2 .bppp2-card__metrics small {
        font-size: 7px !important;
    }

    .bppp2 .bppp2-progress {
        margin-bottom: 13px !important;
        padding-bottom: 10px !important;
        font-size: 10px !important;
    }

    .bppp2 .bppp2-card__footer {
        display: grid !important;
        grid-template-columns: minmax(0,1fr) auto !important;
        gap: 10px !important;
        margin: 0 -14px !important;
        padding: 12px 14px 14px !important;
        align-items: end !important;
    }

    .bppp2 .bppp2-price {
        min-width: 0 !important;
    }

    .bppp2 .bppp2-price small {
        font-size: 8px !important;
    }

    .bppp2 .bppp2-price strong {
        display: block !important;
        margin-top: 3px !important;
        font-size: 10.5px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }

    .bppp2 .bppp2-view-project {
        min-width: 102px !important;
        min-height: 40px !important;
        padding: 0 12px !important;
        border-radius: 10px !important;
        font-size: 9.5px !important;
        white-space: nowrap !important;
    }

    /* ---------------------------------------------
       PAGINATION
       --------------------------------------------- */
    .bppp2 .pagination {
        margin-top: 16px !important;
        gap: 5px !important;
        justify-content: center !important;
    }

    .bppp2 .pagination .page-link {
        min-width: 34px !important;
        height: 34px !important;
        padding: 0 8px !important;
        border-radius: 9px !important;
        font-size: 10px !important;
    }

    /* ---------------------------------------------
       GLOBAL FOOTER — MOBILE ACCORDION PARITY
       --------------------------------------------- */
    .rpg-market-footer {
        padding-bottom: 116px !important;
    }

    .rpg-market-footer__inner,
    .rpg-market-footer .container {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .rpg-market-footer__grid {
        display: block !important;
    }

    .rpg-market-footer__brand {
        margin-bottom: 24px !important;
    }

    .rpg-market-footer__col {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border-top: 1px solid rgba(255,255,255,.17) !important;
    }

    .rpg-market-footer__col h4 {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 64px !important;
        margin: 0 !important;
        padding: 0 48px 0 0 !important;
        color: #fff !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        cursor: pointer !important;
    }

    .rpg-market-footer__col h4::after {
        content: "+" !important;
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        height: 36px !important;
        transform: translateY(-50%) !important;
        border-radius: 50% !important;
        background: rgba(255,255,255,.10) !important;
        color: #fff !important;
        font-size: 22px !important;
        line-height: 1 !important;
    }

    .rpg-market-footer__col.is-bpp-projects-open-v37 h4::after {
        content: "−" !important;
    }

    .rpg-market-footer__col > a {
        display: none !important;
        margin: 0 !important;
        padding: 8px 0 !important;
        color: rgba(255,255,255,.78) !important;
        font-size: 13px !important;
    }

    .rpg-market-footer__col.is-bpp-projects-open-v37 > a {
        display: block !important;
    }

    .rpg-market-footer__col.is-bpp-projects-open-v37 {
        padding-bottom: 12px !important;
    }

    .rpg-market-footer__newsletter {
        margin-top: 24px !important;
        padding-top: 0 !important;
    }

    .rpg-market-footer__newsletter h4 {
        margin-bottom: 10px !important;
        font-size: 15px !important;
    }

    .rpg-market-footer__newsletter p {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    .rpg-market-footer__newsletter-form {
        display: grid !important;
        grid-template-columns: 1fr 54px !important;
        width: 100% !important;
    }

    .rpg-market-footer__newsletter-form input,
    .rpg-market-footer__newsletter-form button {
        height: 50px !important;
    }

    .rpg-market-footer__bottom {
        display: block !important;
        margin-top: 28px !important;
        padding-top: 20px !important;
        font-size: 11px !important;
        line-height: 1.5 !important;
    }

    .rpg-market-footer__bottom > * {
        display: block !important;
        margin-bottom: 7px !important;
    }

    /* ---------------------------------------------
       FIXED MOBILE BOTTOM NAV
       --------------------------------------------- */
    .bpp-projects-mobile-bottom-v37 {
        position: fixed !important;
        left: 14px !important;
        right: 14px !important;
        bottom: 12px !important;
        z-index: 10020 !important;
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        min-height: 70px !important;
        padding: 7px !important;
        border: 1px solid rgba(6,76,50,.10) !important;
        border-radius: 22px !important;
        background: rgba(255,255,255,.97) !important;
        box-shadow: 0 16px 34px rgba(8,47,33,.16) !important;
        backdrop-filter: blur(14px) !important;
    }

    .bpp-projects-mobile-bottom-v37 a {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        min-width: 0 !important;
        color: #5f6e66 !important;
        text-decoration: none !important;
        font-size: 10px !important;
        font-weight: 800 !important;
    }

    .bpp-projects-mobile-bottom-v37 a strong {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 12px !important;
        background: #eff8f3 !important;
        color: #079455 !important;
        font-size: 20px !important;
        line-height: 1 !important;
        font-weight: 500 !important;
    }

    .bpp-projects-mobile-bottom-v37 a[aria-current="page"] {
        color: #08784a !important;
    }
}

/* Tablet remains 2-column but less compressed than phone */
@media (min-width: 768px) and (max-width: 900px) {
    .bppp2 .bppp2-grid {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    }
}
