/* =========================
   DESKTOP MENU
========================= */
@media (min-width: 992px) {

  /* main wrapper */
  .in-header .menu__wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
  }

  /* top-level items */
  .in-header .menu__wrapper > .menu__item {
    position: relative;
    display: inline-block;
  }

  /* top-level links */
  .in-header .menu__wrapper > .menu__item > .menu__link {
    display: inline-block;
    white-space: nowrap;
    position: relative;
    padding-bottom: 4px;
  }

  /* underline hover */
  .in-header .menu__wrapper > .menu__item > .menu__link::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 1px;

    background: currentColor;

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 0.25s ease;
    opacity: 0.6;
  }

  .in-header .menu__wrapper > .menu__item:hover > .menu__link::before,
  .in-header .menu__wrapper > .menu__item:focus-within > .menu__link::before {
    transform: scaleX(1);
  }

  /* hide mobile toggle buttons */
  .in-header .menu__child-toggle {
    display: none !important;
  }

  /* =========================
     DROPDOWN
  ========================== */
  .in-header .menu__submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    min-width: 220px;

    padding: 8px 0;

    background: #fff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);

    z-index: 999;
  }

  /* keep dropdown open */
  .in-header .menu__item:hover > .menu__submenu,
  .in-header .menu__item:focus-within > .menu__submenu {
    display: block;
  }

  /* submenu items */
  .in-header .menu__submenu .menu__item {
    display: block;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .in-header .menu__submenu .menu__item:last-child {
    border-bottom: none;
  }

  /* submenu links */
  .in-header .menu__submenu .menu__link {
    display: block;
    padding: 10px 14px;

    background: transparent;

    transition:
      background-color 0.15s ease,
      color 0.15s ease;
  }

  /* desktop submenu hover */
  .in-header .menu__submenu .menu__link:hover,
  .in-header .menu__submenu .menu__link:focus {
    background-color: #f2f2f2 !important;
  }

  /* =========================
     DESKTOP CHEVRON
  ========================== */
  .in-header .menu__link--has-children {
    position: relative;
    padding-right: 18px;
  }

  .in-header .menu__link--has-children::after {
    content: "";
    position: absolute;

    right: 0;
    top: 50%;

    width: 6px;
    height: 6px;

    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: translateY(-60%) rotate(45deg);

    opacity: 0.6;

    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }

  .in-header .menu__item:hover > .menu__link--has-children::after,
  .in-header .menu__item:focus-within > .menu__link--has-children::after {
    transform: translateY(-40%) rotate(225deg);
    opacity: 1;
  }
}


/* =========================
   MOBILE MENU
========================= */
@media (max-width: 991px) {

  /* hide by default */
  .in-header .menu--desktop {
    display: none;
  }

  /* show when active */
  .in-header .row-fluid.show-menu .menu--desktop {
    display: block;
    width: 100%;
  }

  /* stacked items */
  .in-header .menu__wrapper > .menu__item {
    display: block;
    width: 100%;
    position: relative;

    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .in-header .menu__wrapper > .menu__item:last-child {
    border-bottom: none;
  }

  /* submenu animation */
  .in-header .menu__submenu {
    position: static !important;

    max-height: 0;
    overflow: hidden;

    transition: max-height 0.35s ease;

    border: none !important;
    background: none !important;
    box-shadow: none !important;
  }

  .in-header .menu__item--open > .menu__submenu {
    max-height: 1000px;
  }

  /* indentation */
  .in-header .menu__submenu .menu__link {
    padding-left: 25px;
  }

  .in-header .menu__submenu--level-3 .menu__link {
    padding-left: 35px;
  }

  .in-header .menu__submenu--level-4 .menu__link {
    padding-left: 45px;
  }

    /* =========================
     MOBILE TOGGLE — CLEAN FIX
  ========================= */

  .in-header .menu__child-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);

    width: 30px;
    height: 30px;

    padding: 0;
    margin: 0;

    border: none !important;
    background: transparent !important;
    box-shadow: none !important;

    appearance: none;
    -webkit-appearance: none;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
  }

  /* kill theme styling on the button */
  .in-header .menu__child-toggle::before,
  .in-header .menu__child-toggle::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* chevron icon */
  .in-header .menu__child-toggle-icon {
    position: relative;
    width: 12px;
    height: 12px;
    display: block;
  }

  .in-header .menu__child-toggle-icon::before {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;

    width: 7px;
    height: 7px;

    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: translate(-50%, -50%) rotate(45deg);

    opacity: 0.7;

    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  /* open state */
  .in-header .menu__item--open > .menu__child-toggle .menu__child-toggle-icon::before {
    transform: translate(-50%, -50%) rotate(225deg);
    opacity: 1;
  }

  /* accessibility focus (no visual box look) */
  .in-header .menu__child-toggle:focus-visible {
    outline: 2px solid rgba(0,0,0,0.25);
    outline-offset: 2px;
  }
  
  .in-header .in-menu-toggler,
.in-header .in-menu-toggler-wrap,
.in-header .menu__child-toggle,
.in-header .menu__child-toggle *,
.in-header .in-menu-toggler * {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}