

#h5-properties-section,
#h5-properties-section * {
    box-sizing: border-box;
}

#h5-properties-section {

    --navy: #12355B;
    --navy-dark: #0B2746;

    --teal: #087F6A;
    --teal-dark: #066B5A;
    --teal-soft: #EAF6F3;

    --gold: #C9973E;

    --text: #17202A;
    --body: #475467;
    --muted: #7B8794;

    --border: #E4E7EC;
    --white: #FFFFFF;

    width: 100%;

    background: #FFFFFF;

    padding: 42px 0 58px;

    font-family:
        "Plus Jakarta Sans",
        Arial,
        sans-serif;

    overflow: hidden;
}


/* =========================================================
 CONTAINER
========================================================= */

.h5p-container {

    width: min(
        1240px,
        calc(100% - 40px)
    );

    margin: 0 auto;
}


/* =========================================================
 TOP HEADER
========================================================= */

.h5p-header {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 25px;

    margin-bottom: 22px;
}


.h5p-heading-area {

    min-width: 0;
}


/* SMALL TOP TEXT */

.h5p-eyebrow {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin-bottom: 7px;

    color: var(--teal);

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .9px;
}


.h5p-eyebrow-dot {

    width: 6px;

    height: 6px;

    background: var(--teal);

    border-radius: 50%;
}


/* HEADING */

.h5p-title {

    margin: 0;

    color: var(--navy);

    font-size: 25px;

    line-height: 1.25;

    font-weight: 700;

    letter-spacing: -.35px;
}


/* SUB HEADING */

.h5p-subtitle {

    margin: 7px 0 0;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;

    font-weight: 500;
}


#h5CurrentPropertyRegion {

    color: var(--navy);

    font-weight: 700;
}


/* =========================================================
 RIGHT SIDE CONTROLS
========================================================= */

.h5p-controls {

    display: flex;

    align-items: center;

    gap: 8px;

    flex-shrink: 0;
}


/* VIEW ALL */

.h5p-view-all {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin-right: 8px;

    color: var(--teal);

    font-size: 12px;

    font-weight: 700;

    text-decoration: none;
}


.h5p-view-all:hover {

    color: var(--teal-dark);
}


.h5p-view-all svg {

    width: 15px;

    height: 15px;

    fill: none;

    stroke: currentColor;

    stroke-width: 2;

    stroke-linecap: round;

    stroke-linejoin: round;
}


/* ARROWS */

.h5p-arrow {

    width: 38px;

    height: 38px;

    padding: 0;

    border:
        1px solid
        var(--border);

    border-radius: 50%;

    background: #FFFFFF;

    color: var(--navy);

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    transition: .2s ease;
}


.h5p-arrow:hover {

    border-color: var(--teal);

    color: var(--teal);

    background: var(--teal-soft);
}


.h5p-arrow svg {

    width: 17px;

    height: 17px;

    fill: none;

    stroke: currentColor;

    stroke-width: 2;

    stroke-linecap: round;

    stroke-linejoin: round;
}


/* =========================================================
 SLIDER
========================================================= */

.h5p-slider {

    position: relative;

    width: 100%;

    overflow: hidden;
}


.h5p-track {

    display: flex;

    gap: 18px;

    width: 100%;

    overflow-x: auto;

    overflow-y: hidden;

    scroll-behavior: smooth;

    scroll-snap-type: x mandatory;

    scrollbar-width: none;

    -ms-overflow-style: none;

    padding: 2px 2px 14px;
}


.h5p-track::-webkit-scrollbar {

    display: none;
}


/* =========================================================
 PROPERTY CARD
========================================================= */

.h5p-card {

    flex:
        0 0
        calc((100% - 54px) / 4);

    min-width: 0;

    scroll-snap-align: start;

    background: #FFFFFF;

    border:
        1px solid
        var(--border);

    border-radius: 13px;

    overflow: hidden;

    cursor: pointer;

    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease;
}


.h5p-card:hover {

    transform: translateY(-4px);

    border-color:
        rgba(8,127,106,.25);

    box-shadow:
        0 14px 34px
        rgba(16,42,67,.11);
}


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

.h5p-image-wrap {

    position: relative;

    width: 100%;

    aspect-ratio: 1.35 / 1;

    overflow: hidden;

    background: #EEF2F5;
}


