/* ZPX 製品・サービス メガメニュー ? 既存WPメニューのリンクを利用 */
@media (min-width: 1024px) {
  body.zpx-mega-ready #menu-item-54 > .c-navbar__submenu { display: none !important; }
  body .zpx-mega-menu {
    position: fixed; z-index: 999999; top: 65px !important; left: 50%;
    width: min(1080px, calc(100vw - 48px));
    max-height: var(--zpx-mega-height, calc(100dvh - 100px));
    box-sizing: border-box; display: flex; flex-direction: column;
    padding: 18px 22px; margin: 0; overflow: hidden;
    background: #fff; color: #202832; border: 1px solid #edf0f2;
    border-radius: 22px; box-shadow: 0 18px 55px rgba(25,45,60,.14);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translate(-50%, -7px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
  }
  body .zpx-mega-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
  body .zpx-mega-menu__group-title,
  body .zpx-mega-menu__cta,
  body .zpx-mega-menu__cta-copy { font-family: var(--zpx-nav-font-family, inherit); }
  body .zpx-mega-menu__scroll {
    flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
    overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d5dce1 transparent;
  }
  body .zpx-mega-menu__columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  body .zpx-mega-menu__column { min-width: 0; margin: 0; padding: 0; }
  body .zpx-mega-menu__column--right { border-left: 1px solid #e1e7ea; padding-left: 20px; }
  body .zpx-mega-menu__group,
  body .zpx-mega-menu__group section { margin: 0; padding: 0; border: 0; }
  body .zpx-mega-menu__group + .zpx-mega-menu__group { margin-top: 16px; }
  body .zpx-mega-menu__group-title {
    display: block; margin: 0 0 5px !important; padding: 8px 14px !important;
    border: 0; border-radius: 8px; background: rgba(185, 203, 203, 0.2);
    color: #202832; font-size: var(--zpx-nav-font-size, inherit) !important; line-height: 1.4 !important;
    font-weight: 700; letter-spacing: 0 !important;
  }
  body .zpx-mega-menu__items,
  body .zpx-mega-menu__item { list-style: none !important; margin: 0 !important; padding: 0 !important; }
  body .zpx-mega-menu__item::before,
  body .zpx-mega-menu__item::after { content: none !important; }
  body .zpx-mega-menu__link,
  body .zpx-mega-menu__link.is-child {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    box-sizing: border-box; min-height: 33px; margin: 0 !important;
    padding: 5px 10px 5px calc(10px + var(--item-depth, 0) * 19px) !important;
    border: 0; border-bottom: 1px solid #e7ebee;
    background: transparent; color: #222 !important;
    font-size: 14px !important; font-weight: var(--zpx-nav-font-weight, inherit) !important;
    font-family: var(--zpx-nav-font-family, inherit) !important;
    line-height: var(--zpx-nav-line-height, 1.45) !important; letter-spacing: var(--zpx-nav-letter-spacing, normal) !important;
    text-decoration: none !important;
  }
  body .zpx-mega-menu__link:hover,
  body .zpx-mega-menu__link:focus-visible { color: #008f91 !important; background: #f6f9fa; }
  body .zpx-mega-menu__arrow {
    flex: 0 0 21px; width: 21px; height: 21px; position: relative; display: block;
    box-sizing: border-box; border: 1px solid #c9d5db; border-radius: 50%;
    color: #354957; font-size: 0 !important; line-height: 1; font-weight: 400;
  }
  body .zpx-mega-menu__footer {
    flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    margin: 12px 0 0 !important; padding: 12px 0 0 !important;
    border-top: 1px solid #e2e7eb; background: #fff;
  }
  body .zpx-mega-menu__cta {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 62px; padding: 10px 16px !important; margin: 0 !important;
    box-sizing: border-box; border: 0; border-radius: 8px;
    background: #f0f3f5; color: #202832 !important; text-decoration: none !important;
  }
  body .zpx-mega-menu__cta:hover,
  body .zpx-mega-menu__cta:focus-visible { background: #e8eff2; }
  body .zpx-mega-menu__cta-copy { display: flex; flex-direction: column; gap: 3px; }
  body .zpx-mega-menu__cta-copy strong { font-size: 14px; line-height: 1.35; font-weight: 600; }
  body .zpx-mega-menu__cta-copy small { font-size: 12px; line-height: 1.4; color: #5d6973; }
  body .zpx-mega-menu__cta-arrow {
    flex: 0 0 27px; width: 27px; height: 27px; position: relative; display: block;
    border: 1px solid #a7bac3; border-radius: 50%; font-size: 0 !important; line-height: 1;
  }
  /* Center the chevrons geometrically rather than relying on glyph metrics. */
  body .zpx-mega-menu__arrow::before,
  body .zpx-mega-menu__cta-arrow::before {
    content: "";
    position: absolute;
    display: block;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: translate(-50%, -50%) rotate(45deg);
    box-sizing: border-box;
  }
  @media (max-width: 1200px) {
    body .zpx-mega-menu { width: min(1080px, calc(100vw - 32px)); padding: 12px 15px; }
    body .zpx-mega-menu__columns { gap: 14px; }
    body .zpx-mega-menu__column--right { padding-left: 14px; }

  }
}
@media (max-width: 1023px) { .zpx-mega-menu { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .zpx-mega-menu { transition: none !important; } }
