/* ── Shared CSS variables ─────────────────────────────────────────── */
.chf-search-widget,
.chf-listing-widget {
    --accent:        #3F769A;
    --accent-hover:  #3F769A;
    --accent-light:  #e8f0f7;
    --text-primary:  #4A4F54;
    --text-muted:    #8E8E8E;
    --text-light:    #999;
    --border:        #E5E5E5;
    --bg-card:       #ffffff;
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     14px;
    --shadow-card:   0 1px 3px rgba(0,0,0,.08), 0 1px 8px rgba(0,0,0,.04);
    --shadow-hover:  0 4px 16px rgba(0,0,0,.12);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    box-sizing: border-box;
}

.chf-search-widget *,
.chf-listing-widget * { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════════════════════════════
   WIDGET 1 — Search Bar
══════════════════════════════════════════════════════════════════ */

.chf-search-widget {
    width: 100%;
    position: relative;
}

/* ── Location autocomplete dropdown ──────────────────────────────── */
.chf-suggest-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
    z-index: 60;
}

.chf-suggest-dropdown.is-open { display: block; }

.chf-suggest-header {
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--accent-light);
}

.chf-suggest-list {
    max-height: 320px;
    overflow-y: auto;
}

.chf-suggest-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 18px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
}

.chf-suggest-item:last-child { border-bottom: none; }

.chf-suggest-item:hover,
.chf-suggest-item.is-active { background: var(--accent-light); }

.chf-suggest-item-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.chf-suggest-item-sub {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--text-muted);
}

.chf-suggest-empty {
    padding: 16px 18px;
    font-size: 14px;
    color: var(--text-muted);
}

.chf-suggest-empty.chf-suggest-outside {
    color: var(--text-primary);
    font-style: italic;
}

.chf-search-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}


.chf-location-input::placeholder { color: var(--text-light); }

.chf-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    background: var(--chf-btn, var(--accent));
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s;
    flex-shrink: 0;
}
.chf-search-btn:focus{
    background: #1e4d73;
}

.chf-search-btn:hover { background: var(--chf-btn-hover, var(--accent-hover)); }

.chf-radius-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border-left: 1px solid var(--border);
    flex-shrink: 0;
}
input.chf-location-input:focus-visible{
    outline: unset;
}
input.chf-location-input::placeholder{
    color: #4A4F54;
}
.chf-view-btn.is-active .chf-svg-icon{
    filter: brightness(0) saturate(100%) invert(42%) sepia(18%) saturate(1007%) hue-rotate(158deg) brightness(93%) contrast(89%);
}
.chf-radius-select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 38px 0 16px;
    height: 100%;
    font-size: 16px;
    color: var(--text-primary);
    cursor: pointer;
    font-family: "Nunito";
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23424242' stroke-width='2' fill='none' fill-rule='evenodd'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
}

