/* Shared responsive rules for the complete static site. */

@media (max-width: 767px) {
    .hero-banner-title .hero-title-name {
        display: inline-block;
        white-space: nowrap;
        font-size: min(1em, 8vw);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    #header a[href^="tel:"] {
        white-space: nowrap;
        font-size: 13px;
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 1199px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    img,
    video,
    svg,
    iframe,
    object,
    embed,
    figure {
        max-width: 100%;
    }

    #topbar,
    #container,
    #header,
    #main-navigation,
    #breadcrumb,
    #banner,
    #content,
    #footer,
    .section,
    .section-journey,
    .career {
        min-width: 0;
        max-width: 100%;
    }

    #topbar,
    #header,
    #main-navigation,
    #breadcrumb,
    #banner,
    #content,
    #footer {
        width: 100%;
    }

    .container,
    #topbar > .container,
    #header > .container,
    #main-navigation > .container,
    #breadcrumb > .container,
    #banner > .container,
    #content .container,
    #footer > .container {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .row,
    .row > [class*="col-"] {
        min-width: 0;
    }

    .row > [class*="col-"] {
        flex-shrink: 1;
    }

    #header > .container > .row,
    #main-navigation .menu {
        min-width: 0;
        max-width: 100%;
    }

    #header > .container > .row > [class*="col-"],
    #main-navigation .menu > li {
        min-width: 0;
    }

    #header .logo img,
    #footer .logo img {
        height: auto;
        max-width: 100%;
    }

    #main-navigation .menu > li > a {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .box,
    .news-box,
    .post,
    .news-item,
    .care-home-card,
    .care-card,
    .list5 li,
    .list4 li,
    .info-card,
    .card,
    .section .body,
    .section .content {
        min-width: 0;
        max-width: 100%;
    }

    .form-control,
    input,
    select,
    textarea,
    button,
    .btn,
    .wp-block-button__link {
        max-width: 100%;
    }

    .table-responsive,
    .wp-block-table {
        max-width: 100%;
        overflow-x: auto;
    }

    pre,
    code {
        max-width: 100%;
        overflow-x: auto;
    }

    #side-widget {
        right: 0 !important;
    }

    #hj-float {
        right: 12px !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    #header,
    #topbar,
    #main-navigation {
        width: 100% !important;
        max-width: 100% !important;
    }

    #header > .container,
    #main-navigation > .container {
        width: 100% !important;
        max-width: 100% !important;
    }

    #header > .container > .row {
        max-width: 100%;
    }

    #header .col.logo,
    #header .col.text-xl-center.logo {
        min-width: 0;
        flex: 1 1 0;
    }

    #main-navigation .menu {
        justify-content: space-between !important;
        gap: 8px 16px;
    }

    #main-navigation .menu > li > a {
        font-size: 14px;
        white-space: nowrap;
    }

    .fade-in-left,
    .fade-in-right {
        transform: none !important;
    }
}

