@charset "UTF-8";
/* ============================================================
   FIX MY TEETH — THE MEGA PANEL

   Services has eleven children and What's Bringing You In? has
   nine. A stacked dropdown of eleven treatment names in a 264px
   column is a scroll, not a menu — so both open a full-width panel
   under the nav row instead.

   The panel is the engraved index at menu scale. That is not a
   borrowed pattern: a certificate lists its schedule, and someone
   who has opened a treatments menu wants the whole list in one
   scan. Treatments keep their numbers, because the sequence is the
   practice's own priority order. Concerns drop them, because a list
   of symptoms has no order and numbering it would be decoration.

   Desktop only. Below 62rem the drawer already lists everything.
   ============================================================ */

.mega {
  display: none;
}

@media (min-width: 62rem) {
  /* The panel spans the header, so its containing block has to be the
     nav row rather than the list item. */
  .header-nav-row {
    position: relative;
  }

  .primary-nav li.has-mega {
    position: static;
  }

  .mega {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 90;
    background: var(--bg);
    border-top: 1px solid var(--rule-soft);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-2);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
      visibility 0.22s;
  }

  .has-mega:hover > .mega,
  .has-mega:focus-within > .mega,
  .has-mega.is-open > .mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* A hairline of gold under the trigger while its panel is open — the
     same underline the nav already draws, held rather than hovered. */
  .has-mega:hover > a::after,
  .has-mega:focus-within > a::after,
  .has-mega.is-open > a::after {
    transform: scaleX(1);
  }

  .has-mega.is-open > a .nav-chevron,
  .has-mega:hover > a .nav-chevron {
    transform: rotate(180deg);
  }

  .nav-chevron {
    width: 0.85em;
    height: 0.85em;
    transition: transform 0.22s var(--ease);
  }

  @media (prefers-reduced-motion: reduce) {
    .mega {
      transition: none;
    }

    .nav-chevron {
      transition: none;
    }
  }

  .mega-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding-block: clamp(1.75rem, 3vw, 2.75rem);
    max-width: 1360px;
  }

  @media (min-width: 75rem) {
    .mega-inner {
      grid-template-columns: 1fr 19rem;
    }
  }

  .mega-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(1.5rem, 3vw, 3rem);
    align-items: start;
  }

  /* The index sets tighter inside a menu than it does on a page — a
     menu is scanned, not read. */
  .mega .index li {
    padding-block: 0.55rem;
  }

  .mega .index-name {
    font-size: 1rem;
  }

  .mega .index-plain {
    font-size: 0.8125rem;
    line-height: 1.45;
    max-width: 40ch;
  }

  /* The whole row lights, not just the four words of the link. */
  .mega .index li {
    transition: background-color 0.16s var(--ease);
    border-radius: var(--r-sm);
    padding-inline: 0.6rem;
    margin-inline: -0.6rem;
  }

  .mega .index li:hover {
    background: var(--panel);
  }

  /* ---- The aside ---- */

  .mega-aside {
    display: grid;
    gap: var(--sp-3);
    align-content: start;
    padding: clamp(1.25rem, 2vw, 1.6rem);
    background: var(--panel);
    border-top: 2px solid var(--gold);
    border-radius: var(--r-card);
  }

  .mega-aside-title {
    margin: 0;
    font-family: var(--display);
    font-optical-sizing: none;
    font-variation-settings: "opsz" var(--display-opsz), "wght" 600;
    font-size: 1.25rem;
    line-height: 1.2;
  }

  .mega-aside-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-soft);
  }

  .mega-aside .btn-quiet {
    justify-content: flex-start;
  }

  .mega-aside-actions {
    margin-top: var(--sp-2);
  }

  .mega-aside-actions .btn {
    width: 100%;
  }
}
