/**
 * Care Access static site — header and mobile navigation.
 * Load after theme-overrides.css on site/pages/*.html.
 *
 * Header height is set via --site-header-height (measured in site-header.js).
 * The theme sets `.header .header-menu { display: block }` globally; mobile
 * visibility is controlled here with opacity/transform so the menu can animate.
 */

:root {
  --site-header-height: 112px;
  --site-menu-transition: 0.4s ease;
}

@media only screen and (max-width: 1280px) {
  :root {
    --site-header-height: 85px;
  }
}

@media only screen and (max-width: 959px) {
  :root {
    --site-header-height: 70px;
  }
}

@media only screen and (max-width: 599px) {
  :root {
    --site-header-height: 60px;
  }
}

.body-wrapper {
  padding-top: var(--site-header-height);
}

@media only screen and (max-width: 959px) {
  header.header {
    z-index: 1000;
  }

  .header .header-menu {
    background: #fff;
    bottom: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    display: block;
    left: 0;
    max-height: none;
    opacity: 0;
    overflow-x: hidden;
    overflow-y: auto;
    /* padding: 0 20px 24px; */
    pointer-events: none;
    position: fixed;
    right: 0;
    top: var(--site-header-height);
    transform: translateY(-10px);
    transition:
      opacity var(--site-menu-transition),
      transform var(--site-menu-transition),
      visibility var(--site-menu-transition);
    visibility: hidden;
    width: 100%;
    z-index: 999;
  }

  body.mobile_open {
    overflow: hidden;
  }

  body.mobile_open .header .header-menu {
    opacity: 1;
    pointer-events: auto;
    /* transform: translateY(0); */
    visibility: visible;
  }

  .header .header-menu ul.submenu.level-1 {
    display: block;
    margin-top: 0;
    max-height: none;
    overflow-y: visible;
    padding-top: 24px;
  }
}

@media only screen and (max-width: 599px) {
  .header .header-menu {
    padding: 0 20px;
  }

  .header .header-menu ul.submenu.level-1 {
    padding-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --site-menu-transition: 0.01ms;
  }

  .header .header-menu {
    transform: none;
  }
}

/* ── Primary nav: clearer Resources dropdown ── */
.header .submenu.level-1 > li.has-submenu > a.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header .submenu.level-1 > li.has-submenu > a.menu-link::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
  display: inline-block;
  margin-top: 2px;
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header .submenu.level-1 > li.has-submenu:hover > a.menu-link::after,
.header .submenu.level-1 > li.has-submenu.focus > a.menu-link::after,
.header .submenu.level-1 > li.has-submenu > a.menu-link[aria-expanded="true"]::after {
  opacity: 1;
}

