/* Shared hero/search block rendered by developer/top_search_3.php. */
#home.shared-hero {
    position: relative;
    isolation: isolate;
    overflow: visible;
    background: #f6f9fd;
    height: auto;
    min-height: 520px;
}

#home-wrapper.shared-hero-wrapper {
    margin-bottom: clamp(56px, 5vw, 92px);
}

#home .container-fluid {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

#home .bg-slider {
    position: relative;
    width: 100%;
    min-height: clamp(500px, 38vw, 580px);
    padding: clamp(48px, 4.7vw, 78px) clamp(22px, 4vw, 72px) clamp(42px, 3.8vw, 62px);
}

#home .shared-hero__inner {
    align-items: flex-start !important;
    justify-content: center !important;
    width: min(100%, 1540px);
    margin: 0 auto;
    gap: clamp(24px, 3vw, 38px);
}

#home .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

#home [class*="col-"] {
    position: relative;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
}

#home .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    #home .col-md-1 { flex: 0 0 8.333%; max-width: 8.333%; }
    #home .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    #home .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
}

@media (min-width: 992px) {
    #home .col-lg-1 { flex: 0 0 8.333%; max-width: 8.333%; }
    #home .col-lg-2 { flex: 0 0 20%; max-width: 20%; }
    #home .col-lg-4 { flex: 0 0 32%; max-width: 32%; }
    #home .col-lg-5 { flex: 0 0 34%; max-width: 34%; }
}

#home .d-flex { display: flex !important; }
#home .flex-column { flex-direction: column !important; }
#home .justify-content-around { justify-content: space-around !important; }
#home .align-items-center { align-items: center !important; }
#home .w-100 { width: 100% !important; }
#home .h-100 { min-height: 100%; }
#home .mt-3 { margin-top: 0 !important; }

#home .shared-hero__inner {
    align-items: flex-start !important;
    justify-content: center !important;
}

#home .lcp-hero-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    contain: paint;
    background: #ffffff;
}

#home .lcp-hero-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(248, 251, 255, 0.96) 0%, rgba(248, 251, 255, 0.82) 28%, rgba(248, 251, 255, 0.08) 52%, rgba(248, 251, 255, 0.06) 78%, rgba(248, 251, 255, 0.5) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 46%, rgba(246, 249, 253, 0.84) 100%);
    pointer-events: none;
}

#home .lcp-hero-image .lcp-hero-img {
    position: absolute;
    inset: 0;
    width: 88%;
    height: 100%;
    left: auto;
    display: block;
    object-fit: cover;
    object-position: center center;
}

#home .shared-hero__copy {
    width: min(100%, 610px);
    display: block;
    position: relative;
    z-index: 2;
    padding: 0;
    margin: 0;
    text-align: left;
}

#home .search-title-wrapper h1,
#home .search-title-wrapper h2 {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #061636;
    text-shadow: none;
    font-weight: 700;
    font-size: clamp(2.3rem, 3.75vw, 3.85rem);
    line-height: 1.12;
    letter-spacing: 0;
    text-align: left;
    text-transform: none !important;
    word-break: normal;
}

#home .search-title-wrapper h1 b,
#home .search-title-wrapper h2 b,
#home .search-title-wrapper h1 strong,
#home .search-title-wrapper h2 strong {
    font-weight: 800;
}

#home .search-title-wrapper h1::after,
#home .search-title-wrapper h2::after {
    content: "";
    display: block;
    width: 96px;
    height: 5px;
    margin: clamp(18px, 2.2vw, 28px) 0 0;
    border-radius: 999px;
    background: #0877b9;
}

#home .shared-hero__lead {
    max-width: 560px;
    margin: clamp(18px, 2vw, 24px) 0 0;
    color: #53637e;
    font-size: clamp(1.05rem, 1.4vw, 1.32rem);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0;
}

#home .search-form-wrapper {
    width: min(100%, 1280px);
    position: relative;
    z-index: 3;
    margin: 0 auto;
    padding: clamp(18px, 2.1vw, 26px);
    border: 1px solid rgba(151, 164, 187, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 22px 52px rgba(15, 31, 55, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#home .select2-container--open {
    z-index: 1100;
}

#home .shared-hero__search-row {
    align-items: stretch;
    row-gap: 14px;
}

#home .shared-hero__search-col--type {
    flex: 0 0 20%;
    max-width: 20%;
}

#home .shared-hero__search-col--city {
    flex: 0 0 32%;
    max-width: 32%;
}

#home .shared-hero__search-col--keyword {
    flex: 0 0 38%;
    max-width: 38%;
}