@media (max-width: 767px) {
    #header > .container {
        min-width: 0;
        max-width: 100%;
    }

    #header > .container > .row {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        flex-wrap: nowrap;
    }

    #header > .container > .row > [class*="col-"] {
        min-width: 0;
    }

    #header .col.logo,
    #header .col.text-xl-center.logo {
        min-width: 0;
        flex: 1 1 auto;
    }

    #header .logo img {
        max-height: 56px;
    }

    #main-navigation {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        left: -100% !important;
        top: 130px;
        height: calc(100vh - 130px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .open-menu #main-navigation {
        left: 0 !important;
        z-index: 1200;
    }

    .open-menu #side-widget,
    .open-menu #hj-float {
        display: none !important;
    }

    #side-widget {
        top: auto !important;
        bottom: 96px !important;
        transform: none !important;
        transform-origin: right bottom;
    }

    #main-navigation > .container {
        width: 100% !important;
        min-width: 0;
        max-width: 100% !important;
        padding-left: 16px;
        padding-right: 16px;
    }

    #main-navigation .menu {
        width: auto;
        min-width: 0;
        max-width: none;
        margin-left: -16px;
        margin-right: -16px;
    }

    #main-navigation .menu > li > a {
        padding: 12px 16px;
        font-size: clamp(16px, 4.4vw, 20px);
        line-height: 1.5;
        white-space: normal;
    }

    #main-navigation .mega-menu-panel {
        width: 100%;
        max-width: 100%;
    }

    #content > .fade-in-up,
    #content > .section,
    #content > div {
        min-width: 0;
        max-width: 100%;
    }

    #content .row > [class*="col-md-"]:not(.col-6),
    #content .row > [class*="col-lg-"]:not(.col-6),
    #content .row > [class*="col-xl-"]:not(.col-6) {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    #content .row.justify-content-between,
    #content .row.g-3,
    #content .row.g-4 {
        min-width: 0;
        max-width: 100%;
    }

    #content .fade-in-left,
    #content .fade-in-right {
        transform: none !important;
    }

    #content .row > [class*="col-"] > img,
    #content .row > [class*="col-"] figure,
    #content .row > [class*="col-"] .figure1,
    #content .row > [class*="col-"] .image-container {
        max-width: 100%;
    }

    .section .row,
    .section .row > [class*="col-"] {
        min-width: 0;
    }

    .section .row > [class*="col-md-"]:not(.col-6),
    .section .row > [class*="col-lg-"]:not(.col-6),
    .section .row > [class*="col-xl-"]:not(.col-6) {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    #banner .container,
    #banner .box,
    #banner .content,
    #banner .form,
    #banner .form-group {
        max-width: 100%;
    }

    #banner img,
    #banner video,
    #banner iframe {
        max-width: 100%;
    }

    .slick-slider,
    .slick-list {
        width: 100%;
        max-width: 100%;
    }

    #footer > .container > .row {
        min-width: 0;
        max-width: 100%;
        row-gap: 32px;
    }

    #footer > .container > .row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    #footer > .container > .row > [class*="col-"]:first-child {
        text-align: center;
    }

    #footer .footer-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 16px;
    }

    #footer .footer-links li {
        margin: 0;
        min-width: 0;
    }

    #footer > .container > footer .copyright {
        text-align: center;
        overflow-wrap: anywhere;
    }

    .section h1,
    .section h2,
    .section h3,
    .section h4,
    .section h5,
    .section h6,
    .section p,
    .section li,
    .section a {
        overflow-wrap: anywhere;
    }

    .section input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
    .section select,
    .section textarea,
    .section .form-control {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    #header .logo img {
        max-height: 50px;
    }

    #side-widget {
        right: 0 !important;
        top: auto !important;
        bottom: 88px !important;
        transform: none !important;
        transform-origin: right bottom;
    }

    #hj-float {
        right: 8px !important;
        transform: scale(0.9);
        transform-origin: right bottom;
    }

    .addtoany_list .a2a_label {
        left: auto !important;
        right: 0 !important;
    }

    .facetwp-facet-pagination {
        width: 100%;
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .facetwp-facet-pagination .facetwp-pager {
        width: 100%;
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 8px;
    }

    #footer .footer-links {
        column-gap: 12px;
    }

    body:not(.home) .care-card {
        min-height: 300px;
    }
}

/* Featured-homes cards: fill photos, no empty white, arrows sit close. */
section.card-featured-homes .featured-homes-slider .slide {
    padding: 0 10px;
}
section.card-featured-homes .featured-homes-slider {
    margin: 20px 0 12px;
    padding-bottom: 0;
}
section.card-featured-homes .featured-homes-slider .slick-list {
    padding-bottom: 0 !important;
    overflow: hidden;
}
section.card-featured-homes .news-box {
    padding: 0;
    background: #fff;
}
section.card-featured-homes .news-box,
section.card-featured-homes .news-box .post {
    display: flex;
    flex-direction: column;
    height: 100%;
}
section.card-featured-homes .news-box .figure1 {
    position: relative;
    overflow: hidden;
    flex: 1 1 0;
    min-height: 280px;
    margin: 0;
}
section.card-featured-homes .news-box .figure1 img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center;
}
section.card-featured-homes .news-box .post .content {
    flex: 0 0 auto !important;
    padding: 14px 16px 16px !important;
}
section.card-featured-homes .read-more-toggle {
    display: none;
}
section.card-featured-homes .slick-track {
    display: flex;
    align-items: stretch;
}
section.card-featured-homes .slick-slide.slide,
section.card-featured-homes .slick-slide {
    display: flex !important;
    flex-direction: column;
    height: auto !important;
}
section.card-featured-homes .slick-slide .news-box,
section.card-featured-homes .slick-slide > .box {
    flex: 1 1 auto;
    height: 100%;
    min-height: 420px;
}
section.card-featured-homes .slick-arrow {
    bottom: -28px !important;
    transform: none !important;
    left: auto;
    right: auto;
    margin: 0;
}
section.card-featured-homes .slick-arrow:hover {
    transform: scale(1.08) !important;
}
section.card-featured-homes .slick-prev.slick-arrow {
    left: calc(50% - 62px) !important;
    right: auto !important;
}
section.card-featured-homes .slick-next.slick-arrow {
    left: calc(50% + 12px) !important;
    right: auto !important;
}