.chf-chevron {
    position: absolute;
    right: 13px;
    pointer-events: none;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   WIDGET 2 — Listing
══════════════════════════════════════════════════════════════════ */

.chf-listing-widget { width: 100%; }

/* ── Body layout ───────────────────────────────────────────────── */
.chf-body {
    display: grid;
    grid-template-columns: 29% 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .chf-body { grid-template-columns: 1fr; }
}

/* ── Sidebar ───────────────────────────────────────────────────── */
.chf-sidebar {
    /* overflow: hidden; */
    position: sticky;
    top: 24px;
}

.chf-sidebar-heading.chf-filters{
    font-family: "Lora";
    font-weight: 700;
    font-size: 23px;
    display: flex;
    justify-content: space-between;
}

label.chf-filter-item{
    font-family: "Nunito";
    font-size: 16px;
    color: #424242;
}

.chf-need-help .chf-filter-heading{
    margin-bottom: 14px;
}
.chf-help-text{
    font-family: "Nunito";
    font-size: 14px;
}
.chf-sidebar-section:last-child { border-bottom: none; }

/* Mobile-only "Clear Filters" — hidden on desktop entirely */
.chf-clear-filters-section { display: none; }

.chf-sidebar-heading {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.chf-filter-heading {
    font-size: 19.2px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    font-family: "Lora";
}

.chf-filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    user-select: none;
    line-height: 1.4;
    border-bottom: 1px solid #ECECEC;
}
.chf-sidebar{
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Sections moved inside .chf-sidebar-collapsible-inner need the same
   flex/gap treatment .chf-sidebar gives its direct children, otherwise
   desktop spacing between Care Type / Group / Need Help collapses. */
.chf-sidebar-collapsible-inner{
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.chf-filter-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}

.chf-filter-loading { font-size: 13px; color: var(--text-light); }

.chf-help-text {
    font-size: 14px;
    color: #686868;
    line-height: 1.55;
    margin-bottom: 14px;
    max-width: 320px;
}

.chf-contact-btn {
    display: inline-block;
    padding: 13.5px 31px;
    border: 2px solid #306F98;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 500;
    color: #4A4F54;
    text-decoration: none;
    font-family: "Nunito";
    transition: background .15s, color .15s;
}

/* .chf-contact-btn:hover { background: var(--text-primary); color: #fff; } */

/* ── Results toolbar ───────────────────────────────────────────── */
.chf-results-panel { position: relative; min-height: 200px; }

.chf-results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    min-height: 32px;
}

.chf-results-count { font-size: 16px; color: #686868; font-weight: 500; font-family: "Nunito";}

.chf-results-count-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chf-clear-all-link {
    font-family: "Nunito";
    font-size: 14px;
    font-weight: 600;
    color: #306F98;
    text-decoration: underline;
    cursor: pointer;
}
.chf-clear-all-link:hover,
.chf-clear-all-link:focus {
    color: #285d7f;
}

.chf-view-toggle .chf-view-btn:hover{
    background: #306F98!important;
    color: #fff!important;
}
.chf-view-toggle .chf-view-btn{
    border-radius: 20px;
    transition: .3s ease;
}
.chf-view-toggle .chf-view-btn:hover img{
    filter: brightness(55);
}

.chf-view-toggle {
    display: flex;
    border-radius: 24px;
    overflow: hidden;
    background: #F9F9F9;
    padding: 4px;
    gap: 8px;
}

.chf-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: #686868;
    cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1;
    font-family: 'Nunito';
    font-size: 14px;
    font-weight: 500;
}

.chf-view-toggle {
    background: #F9F9F9;
    border: unset;
}
.chf-view-btn + .chf-view-btn {
    border: unset;
}

/* .chf-view-btn + .chf-view-btn { border-left: 1px solid var(--border); } */

.chf-view-btn.is-active {
    background: #FFFFFF;
    color: #3F769A;
    font-weight: 500;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16);
    border-radius: 20px;
}

.chf-view-btn:hover:not(.is-active) { background: transparent; color: unset; }

/* ── List / Map visibility ─────────────────────────────────────── */
.chf-list-view,
.chf-map-view  { display: none; }

.chf-list-view.is-visible,
.chf-map-view.is-visible { display: block; }
@media only screen and (max-width: 480px){
    .chf-map-view.is-visible{
        margin-left: -16px;
        margin-right: -16px;
    }
    .chf-map-view.is-visible .chf-map{
        border-radius: 0;
    }
}


/* ── Result cards ──────────────────────────────────────────────── */
.chf-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.chf-map .listing-card-home{
    color: #fff;
}

.chf-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: box-shadow .2s, transform .18s;
    border-radius: 16px;
    padding: 24px;
    gap: 24px
}

.chf-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

@media (max-width: 540px) {
    .chf-card { grid-template-columns: 1fr; }
}

.chf-card-image{
    width: 280px;
    height: 220px;
}

.chf-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
    border-radius: 12px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16);
}

@media only screen and (max-width: 480px){
    .chf-card-image img{
        border-radius: 0px;
    }
    .chf-popup-location{
        display: flex;
        align-items: center;
        font-family: 'Nunito';
        gap: 4px;
    }
}
/* .chf-card:hover .chf-card-image img { transform: scale(1.04); } */

.chf-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    background: #f0f0f0;
}

.chf-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chf-card-title {
    font-size: 23px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    font-family: "Lora";
}