#home .shared-hero__search-col--button {
    flex: 0 0 10%;
    max-width: 10%;
}

#home .shared-hero__search-col {
    display: flex;
}

#home .search-form-wrapper .select-fallback,
#home .search-form-wrapper .select2-container {
    position: relative;
    width: 100% !important;
}

#home .search-form-wrapper select:not(.select2-hidden-accessible) {
    display: block;
    width: 100%;
    min-height: 62px;
    padding: 0 46px 0 56px;
    border: 1px solid #d8dee9;
    border-radius: 8px;
    background-color: #fff;
    color: #50617d;
    font-size: 1rem;
    font-weight: 500;
    line-height: 62px;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#home .search-form-wrapper select:not(.select2-hidden-accessible):focus {
    border-color: #0e5a91;
    outline: none;
    box-shadow: 0 0 0 4px rgba(8, 119, 185, 0.12);
}

#home .search-form-wrapper select:not(.select2-hidden-accessible) option {
    color: #0b1d3a;
}

#home .search-form-wrapper .select-fallback::before,
#home .search-form-wrapper .select2-container::before {
    position: absolute;
    left: 22px;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    color: #5b6c8b;
    font-family: "Font Awesome 6 Free";
    font-size: 1.22rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

#home .shared-hero__field--type::before,
#home .shared-hero__search-col--type .select2-container::before {
    content: "\f19d";
}

#home .shared-hero__field--city::before,
#home .shared-hero__search-col--city .select2-container::before {
    content: "\f3c5";
}

#home .shared-hero__field--keyword::before,
#home .shared-hero__search-col--keyword .select2-container::before {
    content: "\f19c";
}

#home .search-form-wrapper .select-fallback-arrow {
    display: block;
    position: absolute;
    right: 20px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 2px solid #5b6c8b;
    border-bottom: 2px solid #5b6c8b;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

/* Hide the native fallback arrow after Select2 adds its own clickable arrow. */
#home .search-form-wrapper .select2-container ~ .select-fallback-arrow {
    display: none;
}

#home .search-form-wrapper .select2-container .select2-selection--single {
    min-height: 62px;
    height: 62px !important;
    display: flex;
    align-items: center;
    padding: 0 46px 0 56px;
    border: 1px solid #d8dee9;
    border-radius: 8px;
    background-color: #fff;
    background-image: none !important;
    color: #50617d !important;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#home .search-form-wrapper .select2-container--open .select2-selection--single,
#home .search-form-wrapper .select2-container .select2-selection--single:focus {
    border-color: #0e5a91;
    box-shadow: 0 0 0 4px rgba(8, 119, 185, 0.12);
}

#home .search-form-wrapper .select2-container .select2-selection__rendered {
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    overflow: hidden;
    color: #50617d !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#home .search-form-wrapper .select2-container--default .select2-selection--single .select2-selection__placeholder,
#home .search-form-wrapper .select2-container--classic .select2-selection--single .select2-selection__placeholder {
    color: #8a96ab !important;
}

#home .search-form-wrapper .select2-container .select2-selection__arrow {
    display: block;
    width: 42px;
    height: 60px !important;
    right: 0;
    background: transparent;
    border-left: 0;
}

#home .search-form-wrapper .select2-container .select2-selection__arrow b {
    border-color: #5b6c8b transparent transparent;
    border-width: 7px 6px 0;
    margin-left: -7px;
    margin-top: -2px;
}

#home .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    text-transform: none;
}

#home .btn.btn-secondary,
#home .shared-hero__button {
    min-height: 62px;
    height: 62px;
    border: 0;
    border-radius: 8px;
    background: #004a7c;
    color: #fff;
    box-shadow: 0 12px 24px rgba(0, 74, 124, 0.22);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#home .btn.btn-secondary:hover,
#home .btn.btn-secondary:focus-visible,
#home .shared-hero__button:hover,
#home .shared-hero__button:focus-visible {
    background: #00609d;
    color: #fff;
    box-shadow: 0 16px 28px rgba(0, 74, 124, 0.28);
    transform: translateY(-1px);
}

#home .shared-hero__button-text {
    display: none;
}

