/* ==========================================================================
   HTS site extras (loaded after forms.css in _Layout)

   Homepage hero image, slideshow pause control, breadcrumbs, "Get started"
   lead capture, FAQ, and a few accessibility fixes layered on top of the
   template CSS. Like forms.css, everything uses px because the template
   sets html { font-size: 10px }. The --hts-* colour tokens come from forms.css.
   ========================================================================== */

/* ---------- Keyboard focus --------------------------------------------------
   The template removes the focus outline from every link and button
   (format.min.css: a:focus, button:focus { outline: 0 !important }), which also
   cancels the :focus-visible outlines set in forms.css. Bring the ring back for
   keyboard users; it needs !important to win over the template. */

a:focus-visible,
button:focus-visible,
.rd-navbar-aside-toggle:focus-visible {
    outline: 3px solid #2b6cb0 !important;
    outline-offset: 2px;
}

/* ---------- Main menu: seven items on one line -----------------------------
   "Referral Form" is the seventh top-level item. The template spaces the desktop
   (static) menu for six and lets the list wrap under the logo, so keep it on one
   line and tighten the spacing. .rd-navbar-static is only present while the
   desktop layout is active (992px and up, non-touch); the mobile panel is untouched. */

.rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin-left: 16px;
    margin-right: 24px;
}

.rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li {
    flex: 0 0 auto;
}

.rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li + li {
    margin-left: 16px;
}

.rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li > a {
    font-size: 15px;
    white-space: nowrap;
}

/* The "Contact us" button keeps its size; the logo is the part that gives way */
.rd-navbar-corporate-light.rd-navbar-static .rd-navbar-btn-wrap {
    flex: 0 0 auto;
}

.rd-navbar-corporate-light.rd-navbar-static .rd-navbar-btn-wrap .button {
    white-space: nowrap;
}

/* 992-1199px: the header is only 900px wide here, so everything is a little more compact.
   The submenu arrow sits in the gap after its item (template: 20px arrow, -24px margin). */
@media (max-width: 1199.98px) {
    .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav {
        margin-left: 14px;
        margin-right: 14px;
    }

    .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li {
        padding-left: 3px;
        padding-right: 3px;
    }

    .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li + li {
        margin-left: 12px;
    }

    .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li.rd-navbar-submenu {
        margin-right: -14px;
    }

    .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li > a {
        font-size: 14px;
    }

    .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-nav > li > .rd-navbar-submenu-toggle {
        width: 14px;
    }

    .rd-navbar-corporate-light.rd-navbar-static .rd-navbar-btn-wrap .button {
        padding-left: 18px;
        padding-right: 18px;
    }

    /* Template: 188px below 1200px, which breaks "OMHC Referral Form" into two lines */
    .rd-navbar-static .rd-navbar-dropdown {
        width: 235px;
    }
}

/* Dropdown and megamenu links: the template's light greys (#a1a19f, #7f7f7f) are hard to read
   on white, so use the body text colour. The template's hover colour still applies. */
.rd-navbar-static .rd-navbar-dropdown > li > a,
.rd-navbar-static .rd-navbar-dropdown > li > a:focus,
.rd-navbar-static .rd-navbar-list > li > a,
.rd-navbar-static .rd-navbar-list > li > a:focus {
    color: var(--hts-text, #4a4f55);
}

/* The megamenu <li> has no padding (p-0); keep the last link of a column off the bottom edge */
.rd-navbar-static .rd-navbar-megamenu .rd-navbar-list {
    padding-bottom: 14px;
}

/* Keyboard: open a submenu while focus is on its item or inside it. The template only opens it
   on hover (its script adds .focus to the <li>), so the Tab key skipped the hidden links. */
.rd-navbar-static .rd-navbar-nav li.rd-navbar-submenu:has(:focus-visible) > .rd-navbar-dropdown,
.rd-navbar-static .rd-navbar-nav li.rd-navbar-submenu:has(:focus-visible) > .rd-navbar-megamenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ---------- Heading-level fixes (same look, better document outline) ------ */

/* Megamenu labels used to be <h5>; they are menu labels, not page headings.
   They are now <div class="h5 ...">, so re-apply the template's element-only h5 rules. */
.hts-menu-label {
    font-family: Karla, sans-serif;
    color: #2f2f2f;
}

/* Homepage "About Us" text used to be an <h4>; it is now <p class="h4 ..."> */
p.hts-about-lead {
    font-family: Karla, sans-serif;
    color: #2f2f2f;
}

/* Footer office titles used to be <h6 class="h6">; they are now <h2 class="h6"> so the
   heading levels never jump (e.g. h3 -> h6). Re-apply the template's h6.h6 look. */
.footer-section h2.footer-title {
    font-family: Hind, Helvetica, Arial, sans-serif;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #fff;
}

/* Status messages at the top of <main> used to be <h4>; they are now <p class="alert-heading h4 ..."> */
.hts-alert-title {
    font-family: Karla, sans-serif;
    color: inherit;
    margin: 0;
}

/* ---------- Home hero: responsive <img> (srcset + WebP) -------------------
   The slides used a CSS background image; they now contain a <picture> that
   fills .banner-bg the same way background-size: cover did. */

#home-banner.slider-banner {
    position: relative;
    z-index: 0; /* keeps slick's slide z-indexes (998/999) inside the banner */
}