.chf-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    color: var(--text-muted);
    font-family: "Nunito";
}
.chf-card-location svg{
    height: 16px;
    width: 16px;
}

.chf-card-phone {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    font-family: "Nunito";
}

.chf-card-phone svg{
    width: 18px;
    height: 18px;
    overflow: visible;
}

.chf-card-phone:hover { color: var(--accent-hover); }

.chf-care-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.chf-tag {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-family: "Nunito";
    color: #424242;
    background: #F9F9F9;
    white-space: nowrap;
}
.inner-search_container{
    display: flex;
}

.chf-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 3px;
    font-size: 13px;
    color: var(--text-muted);
}

.chf-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-family: "Nunito";
    color: #4A4F54;
}
.listing-card-home {
    color: #306F98;
    width: 18px;
    height: 18px;
}
.chf-map-view .listing-card-home{
    transform: rotate(-45deg);
}
.chf-map-popup .listing-card-home{
    transform: rotate(0deg);
}
.chf-popup-phone {display: flex;gap:6px;}
.chf-popup-phone img.phone-icon {width: 16px;}
.meta-home{
    color: #8E8E8E;
}
.chf-card-meta .heat-icon{width: 18px;}

.chf-rating-val { font-weight: 500; }

.chf-card-footer { margin-top: auto; padding-top: 10px; }

.chf-view-details-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #306F98;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    transition: background .18s;
    font-family: "Nunito";
}

