/* ================================================
   HQA SITE HEADER (lookalike of hqa.ca's header)
   Shown at the top of every Portraits of Care page.
   ================================================ */

@font-face {
  font-family: "Soleil Regular";
  src: local("Soleil Regular"), url(/wp-content/themes/hqca-2021/assets/fonts/SoleilRegular.woff) format("woff");
  font-display: swap;
}

.hqa-sh { background: #fff; }
.hqa-sh-wrap { max-width: 1170px; margin: 0 auto; padding: 0 15px; }

/* navy strip on top (carries the Portraits back-link) */
.hqa-sh-strip { background: #004775; }
.hqa-sh-strip-row { display: flex; align-items: center; min-height: 42px; }
.hqa-sh-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.04em; color: rgba(255,255,255,0.65); text-decoration: none;
  transition: color 0.2s;
}
a.hqa-sh-back:hover { color: #91D500; }
.hqa-sh-strip-row { justify-content: space-between; }
.hqa-sh-access { margin-left: auto; display: flex; align-items: center; gap: 12px; color: #fff; font-family: "Soleil Regular", "Lato", sans-serif; }
.hqa-sh-asep { color: rgba(255,255,255,0.4); }
.hqa-fs, .hqa-hc { background: none; border: 0; color: #fff; cursor: pointer; padding: 0; line-height: 1; font-family: inherit; }
.hqa-fs-1 { font-size: 13px; }
.hqa-fs-2 { font-size: 16px; text-decoration: underline; }
.hqa-fs-3 { font-size: 19px; text-decoration: underline; }
.hqa-fs.is-active { font-weight: 700; }
.hqa-hc { font-size: 14px; }
.hqa-hc u { font-weight: 700; }
.hqa-fs:hover, .hqa-hc:hover { color: #91D500; }
/* high-contrast mode: stronger contrast + always-underlined links.
   The filter goes on body's CHILDREN (not body): a filter on body would
   become the containing block for the fixed mobile menu panel and trap it. */
html.hqa-high-contrast body > :not(.hqa-sh-mobile) { filter: contrast(1.2); }
html.hqa-high-contrast .hqa-sh-mobile { filter: contrast(1.2); }
html.hqa-high-contrast a { text-decoration: underline !important; }
@media (max-width: 640px) { .hqa-sh-access { display: none; } }

/* white main row: logo · search · utility links */
.hqa-sh-main { display: flex; align-items: center; gap: clamp(20px, 4vw, 60px); padding-top: 20px; padding-bottom: 20px; }
.hqa-sh-logo { flex: 0 0 auto; }
.hqa-sh-logo img { display: block; width: 250px; height: 70px; object-fit: contain; object-position: left center; }
.hqa-sh-search { flex: 1 1 auto; max-width: 430px; display: flex; align-items: center; gap: 8px; border-bottom: 3px solid #91D500; padding-bottom: 6px; }
.hqa-sh-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-family: "Soleil Regular", "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; color: #222;
}
.hqa-sh-search input::placeholder { color: #6b6b6b; }
.hqa-sh-search button { border: 0; background: none; color: #222; cursor: pointer; padding: 0 2px; display: flex; align-items: center; }
.hqa-sh-utility { margin-left: auto; white-space: nowrap; font-family: "Soleil Regular", "Lato", sans-serif; font-size: 0.95rem; }
.hqa-sh-utility a { color: #004f7a; text-decoration: underline; }
.hqa-sh-utility a:hover { color: #222; }
.hqa-sh-sep { color: #c4c4c4; margin: 0 12px; }

/* nav row: separator + spacing mirrored 1:1 from their .main-nav-container */
.hqa-sh-nav {
  border-top: none;
  background-image: linear-gradient(to right, #999 40%, #ffffff 0%);
  background-position: top; background-size: 8px 1px; background-repeat: repeat-x;
}
.hqa-sh-nav-list { list-style: none; display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 8px 24px; margin: 0; padding: 18px 0 0; }
.hqa-sh-nav-list li { margin: 0; }
.hqa-sh-nav-list > li { padding-bottom: 22px; }
.hqa-sh-nav-list a {
  font-family: "Soleil Regular", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625em; color: #222; text-decoration: none;
}
.hqa-sh-nav-list a:hover { color: #004f7a; }

/* their theme injects icon-font codes into menu items; the homepage nav shows
   no carets, so hide any injected icons for an identical look */
.hqa-sh-nav-list .fa, .hqa-sh-nav-list [class*="fa-"], .hqa-sh-nav-list .caret,
.hqa-sh-nav-list i, .hqa-sh-nav-list .dropdown-toggle { display: none !important; }

/* dropdowns — mirrored 1:1 from hqa.ca's own .main-nav .sub-menu rules */
.hqa-sh-nav-list li { position: relative; }
.hqa-sh-nav-list li > .sub-menu {
  list-style: none; margin: 0; padding: 10px 0; display: none;
  position: absolute; top: 100%; left: 0; min-width: 320px;
  border-top: 5px solid #004f7a; background-color: #fff; z-index: 300;
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.16);
}
.hqa-sh-nav-list li:hover > .sub-menu,
.hqa-sh-nav-list li:focus-within > .sub-menu { display: block; }
.hqa-sh-nav-list li > .sub-menu li { list-style: none; margin: 0; padding: 0; position: relative; }
.hqa-sh-nav-list li > .sub-menu > li { padding: 10px 35px; }
.hqa-sh-nav-list li > .sub-menu > li:hover { background-color: #F5F5F5; }
.hqa-sh-nav-list .sub-menu a { display: block; font-size: 16px; line-height: 20px; color: #222; text-decoration: none; }
.hqa-sh-nav-list .sub-menu a:hover { color: #004f7a; text-decoration: none; }
.hqa-sh-nav-list .sub-menu > li.menu-item-has-children > a::after {
  content: "\203A"; position: absolute; top: 50%; right: 20px; margin-top: -12px;
  font-size: 19px; line-height: 22px; color: #6e6e6e;
}
/* third level flies out to the right in a grey panel, same as their site */
.hqa-sh-nav-list li > .sub-menu > li > .sub-menu {
  left: 100%; top: -10px; background-color: #F5F5F5; border-top: 0;
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.16); padding: 10px 0;
}
.hqa-sh-nav-list li > .sub-menu > li > .sub-menu > li { padding: 8px 30px; }
.hqa-sh-nav-list li > .sub-menu > li > .sub-menu > li:hover { background-color: #ececec; }
/* last top-level item: dropdown right-aligned, flyouts open left */
.hqa-sh-nav-list > li:last-child > .sub-menu { left: auto; right: 0; }
.hqa-sh-nav-list > li:last-child > .sub-menu > li > .sub-menu { left: auto; right: 100%; }
@media (max-width: 980px) { .hqa-sh-nav-list .sub-menu { display: none !important; } }

@media (max-width: 980px) {
  .hqa-sh-search, .hqa-sh-utility { display: none; }
  .hqa-sh-main { padding-top: 14px; padding-bottom: 14px; }
}
@media (max-width: 640px) {
  .hqa-sh-logo img { width: 190px; height: auto; }
}

/* ================================================
   MOBILE: hamburger + full-screen menu panel,
   mirrored 1:1 from hqa.ca's #mobile-menu
   (their breakpoint: hamburger below 768px)
   ================================================ */
.hqa-sh-burger { display: none; margin-left: auto; background: none; border: 0; padding: 0; color: #8cc63f; cursor: pointer; line-height: 1; }
.hqa-sh-mobile {
  display: none; position: fixed; top: 0; right: 0; width: 100%; height: 100%;
  background: #fff; transform: translate3d(100%, 0, 0); transition: transform 300ms ease;
  z-index: 99999; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
html.hqa-sh-open .hqa-sh-mobile { transform: translate3d(0, 0, 0); }
html.hqa-sh-open body { position: fixed; left: 0; right: 0; overflow: hidden; }

@media (max-width: 767.98px) {
  .hqa-sh-nav { display: none; }
  .hqa-sh-burger { display: block; }
  .hqa-sh-mobile { display: block; }
  /* their site shows no navy strip on mobile; ours stays only for the back-link */
  .hqa-sh-strip--nb { display: none; }
}

/* panel header: logo + close */
.hqa-sh-m-head { display: flex; align-items: center; padding: 24px 25px; }
.hqa-sh-m-logo img { display: block; width: 200px; height: 50px; object-fit: contain; object-position: left center; }
.hqa-sh-m-close { margin-left: auto; background: none; border: 0; padding: 0 2px; color: #004f7a; cursor: pointer; line-height: 1; }

/* main nav list */
.hqa-sh-m-top { border-top: 1px solid #ccc; }
.hqa-sh-m-nav { list-style: none; display: flex; flex-direction: column; margin: 0; padding: 0; background: #fff; }
.hqa-sh-m-nav li { display: block; list-style: none; margin: 0; padding: 0 30px; width: 100%; border-bottom: 2px dotted #ccc; position: relative; }
.hqa-sh-m-nav a {
  position: relative; display: block; padding: 20px 0;
  font-family: "Soleil Regular", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.5; color: #222; text-decoration: none;
}
.hqa-sh-m-nav a:hover, .hqa-sh-m-nav a:active { color: #222; text-decoration: none; }
/* their theme injects icon-font codes into menu items; hide them here too */
.hqa-sh-m-nav .fa, .hqa-sh-m-nav [class*="fa-"], .hqa-sh-m-nav i, .hqa-sh-m-nav .caret { display: none !important; }

/* chevron toggle (injected by JS); tapping the label navigates, the chevron expands */
.hqa-arrow-sub { position: absolute; top: 0; right: 0; z-index: 2; padding: 20px 0 20px 24px; color: #ccc; display: inline-flex; cursor: pointer; }
.hqa-arrow-sub svg { transition: transform 150ms ease; }
.hqa-sh-m-nav li.hqa-open > a .hqa-arrow-sub svg { transform: rotate(180deg); }

/* sub-menus: grey inset panels, matching their .main-nav-mobile .sub-menu */
.hqa-sh-m-nav .sub-menu {
  display: none; list-style: none; position: static; margin: 0 -30px; padding: 0 15px;
  background: #F5F5F5; border: 0; box-shadow: none;
}
.hqa-sh-m-nav li.hqa-open > .sub-menu { display: block; }
.hqa-sh-m-nav .sub-menu > li { border-bottom: 0; padding: 0 30px; }
.hqa-sh-m-nav .sub-menu > li:not(:last-child) > a { border-bottom: 2px dotted #ccc; }
/* third level: darker grey, dash-prefixed items */
.hqa-sh-m-nav .sub-menu .sub-menu { margin: 0 -45px; padding: 0 15px; background: #EEE; }
.hqa-sh-m-nav .sub-menu .sub-menu > li > a { padding-left: 30px; }
.hqa-sh-m-nav .sub-menu .sub-menu > li > a::before { content: '-'; position: absolute; left: 15px; }

/* navy bottom: utility links + reading-experience controls */
.hqa-sh-m-bottom { padding: 50px 30px; background: #004f7a; font-family: "Soleil Regular", "Lato", sans-serif; }
.hqa-sh-m-utility { list-style: none; display: flex; flex-wrap: wrap; margin: 0 -15px 48px; padding: 0; }
.hqa-sh-m-utility li { flex: 0 0 50%; max-width: 50%; margin: 0; padding: 0 15px; list-style: none; }
.hqa-sh-m-utility a { display: block; padding: 15px 0; font-size: 15px; color: #fff; text-decoration: underline; border-bottom: 2px dotted #fff; }
.hqa-sh-m-access h5 { margin: 0; padding: 15px 0; font-size: 1.125em; font-weight: 700; color: #fff; letter-spacing: 0.2px; }
.hqa-sh-m-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 2px dotted #fff; color: #fff; font-size: 15px; }
.hqa-sh-m-fs { display: flex; align-items: flex-end; background: rgba(255, 255, 255, 0.16); border-radius: 20px; padding: 4px; }
.hqa-sh-m-fs .hqa-fs { padding: 0 10px; font-weight: 700; color: #fff; }
.hqa-sh-m-hcval { background: none; border: 0; padding: 0; color: #fff; font-family: inherit; font-size: 15px; cursor: pointer; }
.hqa-sh-m-hcval span { padding: 0 6px; opacity: 0.55; }
.hqa-sh-m-hcval .hqa-hc-off { opacity: 1; font-weight: 700; text-decoration: underline; }
html.hqa-high-contrast .hqa-sh-m-hcval .hqa-hc-off { opacity: 0.55; font-weight: 400; text-decoration: none; }
html.hqa-high-contrast .hqa-sh-m-hcval .hqa-hc-on { opacity: 1; font-weight: 700; text-decoration: underline; }