#home-banner.slider-banner .banner-slider .banner-slide .banner-bg .hts-hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
}

/* White slide titles sit on a bright sky photo; a soft shadow keeps them readable */
#home-banner.slider-banner .banner-slider .banner-slide .banner-title h2 {
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

/* Pause / play control for the auto-advancing slideshow (WCAG 2.2.2) */
.hts-banner-pause {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease;
}

.hts-banner-pause:hover,
.hts-banner-pause:focus {
    background: rgba(0, 0, 0, .7);
}

.hts-banner-pause:focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: 2px;
}

.hts-banner-pause .fa-play,
.hts-banner-pause[aria-pressed="true"] .fa-pause {
    display: none;
}

.hts-banner-pause[aria-pressed="true"] .fa-play {
    display: inline-block;
}

/* Stop the slow background drift when paused or when the visitor prefers less motion */
#home-banner.is-paused .banner-slider .banner-bg {
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    #home-banner .banner-slider .banner-bg {
        transform: none !important;
    }
}

/* ---------- Breadcrumbs (Views/Shared/_Breadcrumbs.cshtml) ----------------
   Default: a slim bar under the header (pages without a title banner, e.g. Privacy).
   Pages that start with the teal .page-title-wrap banner get the trail overlaid
   at the banner's top-left instead (see the :has() rules below). */

