/* =========================
   DESKTOP MENU (HORIZONTAL + STABLE HOVER FIX)
========================= */
@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__link {
    display: inline-block;
    white-space: nowrap;
  }

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

  /* =========================
     DROPDOWN BASE STATE (FORCED)
  ========================== */
  .in-header .menu__submenu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;

    min-width: 220px;

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

    z-index: 999;
  }

  /* =========================
     HOVER / FOCUS OPEN STATE (FORCED)
  ========================== */
  .in-header .menu__item:hover > .menu__submenu,
  .in-header .menu__item:focus-within > .menu__submenu {
    display: block !important;
  }

  /* submenu item layout */
  .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;
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  /* hover state (desktop only) */
  .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: 16px;
  }

  .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(-50%) 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(-50%) rotate(225deg);
    opacity: 1;
  }
}
/* =========================
   MOBILE MENU (uses theme toggle)
========================= */
@media (max-width: 991px) {

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

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

  /* Stack 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 NO BOX (PRESERVES CHEVRON)
========================= */

@media (max-width: 991px) {

  /* Button reset (safe, non-destructive) */
  .in-header .menu__child-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);

    width: 30px;
    height: 30px;

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

    padding: 0;
    margin: 0;

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

    cursor: pointer;
  }

  /* ONLY remove visual “box artifacts”, not structure */
  .in-header .menu__child-toggle-icon {
    width: 10px;
    height: 10px;
    position: relative;
    display: block;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* CHEVRON (this MUST remain intact) */
  .in-header .menu__child-toggle-icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;

    width: 10px;
    height: 10px;

    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 only (no visual box except focus ring) */
  .in-header .menu__child-toggle:focus {
    outline: none;
  }

  .in-header .menu__child-toggle:focus-visible {
    outline: 2px solid rgba(0,0,0,0.35);
    outline-offset: 3px;
    border-radius: 4px;
  }
}