@media (min-width: 992px) {
    /* Keep the cropped hero compact now that the source image is shorter. */
    #home.shared-hero {
        min-height: clamp(510px, 52vh, 650px);
    }

    /* The image starts under this fade, so its left edge never reads as a vertical seam. */
    #home.shared-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(
            to right,
            #ffffff 0%,
            #ffffff 28%,
            rgba(255, 255, 255, 0.86) 38%,
            rgba(255, 255, 255, 0.42) 54%,
            rgba(255, 255, 255, 0) 68%
        );
        pointer-events: none;
    }

    #hero-image.lcp-hero-image {
        top: 0;
        right: 0;
        left: auto;
        width: 68%;
        height: 100%;
        opacity: 1;
        filter: none;
    }

    #home .lcp-hero-image::before {
        display: none;
    }

    #home #hero-image .lcp-hero-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 50% center;
        opacity: 1;
        filter: none;
        transform: none;
        transform-origin: center center;
    }

    #home .shared-hero__shell.bg-slider {
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        padding-top: clamp(32px, 3.2vw, 48px);
        padding-bottom: clamp(20px, 2vw, 36px);
    }

    #home .d-flex.shared-hero__inner.justify-content-around {
        justify-content: flex-start !important;
    }

    #home .shared-hero__inner.align-items-center {
        align-items: stretch !important;
    }

    #home .shared-hero__inner {
        flex: 1 1 auto;
        min-height: 0;
        gap: clamp(10px, 1.2vw, 18px);
    }

    #home .shared-hero__copy {
        position: relative;
        z-index: 2;
        max-width: 42%;
        margin-top: 0;
        padding-top: 0;
    }

    /* Search bar sits on the lower seam of the hero, overlapping the image slightly */
    #home .search-form-wrapper {
        margin-top: auto;
        margin-bottom: 0;
        transform: translateY(54px);
    }
}

@media (max-width: 1399.98px) {
    #home .bg-slider {
        min-height: 515px;
        padding-left: clamp(26px, 4vw, 54px);
        padding-right: clamp(26px, 4vw, 54px);
    }

    #home .shared-hero__copy {
        width: min(100%, 560px);
    }

    #home .search-form-wrapper {
        width: min(100%, 1120px);
    }
}

@media (max-width: 1199.98px) {
    #home .bg-slider {
        min-height: 500px;
    }

    #home .search-form-wrapper {
        width: min(100%, 920px);
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    /* Narrow laptop/tablet uses the full photo so no person is cut by a column edge. */
    #hero-image.lcp-hero-image {
        left: 0;
        right: 0;
        width: 100%;
    }

    #home .shared-hero__search-col--type,
    #home .shared-hero__search-col--city {
        flex: 0 0 50%;
        max-width: 50%;
    }

    #home .shared-hero__search-col--keyword {
        flex: 0 0 72%;
        max-width: 72%;
    }

    #home .shared-hero__search-col--button {
        flex: 0 0 28%;
        max-width: 28%;
    }

    #home .shared-hero__button-text {
        display: inline;
    }
}

/* Tablet: pull headline up, pin search toward the bottom of the hero (faces stay visible). */
@media (min-width: 768px) and (max-width: 1199.98px) {
    #home .shared-hero__shell.bg-slider {
        display: flex;
        flex-direction: column;
        padding-top: clamp(22px, 3vw, 36px);
        padding-bottom: clamp(14px, 2vw, 26px);
    }

    #home .d-flex.shared-hero__inner.justify-content-around {
        justify-content: flex-start !important;
    }

    #home .shared-hero__inner.align-items-center {
        align-items: stretch !important;
    }

    #home .shared-hero__inner {
        flex: 1 1 auto;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0;
        width: 100%;
    }

    #home .shared-hero__copy {
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0.35rem;
    }

    #home .search-form-wrapper {
        margin-top: auto;
        margin-bottom: clamp(4px, 1vw, 12px);
        transform: translateY(54px);
    }
}

@media (max-width: 1199.98px) {
    #home.shared-hero::before {
        display: none;
    }

    #home .lcp-hero-image::before {
        background: transparent;
    }

    #home .lcp-hero-image .lcp-hero-img {
        width: 100%;
        object-position: 49% center;
    }

    #home .shared-hero__copy {
        width: min(100%, 680px);
    }

    #home .search-title-wrapper h1,
    #home .search-title-wrapper h2,
    #home .shared-hero__lead {
        text-align: left;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    #home #hero-image .lcp-hero-img {
        object-position: 52% center;
    }
}