.hts-breadcrumbs {
    background: var(--hts-surface, #f6f8fa);
    border-bottom: 1px solid var(--hts-border-soft, #e5e7e9);
    font: 400 13px/1.4 Karla, sans-serif;
}

.hts-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    color: var(--hts-text, #4a4f55);
}

.hts-breadcrumbs__list li {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.hts-breadcrumbs__list li + li::before {
    content: "\203A";
    content: "\203A" / "";
    margin: 0 8px;
    font-size: 16px;
    line-height: 1;
    color: var(--hts-muted, #6b7178);
}

.hts-breadcrumbs__list a {
    color: #0b6f8e;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hts-breadcrumbs__list a:hover,
.hts-breadcrumbs__list a:focus {
    color: var(--hts-ink, #272725);
}

.hts-breadcrumbs__list [aria-current="page"] {
    color: var(--hts-ink, #272725);
    font-weight: 700;
}

/* Below 992px the template's header is fixed (56px tall) and covers the top of the page */
@media (max-width: 991.98px) {
    .hts-breadcrumbs {
        margin-top: 56px;
    }
}

/* Touch devices at 992px+ also get the fixed header (RD Navbar adds this class) */
html.rd-navbar-fixed-linked .hts-breadcrumbs {
    margin-top: 56px;
}

/* Overlay variant: a small pill on the title banner. Takes no space in the flow. */
html body .hts-breadcrumbs:has(~ .page-title-wrap) {
    position: relative;
    z-index: 3;
    height: 0;
    margin: 0;
    background: none;
    border: 0;
}

html body .hts-breadcrumbs:has(~ .page-title-wrap) .container {
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
}

@media (max-width: 991.98px) {
    html body .hts-breadcrumbs:has(~ .page-title-wrap) .container {
        top: 66px;
    }
}

html.rd-navbar-fixed-linked body .hts-breadcrumbs:has(~ .page-title-wrap) .container {
    top: 66px;
}

.hts-breadcrumbs:has(~ .page-title-wrap) .hts-breadcrumbs__list {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 40, 52, .65); /* keeps white text >= 4.5:1 on the mint/teal banner */
    color: #fff;
}

.hts-breadcrumbs:has(~ .page-title-wrap) .hts-breadcrumbs__list a,
.hts-breadcrumbs:has(~ .page-title-wrap) .hts-breadcrumbs__list a:hover,
.hts-breadcrumbs:has(~ .page-title-wrap) .hts-breadcrumbs__list a:focus,
.hts-breadcrumbs:has(~ .page-title-wrap) .hts-breadcrumbs__list [aria-current="page"] {
    color: #fff;
}

.hts-breadcrumbs:has(~ .page-title-wrap) .hts-breadcrumbs__list li + li::before {
    color: rgba(255, 255, 255, .85);
}

.hts-breadcrumbs:has(~ .page-title-wrap) .hts-breadcrumbs__list a:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 2px;
}

/* Fixed header at 992px+ (touch devices): the template puts the banner title only
   66px from the top, which is where the trail sits, so move the title down a little. */
@media (min-width: 992px) {
    html.rd-navbar-fixed-linked .hts-breadcrumbs ~ .page-title-wrap .page-title {
        margin-top: 44px !important;
    }
}

/* ---------- Homepage: About "at a glance" facts --------------------------- */

.hts-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    max-width: 1000px;
    margin: 32px auto 0;
    padding: 0;
    text-align: center;
}

.hts-facts__item {
    background: #fff;
    border: 1px solid var(--hts-border-soft, #e5e7e9);
    border-radius: 12px;
    padding: 16px 14px;
}

.hts-facts dt {
    font: 700 12px/1.3 Karla, sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--hts-muted, #6b7178);
    margin: 0 0 6px;
}

.hts-facts dd {
    font: 700 17px/1.35 Karla, sans-serif;
    color: var(--hts-ink, #272725);
    margin: 0;
}

@media (max-width: 575px) {
    .hts-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 24px;
    }

    .hts-facts__item {
        padding: 12px 10px;
    }

    .hts-facts__item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .hts-facts dd {
        font-size: 15px;
    }
}

/* ---------- Homepage: "Get started" section ------------------------------- */

.hts-get-started .hts-start__title {
    font: 700 30px/1.25 Karla, sans-serif !important;
    letter-spacing: 0 !important;
    color: var(--hts-ink, #272725);
    margin: 0 0 10px !important;
}

.hts-start__lead {
    font-size: 16px;
    line-height: 1.6;
    color: var(--hts-text, #4a4f55);
    margin: 0 0 22px;
}

.hts-start__options {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
}

.hts-start__options li + li {
    margin-top: 12px;
}

.hts-start__option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--hts-border-soft, #e5e7e9);
    border-radius: 12px;
    color: var(--hts-text, #4a4f55) !important;
    text-decoration: none !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.hts-start__option:hover,
.hts-start__option:focus {
    border-color: var(--hts-primary, #1298c1);
    box-shadow: 0 8px 20px rgba(18, 152, 193, .12);
}

.hts-start__option:focus-visible {
    outline: 3px solid #2b6cb0;
    outline-offset: 2px;
}

/* GTM click triggers read the id/data-* on the link; let clicks on the inner spans fall through */
.hts-start__option * {
    pointer-events: none;
}

.hts-start__icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e3f3f8;
    color: var(--hts-primary-dark, #0e7fa2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.hts-start__text {
    flex: 1 1 auto;
    display: block;
    font-size: 14.5px;
    line-height: 1.5;
}

.hts-start__text strong {
    display: block;
    font: 700 17px/1.35 Karla, sans-serif;
    color: var(--hts-ink, #272725);
    margin-bottom: 2px;
}

.hts-start__chevron {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--hts-primary-dark, #0e7fa2);
}

.hts-start__call {
    padding: 18px 20px;
    background: #fff;
    border: 1px dashed var(--hts-border, #d5dbe0);
    border-radius: 12px;
}

.hts-start__call-title {
    font: 700 16px/1.4 Karla, sans-serif;
    color: var(--hts-ink, #272725);
    margin: 0 0 8px;
}

.hts-start__call-title .fa {
    color: var(--hts-primary-dark, #0e7fa2);
    margin-right: 6px;
}

.hts-start__call ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--hts-text, #4a4f55);
}

.hts-start__call a {
    color: var(--hts-primary-dark, #0e7fa2);
    font-weight: 700;
    text-decoration: underline;
}

.hts-start__hours {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--hts-muted, #6b7178);
    margin: 8px 0 0;
}

/* Compact version of the contact form card */
.hts-get-started .hts-card {
    padding: 32px;
}

.hts-get-started .hts-form-header {
    margin-bottom: 20px;
}

.hts-get-started .hts-form-header .hts-title {
    font-size: 24px !important;
}

.hts-get-started .hts-form textarea,
.hts-get-started .hts-form textarea.form-control {
    min-height: 110px;
}

.hts-get-started .hts-trust {
    margin: 4px 0 20px;
}

/* The CARF badge is wrapped in <picture> (WebP), so size the flex item instead of the img */
.hts-trust picture {
    flex: 0 0 48px;
    line-height: 0;
}

@media (max-width: 991px) {
    .hts-get-started .hts-start {
        margin-bottom: 8px;
    }
}

@media (max-width: 767px) {
    .hts-get-started .hts-card { padding: 24px 18px; }
    .hts-get-started .hts-start__title { font-size: 26px !important; }
}

/* ---------- Homepage: FAQ ------------------------------------------------- */

.hts-faq {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 30px;
}

.hts-faq__item {
    background: #fff;
    border: 1px solid var(--hts-border-soft, #e5e7e9);
    border-radius: 12px;
    padding: 22px 24px;
}

.hts-faq__q {
    font: 700 19px/1.35 Karla, sans-serif !important;
    letter-spacing: 0 !important;
    color: var(--hts-ink, #272725);
    margin: 0 0 10px !important;
}

.hts-faq__a {
    font-size: 16px;
    line-height: 1.65;
    color: var(--hts-text, #4a4f55);
    margin: 0;
}

.hts-faq-cta {
    margin-top: 30px;
}

@media (max-width: 991px) {
    .hts-faq { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
    .hts-faq__item { padding: 18px; }
    .hts-faq__q { font-size: 18px !important; }
}
