/* Navigation shares the locally hosted type, produce pictograms and brand palette. */
.header {
  --menu-ink: #183f32;
  --menu-muted: #45634e;
  --menu-paper: #fdfcf7;
  --menu-line: #dce3d6;
  --menu-tint: #edf2e6;
  --menu-motion: cubic-bezier(.2,.7,.2,1);
}
.mobile-disclosure { display: none; }
.menu-toggle { list-style: none; cursor: pointer; }
.menu-toggle::-webkit-details-marker { display: none; }
.header-inner { gap: clamp(12px, 2.7vw, 42px); }
.header:has(.mobile-disclosure[open], .menu-group[open]) { z-index: 35; }
.header .navigation {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(2px, .5vw, 12px);
  color: var(--menu-ink);
}
.header .menu-direct, .menu-group > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px clamp(7px, .85vw, 16px);
  border-radius: 9px;
  font-size: clamp(.8rem, .86vw, .94rem);
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  transition: color .18s, background-color .18s;
}
.header .menu-direct::after { content: none; }
.menu-group > summary { list-style: none; cursor: pointer; }
.menu-group > summary::-webkit-details-marker { display: none; }
.header .menu-direct > .icon, .menu-group > summary > .icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--menu-muted);
  stroke-width: 1.7;
}
.menu-chevron { display: inline-flex; }
.header:not(.nav-ready) :is(.navigation,.menu-line,.menu-chevron .icon,.menu-panel) { transition: none; }
.menu-chevron .icon { width: 13px; height: 13px; stroke-width: 2; transition: transform .2s var(--menu-motion); }
.menu-group[open] .menu-chevron .icon { transform: rotate(180deg); }
.header .menu-direct:is(:hover,[aria-current]), .menu-group > summary:is(:hover,.section-current), .menu-group[open] > summary {
  color: var(--menu-ink);
  background: var(--menu-tint);
}
.header :is(.menu-direct, .menu-group summary, .menu-panel a, .menu-toggle, .language a):focus-visible {
  outline: 2px solid #387040;
  outline-offset: 2px;
}
.menu-panel {
  position: absolute;
  z-index: 2;
  top: calc(100% + 8px);
  right: 0;
  width: min(568px, 72vw);
  padding: 12px;
  background: var(--menu-paper);
  border: 1px solid var(--menu-line);
  border-radius: 16px;
  box-shadow: 0 18px 48px #14382726, 0 2px 8px #1438270a;
}
.menu-trade .menu-panel { width: 310px; right: 6%; }
.menu-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 3px;
}
.menu-trade .menu-items { grid-template-columns: 1fr; }
.menu-items a, .menu-catalog {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 6px 9px;
  border-radius: 8px;
  gap: 10px;
  color: var(--menu-ink);
  font-size: .84rem;
  line-height: 1.35;
  font-weight: 650;
  transition: background-color .16s;
}
.menu-symbol {
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--menu-muted);
  background: var(--menu-tint);
}
.menu-symbol .icon { width: 20px; height: 20px; }
.menu-items a:is(:hover,:focus-visible,[aria-current]) { background: var(--menu-tint); }
.menu-tools, .menu-catalog { border-top: 1px solid var(--menu-line); margin-top: 9px; padding-top: 9px; }
.menu-tools .menu-symbol { background: transparent; }
.menu-catalog { justify-content: space-between; padding: 11px 12px 4px; border-radius: 0; font-weight: 750; }
.menu-catalog .icon { width: 18px; height: 18px; transition: transform .18s ease-out; }
.menu-catalog:hover .icon { transform: translateX(3px); }
.header .language { gap: 1px; font-size: .71rem; }
.header .language a { display: inline-grid; place-items: center; min-width: 28px; min-height: 34px; opacity: 1; color: #526353; border-radius: 6px; }
.header .language a:is(:hover,[aria-current]) { color: var(--menu-ink); background: var(--menu-tint); }
@media (min-width: 861px) {
  .menu-panel { max-height: calc(100dvh - 140px); overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 860px) {
  .header { position: sticky; }
  .header .header-inner { display: grid; grid-template-columns: minmax(0,1fr) auto auto; grid-template-areas: 'brand langs toggle'; height: auto; min-height: 70px; gap: 4px 8px; padding-block: 8px; }
  .header .mobile-disclosure { display: block; grid-area: toggle; }
  .header .brand { grid-area: brand; justify-self: start; }
  .header .brand img { width: clamp(110px,24vw,160px); }
  .header .header-actions { grid-area: langs; }
  .header .menu-toggle { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 9px; color: var(--menu-ink); background: var(--menu-tint); }
  .header .navigation {
    display: grid;
    align-items: stretch;
    grid-template-columns: 1fr;
    gap: 2px;
    margin: 0;
    background: var(--menu-paper);
    border: 0;
    box-shadow: none;
    position: absolute;
    inset: 100% 0 auto;
    padding: 10px var(--gutter) 16px;
    max-height: calc(100vh - 108px);
    max-height: calc(100dvh - 108px);
    overflow: auto;
    overscroll-behavior: contain;
    border-block: 1px solid var(--menu-line);
    box-shadow: 0 14px 24px #14382718;
    transform: translateY(-5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease-out, transform .2s var(--menu-motion), visibility 0s linear .2s;
  }
  .header .mobile-disclosure[open] + .navigation { visibility: visible; pointer-events: auto; opacity: 1; transform: none; transition-delay: 0s; }
  .header .menu-direct, .menu-group > summary { padding: 10px; min-height: 46px; border: 0; font-size: .96rem; }
  .menu-chevron { margin-left: auto; }
  .menu-group .menu-panel { position: static; width: auto; padding: 5px; margin: 3px 0 6px; border-radius: 10px; box-shadow: none; }
  .menu-products .menu-items { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .menu-items a { padding-inline: 5px; gap: 6px; }
  .menu-tools { padding-top: 5px; margin-top: 4px; }
  .header .language a { min-height: 40px; }
}
@media (max-width: 355px) {
  .menu-symbol { flex-basis: 25px; width: 25px; height: 27px; }
  .menu-items a { font-size: .79rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .nav-ready .menu-group[open] .menu-panel { animation: menu-in .19s var(--menu-motion) both; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: 400ms; }
  ::view-transition-old(root) { animation: medex-page-out 190ms ease both; }
  ::view-transition-new(root) { animation: medex-page-in 400ms cubic-bezier(.22,1,.36,1) both; }
  .medex-home .hero-copy { animation: medex-hero-in 720ms cubic-bezier(.22,1,.36,1) both; }
  .medex-page-hero :where(.breadcrumb,h1,p) { animation: medex-hero-in 490ms cubic-bezier(.22,1,.36,1) both; }
  .medex-page-hero h1 { animation-delay: 45ms; }
  .medex-page-hero p { animation-delay: 90ms; }
  :is(.medex-home,.medex-page-hero)::before { animation: medex-wave-in 1050ms cubic-bezier(.22,1,.36,1) both; }
  @keyframes medex-wave-in {
    from { opacity: .15; transform: translate3d(-5%,7%,0) scale(1.04); }
    to { opacity: 1; transform: none; }
  }
  @keyframes medex-hero-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes medex-page-out { to { opacity: 0; } }
  @keyframes medex-page-in { from { opacity: 0; } to { opacity: 1; } }
  /* Browsers may skip a document snapshot, including on a slow connection. */
  html:not(.has-page-transition) main { animation: medex-content-in .33s ease-out; }
  @keyframes medex-content-in { from { opacity: 0; } to { opacity: 1; } }
}
:is(.medex-home,.medex-page-hero) { isolation: isolate; }
:is(.medex-home,.medex-page-hero)::before {
  content: "";
  position: absolute;
  inset: -4% -4% 0;
  z-index: -1;
  pointer-events: none;
  background: url("/assets/medex-wave.svg") center bottom / 100% 100% no-repeat;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .header *, .header *::after { animation: none !important; transition: none !important; }
}


.menu-line { transform-origin: 12px 12px; transition: transform .2s ease, opacity .14s; }
.mobile-disclosure[open] .first { transform: rotate(45deg) translateY(6px); }
.mobile-disclosure[open] .middle { opacity: 0; }
.mobile-disclosure[open] .last { transform: rotate(-45deg) translateY(-6px); }