@media only screen and (min-width: 960px) {
  .header .submenu.level-1 > li.has-submenu {
    position: relative;
  }

  .header .submenu.level-1 > li.has-submenu:hover > a.menu-link::after,
  .header .submenu.level-1 > li.has-submenu.focus > a.menu-link::after {
    transform: rotate(180deg);
  }

  .header .submenu.level-2 {
    background: #fff;
    border: 1px solid rgba(27, 28, 39, 0.08);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(27, 28, 39, 0.12);
    left: 50%;
    min-width: 220px;
    opacity: 0;
    padding: 8px;
    pointer-events: none;
    position: absolute !important;
    top: calc(100% + 6px);
    transform: translateX(-50%) translateY(4px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0.18s ease;
    visibility: hidden;
    z-index: 1002;
  }

  /* Invisible hover bridge so the menu doesn’t close between label and panel */
  .header .submenu.level-2::before {
    content: "";
    height: 14px;
    left: 0;
    position: absolute;
    right: 0;
    top: -14px;
  }

  .header .submenu.level-1 > li.has-submenu:hover > .submenu.level-2,
  .header .submenu.level-1 > li.has-submenu.focus > .submenu.level-2 {
    left: 50%;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
  }

  .header .submenu.level-2 li {
    padding: 0;
  }

  .header .submenu.level-2 li a {
    border-radius: 7px;
    color: #1b1c27;
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    padding: 11px 14px;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .header .submenu.level-2 li a:hover,
  .header .submenu.level-2 li a:focus {
    background: rgba(214, 79, 126, 0.08);
    color: #d64f7e;
  }

  .header .submenu.level-2 li a.active-item {
    background: rgba(214, 79, 126, 0.1);
    color: #d64f7e;
  }

  .header .child-trigger {
    display: none !important;
  }
}

@media only screen and (max-width: 959px) {
  .header .submenu.level-1 > li.has-submenu > a.menu-link {
    padding-right: 52px;
  }

  .header .submenu.level-1 > li.has-submenu > a.menu-link::after {
    display: none;
  }

  .header .submenu.level-2 {
    border-left: 2px solid rgba(214, 79, 126, 0.28);
    margin: 4px 0 10px 4px;
    padding: 4px 0 4px 12px !important;
  }

  .header .submenu.level-2 li a {
    font-size: 15px;
    padding: 12px 8px;
  }

  /* Reset global theme `button` styles — child-trigger is not a CTA */
  .header .child-trigger,
  .header .child-trigger:hover,
  .header .child-trigger:focus,
  .header .child-trigger:active {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 9;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px !important;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(214, 79, 126, 0.35);
    border-radius: 10px;
    background: #fff !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #d64f7e !important;
    font-size: 22px !important;
    font-weight: 500;
    line-height: 1;
    text-shadow: none;
    cursor: pointer;
    transform: translateY(-50%);
  }

  .header .child-trigger:before {
    content: "+";
    display: block;
    line-height: 1;
  }

  .header .child-trigger.child-open:before {
    content: "−";
  }
}

/* Footer legal link */
.footer .footer-end a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer .footer-end a:hover,
.footer .footer-end a:focus {
  color: #fff;
}

/* ── Footer bar: thinner content row, clearance for sticky enquire ──
   padding-bottom on footer.footer must be >= .bottom_pane height so
   copyright/social sit above the fixed enquire bar when scrolled to end. */
footer.footer {
  padding-bottom: 128px;
}

body.no-bottom-pane footer.footer {
  padding-bottom: 16px;
}

.footer .content-wrapper,
.footer .content-wrapper.footer-layout {
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

.footer .footer-end {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.footer .footer-end p,
.footer .footer-end p span {
  margin: 0;
  line-height: 1.4;
}

.footer .footer-social {
  gap: 10px;
  align-items: center;
}

.footer .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.25s ease, opacity 0.25s ease;
}

.footer .footer-social a:hover,
.footer .footer-social a:focus {
  background: rgba(214, 79, 126, 0.28);
  opacity: 1;
}

.footer .footer-social img {
  width: 16px !important;
  height: 16px !important;
  display: block;
  /* SVGs are already white single-path marks — do not filter:
     the old PNGs were color + white glyphs; brightness/invert
     flattened them into solid circle / rounded-square blobs. */
  opacity: 0.92;
}

.footer .footer-social a:hover img,
.footer .footer-social a:focus img {
  opacity: 1;
}

/* Hide any leftover Instagram links */
.footer .footer-social a[href*="instagram"],
.footer .footer-social img[alt="Instagram"],
.footer .footer-social a:has(img[alt="Instagram"]) {
  display: none !important;
}

@media only screen and (max-width: 1280px) {
  footer.footer {
    padding-bottom: 124px;
  }

  body.no-bottom-pane footer.footer {
    padding-bottom: 16px;
  }
}

@media only screen and (max-width: 959px) {
  footer.footer {
    padding-bottom: 88px;
  }

  .footer .content-wrapper,
  .footer .content-wrapper.footer-layout {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    justify-content: center;
    gap: 12px;
  }

  .footer .footer-end p span:first-child {
    margin-bottom: 0 !important;
  }
}

@media only screen and (max-width: 599px) {
  footer.footer {
    padding-bottom: 96px;
  }
}
