/* Shared Services disclosure for the main site navigation. */
.site-header .services-nav > summary {
  display: flex;
  cursor: pointer;
  list-style: none;
}
.site-header .services-nav > summary::-webkit-details-marker { display: none; }
.site-header nav :is(.about-trigger, .services-nav > summary) { align-items: center; }
.site-header nav .about-trigger { display: inline-flex; }

/* Match the main-page About Us menu on the legacy treatment templates. */
body.madilu-service-route .site-header nav .about-dropdown > .dropdown-panel > a {
  box-sizing: border-box;
  padding: 8px 10px !important;
  border-radius: 9px;
  color: #344452;
  font: 600 13px/1.4 'DM Sans', sans-serif !important;
  text-decoration: none;
}

@media (min-width: 1021px) {
  body.madilu-service-route .site-header nav .about-dropdown > .dropdown-panel {
    box-sizing: border-box;
    width: max-content;
    min-width: 205px !important;
    max-width: min(420px, 90vw);
    padding: 12px !important;
    box-shadow: 0 14px 40px rgba(19, 54, 75, .14) !important;
    z-index: 2000 !important;
  }
}

.site-header .services-menu {
  color: #153447;
  background: #fff;
  border: 1px solid #dce9ee;
  border-radius: 16px;
  box-sizing: border-box;
}
.site-header .services-menu-categories { position: relative; padding: 12px; }
.site-header .services-menu-categories > .service-category {
  margin: 0;
  padding: 0;
}
.site-header .services-menu-categories > .service-category + .service-category { margin-block-start: 2px; }
.site-header .services-menu h2 {
  margin: 0 0 8px;
  padding-inline: 10px;
  color: #446476;
  font: 700 13px/1.4 'DM Sans', sans-serif;
}
/* Legacy treatment templates set all h2 and h3 fonts with !important. */
body.madilu-service-route .site-header .services-menu :is(h2, h3) {
  font: 700 13px/1.4 'DM Sans', sans-serif !important;
  letter-spacing: normal !important;
}
.site-header .services-menu ul { list-style: none; margin: 0; padding: 0; }
.site-header nav .services-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #153447;
  font: 600 14px/1.35 'DM Sans', sans-serif;
  white-space: normal;
  text-decoration: none;
}
.site-header nav .services-menu li a:hover { background: #e2f1f5; }
.site-header .services-menu-footer { padding: 8px 14px; border-top: 1px solid #dce9ee; }
.site-header nav .services-menu .services-all { color: #205f76; font-weight: 800; }
.site-header nav .services-menu .services-all:hover { background: #e2f1f5; }
.site-header .services-nav :is(summary, a):focus-visible {
  outline: 2px solid #287b9c;
  outline-offset: -2px;
}
.site-header .service-category summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px;
  color: #153447;
  white-space: normal;
}
.site-header .service-category > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 7px;
  font: 700 14px/1.35 'DM Sans', sans-serif;
}
.site-header .service-category > summary::-webkit-details-marker { display: none; }
.site-header .service-category > summary::after {
  content: '';
  flex: 0 0 6px;
  height: 6px;
  border: solid #287b9c;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin-inline-end: 3px;
}
.site-header .service-category[open] > summary,
.site-header .service-category > summary:hover { background: #e2f1f5; }
.site-header .service-category-panel { min-width: 0; background: #f4f9fb; }
.site-header .service-category-panel h3,
.site-header .service-treatment-heading {
  margin: 0;
  padding: 8px 10px;
  color: #446476;
  font: 700 13px/1.4 'DM Sans', sans-serif;
}
.site-header .service-category-groups { display: grid; gap: 4px 12px; }
.site-header .service-treatment-group { min-width: 0; border-block-start: 1px solid #dce9ee; }
.site-header .service-treatment-heading { display: none; }
@media (min-width: 1021px) {
  .site-header .services-menu {
    position: absolute;
    z-index: 2000;
    inset: 100% auto auto 50%;
    transform: translateX(-50%);
    width: min(700px, calc(100vw - 32px));
    max-height: 72vh;
    overflow: auto;
    box-shadow: 0 16px 40px #15344726;
  }
  .site-header .services-menu-categories { padding-inline-end: calc(100% - 232px); }
  .site-header .service-category > summary::after { transform: rotate(-45deg); }
  .site-header .service-category-panel {
    position: absolute;
    inset: 0 0 0 244px;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 12px 16px;
    border-inline-start: 1px solid #dce9ee;
  }
  .site-header .service-category-panel > ul,
  .site-header .service-category-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px 12px; }
  .site-header nav .service-category-panel li a { min-height: 38px; padding-block: 6px; }
  .site-header nav .service-category-panel > .services-all {
    margin-block-start: 6px;
    border-block-start: 1px solid #dce9ee;
  }
  .site-header .service-category[data-desktop-groups] .service-treatment-group > summary { display: none; }
  .site-header .service-category[data-desktop-groups] .service-treatment-heading { display: block; }
}
@media (max-width: 1020px) {
  .site-header .services-nav { width: 100%; }
  .site-header .services-nav > summary { min-height: 44px; }
  .site-header .services-menu { margin-block: 4px 8px; }
  .site-header .services-menu-categories { padding: 8px; }
  .site-header .service-category-panel { padding: 4px 8px; border-radius: 7px; }
  .site-header .service-category-panel h3 { display: none; }
  .site-header .service-category[open] > summary::after { transform: rotate(225deg); }
  .site-header .services-menu-footer { padding: 4px 8px; }
  .site-header.menu-open nav:has(.services-nav[open]) {
    max-height: min(66dvh, calc(100dvh - 130px));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    justify-content: flex-start !important;
  }
}