.chf-view-details-btn:hover { background: var(--accent-hover); color: #fff; }

/* ── "Showing nearest" fallback banner ────────────────────────────
   Shown above results when nothing was found within the requested
   radius, so the user still sees the nearest homes instead of a
   blank "no results" state. Spans the full card grid. */
.chf-fallback-note {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.chf-fallback-note svg { flex-shrink: 0; }

/* ── Empty state ───────────────────────────────────────────────── */
.chf-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.chf-empty-state svg { display: block; margin: 0 auto 14px; color: #ccc; }
.chf-empty-state p   { font-size: 15px; font-weight: 500; }
.chf-empty-sub       { font-size: 13px; font-weight: 400 !important; margin-top: 5px; }

/* ── Pagination ────────────────────────────────────────────────── */
.chf-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.chf-page-btn {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
    min-width: 36px;
}

.chf-page-btn.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chf-page-btn:hover:not(.is-active):not(:disabled) { background: var(--accent-light); color: var(--accent); }
.chf-page-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ── Map ───────────────────────────────────────────────────────── */
.chf-map {
    width: 100%;
    height: 520px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.chf-map-view { position: relative; }
.chf-map-view .chf-marker {
    width: 48px;
    height: 48px;
}
.chf-marker {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 50%;
    transform: rotate(-45deg);
    /* border: 3px solid #fff; */
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    cursor: pointer;
    transition: transform .15s, background .15s;
}

.chf-marker:hover,
.chf-marker.is-active { background: #BB7057; transform: rotate(-45deg) scale(1.18); }

.chf-marker-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    color: #fff;
}

/* Map popup */
.chf-map-popup {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 8px 28px rgba(0,0,0,.16);
    overflow: hidden;
    z-index: 10;
    padding: 24px;
    gap: 20px;
}
.chf-popup-close:hover,
.chf-popup-close:focus-within{
    background: unset;
    color: #686868;
}
.chf-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    /* background: rgba(0,0,0,.45); */
    color: #686868;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
 .chf-popup-close svg{
    width:18px;
    height:18px;
 }

.chf-popup-image { height: 140px; overflow: hidden; width: 180px; }
.chf-popup-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.chf-popup-body { width: 65%; }
.chf-popup-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.chf-popup-location { font-size: 12px; color: var(--text-muted); margin-bottom: 7px; }
.chf-popup-phone { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 500; }

.chf-popup-actions { display: block; }
.chf-popup-callus-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    color: #306F98;
    border: 1px solid #306F98;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    font-family: "Nunito";
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s;
}
.chf-popup-callus-btn:hover { background: #F2F7FA; color: #306F98; }
.chf-popup-callus-btn .chf-callus-icon { width: 16px; height: 16px; }
.chf-need-help{margin-top:24px;}
@media only screen and (max-width: 768px){
    .chf-popup-body{
        width: 100%;
    }
    .chf-map-popup .chf-popup-callus-btn{
        flex: 1;
    }
    .chf-need-help{
        display: none!important;
    }
}

/* ── Loading ───────────────────────────────────────────────────── */
.chf-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
    z-index: 20;
    border-radius: var(--radius-lg);
}

@keyframes chf-spin { to { transform: rotate(360deg); } }

.chf-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--accent-light);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: chf-spin .65s linear infinite;
}


.inner-search_container input.chf-location-input {
    border: 1px solid #8E8E8E!important;
    border-radius: 0;
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
    background: #fff;
    font-family: "Nunito";
    font-size: 16px;
    color: #4A4F54;
    padding: 15.5px 20px;
    width: 330px;
    height: 54px;
}
.inner-search_container .chf-search-btn{
    border-radius: unset;
    border-top-right-radius: 25px;
    font-family: 'Nunito';
    border-bottom-right-radius: 25px;
    align-items: center;
    width: 174px;
}

.chf-radius-wrap {
    background: #fff;
    height: 54px;
    border-radius: 4px;
    border: 1px solid #8E8E8E;
}
.chf-sidebar-heading.chf-filters img{
    display: none;
}

@media only screen and (max-width: 768px){
   aside.chf-sidebar {
      position: unset;
      /* display: none; */
      background: #F9F9F9;
      gap: 0;
   }
   .chf-radius-wrap{
      display: none;
   }
   body.page-id-1456 .chf-radius-wrap{
      display: block;
   }
   .chf-clear-all-link{
      display: none;
   }
   .chf-search-btn{
      font-size: 0px;
      width: auto!important;
   }
   .inner-search_container input.chf-location-input{
      width: 100%!important;
   }
   .chf-card-image,
   .inner-search_container{
      width: 100%;
   }
   .chf-sidebar-heading.chf-filters{
        background: #EFE9E1;
        padding: 12px 16px;
        font-weight: 600;
    }
   .chf-sidebar-heading.chf-filters img{
        display: block;
        transition: transform 0.35s ease;
    }
   .chf-sidebar-heading.chf-filters img.is-open{
        transform: rotate(180deg);
    }

    /* Slide in / slide out — grid-template-rows animates to natural
       content height, which is important since the filter checkboxes
       inside load in asynchronously (so a fixed max-height won't work). */
    .chf-sidebar-collapsible{
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.35s ease;
    }
    .chf-sidebar-collapsible.is-open{
        grid-template-rows: 1fr;
    }
    .chf-sidebar-collapsible-inner{
        overflow: hidden;
        min-height: 0;
        /* padding-top: 24px; */
    }
    .chf-sidebar-collapsible .chf-sidebar-section{
        padding: 16px;
    }

    .chf-map-popup .chf-popup-phone,
    .chf-map-popup .chf-care-tags,
    .chf-map-popup .chf-card-meta{
        display: none;
    }
    .chf-map-popup{
        flex-direction: column;
    }
    .chf-popup-image{
        width: 100%;
    }
    .chf-map-popup .chf-popup-actions{
        display: flex;
        gap: 10px;
    }
    .chf-map-popup .chf-popup-actions .chf-view-details-btn{
        width: auto;
        flex: 1;
    }
    .chf-map-popup .chf-popup-callus-btn{
        display: flex;
        flex-direction: row-reverse;
    }

    .chf-clear-filters-btn {
        width: 100%;
        padding: 13px 0;
        border: 1px solid #8E8E8E;
        border-radius: 100px;
        background: transparent;
        font-family: "Nunito";
        font-size: 15px;
        font-weight: 600;
        color: #4A4F54;
        cursor: pointer;
        transition: background .15s, color .15s;
    }
    .chf-clear-filters-btn:active {
        background: #EFE9E1;
    }
    .chf-clear-filters-section{
        display: block;
    }
    .chf-sidebar-collapsible-inner{
        gap: 0px;
    }
    button.chf-clear-filters-btn {
        border: 2px solid #306F98;
    }
    button.chf-clear-filters-btn:hover,
    button.chf-clear-filters-btn:focus{
        background: #dee6ec;
        color: #4A4F54;
    }

} 

@media only screen and (min-width: 1100px){
    .chf-sidebar{
        margin-top: 12px;
    }
}

/* ══════════════════════════════════════════════════════════════════
   WIDGET 3 — Search + Grid
══════════════════════════════════════════════════════════════════ */

.chf-searchgrid-widget { width: 100%; }

.chf-searchgrid-widget .chf-sg-search {
    margin-bottom: 32px;
}

/* ── Grid layout ───────────────────────────────────────────────── */
.chf-grid-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.chf-grid-cards.chf-grid-cols-1 { grid-template-columns: 1fr; }
.chf-grid-cards.chf-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
    .chf-grid-cards,
    .chf-grid-cards.chf-grid-cols-3 { grid-template-columns: 1fr; }
}

