/* Shared Cooza Mediplex navigation */
.cm-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #e1e9e7;
  box-shadow: 0 4px 18px rgba(20, 44, 75, 0.045);
  backdrop-filter: blur(12px);
}

.cm-nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(1200px, calc(100% - 48px));
  min-height: 84px;
  margin-inline: auto;
}

.cm-nav-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.cm-nav-brand img {
  display: block;
  width: 184px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.cm-nav-toggle {
  display: none;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dce6e2;
  border-radius: 7px;
  color: #21477e;
  background: #fff;
  cursor: pointer;
}

.cm-nav-toggle-line {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 140ms ease;
}

.cm-nav-toggle[aria-expanded="true"] .cm-nav-toggle-line:first-child {
  transform: translateY(7px) rotate(45deg);
}

.cm-nav-toggle[aria-expanded="true"] .cm-nav-toggle-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}

.cm-nav-toggle[aria-expanded="true"] .cm-nav-toggle-line:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.cm-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.2vw, 32px);
}

.cm-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #53635d;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.cm-nav-link:hover,
.cm-nav-link[aria-current="page"] {
  color: #087b08;
}

.cm-nav-link[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: #087b08;
  content: "";
}

.cm-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #fff;
  background: #087b08;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, transform 180ms ease;
}

.cm-nav-cta:hover {
  transform: translateY(-1px);
  background: #053062;
}

.cm-nav-cta-arrow {
  font-size: 17px;
  line-height: 1;
}

@media (max-width: 860px) {
  .cm-nav-inner {
    min-height: 76px;
  }

  .cm-nav-brand img {
    width: 174px;
    height: 54px;
  }

  .js .cm-nav-toggle {
    display: flex;
  }

  .js .cm-nav-links {
    position: absolute;
    top: 100%;
    right: -1px;
    left: -1px;
    z-index: 1;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    padding: 0 18px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0 solid #e1e9e7;
    background: #fff;
    box-shadow: 0 16px 24px rgba(20, 44, 75, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-7px);
    visibility: hidden;
    transition: max-height 220ms ease, padding 220ms ease, opacity 180ms ease,
      transform 180ms ease, visibility 180ms ease;
  }

  .js .cm-nav-links.is-open {
    max-height: calc(100vh - 76px);
    max-height: calc(100dvh - 76px);
    padding: 8px 18px 18px;
    overflow-y: auto;
    border-width: 1px 0 0;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .cm-nav-link {
    min-height: 48px;
    padding: 12px 2px;
    border-bottom: 1px solid #edf1ef;
    font-size: 15px;
    white-space: normal;
  }

  .cm-nav-link[aria-current="page"]::after {
    right: auto;
    bottom: 0;
    width: 34px;
  }

  .cm-nav-cta {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
    white-space: normal;
  }

  /* Without JavaScript, leave the links available and hide the inert toggle. */
  html:not(.js) .cm-nav-links {
    flex: 1 0 100%;
    order: 2;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding-block: 8px 18px;
  }

  html:not(.js) .cm-nav-inner {
    flex-wrap: wrap;
    padding-block: 10px;
  }

  html:not(.js) .cm-nav-toggle {
    display: none;
  }
}

@media (max-width: 360px) {
  .cm-nav-inner {
    width: calc(100% - 32px);
    gap: 12px;
  }

  .cm-nav-brand img {
    width: 158px;
    height: 50px;
  }

  .js .cm-nav-links,
  .js .cm-nav-links.is-open {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-nav-toggle-line,
  .cm-nav-link,
  .cm-nav-cta,
  .cm-nav-links {
    transition-duration: 0.01ms;
  }
}
