/* Soft floating medical bubbles inspired by the supplied reference, scoped to home. */
[data-home-page] > .hero { position: relative; isolation: isolate; overflow: hidden; }
[data-home-page] > .hero > .container { position: relative; z-index: 1; }
[data-home-page] .home-hero-medical-floats {
    position: absolute; inset: 0; z-index: 0; overflow: hidden;
    pointer-events: none; user-select: none;
}
[data-home-page] .home-medical-float {
    position: absolute; display: flex; justify-content: center; align-items: center;
    width: var(--bubble-size, 64px); height: var(--bubble-size, 64px);
    box-sizing: border-box; border-radius: 50%; color: #d8fff5;
    border: 1px solid rgba(230, 255, 251, .58);
    background: radial-gradient(circle at 28% 23%, rgba(255, 255, 255, .35), transparent 57%), rgba(177, 246, 229, .19);
    box-shadow: 0 4px 22px rgba(12, 83, 143, .1), inset 0 0 16px rgba(233, 255, 249, .15);
    animation: home-medical-float 9s ease-in-out infinite;
    will-change: transform;
}
[data-home-page] .home-medical-float svg {
    width: 55%; height: 55%; overflow: visible;
    filter: drop-shadow(0 1px 2px rgba(23, 110, 156, .13));
}
[data-home-page] .home-medical-float--heart { --bubble-size: 78px; top: 14%; right: auto; left: 8%; bottom: auto; animation-duration: 6.8s; animation-delay: 0s; opacity: 0.83; }
[data-home-page] .home-medical-float--pulse { --bubble-size: 69px; top: 63%; right: auto; left: 5%; bottom: auto; animation-duration: 8.6s; animation-delay: -4s; opacity: 0.83; }
[data-home-page] .home-medical-float--stethoscope { --bubble-size: 81px; top: 24%; right: 7%; left: auto; bottom: auto; animation-duration: 7.8s; animation-delay: -3s; opacity: 0.83; }
[data-home-page] .home-medical-float--pill { --bubble-size: 74px; top: 65%; right: 5%; left: auto; bottom: auto; animation-duration: 7.4s; animation-delay: -6s; opacity: 0.83; }
[data-home-page] .home-medical-float--kit { --bubble-size: 52px; top: 75%; right: auto; left: 28%; bottom: auto; animation-duration: 9.2s; animation-delay: -2s; opacity: 0.55; }
[data-home-page] .home-medical-float--cross { --bubble-size: 52px; top: 12%; right: 28%; left: auto; bottom: auto; animation-duration: 7s; animation-delay: -5s; opacity: 0.56; }
[data-home-page] .home-medical-float--clipboard { --bubble-size: 54px; top: 78%; right: 28%; left: auto; bottom: auto; animation-duration: 8.8s; animation-delay: -7s; opacity: 0.5; }
[data-home-page] .home-medical-float--shield { --bubble-size: 48px; top: 11%; right: auto; left: 30%; bottom: auto; animation-duration: 8s; animation-delay: -1s; opacity: 0.48; }
@keyframes home-medical-float {
    0%, 100% { transform: translate3d(-9px, 12px, 0) rotate(-7deg); }
    50% { transform: translate3d(15px, -24px, 0) rotate(9deg); }
}
@media (max-width: 991.98px), (max-width: 1199.98px) and (pointer: coarse) {
    /* Match the white header and keep hero text readable on the light surface. */
    [data-home-page] > .hero { background: var(--white); color: #394c64; padding-bottom: 24px; }
    /* Reuse the original hero blue palette without changing bubble geometry or motion. */
    [data-home-page] .home-medical-float {
        animation-name: home-medical-float-mobile;
        color: #2c7be5;
        border-color: rgba(44, 123, 229, .58);
        background: radial-gradient(circle at 28% 23%, rgba(255, 255, 255, .35), transparent 57%), linear-gradient(180deg, rgba(44, 123, 229, .19) 0%, rgba(106, 162, 224, .19) 100%);
    }
    /* Edges and subdued opacity protect the text and search controls on phones. */
    [data-home-page] .home-medical-float--heart { --bubble-size: 49px; top: 17%; right: auto; left: -10px; opacity: 0.358; animation-duration: 10.2s; }
    [data-home-page] .home-medical-float--pulse { --bubble-size: 55px; top: 45%; right: auto; left: -18px; opacity: 0.358; animation-duration: 12.9s; }
    [data-home-page] .home-medical-float--stethoscope { --bubble-size: 55px; top: 37%; right: -17px; left: auto; opacity: 0.358; animation-duration: 11.7s; }
    [data-home-page] .home-medical-float--pill { --bubble-size: 48px; top: 74%; right: 22px; left: auto; opacity: 0.358; animation-duration: 11.1s; }
    [data-home-page] .home-medical-float--kit { --bubble-size: 42px; top: 75%; right: auto; left: 6%; opacity: 0.254; animation-duration: 13.8s; }
    [data-home-page] .home-medical-float--cross { --bubble-size: 42px; top: 15%; right: 17%; left: auto; opacity: 0.234; animation-duration: 10.5s; }
    [data-home-page] .home-medical-float--clipboard { --bubble-size: 40px; top: 76%; right: 43%; left: auto; opacity: 0.227; animation-duration: 13.2s; }
    [data-home-page] .home-medical-float--shield { --bubble-size: 36px; top: 12%; right: auto; left: 35%; opacity: 0.208; animation-duration: 12s; }
    @keyframes home-medical-float-mobile {
        0%, 100% { transform: translate3d(-4px, 5px, 0) rotate(-4deg); }
        50% { transform: translate3d(7px, -11px, 0) rotate(5deg); }
    }
}
@media (prefers-reduced-motion: reduce) {
    [data-home-page] .home-medical-float { animation: none; will-change: auto; }
}

/* Reference-matched photographic hero on desktop. Mobile retains the existing
   search layout and never requests the desktop-only photo sources. */
[data-home-page] .home-hero-slideshow { display: none; }
@media (min-width: 992px) and (pointer: fine), (min-width: 992px) and (pointer: none), (min-width: 1200px) {
    [data-home-page] > .hero:has(> .home-hero-slideshow) {
        --home-hero-height: clamp(420px, 43vw, 600px);
        display: flex;
        flex-direction: column;
        min-height: var(--home-hero-height) !important;
        padding: 38px 16px 54px;
        background: #e8e9e5;
        color: #414b50;
    }
    [data-home-page] > .hero:has(> .home-hero-slideshow) > .home-hero-medical-floats {
        display: none;
    }
    [data-home-page] .home-hero-slideshow {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 0;
        overflow: hidden;
        pointer-events: none;
        user-select: none;
        background: #e8e9e5;
    }
    [data-home-page] .home-hero-slide {
        position: absolute;
        inset: 0;
        opacity: 0;
        z-index: 0;
        transition: opacity 900ms ease-in-out;
    }
    [data-home-page] .home-hero-slide img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }
    [data-home-page] .home-hero-slide.is-previous { opacity: 1; z-index: 1; }
    [data-home-page] .home-hero-slide.is-active { opacity: 1; z-index: 2; }
    /* White gradient begins at the bottom edge of the fixed blue header. */
    [data-home-page] .home-hero-slideshow::after {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        height: clamp(145px, 16vw, 220px);
        z-index: 3;
        background: linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, .94) 22%, rgba(255, 255, 255, .64) 52%, rgba(255, 255, 255, .23) 78%, rgba(255, 255, 255, 0) 100%);
        pointer-events: none;
    }
    [data-home-page] > .hero:has(> .home-hero-slideshow) > .container {
        display: flex;
        flex: 1 0 auto;
        flex-direction: column;
        width: min(1160px, 100%);
        margin-inline: auto;
        z-index: 1;
    }
    /* Keep the compact copy lifted and inset it 10% from the right edge. */
    [data-home-page] > .hero:has(> .home-hero-slideshow) > .container > h1,
    [data-home-page] > .hero:has(> .home-hero-slideshow) > .container > h1 + p {
        justify-content: flex-start !important;
        text-align: right;
        direction: rtl;
        margin-right: 10%;
        margin-left: 0;
        position: relative;
        top: -20px;
        min-height: 30px !important;
        max-height: none !important;
        line-height: 1.5;
        color: #626262;
    }
    [data-home-page] > .hero:has(> .home-hero-slideshow) > .container > h1 {
        margin-bottom: 2px !important;
    }
    [data-home-page] > .hero:has(> .home-hero-slideshow) .home-search-widget {
        margin-top: auto;
        width: 75%;
        max-width: 870px;
    }
    /* Compact the two search panels without scaling text or interactive hit areas. */
    [data-home-page] > .hero .home-search-tab {
        min-height: 51px;
        padding: 9px 11px;
        gap: 9px;
        font-size: 15px;
    }
    [data-home-page] > .hero .home-search-tab .home-search-tab-icon {
        width: 19px;
        height: 19px;
        flex-basis: 19px;
    }
    [data-home-page] > .hero .home-search-widget .search-box {
        padding: 12px;
    }
    [data-home-page] > .hero .home-search-controls {
        grid-template-columns: minmax(0, 1.5fr) minmax(0, .95fr) minmax(0, 1fr) minmax(170px, 1.15fr);
        gap: 7px;
    }
    [data-home-page] > .hero .home-search-field {
        min-height: 51px;
        padding: 6px 10px;
    }
    [data-home-page] > .hero .home-search-widget .search-box .home-search-field input[type="search"] {
        font-size: 13px;
        padding-inline-end: 27px;
    }
    [data-home-page] > .hero .home-search-mobile-icon {
        inset-inline-end: 11px;
        width: 19px;
        height: 19px;
    }
    [data-home-page] > .hero .home-search-widget .search-box .home-search-field .nn-modal-btn {
        font-size: 13px !important;
    }
    [data-home-page] > .hero .home-search-widget .search-box .home-search-field .nn-modal-btn::after {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
        margin-inline-end: 2px;
    }
    [data-home-page] > .hero .home-search-widget .search-box button.home-search-submit[type="submit"],
    [data-home-page] > .hero .home-search-widget #homeDoctorSearch button.home-search-submit[type="submit"] {
        min-height: 51px !important;
        padding: 7px;
        font-size: 13px;
    }
    [data-home-page] > .hero .home-search-submit .home-search-desktop-label {
        white-space: nowrap;
    }
    /* Match all three doctor-search field labels and glyphs to the header blue. */
    [data-home-page] > .hero #homeDoctorSearch {
        --home-search-field-blue: #2477D3;
    }
    [data-home-page] > .hero .home-search-widget #homeDoctorSearch .home-search-field input[type="search"],
    [data-home-page] > .hero .home-search-widget #homeDoctorSearch .home-search-field input::placeholder,
    [data-home-page] > .hero #homeDoctorSearch .home-search-mobile-icon {
        color: var(--home-search-field-blue);
        opacity: 1;
    }
    [data-home-page] > .hero .home-search-widget #homeDoctorSearch .home-search-field .nn-modal-btn {
        color: var(--home-search-field-blue) !important;
    }
    [data-home-page] > .hero .home-search-widget #homeDoctorSearch .home-search-field .nn-modal-btn::after {
        background: currentColor;
        -webkit-mask: url('../images/site-chevron-down.svg') center / contain no-repeat;
        mask: url('../images/site-chevron-down.svg') center / contain no-repeat;
    }
    [data-home-page] > .hero .home-search-submit-icon {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
    }
    [data-home-page] > .hero .home-search-submit i { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    [data-home-page] .home-hero-slide { transition: none; }
}