/* ── Grid card (image on top, vertical stack) ────────────────────── */
.chf-grid-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #E5E5E5;
    border-radius: 16px;
    padding: 24px;
    gap: 24px;
    transition: box-shadow .2s, transform .18s;
    background: #fff;
}

.chf-grid-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.chf-grid-card-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.chf-grid-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    max-height: 220px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16);
}

.chf-grid-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    background: #f0f0f0;
}

.chf-grid-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chf-grid-card-title {
    font-size: 33.18px;
    font-weight: 600;
    color: #424242;
    line-height: 1.3;
    font-family: "Lora";
    margin: unset;
}

.chf-grid-card-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 70px;
}

.chf-grid-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    color: #686868;
    font-family: "Nunito";
}
.chf-grid-card-location svg {
    width: 16px;
    height: 16px;
}

.chf-grid-card-phone {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    font-family: "Nunito";
}

.chf-grid-card-phone:hover { color: var(--accent-hover); }

.chf-grid-card-footer { max-width: 240px;  }

/* ── Empty / loading states ──────────────────────────────────────── */
.chf-grid-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.chf-grid-empty svg { display: block; margin: 0 auto 14px; color: #ccc; }
.chf-grid-empty p   { font-size: 15px; font-weight: 500; }

.chf-searchgrid-widget { position: relative; }

/* Widget 4 — Grid (results only) */
.chf-grid-widget { width: 100%; position: relative; }
.chf-grid-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
    z-index: 20;
    border-radius: var(--radius-lg);
}

/* ── View Map button ──────────────────────────────────────────────── */
.chf-view-map-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.chf-view-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid var(--accent, #306F98);
    border-radius: 100px;
    background: #fff;
    color: var(--accent, #306F98);
    font-size: 15px;
    font-weight: 500;
    font-family: "Nunito";
    cursor: pointer;
    transition: background .15s, color .15s;
}

.chf-view-map-btn:hover {
    background: var(--accent, #306F98);
    color: #fff;
}
p.chf-popup-location {
    display: flex;
    align-items: center;
    gap: 8.33px;
    font-size: 16px;
    font-weight: 400;
    font-family: "Nunito";
}
.chf-popup-title{
    font-size: 23px;
    font-family: "Lora";
    font-weight: 600;
}
p.chf-popup-location svg{
    width: 14px;
    height: 14px;
}
.chf-popup-phone{
    font-size: 18px;
    font-weight: 700;
    font-family: "Nunito";
    color: #3F769A;
}
.chf-popup-phone:hover,
.chf-popup-phone:hover svg{
    color: #285d7f;
    filter: brightness(0) saturate(100%) invert(31%) sepia(37%) saturate(893%) hue-rotate(159deg) brightness(92%) contrast(91%);
}

@media only screen and (max-width: 528px){
    .chf-grid-card{
        gap: 16px;
    }
    .chf-grid-card-body,
    .chf-grid-card-meta-row{
        gap: 8px;
    }
    .chf-grid-card-footer {
        max-width: 100%;
    }
    .chf-grid-card-title{
        font-size: 23px;
    }
    .chf-grid-card-body .chf-care-tags{
        margin: unset;
    }
}