{"id":44,"date":"2024-04-01T19:25:59","date_gmt":"2024-04-01T19:25:59","guid":{"rendered":"https:\/\/www.buddyupgo.com\/pinnacle-slate-homepage\/"},"modified":"2026-04-07T18:46:48","modified_gmt":"2026-04-07T18:46:48","slug":"pinnacle-slate-homepage","status":"publish","type":"page","link":"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/","title":{"rendered":"Home"},"content":{"rendered":"<div class=\"buddyUpPjaxContainer\" data-buddyup-pjax-container=\"1\"><style>#buddyUpHomeLanding {\n    max-width: none;\n    margin: 0 auto;\n    padding: calc(env(safe-area-inset-top, 0px) + .6rem) .65rem calc(var(--buddyup-mobile-nav-height, 70px) + env(safe-area-inset-bottom, 0px) + 1rem);\n    --for-you-card-radius: 14px;\n    box-sizing: border-box;\n    overflow-x: clip;\n}\n\n.buddyUpHomeLandingAnonView.hidden,\n.buddyUpForYouView.hidden {\n    display: none;\n}\n\n.buddyUpHomeLandingHero {\n    background: linear-gradient(145deg, #f2f8ff 0%, #ffffff 46%, #eefbf7 100%);\n    border: 1px solid rgba(0, 0, 0, .08);\n    border-radius: 14px;\n    box-shadow: 0 14px 30px rgba(0, 0, 0, .08);\n    padding: 1rem;\n    margin-bottom: 1rem;\n    display: flex;\n    justify-content: center;\n}\n\n.buddyUpHomeLandingHeroInner {\n    width: min(760px, 100%);\n    text-align: left;\n}\n\n.buddyUpHomeLandingLogoWrap {\n    text-align: center;\n    margin: 0 0 .65rem;\n}\n\n.buddyUpHomeLandingLogo {\n    max-width: 240px;\n    width: min(78vw, 240px);\n    height: auto;\n}\n\n.buddyUpHomeLandingHero h1 {\n    margin: 0 0 .45rem;\n    line-height: 1.18;\n}\n\n.buddyUpHomeLandingLead {\n    margin: 0;\n    max-width: 65ch;\n    line-height: 1.45;\n}\n\n.buddyUpHomeLandingActions {\n    display: flex;\n    flex-wrap: wrap;\n    gap: .6rem;\n    margin-top: 1rem;\n}\n\n.buddyUpHomeLandingWidget {\n    background: #fff;\n    border: 1px solid rgba(0, 0, 0, .08);\n    border-radius: 14px;\n    box-shadow: 0 8px 22px rgba(0, 0, 0, .06);\n    overflow: hidden;\n}\n\n.buddyUpForYouView {\n    display: grid;\n    gap: .8rem;\n    min-width: 0;\n}\n\n.buddyUpForYouHeader {\n    border: 1px solid rgba(0, 0, 0, .08);\n    border-radius: var(--for-you-card-radius);\n    background: linear-gradient(160deg, #f4f9ff 0%, #ffffff 62%, #ecfbf3 100%);\n    box-shadow: 0 10px 28px rgba(0, 0, 0, .08);\n    padding: .9rem;\n    display: flex;\n    flex-direction: column;\n    align-items: stretch;\n    gap: .75rem;\n}\n\n.buddyUpForYouHeaderText {\n    flex: 1;\n    min-width: 0;\n}\n\n.buddyUpForYouEyebrow {\n    font-size: .72rem;\n    text-transform: uppercase;\n    letter-spacing: .14em;\n    font-weight: 700;\n    color: #2e598f;\n    margin-bottom: .35rem;\n}\n\n.buddyUpForYouHeaderText h1 {\n    margin: 0 0 .25rem;\n    line-height: 1.15;\n}\n\n.buddyUpForYouHeaderText p {\n    margin: 0;\n    max-width: 72ch;\n    line-height: 1.4;\n}\n\n.buddyUpForYouMiniProfile {\n    width: 100%;\n    background: rgba(255, 255, 255, .96);\n    border: 1px solid rgba(0, 0, 0, .08);\n    border-radius: 12px;\n    padding: .75rem;\n    display: flex;\n    gap: .7rem;\n    align-items: center;\n}\n\n.buddyUpForYouMiniAvatar {\n    height: 72px;\n    width: 72px;\n    border-radius: 50%;\n    border: 2px solid #fff;\n    box-shadow: 0 5px 12px rgba(0, 0, 0, .16);\n    object-fit: cover;\n    background: #dbe7f8;\n}\n\n.buddyUpForYouMiniMeta {\n    min-width: 0;\n    flex: 1;\n}\n\n.buddyUpForYouMiniName {\n    font-weight: 700;\n    line-height: 1.2;\n    margin-bottom: .2rem;\n}\n\n.buddyUpForYouMiniHint {\n    font-size: .84rem;\n    opacity: .85;\n    line-height: 1.28;\n}\n\n.buddyUpForYouMiniLink {\n    margin-top: .4rem;\n    font-size: .84rem;\n}\n\n.buddyUpForYouStatus {\n    font-size: .92rem;\n    opacity: .84;\n    margin: 0;\n    padding: 0 .15rem;\n}\n\n.buddyUpForYouRail {\n    background: #fff;\n    border: 1px solid rgba(0, 0, 0, .08);\n    border-radius: var(--for-you-card-radius);\n    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);\n    padding: .7rem;\n    min-width: 0;\n    box-sizing: border-box;\n}\n\n.buddyUpForYouRailHead {\n    display: flex;\n    flex-direction: column;\n    justify-content: flex-start;\n    align-items: flex-start;\n    gap: .35rem;\n    margin-bottom: .55rem;\n}\n\n.buddyUpForYouRailHead h2 {\n    margin: 0;\n    font-size: 1.08rem;\n}\n\n.buddyUpForYouRailTrack {\n    display: grid;\n    grid-auto-flow: column;\n    grid-auto-columns: minmax(82vw, 82vw);\n    gap: .66rem;\n    overflow-x: auto;\n    padding: 0 .05rem .35rem;\n    scroll-snap-type: x mandatory;\n    scroll-padding-left: .05rem;\n    overscroll-behavior-x: contain;\n    -webkit-overflow-scrolling: touch;\n    touch-action: pan-x;\n    min-width: 0;\n    max-width: 100%;\n    box-sizing: border-box;\n}\n\n.buddyUpForYouRailTrack > .buddyUpForYouRailCard:nth-child(n + 4) {\n    display: none;\n}\n\n.buddyUpForYouRailCard {\n    border: 1px solid rgba(0, 0, 0, .1);\n    border-radius: 12px;\n    overflow: hidden;\n    background: #fff;\n    color: inherit;\n    text-decoration: none;\n    display: flex;\n    flex-direction: column;\n    min-height: 228px;\n    min-width: 0;\n    scroll-snap-align: start;\n    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;\n    box-sizing: border-box;\n}\n\n.buddyUpForYouRailCard:hover {\n    transform: translateY(-2px);\n    box-shadow: 0 10px 18px rgba(0, 0, 0, .14);\n    border-color: rgba(32, 90, 180, .35);\n}\n\n.buddyUpForYouRailCardMedia {\n    height: 144px;\n    width: 100%;\n    object-fit: cover;\n    background: #e2ebf8;\n}\n\n.buddyUpForYouRailCardBody {\n    padding: .66rem .68rem .78rem;\n    display: grid;\n    gap: .34rem;\n}\n\n.buddyUpForYouRailCardTag {\n    font-size: .7rem;\n    text-transform: uppercase;\n    letter-spacing: .07em;\n    font-weight: 700;\n    color: #2d5b95;\n}\n\n.buddyUpForYouRailCardTitle {\n    font-size: .96rem;\n    line-height: 1.28;\n    font-weight: 700;\n    overflow-wrap: anywhere;\n}\n\n.buddyUpForYouRailCardMeta {\n    font-size: .82rem;\n    opacity: .82;\n    line-height: 1.28;\n    overflow-wrap: anywhere;\n}\n\n.buddyUpForYouRailCardScore {\n    margin-top: .2rem;\n    font-size: .76rem;\n    font-weight: 700;\n    color: #226f45;\n}\n\n.buddyUpForYouEmpty {\n    border: 1px dashed rgba(0, 0, 0, .18);\n    border-radius: 10px;\n    padding: .9rem;\n    font-size: .88rem;\n    opacity: .86;\n}\n\n.buddyup-home-landing-anon #buddyUpTopNav,\n.buddyup-home-landing-anon #pinnacleHeader {\n    display: none !important;\n}\n\n@media (max-width: 480px) {\n    #buddyUpHomeLanding {\n        padding-left: .45rem;\n        padding-right: .45rem;\n    }\n\n    .buddyUpHomeLandingHero,\n    .buddyUpForYouHeader,\n    .buddyUpForYouRail,\n    .buddyUpHomeLandingWidget {\n        border-radius: 12px;\n    }\n\n    .buddyUpForYouHeaderText h1 {\n        font-size: 1.45rem;\n    }\n\n    .buddyUpForYouMiniAvatar {\n        width: 60px;\n        height: 60px;\n    }\n\n    .buddyUpForYouRailTrack {\n        grid-auto-flow: row;\n        grid-template-columns: 1fr;\n        grid-auto-columns: unset;\n        overflow: visible;\n        padding: 0;\n        scroll-snap-type: none;\n        scroll-padding-left: 0;\n        overscroll-behavior-x: auto;\n        -webkit-overflow-scrolling: auto;\n        touch-action: auto;\n    }\n\n    .buddyUpForYouRailCard {\n        min-height: 0;\n    }\n}\n\n@media (min-width: 481px) and (max-width: 680px) {\n    .buddyUpForYouRailTrack {\n        grid-auto-flow: row;\n        grid-template-columns: repeat(2, minmax(0, 1fr));\n        grid-auto-columns: unset;\n        overflow: visible;\n        padding: 0;\n        scroll-snap-type: none;\n        scroll-padding-left: 0;\n        overscroll-behavior-x: auto;\n        -webkit-overflow-scrolling: auto;\n        touch-action: auto;\n        align-items: stretch;\n    }\n\n    .buddyUpForYouRailCard {\n        min-height: 100%;\n    }\n\n    .buddyUpForYouRailCardMedia {\n        height: 108px;\n    }\n\n    .buddyUpForYouRailCardTitle {\n        font-size: .88rem;\n    }\n\n    .buddyUpForYouRailCardMeta {\n        font-size: .76rem;\n    }\n}\n\n@media (min-width: 681px) and (max-width: 1024px) {\n    #buddyUpHomeLanding {\n        padding: .9rem .9rem 1.7rem;\n    }\n\n    .buddyUpForYouHeader {\n        padding: 1rem;\n        flex-direction: row;\n        gap: .8rem;\n        flex-wrap: wrap;\n    }\n\n    .buddyUpForYouHeaderText {\n        min-width: 240px;\n    }\n\n    .buddyUpForYouMiniProfile {\n        width: min(100%, 340px);\n        padding: .8rem;\n    }\n\n    .buddyUpForYouRailHead {\n        flex-direction: row;\n        justify-content: space-between;\n        align-items: center;\n        gap: .6rem;\n    }\n\n    .buddyUpForYouRailTrack {\n        grid-auto-flow: row;\n        grid-template-columns: repeat(3, minmax(0, 1fr));\n        grid-auto-columns: unset;\n        overflow: visible;\n        padding: 0;\n        scroll-snap-type: none;\n        scroll-padding-left: 0;\n        overscroll-behavior-x: auto;\n        -webkit-overflow-scrolling: auto;\n        touch-action: auto;\n        align-items: stretch;\n    }\n\n    .buddyUpForYouRailTrack > .buddyUpForYouRailCard:nth-child(n + 4) {\n        display: none;\n    }\n\n    .buddyUpForYouRailCard {\n        min-height: 100%;\n    }\n\n    .buddyUpForYouRailCardMedia {\n        height: 118px;\n    }\n}\n\n@media (min-width: 1025px) {\n    #buddyUpHomeLanding {\n        padding: 1rem 1rem 2rem;\n    }\n\n    .buddyUpHomeLandingHero {\n        padding: 1.5rem;\n    }\n\n    .buddyUpHomeLandingLogo {\n        max-width: 320px;\n        width: min(70vw, 320px);\n    }\n\n    .buddyUpForYouHeader {\n        padding: 1rem;\n        flex-direction: row;\n        gap: .8rem;\n        flex-wrap: wrap;\n    }\n\n    .buddyUpForYouHeaderText {\n        min-width: 250px;\n    }\n\n    .buddyUpForYouMiniProfile {\n        width: min(100%, 360px);\n        padding: .8rem;\n    }\n\n    .buddyUpForYouRail {\n        padding: .75rem;\n    }\n\n    .buddyUpForYouRailHead {\n        flex-direction: row;\n        justify-content: space-between;\n        align-items: center;\n        gap: .6rem;\n    }\n\n    .buddyUpForYouRailTrack {\n        grid-auto-columns: minmax(220px, 1fr);\n        padding-bottom: .3rem;\n    }\n\n    .buddyUpForYouRailTrack > .buddyUpForYouRailCard:nth-child(n + 4) {\n        display: flex;\n    }\n\n    .buddyUpForYouRailCard {\n        min-height: 248px;\n    }\n\n    .buddyUpForYouRailCardMedia {\n        height: 128px;\n    }\n}\n<\/style>\n<section id=\"buddyUpHomeLanding\" class=\"buddyUpContainer\">\n    <div class=\"buddyUpHomeLandingAnonView\">\n        <div class=\"buddyUpHomeLandingHero\">\n            <div class=\"buddyUpHomeLandingHeroInner\">\n                <div class=\"buddyUpHomeLandingLogoWrap\">\n                    <img decoding=\"async\" src=\"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/wp-content\/uploads\/buddyupgo-logo.png\" alt=\"My WordPress\" class=\"buddyUpHomeLandingLogo\" \/>\n                <\/div>\n\n                <h1>Explore the community before you join in.<\/h1>\n                <p class=\"buddyUpHomeLandingLead\">Browse a live snapshot of events, groups, and adventures. Create a free account to connect, message, and participate.<\/p>\n\n                <div class=\"buddyUpHomeLandingActions buddyUpHomeLandingLoggedOut\">\n                    <a class=\"buddyUpButton3\" href=\"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/login\/\">Log In<\/a>\n                    <a class=\"buddyUpButton1\" href=\"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/register\/\">Create a Free Account<\/a>\n                <\/div>\n\n                <div class=\"buddyUpHomeLandingActions buddyUpHomeLandingLoggedIn hidden\">\n                    <a class=\"buddyUpButton1\" href=\"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/\">Go to Your Home<\/a>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <div class=\"buddyUpHomeLandingWidget\">\n            <div class=\"buddyUpPjaxContainer\" data-buddyup-pjax-container=\"1\"><style>#buddyUpExploreWidget {\n    padding: .6rem;\n}\n\n.buddyUpExploreWidgetTopbar {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    gap: .8rem;\n    flex-wrap: wrap;\n    margin-bottom: .5rem;\n}\n\n.buddyUpExploreWidgetTopbar h3 {\n    margin: .2rem 0;\n}\n\n.buddyUpExploreWidgetActions {\n    display: flex;\n    gap: .55rem;\n    align-items: center;\n    flex-wrap: wrap;\n}\n\n.buddyUpExploreWidgetModes {\n    display: inline-flex;\n    gap: .3rem;\n    background: #edf2fb;\n    border-radius: 999px;\n    padding: .22rem;\n}\n\n.buddyUpExploreWidgetMode {\n    border: none;\n    background: transparent;\n    border-radius: 999px;\n    padding: .38rem .76rem;\n    font-weight: 700;\n    font-size: .84rem;\n    cursor: pointer;\n    margin: 0;\n    color: #2a3b5f;\n}\n\n.buddyUpExploreWidgetMode.isActive {\n    background: #1d5fd0;\n    color: #fff;\n}\n\n.buddyUpExploreWidgetStatus {\n    opacity: .85;\n    margin: .15rem 0 .5rem;\n    font-size: .92rem;\n}\n\n.buddyUpExploreWidgetShell {\n    display: grid;\n    grid-template-columns: 280px minmax(0, 1fr);\n    gap: .75rem;\n    align-items: stretch;\n}\n\n.buddyUpExploreWidgetSidebar {\n    border: 1px solid rgba(11, 37, 91, .14);\n    border-radius: 12px;\n    background: linear-gradient(180deg, #f6f9ff 0%, #eef4ff 100%);\n    padding: .7rem;\n    display: flex;\n    flex-direction: column;\n    gap: .6rem;\n}\n\n.buddyUpExploreWidgetFilterCard {\n    background: #fff;\n    border: 1px solid rgba(12, 50, 120, .1);\n    border-radius: 10px;\n    padding: .6rem;\n}\n\n.buddyUpExploreWidgetFilterCard label,\n.buddyUpExploreWidgetFilterHeading {\n    font-size: .86rem;\n    font-weight: 700;\n    display: block;\n    margin-bottom: .35rem;\n}\n\n.buddyUpExploreWidgetFilterCard input[type=\"text\"] {\n    width: 100%;\n    margin: 0;\n}\n\n.buddyUpExploreWidgetPills {\n    display: flex;\n    flex-wrap: wrap;\n    gap: .35rem;\n}\n\n.buddyUpExploreWidgetPill {\n    border: 1px solid rgba(14, 56, 129, .2);\n    background: #f3f8ff;\n    color: #214278;\n    font-size: .74rem;\n    line-height: 1.2;\n    padding: .3rem .55rem;\n    border-radius: 999px;\n    cursor: pointer;\n    font-weight: 700;\n}\n\n.buddyUpExploreWidgetPill.isActive {\n    background: #1d5fd0;\n    border-color: #1d5fd0;\n    color: #fff;\n}\n\n.buddyUpExploreWidgetRangeRow {\n    display: flex;\n    align-items: center;\n    gap: .4rem;\n    margin-bottom: .35rem;\n}\n\n.buddyUpExploreWidgetRangeRow input[type=\"range\"] {\n    margin: 0;\n    flex: 1;\n}\n\n.buddyUpExploreWidgetJoinCta {\n    width: 100%;\n    text-align: center;\n}\n\n.buddyUpExploreWidgetMap {\n    width: 100%;\n    min-height: min(74vh, 860px);\n    border-radius: 12px;\n    border: 1px solid rgba(12, 50, 120, .16);\n    overflow: hidden;\n}\n\n.buddyUpExploreWidgetPin {\n    width: 66px;\n    height: 52px;\n    position: relative;\n    border-radius: 12px;\n    border: 2px solid rgba(255, 255, 255, .95);\n    box-shadow: 0 7px 14px rgba(0, 0, 0, .25);\n    overflow: hidden;\n    background: #0d3f94;\n}\n\n.buddyUpExploreWidgetPin img {\n    width: 100%;\n    height: 100%;\n    object-fit: cover;\n    display: block;\n}\n\n.buddyUpExploreWidgetPin::after {\n    content: '';\n    position: absolute;\n    bottom: -8px;\n    left: 24px;\n    width: 14px;\n    height: 14px;\n    background: #154db0;\n    transform: rotate(45deg);\n    border-radius: 2px;\n    box-shadow: 0 3px 6px rgba(0, 0, 0, .18);\n}\n\n.buddyUpExploreWidgetPin.pin-events::after {\n    background: #dd7f00;\n}\n\n.buddyUpExploreWidgetPin.pin-groups::after {\n    background: #26764b;\n}\n\n.buddyUpExploreWidgetPopupTitle {\n    font-weight: 700;\n    margin-bottom: .2rem;\n}\n\n@media (max-width: 980px) {\n    .buddyUpExploreWidgetShell {\n        grid-template-columns: 1fr;\n    }\n\n    .buddyUpExploreWidgetSidebar {\n        order: 2;\n    }\n\n    .buddyUpExploreWidgetMap {\n        order: 1;\n        min-height: 58vh;\n    }\n}\n<\/style><section id=\"buddyUpExploreWidget\" class=\"buddyUpElWrapper\">\n    <div class=\"buddyUpExploreWidgetTopbar\">\n        <h3>Explore Preview<\/h3>\n        <div class=\"buddyUpExploreWidgetActions\">\n            <div class=\"buddyUpExploreWidgetModes\" role=\"tablist\" aria-label=\"Explore mode\">\n                <button type=\"button\" class=\"buddyUpExploreWidgetMode isActive\" data-mode=\"adventures\" role=\"tab\" aria-selected=\"true\">Adventures<\/button>\n                <button type=\"button\" class=\"buddyUpExploreWidgetMode\" data-mode=\"events\" role=\"tab\" aria-selected=\"false\">Events<\/button>\n                <button type=\"button\" class=\"buddyUpExploreWidgetMode\" data-mode=\"groups\" role=\"tab\" aria-selected=\"false\">Groups<\/button>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <div id=\"buddyUpExploreWidgetStatus\" class=\"buddyUpExploreWidgetStatus\">Loading map preview...<\/div>\n\n    <div class=\"buddyUpExploreWidgetShell\">\n        <aside class=\"buddyUpExploreWidgetSidebar\" aria-label=\"Explore filters preview\">\n            <div class=\"buddyUpExploreWidgetFilterCard\">\n                <label for=\"buddyUpExploreWidgetSearch\">Search<\/label>\n                <input id=\"buddyUpExploreWidgetSearch\" type=\"text\" placeholder=\"Search by title or place\" \/>\n            <\/div>\n\n            <div class=\"buddyUpExploreWidgetFilterCard\">\n                <div class=\"buddyUpExploreWidgetFilterHeading\">Popular Interests<\/div>\n                <div id=\"buddyUpExploreWidgetCategories\" class=\"buddyUpExploreWidgetPills\"><\/div>\n            <\/div>\n\n            <div class=\"buddyUpExploreWidgetFilterCard\">\n                <div class=\"buddyUpExploreWidgetFilterHeading\">Nearby<\/div>\n                <div class=\"buddyUpExploreWidgetRangeRow\">\n                    <input id=\"buddyUpExploreWidgetRadius\" type=\"range\" min=\"5\" max=\"100\" step=\"5\" value=\"25\" \/>\n                    <span id=\"buddyUpExploreWidgetRadiusLabel\">25 mi<\/span>\n                <\/div>\n                <div class=\"textSmall\">Preview filter controls. Join free to unlock full interaction.<\/div>\n            <\/div>\n\n            <a href=\"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/register\/\" class=\"buddyUpButton1 buddyUpExploreWidgetJoinCta\">Join FREE to Connect<\/a>\n        <\/aside>\n\n        <div id=\"buddyUpExploreWidgetMap\" class=\"buddyUpExploreWidgetMap\" aria-label=\"Explore map preview\"><\/div>\n    <\/div>\n<\/section>\n<script>(async function(){\n    const wrapper = document.getElementById('buddyUpExploreWidget');\n    if (!wrapper) return;\n\n    const statusEl = document.getElementById('buddyUpExploreWidgetStatus');\n    const mapEl = document.getElementById('buddyUpExploreWidgetMap');\n    const modeButtons = wrapper.querySelectorAll('.buddyUpExploreWidgetMode');\n    const searchInput = document.getElementById('buddyUpExploreWidgetSearch');\n    const radiusInput = document.getElementById('buddyUpExploreWidgetRadius');\n    const radiusLabel = document.getElementById('buddyUpExploreWidgetRadiusLabel');\n    const categoryContainer = document.getElementById('buddyUpExploreWidgetCategories');\n\n    const imageFallback = (window.buddyUpVariables && buddyUpVariables.plugin_path ? `${buddyUpVariables.plugin_path}img\/trailer-image.webp` : '');\n\n    const state = {\n        mode: 'adventures',\n        search: '',\n        category: '',\n        radiusMiles: 25,\n        allByMode: {\n            adventures: [],\n            events: [],\n            groups: [],\n        },\n    };\n\n    let map = null;\n    let markersLayer = null;\n\n    const safe = (v) => String(v || '').replace(\/[&<>\\\"]\/g, (m) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;' }[m]));\n\n    const loadLeaflet = async () => {\n        if (window.L && typeof window.L.map === 'function') return true;\n\n        if (!document.getElementById('buddyupLeafletCss')) {\n            const css = document.createElement('link');\n            css.id = 'buddyupLeafletCss';\n            css.rel = 'stylesheet';\n            css.href = 'https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.css';\n            document.head.appendChild(css);\n        }\n\n        await new Promise((resolve, reject) => {\n            if (document.getElementById('buddyupLeafletJs')) return resolve();\n            const js = document.createElement('script');\n            js.id = 'buddyupLeafletJs';\n            js.src = 'https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.js';\n            js.onload = resolve;\n            js.onerror = reject;\n            document.body.appendChild(js);\n        });\n\n        return !!(window.L && typeof window.L.map === 'function');\n    };\n\n    const toCategories = (raw) => {\n        if (Array.isArray(raw)) return raw.map((x) => String(x || '').trim()).filter(Boolean);\n        if (typeof raw === 'string') {\n            return raw.split(',').map((x) => x.trim()).filter(Boolean);\n        }\n        return [];\n    };\n\n    const normalizePayload = (aggregate) => {\n        const adventures = Array.isArray(aggregate && aggregate.adventures) ? aggregate.adventures : [];\n        const events = Array.isArray(aggregate && aggregate.events) ? aggregate.events : [];\n        const groups = Array.isArray(aggregate && aggregate.groups) ? aggregate.groups : [];\n\n        state.allByMode.adventures = adventures\n            .map((item) => ({\n                id: Number(item.id || 0),\n                title: String(item.title || 'Adventure'),\n                subtitle: String(item.location_label || [item.city, item.state].filter(Boolean).join(', ')),\n                latitude: Number(item.latitude),\n                longitude: Number(item.longitude),\n                image: String(item.preview_url || (Array.isArray(item.media) && item.media[0] && item.media[0].url ? item.media[0].url : '') || imageFallback),\n                categories: toCategories(item.categories),\n            }))\n            .filter((item) => isFinite(item.latitude) && isFinite(item.longitude));\n\n        state.allByMode.events = events\n            .map((item) => ({\n                id: Number(item.event_id || 0),\n                title: String(item.event_name || 'Event'),\n                subtitle: String(item.location_label || [item.city, item.state].filter(Boolean).join(', ')),\n                latitude: Number(item.latitude),\n                longitude: Number(item.longitude),\n                image: String(item.event_image || imageFallback),\n                categories: toCategories(item.event_categories),\n            }))\n            .filter((item) => isFinite(item.latitude) && isFinite(item.longitude));\n\n        state.allByMode.groups = groups\n            .map((item) => ({\n                id: Number(item.id || 0),\n                title: String(item.name || 'Group'),\n                subtitle: String(item.location_label || [item.city, item.state].filter(Boolean).join(', ')),\n                latitude: Number(item.latitude),\n                longitude: Number(item.longitude),\n                image: String(item.image || imageFallback),\n                categories: toCategories(item.categories),\n            }))\n            .filter((item) => isFinite(item.latitude) && isFinite(item.longitude));\n    };\n\n    const getFilteredItems = () => {\n        const current = Array.isArray(state.allByMode[state.mode]) ? state.allByMode[state.mode] : [];\n        const searchTerm = state.search.toLowerCase().trim();\n\n        return current.filter((item) => {\n            if (state.category) {\n                const hasCategory = item.categories.some((c) => c.toLowerCase() === state.category.toLowerCase());\n                if (!hasCategory) return false;\n            }\n\n            if (!searchTerm) return true;\n\n            return (\n                item.title.toLowerCase().includes(searchTerm) ||\n                item.subtitle.toLowerCase().includes(searchTerm) ||\n                item.categories.some((c) => c.toLowerCase().includes(searchTerm))\n            );\n        });\n    };\n\n    const buildPinIcon = (item) => {\n        const className = state.mode === 'events' ? 'pin-events' : (state.mode === 'groups' ? 'pin-groups' : 'pin-adventures');\n        const html = `<div class=\"buddyUpExploreWidgetPin ${className}\"><img decoding=\"async\" src=\"${safe(item.image || imageFallback)}\" alt=\"${safe(item.title)}\" loading=\"lazy\" \/><\/div>`;\n        return L.divIcon({\n            className: 'buddyUpExploreWidgetPinWrap',\n            html: html,\n            iconSize: [66, 60],\n            iconAnchor: [33, 58],\n            popupAnchor: [0, -54],\n        });\n    };\n\n    const renderCategories = () => {\n        if (!categoryContainer) return;\n\n        const items = Array.isArray(state.allByMode[state.mode]) ? state.allByMode[state.mode] : [];\n        const tally = {};\n        items.forEach((item) => {\n            item.categories.forEach((cat) => {\n                const key = String(cat || '').trim();\n                if (!key) return;\n                tally[key] = (tally[key] || 0) + 1;\n            });\n        });\n\n        const sorted = Object.keys(tally).sort((a, b) => tally[b] - tally[a]).slice(0, 8);\n        const buttons = [];\n        buttons.push(`<button type=\"button\" class=\"buddyUpExploreWidgetPill ${state.category === '' ? 'isActive' : ''}\" data-cat=\"\">All<\/button>`);\n        sorted.forEach((cat) => {\n            const active = state.category.toLowerCase() === cat.toLowerCase();\n            buttons.push(`<button type=\"button\" class=\"buddyUpExploreWidgetPill ${active ? 'isActive' : ''}\" data-cat=\"${safe(cat)}\">${safe(cat)}<\/button>`);\n        });\n\n        categoryContainer.innerHTML = buttons.join('');\n\n        categoryContainer.querySelectorAll('.buddyUpExploreWidgetPill').forEach((btn) => {\n            btn.addEventListener('click', () => {\n                state.category = String(btn.getAttribute('data-cat') || '');\n                renderCategories();\n                renderMap();\n            });\n        });\n    };\n\n    const renderMap = () => {\n        if (!map || !markersLayer) return;\n        markersLayer.clearLayers();\n\n        const items = getFilteredItems();\n        if (items.length === 0) {\n            statusEl.innerText = `No ${state.mode} matched your preview filters.`;\n            return;\n        }\n\n        const markers = [];\n        const coordBuckets = {};\n        items.forEach((item) => {\n            const coordKey = `${item.latitude.toFixed(4)}_${item.longitude.toFixed(4)}`;\n            coordBuckets[coordKey] = (coordBuckets[coordKey] || 0) + 1;\n\n            const duplicateIndex = coordBuckets[coordKey] - 1;\n            const spreadRadius = duplicateIndex === 0 ? 0 : (duplicateIndex * 0.00035);\n            const spreadAngle = duplicateIndex * (Math.PI \/ 4.2);\n            const latOffset = spreadRadius * Math.sin(spreadAngle);\n            const lngOffset = spreadRadius * Math.cos(spreadAngle);\n\n            const marker = L.marker([item.latitude + latOffset, item.longitude + lngOffset], {\n                icon: buildPinIcon(item),\n                keyboard: true,\n            });\n\n            marker.bindPopup(`<div class=\"buddyUpExploreWidgetPopupTitle\">${safe(item.title)}<\/div><div>${safe(item.subtitle)}<\/div>`);\n            marker.addTo(markersLayer);\n            markers.push(marker);\n        });\n\n        statusEl.innerText = `${items.length} ${state.mode} visible. Use tabs and preview filters to explore.`;\n\n        const group = L.featureGroup(markers);\n        if (markers.length === 1) {\n            map.setView(markers[0].getLatLng(), 12);\n        } else {\n            map.fitBounds(group.getBounds().pad(0.18));\n        }\n    };\n\n    const setMode = (mode) => {\n        state.mode = mode;\n        state.category = '';\n\n        modeButtons.forEach((btn) => {\n            const active = btn.getAttribute('data-mode') === mode;\n            btn.classList.toggle('isActive', active);\n            btn.setAttribute('aria-selected', active ? 'true' : 'false');\n        });\n\n        renderCategories();\n        renderMap();\n    };\n\n    statusEl.innerText = 'Loading adventures, events, and groups...';\n\n    const [okLeaflet, aggregateResp] = await Promise.all([\n        loadLeaflet(),\n        BUDDYUP.apiRequest('explore-aggregate', {\n            limit_adventures: 500,\n            limit_events: 200,\n            limit_groups: 200,\n            include_events: 1,\n            include_groups: 1,\n        })\n    ]);\n\n    if (!okLeaflet) {\n        statusEl.innerText = 'Map unavailable right now.';\n        return;\n    }\n\n    if (!aggregateResp || aggregateResp.status !== 'success') {\n        statusEl.innerText = 'Could not load explore preview.';\n        return;\n    }\n\n    normalizePayload(aggregateResp);\n\n    const totalItems = state.allByMode.adventures.length + state.allByMode.events.length + state.allByMode.groups.length;\n    if (totalItems === 0) {\n        statusEl.innerText = 'No public map content available yet.';\n        return;\n    }\n\n    map = L.map(mapEl, {\n        zoomControl: true,\n        scrollWheelZoom: true,\n        dragging: true,\n        doubleClickZoom: true,\n    });\n\n    L.tileLayer('https:\/\/{s}.tile.openstreetmap.org\/{z}\/{x}\/{y}.png', {\n        maxZoom: 19,\n        attribution: '&copy; OpenStreetMap contributors'\n    }).addTo(map);\n\n    markersLayer = L.layerGroup().addTo(map);\n\n    modeButtons.forEach((btn) => {\n        btn.addEventListener('click', () => {\n            const nextMode = btn.getAttribute('data-mode');\n            if (!nextMode || nextMode === state.mode) return;\n            setMode(nextMode);\n        });\n    });\n\n    if (searchInput) {\n        searchInput.addEventListener('input', () => {\n            state.search = String(searchInput.value || '');\n            renderMap();\n        });\n    }\n\n    if (radiusInput && radiusLabel) {\n        const syncRadius = () => {\n            state.radiusMiles = Number(radiusInput.value || 25);\n            radiusLabel.innerText = `${state.radiusMiles} mi`;\n        };\n        radiusInput.addEventListener('input', syncRadius);\n        syncRadius();\n    }\n\n    setMode('adventures');\n})();\n<\/script><\/div>        <\/div>\n    <\/div>\n\n    <div id=\"buddyUpForYouView\" class=\"buddyUpForYouView hidden\" aria-live=\"polite\">\n        <section class=\"buddyUpForYouHeader buddyUpElWrapper\">\n            <div class=\"buddyUpForYouHeaderText\">\n                <div class=\"buddyUpForYouEyebrow\">For You<\/div>\n                <h1 id=\"buddyUpForYouTitle\">Loading your recommendations...<\/h1>\n                <p id=\"buddyUpForYouSubtitle\">Matching adventures, events, and groups based on your profile intent.<\/p>\n            <\/div>\n            <div id=\"buddyUpForYouMiniProfile\" class=\"buddyUpForYouMiniProfile\"><\/div>\n        <\/section>\n\n        <div id=\"buddyUpForYouStatus\" class=\"buddyUpForYouStatus\">Preparing your feed...<\/div>\n\n        <section class=\"buddyUpForYouRail\" data-rail=\"events\">\n            <div class=\"buddyUpForYouRailHead\">\n                <h2>Events for You<\/h2>\n                <a href=\"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/events\/\" class=\"buddyUpLink\">See all events<\/a>\n            <\/div>\n            <div id=\"buddyUpForYouEvents\" class=\"buddyUpForYouRailTrack\"><\/div>\n        <\/section>\n\n        <section class=\"buddyUpForYouRail\" data-rail=\"groups\">\n            <div class=\"buddyUpForYouRailHead\">\n                <h2>Groups for You<\/h2>\n                <a href=\"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/groups\/\" class=\"buddyUpLink\">See all groups<\/a>\n            <\/div>\n            <div id=\"buddyUpForYouGroups\" class=\"buddyUpForYouRailTrack\"><\/div>\n        <\/section>\n\n        <section class=\"buddyUpForYouRail\" data-rail=\"adventures\">\n            <div class=\"buddyUpForYouRailHead\">\n                <h2>Adventures for You<\/h2>\n                <a href=\"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/explore\/\" class=\"buddyUpLink\">Browse explore<\/a>\n            <\/div>\n            <div id=\"buddyUpForYouAdventures\" class=\"buddyUpForYouRailTrack\"><\/div>\n        <\/section>\n    <\/div>\n<\/section>\n<script>(function() {\n    const wrapper = document.getElementById('buddyUpHomeLanding');\n    if (!wrapper) return;\n\n    const anonView = wrapper.querySelector('.buddyUpHomeLandingAnonView');\n    const forYouView = wrapper.querySelector('#buddyUpForYouView');\n    const loggedOutRow = wrapper.querySelector('.buddyUpHomeLandingLoggedOut');\n    const loggedInRow = wrapper.querySelector('.buddyUpHomeLandingLoggedIn');\n\n    const forYouTitle = wrapper.querySelector('#buddyUpForYouTitle');\n    const forYouSubtitle = wrapper.querySelector('#buddyUpForYouSubtitle');\n    const forYouStatus = wrapper.querySelector('#buddyUpForYouStatus');\n    const miniProfile = wrapper.querySelector('#buddyUpForYouMiniProfile');\n\n    const eventsRail = wrapper.querySelector('#buddyUpForYouEvents');\n    const groupsRail = wrapper.querySelector('#buddyUpForYouGroups');\n    const adventuresRail = wrapper.querySelector('#buddyUpForYouAdventures');\n\n    const imageFallback = (window.buddyUpVariables && buddyUpVariables.plugin_path)\n        ? `${buddyUpVariables.plugin_path}img\/trailer-image.webp`\n        : '';\n\n    let recommendationsLoaded = false;\n\n    const safe = function(value) {\n        if (typeof BUDDYUP !== 'undefined' && typeof BUDDYUP.escapeHtml === 'function') {\n            return BUDDYUP.escapeHtml(value);\n        }\n        return String(value == null ? '' : value)\n            .replace(\/&\/g, '&amp;')\n            .replace(\/<\/g, '&lt;')\n            .replace(\/>\/g, '&gt;')\n            .replace(\/\"\/g, '&quot;')\n            .replace(\/'\/g, '&#39;');\n    };\n\n    const normalizeList = function(raw) {\n        if (Array.isArray(raw)) {\n            return raw.map((v) => String(v || '').trim()).filter(Boolean);\n        }\n        if (typeof raw === 'string') {\n            return raw.split(',').map((v) => String(v || '').trim()).filter(Boolean);\n        }\n        return [];\n    };\n\n    const toDateValue = function(raw) {\n        if (!raw) return null;\n        const val = Date.parse(String(raw));\n        return Number.isFinite(val) ? val : null;\n    };\n\n    const haversineMiles = function(lat1, lon1, lat2, lon2) {\n        if (![lat1, lon1, lat2, lon2].every((v) => Number.isFinite(Number(v)))) return null;\n        const R = 3958.8;\n        const toRad = function(d) { return Number(d) * (Math.PI \/ 180); };\n        const dLat = toRad(lat2 - lat1);\n        const dLon = toRad(lon2 - lon1);\n        const a = Math.sin(dLat \/ 2) * Math.sin(dLat \/ 2) +\n            Math.cos(toRad(lat1)) * Math.cos(toRad(lat2)) *\n            Math.sin(dLon \/ 2) * Math.sin(dLon \/ 2);\n        const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n        return R * c;\n    };\n\n    const buildDetailLink = function(type, id) {\n        const addPathId = function(base, paramName) {\n            const url = String(base || '').trim();\n            if (!url) return '#';\n            if (url.indexOf('?') >= 0) {\n                return `${url}${url.endsWith('?') || url.endsWith('&') ? '' : '&'}${paramName}=${Number(id)}`;\n            }\n            return `${url}${url.endsWith('\/') ? '' : '\/'}${Number(id)}`;\n        };\n\n        if (!Number.isFinite(Number(id)) || Number(id) <= 0) return '#';\n\n        if (type === 'events') {\n            return addPathId(buddyUpVariables && buddyUpVariables.event_link ? buddyUpVariables.event_link : '', 'event_id');\n        }\n        if (type === 'groups') {\n            return addPathId(buddyUpVariables && buddyUpVariables.group_link ? buddyUpVariables.group_link : '', 'group_id');\n        }\n        return addPathId(buddyUpVariables && buddyUpVariables.adventure_link ? buddyUpVariables.adventure_link : '', 'adventure_id');\n    };\n\n    const percentFromScore = function(score) {\n        const value = 58 + (Number(score || 0) * 1.8);\n        return Math.max(54, Math.min(98, Math.round(value)));\n    };\n\n    const itemCompletenessScore = function(item) {\n        if (!item || typeof item !== 'object') return 0;\n\n        let score = 0;\n        if (String(item.title || '').trim() !== '') score += 3;\n        if (String(item.subtitle || '').trim() !== '') score += 2;\n        if (String(item.image || '').trim() !== '') score += 2;\n        if (Array.isArray(item.categories) && item.categories.length > 0) score += 2;\n        if (Number.isFinite(item.latitude)) score += 1;\n        if (Number.isFinite(item.longitude)) score += 1;\n        if (Number(item.popularity || 0) > 0) score += 1;\n        return score;\n    };\n\n    const mergeFeedItem = function(current, incoming) {\n        if (!current) return incoming;\n        if (!incoming) return current;\n\n        return {\n            ...current,\n            ...incoming,\n            title: String(incoming.title || '').trim() !== '' ? incoming.title : current.title,\n            subtitle: String(incoming.subtitle || '').trim() !== '' ? incoming.subtitle : current.subtitle,\n            image: String(incoming.image || '').trim() !== '' ? incoming.image : current.image,\n            categories: Array.from(new Set([...(Array.isArray(current.categories) ? current.categories : []), ...(Array.isArray(incoming.categories) ? incoming.categories : [])])),\n            latitude: Number.isFinite(incoming.latitude) ? incoming.latitude : current.latitude,\n            longitude: Number.isFinite(incoming.longitude) ? incoming.longitude : current.longitude,\n            dateValue: incoming.dateValue || current.dateValue,\n            popularity: Math.max(Number(current.popularity || 0), Number(incoming.popularity || 0)),\n        };\n    };\n\n    const dedupeFeedItems = function(items) {\n        if (!Array.isArray(items) || items.length === 0) return [];\n\n        const seen = new Map();\n        items.forEach((item) => {\n            const key = Number(item && item.id);\n            if (!Number.isFinite(key) || key <= 0) return;\n\n            if (!seen.has(key)) {\n                seen.set(key, item);\n                return;\n            }\n\n            const existing = seen.get(key);\n            const existingScore = itemCompletenessScore(existing);\n            const incomingScore = itemCompletenessScore(item);\n            const merged = incomingScore >= existingScore\n                ? mergeFeedItem(existing, item)\n                : mergeFeedItem(item, existing);\n            seen.set(key, merged);\n        });\n\n        return Array.from(seen.values());\n    };\n\n    const accountEvents = (accountResp) => {\n        const eventsRoot = (accountResp && accountResp.events)\n            || (accountResp && accountResp.data && accountResp.data.events)\n            || {};\n\n        const upcoming = Array.isArray(eventsRoot.upcoming) ? eventsRoot.upcoming : [];\n        const past = Array.isArray(eventsRoot.past) ? eventsRoot.past : [];\n        return upcoming.concat(past);\n    };\n\n    const accountGroups = (accountResp) => {\n        if (accountResp && Array.isArray(accountResp.groups)) return accountResp.groups;\n        if (accountResp && accountResp.data && Array.isArray(accountResp.data.groups)) return accountResp.data.groups;\n        return [];\n    };\n\n    const normalizeEventId = (event) => {\n        const id = Number(event && (event.id || event.event_id || event.eventId || 0));\n        return Number.isFinite(id) && id > 0 ? id : 0;\n    };\n\n    const normalizeGroupId = (group) => {\n        const id = Number(group && (group.id || group.group_id || group.groupId || 0));\n        return Number.isFinite(id) && id > 0 ? id : 0;\n    };\n\n    const normalizeAdventureId = (adventure) => {\n        const id = Number(adventure && (adventure.id || adventure.adventure_id || adventure.adventureId || 0));\n        return Number.isFinite(id) && id > 0 ? id : 0;\n    };\n\n    const collectParticipatingIds = function(accountResp, adventuresResp) {\n        const eventIds = new Set();\n        const groupIds = new Set();\n        const adventureIds = new Set();\n\n        accountEvents(accountResp).forEach((event) => {\n            const id = normalizeEventId(event);\n            if (id > 0) eventIds.add(id);\n        });\n\n        accountGroups(accountResp).forEach((group) => {\n            const id = normalizeGroupId(group);\n            if (id > 0) groupIds.add(id);\n        });\n\n        const createdAdventures = Array.isArray(adventuresResp && adventuresResp.created_adventures)\n            ? adventuresResp.created_adventures\n            : (Array.isArray(adventuresResp && adventuresResp.adventures) ? adventuresResp.adventures : []);\n        const taggedAdventures = Array.isArray(adventuresResp && adventuresResp.tagged_adventures)\n            ? adventuresResp.tagged_adventures\n            : [];\n\n        createdAdventures.concat(taggedAdventures).forEach((adventure) => {\n            const id = normalizeAdventureId(adventure);\n            if (id > 0) adventureIds.add(id);\n        });\n\n        return { eventIds, groupIds, adventureIds };\n    };\n\n    const normalizeFeed = function(aggregate) {\n        const result = {\n            events: [],\n            groups: [],\n            adventures: []\n        };\n\n        const events = Array.isArray(aggregate && aggregate.events) ? aggregate.events : [];\n        const groups = Array.isArray(aggregate && aggregate.groups) ? aggregate.groups : [];\n        const adventures = Array.isArray(aggregate && aggregate.adventures) ? aggregate.adventures : [];\n\n        result.events = dedupeFeedItems(events.map((row) => ({\n            id: Number(row.event_id || row.id || 0),\n            title: String(row.event_name || row.name || 'Event'),\n            subtitle: String(row.location_label || [row.city, row.state].filter(Boolean).join(', ')),\n            categories: normalizeList(row.event_categories || row.categories),\n            image: String(row.event_image || row.image || imageFallback),\n            latitude: Number(row.latitude),\n            longitude: Number(row.longitude),\n            dateValue: toDateValue(row.event_date || row.date),\n            popularity: Number(row.attendees_count || row.joined_count || row.member_count || 0),\n        })).filter((row) => row.id > 0));\n\n        result.groups = dedupeFeedItems(groups.map((row) => ({\n            id: Number(row.id || row.group_id || 0),\n            title: String(row.name || 'Group'),\n            subtitle: String(row.location_label || [row.city, row.state].filter(Boolean).join(', ')),\n            categories: normalizeList(row.categories || row.group_categories),\n            image: String(row.image || row.group_image || imageFallback),\n            latitude: Number(row.latitude),\n            longitude: Number(row.longitude),\n            dateValue: null,\n            popularity: Number(row.member_count || row.members_count || row.total_members || 0),\n        })).filter((row) => row.id > 0));\n\n        result.adventures = dedupeFeedItems(adventures.map((row) => ({\n            id: Number(row.id || row.adventure_id || 0),\n            title: String(row.title || 'Adventure'),\n            subtitle: String(row.location_label || [row.city, row.state].filter(Boolean).join(', ')),\n            categories: normalizeList(row.categories),\n            image: String(row.preview_url || (Array.isArray(row.media) && row.media[0] && row.media[0].url ? row.media[0].url : '') || imageFallback),\n            latitude: Number(row.latitude),\n            longitude: Number(row.longitude),\n            dateValue: toDateValue(row.adventure_date || row.event_date || row.date),\n            popularity: Number(row.participant_count || row.member_count || row.attendees_count || 0),\n        })).filter((row) => row.id > 0));\n\n        return result;\n    };\n\n    const scoreItem = function(item, context) {\n        const userInterests = context.userInterests;\n        const userKeywords = context.userKeywords;\n\n        let score = 0;\n\n        const itemCats = Array.isArray(item.categories) ? item.categories.map((cat) => String(cat || '').toLowerCase()) : [];\n        const overlap = itemCats.filter((cat) => userInterests.has(cat)).length;\n        score += overlap * 12;\n\n        const blob = `${String(item.title || '')} ${String(item.subtitle || '')} ${itemCats.join(' ')}`.toLowerCase();\n        let keywordHits = 0;\n        userKeywords.forEach((kw) => {\n            if (kw && blob.includes(kw)) keywordHits += 1;\n        });\n        score += Math.min(15, keywordHits * 2.5);\n\n        if (Number.isFinite(context.userLatitude) && Number.isFinite(context.userLongitude) && Number.isFinite(item.latitude) && Number.isFinite(item.longitude)) {\n            const miles = haversineMiles(context.userLatitude, context.userLongitude, item.latitude, item.longitude);\n            if (miles !== null) {\n                const distanceBonus = Math.max(0, 30 - miles) * 0.7;\n                score += distanceBonus;\n            }\n        }\n\n        if (item.dateValue) {\n            const now = Date.now();\n            const deltaDays = (item.dateValue - now) \/ (1000 * 60 * 60 * 24);\n            if (deltaDays >= 0 && deltaDays <= 21) {\n                score += 10;\n            } else if (deltaDays > 21 && deltaDays <= 60) {\n                score += 6;\n            } else if (deltaDays < 0) {\n                score -= 4;\n            }\n        }\n\n        const pop = Number(item.popularity || 0);\n        if (pop > 0) {\n            score += Math.min(8, Math.log(pop + 1) * 2.2);\n        }\n\n        return score;\n    };\n\n    const renderMiniProfile = function(user, account) {\n        if (!miniProfile) return;\n\n        const displayName = (typeof BUDDYUP !== 'undefined' && typeof BUDDYUP.displayNameFromUser === 'function')\n            ? BUDDYUP.displayNameFromUser(account || user, 'Explorer')\n            : String((account && account.username) || (user && user.username) || 'Explorer');\n\n        const imageSrc = (typeof BUDDYUP !== 'undefined' && typeof BUDDYUP.profileImageSrc === 'function')\n            ? BUDDYUP.profileImageSrc((account && account.profile_image) || (user && user.profile_image))\n            : ((account && account.profile_image) || (user && user.profile_image) || imageFallback);\n\n        const interests = normalizeList((account && account.interests) || (user && user.interests)).slice(0, 3);\n        const interestsText = interests.length > 0 ? interests.join(' \u2022 ') : 'Add interests in your profile for stronger matching.';\n        const profileLink = buddyUpVariables && buddyUpVariables.account_link ? buddyUpVariables.account_link : '#';\n\n        miniProfile.innerHTML = `\n            <img decoding=\"async\" class=\"buddyUpForYouMiniAvatar\" src=\"${safe(imageSrc)}\" alt=\"${safe(displayName)}\" onerror=\"BUDDYUP.onErrProfileImage(this)\" \/>\n            <div class=\"buddyUpForYouMiniMeta\">\n                <div class=\"buddyUpForYouMiniName\">${safe(displayName)}<\/div>\n                <div class=\"buddyUpForYouMiniHint\">${safe(interestsText)}<\/div>\n                <div class=\"buddyUpForYouMiniLink\"><a href=\"${safe(profileLink)}\" class=\"buddyUpLink\">View Profile<\/a><\/div>\n            <\/div>\n        `;\n    };\n\n    const renderRail = function(trackEl, type, items) {\n        if (!trackEl) return;\n\n        if (!Array.isArray(items) || items.length === 0) {\n            trackEl.innerHTML = '<div class=\"buddyUpForYouEmpty\">No matches yet for this rail. Try adding more interests or location details in your profile.<\/div>';\n            return;\n        }\n\n        trackEl.innerHTML = items.slice(0, 18).map((item) => {\n            const href = buildDetailLink(type, item.id);\n            const tag = item.categories.length > 0 ? item.categories[0] : (type === 'events' ? 'Event' : (type === 'groups' ? 'Group' : 'Adventure'));\n\n            let meta = item.subtitle || '';\n            if (type === 'events' && item.dateValue) {\n                const dateText = new Date(item.dateValue).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });\n                meta = meta ? `${meta} \u2022 ${dateText}` : dateText;\n            }\n            if (type === 'groups') {\n                const countText = Number(item.popularity || 0) > 0 ? `${Number(item.popularity)} members` : '';\n                meta = meta ? `${meta}${countText ? ` \u2022 ${countText}` : ''}` : countText;\n            }\n\n            return `\n                <a class=\"buddyUpForYouRailCard\" href=\"${safe(href)}\">\n                    <img decoding=\"async\" class=\"buddyUpForYouRailCardMedia\" src=\"${safe(item.image || imageFallback)}\" alt=\"${safe(item.title)}\" \/>\n                    <div class=\"buddyUpForYouRailCardBody\">\n                        <div class=\"buddyUpForYouRailCardTag\">${safe(tag)}<\/div>\n                        <div class=\"buddyUpForYouRailCardTitle\">${safe(item.title)}<\/div>\n                        <div class=\"buddyUpForYouRailCardMeta\">${safe(meta || 'Recommended for your current profile intent')}<\/div>\n                        <div class=\"buddyUpForYouRailCardScore\">${percentFromScore(item.intentScore)}% intent match<\/div>\n                    <\/div>\n                <\/a>\n            `;\n        }).join('');\n    };\n\n    const loadRecommendations = async function() {\n        if (recommendationsLoaded) return;\n\n        const user = typeof BUDDYUP !== 'undefined' && typeof BUDDYUP.getCurrentUser === 'function' ? BUDDYUP.getCurrentUser() : null;\n        if (!user || !user.id) {\n            if (forYouStatus) forYouStatus.textContent = 'Please log in to view your personalized feed.';\n            return;\n        }\n\n        if (forYouStatus) forYouStatus.textContent = 'Matching your interests with upcoming activity...';\n\n        try {\n            const [accountRes, aggregateRes, myAdventuresRes] = await Promise.all([\n                BUDDYUP.apiRequest('account-get', {\n                    id: user.id,\n                    include: 'events,groups',\n                    fields: 'id,username,profile_image,interests,about_me,latitude,longitude,events,groups',\n                    _force: true\n                }),\n                BUDDYUP.apiRequest('explore-aggregate', {\n                    limit_adventures: 400,\n                    limit_events: 220,\n                    limit_groups: 220,\n                    include_events: 1,\n                    include_groups: 1,\n                }),\n                BUDDYUP.apiRequest('adventures-list-mine', { limit: 200 })\n            ]);\n\n            if (!aggregateRes || aggregateRes.status !== 'success') {\n                throw new Error('Could not load recommendation content.');\n            }\n\n            const account = accountRes && accountRes.status === 'success' ? accountRes : user;\n            renderMiniProfile(user, account);\n\n            const profileInterests = normalizeList((account && account.interests) || (user && user.interests));\n            const profileAbout = String((account && account.about_me) || (user && user.about_me) || '').toLowerCase();\n\n            const keywordSet = new Set(profileInterests.map((i) => i.toLowerCase()));\n            profileAbout.split(\/[^a-z0-9]+\/gi).map((w) => w.trim()).filter((w) => w.length >= 4).forEach((w) => keywordSet.add(w.toLowerCase()));\n\n            const context = {\n                userInterests: new Set(profileInterests.map((i) => i.toLowerCase())),\n                userKeywords: keywordSet,\n                userLatitude: Number((account && account.latitude) || (user && user.latitude)),\n                userLongitude: Number((account && account.longitude) || (user && user.longitude)),\n            };\n\n            const normalized = normalizeFeed(aggregateRes);\n            const participating = collectParticipatingIds(accountRes, myAdventuresRes);\n\n            normalized.events = normalized.events.filter((item) => !participating.eventIds.has(Number(item.id || 0)));\n            normalized.groups = normalized.groups.filter((item) => !participating.groupIds.has(Number(item.id || 0)));\n            normalized.adventures = normalized.adventures.filter((item) => {\n                const itemId = Number(item.id || 0);\n                const ownerId = Number(item.user_id || 0);\n                if (itemId > 0 && participating.adventureIds.has(itemId)) return false;\n                if (ownerId > 0 && ownerId === Number(user.id || 0)) return false;\n                return true;\n            });\n\n            ['events', 'groups', 'adventures'].forEach((type) => {\n                normalized[type].forEach((item) => {\n                    item.intentScore = scoreItem(item, context);\n                });\n                normalized[type].sort((a, b) => b.intentScore - a.intentScore);\n            });\n\n            const displayName = (typeof BUDDYUP !== 'undefined' && typeof BUDDYUP.displayNameFromUser === 'function')\n                ? BUDDYUP.displayNameFromUser(account || user, 'Explorer')\n                : 'Explorer';\n\n            if (forYouTitle) forYouTitle.textContent = `${displayName}, here is your For You feed`;\n            if (forYouSubtitle) {\n                forYouSubtitle.textContent = 'Intent matching combines interests, location proximity, freshness, and activity levels.';\n            }\n\n            renderRail(eventsRail, 'events', normalized.events);\n            renderRail(groupsRail, 'groups', normalized.groups);\n            renderRail(adventuresRail, 'adventures', normalized.adventures);\n\n            const totalMatches = normalized.events.length + normalized.groups.length + normalized.adventures.length;\n            if (forYouStatus) {\n                forYouStatus.textContent = totalMatches > 0\n                    ? `Showing ${totalMatches} ranked recommendations across events, groups, and adventures.`\n                    : 'No recommendation content available yet.';\n            }\n\n            recommendationsLoaded = true;\n        } catch (err) {\n            if (forYouStatus) {\n                forYouStatus.textContent = err && err.message ? err.message : 'Unable to build your For You feed right now.';\n            }\n            if (eventsRail) eventsRail.innerHTML = '<div class=\"buddyUpForYouEmpty\">Could not load events right now.<\/div>';\n            if (groupsRail) groupsRail.innerHTML = '<div class=\"buddyUpForYouEmpty\">Could not load groups right now.<\/div>';\n            if (adventuresRail) adventuresRail.innerHTML = '<div class=\"buddyUpForYouEmpty\">Could not load adventures right now.<\/div>';\n        }\n    };\n\n    const updateLandingState = function() {\n        const isLoggedIn = !!(\n            typeof BUDDYUP !== 'undefined' &&\n            typeof BUDDYUP.hasAuthenticatedUser === 'function' &&\n            BUDDYUP.hasAuthenticatedUser(BUDDYUP.getCurrentUser())\n        );\n\n        if (loggedOutRow) {\n            loggedOutRow.classList.toggle('hidden', isLoggedIn);\n        }\n        if (loggedInRow) {\n            loggedInRow.classList.toggle('hidden', !isLoggedIn);\n        }\n\n        if (anonView) {\n            anonView.classList.toggle('hidden', isLoggedIn);\n        }\n        if (forYouView) {\n            forYouView.classList.toggle('hidden', !isLoggedIn);\n        }\n\n        if (isLoggedIn) {\n            loadRecommendations();\n        }\n\n        document.body.classList.toggle('buddyup-home-landing-anon', !isLoggedIn);\n    };\n\n    updateLandingState();\n\n    if (typeof BUDDYUP !== 'undefined' && typeof BUDDYUP.setGlobalHandler === 'function') {\n        BUDDYUP.setGlobalHandler('homeLanding.state.sync', document, 'buddyUpPageChange', updateLandingState);\n        BUDDYUP.setGlobalHandler('homeLanding.state.sync.paging', document, 'buddyup:paging', updateLandingState);\n    }\n})();<\/script><\/div>\r\n<!-- [widget_blocks title=\"hero\"]\r\n[widget_blocks title=\"Interests\"]\r\n[widget_blocks title=\"Intro\"]\r\n[widget_blocks title=\"Locals Section\"]\r\n[widget_blocks title=\"Events\"] -->","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-44","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/api\/wp\/v2\/pages\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/api\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/api\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/api\/wp\/v2\/comments?post=44"}],"version-history":[{"count":1,"href":"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/api\/wp\/v2\/pages\/44\/revisions"}],"predecessor-version":[{"id":516,"href":"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/api\/wp\/v2\/pages\/44\/revisions\/516"}],"wp:attachment":[{"href":"https:\/\/buddyupapi-staging.us35.cdn-alpha.com\/api\/wp\/v2\/media?parent=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}