.h5p-image {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition:
        transform .45s ease;
}


.h5p-card:hover .h5p-image {

    transform: scale(1.035);
}


/* =========================================================
 VERIFIED / FEATURED BADGE
========================================================= */

.h5p-badge {

    position: absolute;

    top: 12px;

    left: 12px;

    z-index: 3;

    padding: 6px 9px;

    border-radius: 6px;

    background:
        rgba(255,255,255,.95);

    color: var(--teal);

    font-size: 9px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .3px;
}


/* =========================================================
 HEART
========================================================= */

.h5p-heart {

    position: absolute;

    top: 12px;

    right: 12px;

    z-index: 4;

    width: 36px;

    height: 36px;

    padding: 0;

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

    border-radius: 50%;

    background:
        rgba(8,25,43,.42);

    color: #FFFFFF;

    display: flex;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    backdrop-filter: blur(5px);

    -webkit-backdrop-filter: blur(5px);

    transition: .18s ease;
}


.h5p-heart:hover {

    transform: scale(1.07);

    background:
        rgba(8,25,43,.65);
}


.h5p-heart.saved {

    background: var(--teal);

    border-color: var(--teal);
}


.h5p-heart svg {

    width: 18px;

    height: 18px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.8;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.h5p-heart.saved svg {

    fill: currentColor;
}


/* =========================================================
 PRICE
========================================================= */

.h5p-price {

    position: absolute;

    left: 12px;

    bottom: 12px;

    z-index: 3;

    padding: 7px 10px;

    background: #FFFFFF;

    border-radius: 6px;

    color: var(--navy);

    font-size: 15px;

    line-height: 1;

    font-weight: 700;

    box-shadow:
        0 4px 12px
        rgba(0,0,0,.10);
}


/* =========================================================
 CONTENT
========================================================= */

.h5p-content {

    padding: 15px 15px 16px;
}


.h5p-property-title {

    margin: 0;

    color: var(--navy);

    font-size: 15px;

    line-height: 1.4;

    font-weight: 700;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.h5p-location {

    margin-top: 7px;

    color: var(--body);

    font-size: 11px;

    line-height: 1.5;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.h5p-location strong {

    color: var(--text);

    font-weight: 600;
}


/* =========================================================
 DETAILS
========================================================= */

.h5p-details {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 11px;

    color: var(--body);

    font-size: 10px;

    font-weight: 600;
}


.h5p-detail-divider {

    width: 3px;

    height: 3px;

    border-radius: 50%;

    background: #B7C0CB;
}


/* =========================================================
 BOTTOM META
========================================================= */

.h5p-meta {

    margin-top: 12px;

    padding-top: 11px;

    border-top:
        1px solid
        #EEF1F4;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 8px;

    color: var(--muted);

    font-size: 9px;

    font-weight: 500;
}


.h5p-source {

    display: inline-flex;

    align-items: center;

    gap: 5px;
}


.h5p-source-dot {

    width: 5px;

    height: 5px;

    border-radius: 50%;

    background: var(--teal);
}


/* =========================================================
 SLIDE PROGRESS
========================================================= */

.h5p-progress-row {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    margin-top: 7px;
}


.h5p-progress-dot {

    width: 6px;

    height: 6px;

    border: 0;

    padding: 0;

    border-radius: 20px;

    background: #D7DDE4;

    cursor: pointer;

    transition:
        width .25s ease,
        background .25s ease;
}


.h5p-progress-dot.active {

    width: 22px;

    background: var(--teal);
}


/* =========================================================
 EMPTY
========================================================= */

.h5p-empty {

    display: none;

    padding: 45px 20px;

    border:
        1px dashed
        var(--border);

    border-radius: 12px;

    background: #F8FAFB;

    text-align: center;
}


.h5p-empty.show {

    display: block;
}


.h5p-empty-title {

    color: var(--navy);

    font-size: 16px;

    font-weight: 700;
}


.h5p-empty-text {

    margin-top: 6px;

    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
 TABLET
========================================================= */

@media (max-width: 1024px) {

    .h5p-card {

        flex:
            0 0
            calc((100% - 36px) / 3);
    }

}


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

@media (max-width: 767px) {

    #h5-properties-section {

        padding:
            34px 0 48px;
    }


    .h5p-container {

        width:
            calc(100% - 24px);
    }


    .h5p-header {

        align-items:
            flex-start;

        margin-bottom:
            17px;
    }


    .h5p-title {

        font-size:
            20px;
    }


    .h5p-subtitle {

        font-size:
            11px;
    }


    .h5p-view-all {

        display: none;
    }


    .h5p-arrow {

        width: 34px;

        height: 34px;
    }


    .h5p-track {

        gap: 13px;

        padding-right: 30px;
    }


    .h5p-card {

        flex:
            0 0
            78%;
    }

}


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

@media (max-width: 420px) {

    .h5p-card {

        flex:
            0 0
            84%;
    }

}


.h5p-card[data-url]{cursor:pointer}
.h5p-demo-badge{background:#fff3dd;color:#9a5900}

/* Phase 4A: recommended-only region and property type filtering */
.h5p-type-filter-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #43536a; white-space: nowrap; }
.h5p-type-filter { min-width: 125px; max-width: 175px; padding: 8px 10px; border: 1px solid #d8e1e9; border-radius: 8px; background: #fff; color: #122e4e; font-size: 12px; }
@media (max-width: 700px) { .h5p-type-filter-label { width: 100%; } .h5p-type-filter { flex: 1; max-width: none; } }


/* H5 mobile/tablet recommended-properties four-row header — 2026-11-17.
   Grid placement works with the existing PHP markup; no JS/query changes. */
@media (max-width: 1024px) {
  #h5-properties-section .h5p-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 38px 38px !important;
    grid-template-rows: auto auto auto auto !important;
    column-gap: 9px !important;
    row-gap: 12px !important;
    align-items: center !important;
    width: 100% !important;
  }
  #h5-properties-section .h5p-heading-area,
  #h5-properties-section .h5p-controls {
    display: contents !important;
  }
  #h5-properties-section .h5p-eyebrow {
    grid-column: 1 !important; grid-row: 1 !important;
    margin: 0 !important; width: auto !important;
  }
  #h5-properties-section #h5pPrev {
    grid-column: 2 !important; grid-row: 1 !important;
  }
  #h5-properties-section #h5pNext {
    grid-column: 3 !important; grid-row: 1 !important;
  }
  #h5-properties-section .h5p-title {
    grid-column: 1 / -1 !important; grid-row: 2 !important;
    margin: 0 !important; width: 100% !important;
    max-width: 100% !important; overflow-wrap: normal !important;
  }
  #h5-properties-section .h5p-subtitle {
    grid-column: 1 / -1 !important; grid-row: 3 !important;
    margin: 0 !important; width: 100% !important;
    max-width: 100% !important; overflow-wrap: normal !important;
  }
  #h5-properties-section .h5p-type-filter-label {
    grid-column: 1 !important; grid-row: 4 !important;
    display: flex !important; flex-wrap: wrap !important;
    align-items: center !important; gap: 8px !important;
    min-width: 0 !important; width: auto !important;
    white-space: normal !important;
  }
  #h5-properties-section .h5p-type-filter {
    flex: 1 1 100px !important; width: auto !important;
    min-width: 100px !important; max-width: 190px !important;
  }
  #h5-properties-section .h5p-view-all {
    grid-column: 2 / 4 !important; grid-row: 4 !important;
    display: inline-flex !important; justify-self: end !important;
    margin: 0 !important; font-size: 11px !important;
    white-space: nowrap !important;
  }
  #h5-properties-section .h5p-arrow {
    width: 38px !important; height: 38px !important;
  }
}
@media (max-width: 540px) {
  #h5-properties-section .h5p-header {
    grid-template-columns: minmax(0, 1fr) 34px 34px !important;
    grid-template-rows: auto auto auto auto auto !important;
    row-gap: 11px !important;
  }
  #h5-properties-section .h5p-type-filter-label {
    grid-column: 1 / -1 !important; grid-row: 4 !important;
    flex-wrap: nowrap !important;
  }
  #h5-properties-section .h5p-view-all {
    grid-column: 1 / -1 !important; grid-row: 5 !important;
    justify-self: start !important;
    font-size: 12px !important;
  }
  #h5-properties-section .h5p-type-filter {
    min-width: 0 !important; max-width: none !important;
  }
  #h5-properties-section .h5p-arrow {
    width: 34px !important; height: 34px !important;
  }
}