@media (max-width: 767.98px) {
    #home-wrapper.shared-hero-wrapper {
        margin-bottom: 0;
    }

    #home.shared-hero {
        position: relative;
        min-height: clamp(490px, 76vh, 660px);
        /* White under the search card keeps the following section from creating a visible seam. */
        background: #ffffff;
    }

    /* White top wash keeps the mobile lead readable without tinting the full photo. */
    #home.shared-hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: clamp(210px, 45vh, 330px);
        z-index: 1;
        background: linear-gradient(
            to bottom,
            #ffffff 0%,
            rgba(255, 255, 255, 0.96) 48%,
            rgba(255, 255, 255, 0.74) 72%,
            rgba(255, 255, 255, 0) 100%
        );
        pointer-events: none;
    }

    /* Full-bleed photo behind copy + search; no gradient tint on mobile */
    #home .lcp-hero-image::before,
    #home #hero-image.lcp-hero-image::before {
        display: none !important;
    }

    #home #hero-image.lcp-hero-image::after {
        display: none !important;
    }

    #hero-image.lcp-hero-image {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        overflow: hidden;
        /* Match the page background so translated image edges do not create colored bands. */
        background: #ffffff;
        contain: none;
    }

    /* Gentle frame nudge keeps more people visible while the small scale covers edge gaps. */
    #home #hero-image.lcp-hero-image .lcp-hero-img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        left: 0;
        object-fit: cover;
        transform: translate3d(-2%, 1%, 0) scale(1.04);
        transform-origin: center center;
        will-change: transform;
    }

    #home .shared-hero__shell.bg-slider {
        position: relative;
        z-index: 2;
        box-sizing: border-box;
        min-height: clamp(490px, 76vh, 660px);
        padding: 0.75rem 0 0;
        background: transparent;
        display: flex;
        flex-direction: column;
    }

    #home .shared-hero__inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        margin: 0;
        gap: 0;
    }

    #home .shared-hero__inner::before {
        display: none !important;
    }

    #home .search-title-wrapper h1,
    #home .search-title-wrapper h2 {
        font-size: clamp(2rem, 9.4vw, 2.85rem);
        text-shadow:
            0 0 1.25rem rgba(255, 255, 255, 0.95),
            0 0 2.5rem rgba(255, 255, 255, 0.65),
            0 1px 0 rgba(255, 255, 255, 0.9);
    }

    #home .shared-hero__lead {
        font-size: 1.18rem;
        text-shadow:
            0 0 1rem rgba(255, 255, 255, 0.95),
            0 0 1.75rem rgba(255, 255, 255, 0.7);
    }

    #home .shared-hero__copy {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem 1rem 0.75rem;
        background: transparent;
        position: relative;
        z-index: 2;
    }

    #home .search-form-wrapper {
        position: relative;
        z-index: 3;
        width: auto !important;
        padding: 16px;
        border: 1px solid #dde1e7;
        border-radius: 12px;
        margin: auto 12px 4px;
        background: #ffffff;
        /* Keep shadow soft — heavy bottom blur reads like a grey seam on white */
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    #home .shared-hero__search-row {
        width: 100% !important;
        flex-direction: column;
        gap: 8px;
        margin-left: 0;
        margin-right: 0;
        row-gap: 8px;
    }

    #home .shared-hero__search-col {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100% !important;
        margin-top: 0 !important;
        padding-left: 0;
        padding-right: 0;
    }

    #home .shared-hero__button {
        width: 100%;
        margin-top: 4px;
    }

    #home .search-form-wrapper select:not(.select2-hidden-accessible),
    #home .search-form-wrapper .select2-container .select2-selection--single,
    #home .btn.btn-secondary,
    #home .shared-hero__button {
        min-height: 58px;
        height: 58px !important;
    }

    #home .shared-hero__button-text {
        display: inline;
    }
}

@media (max-width: 480px) {
    #home-wrapper.shared-hero-wrapper {
        margin-bottom: 0;
    }

    #home #hero-image.lcp-hero-image .lcp-hero-img {
        transform: translate3d(0, 0, 0) scale(1.04);
    }

    #home .search-title-wrapper h1,
    #home .search-title-wrapper h2 {
        font-size: clamp(1.82rem, 8.7vw, 2.45rem);
    }

    #home .shared-hero__lead {
        font-size: 1.05rem;
    }

    #home .search-form-wrapper select:not(.select2-hidden-accessible),
    #home .search-form-wrapper .select2-container .select2-selection--single {
        padding-left: 50px;
        padding-right: 42px;
    }
}

/* Images used by city/listing cards below the shared hero. */
.card-ranking-img {
    display: block;
    width: 100%;
    height: auto;
}

.row.city-toc-row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 12px;
}

.city-toc-wrapper,
.card-ranking {
    width: 100%;
}

@media (max-width: 767.98px) {
    .row.city-toc-row {
        padding-left: 8px;
        padding-right: 8px;
    }
}
