/* ==========================================================================
   Nav dropdowns / mega-menu — added for the full-sitemap build-out.
   Kept in its own file (layered after styles/global/home.css) so it stays
   separate from the design's CSS and is reversible. The design shipped
   `.has-mega` items with only a chevron; these panels add the child links.
   Desktop = pure-CSS hover/focus reveal (no JS). Mobile = shown when main.js
   toggles `.mm-acc.open` (its existing accordion handler).
   ========================================================================== */

/* ---------- Desktop dropdown panels ---------- */
.main-nav .nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 10px;
  min-width: 240px;
  background: var(--white, #fff);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(17, 25, 33, 0.14);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity var(--dur, 300ms) var(--ease, ease),
    transform var(--dur, 300ms) var(--ease, ease),
    visibility var(--dur, 300ms) var(--ease, ease);
  z-index: 200;
}

/* Invisible bridge so the pointer can travel from the link to the panel
   across the 10px gap without the hover dropping. */
.main-nav .nav-panel::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 14px;
}

.main-nav .nav-item.has-mega:hover > .nav-panel,
.main-nav .nav-item.has-mega:focus-within > .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Treatments — three-column mega */
.main-nav .nav-panel--mega {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px 22px;
  min-width: 640px;
}
.main-nav .nav-panel__col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.main-nav .nav-panel a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink, #333);
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--dur, 300ms) var(--ease, ease),
    color var(--dur, 300ms) var(--ease, ease);
}
.main-nav .nav-panel a:hover {
  background: rgba(0, 179, 240, 0.08);
  color: var(--brand, #00b3f0);
}

.main-nav .nav-panel__col-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand, #00b3f0);
  padding: 6px 10px 4px;
  margin: 0 0 2px;
}
.main-nav .nav-panel__col-title:hover {
  background: transparent;
  color: var(--brand-light, #66d4f6);
}

/* ---------- Mobile accordion panels ---------- */
.mobile-menu .mm-acc__panel {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 10px 14px;
}
.mobile-menu .mm-acc.open .mm-acc__panel {
  display: flex;
}
.mobile-menu .mm-acc__panel a {
  display: block;
  padding: 9px 0;
  color: var(--ink-mid, #515153);
  font-size: 15px;
  text-decoration: none;
}
.mobile-menu .mm-acc__panel a:hover {
  color: var(--brand, #00b3f0);
}
.mobile-menu .mm-acc__sub-title {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand, #00b3f0);
  padding: 10px 0 2px;
}

/* Caret on mobile accordion parents; rotates when open. */
.mobile-menu .mm-acc > .mm-link {
  position: relative;
}
.mobile-menu .mm-acc > .mm-link::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--brand, #00b3f0);
  border-bottom: 2px solid var(--brand, #00b3f0);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--dur, 300ms) var(--ease, ease);
}
.mobile-menu .mm-acc.open > .mm-link::after {
  transform: translateY(-30%) rotate(-135deg);
}
