/* Mobile navigation only. Load last so the legacy plus/minus and first-item
   emphasis cannot leak into the new controls and nested links. */
header.header .header-bottom .right .mm-call { display: none; }

@media (max-width: 1199px) {
  header.header .header-bottom .right { gap: 8px; }
  header.header .header-bottom .right .mm-call,
  header.header .header-bottom .right button.menu {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #f6f6f6;
    background-image: none !important;
    color: #292929;
    box-shadow: none;
    text-decoration: none;
    transform: none;
    -webkit-tap-highlight-color: transparent;
  }
  header.header .header-bottom .right .mm-call svg {
    display: block;
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
  }
  header.header .header-bottom .right button.menu .mm-menu-lines {
    position: relative;
    display: block;
    width: 22px;
    height: 18px;
    pointer-events: none;
  }
  header.header .header-bottom .right button.menu .mm-menu-lines > span {
    position: absolute;
    left: 0;
    display: block;
    width: 22px;
    height: 1.8px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
    transition: transform .18s ease, top .18s ease;
    pointer-events: none;
  }
  header.header .header-bottom .right button.menu .mm-menu-lines > span:first-child { top: 5px; }
  header.header .header-bottom .right button.menu .mm-menu-lines > span:last-child { top: 12px; }
  header.header .header-bottom .right button.menu.menu-close .mm-menu-lines > span:first-child { top: 8px; transform: rotate(45deg); }
  header.header .header-bottom .right button.menu.menu-close .mm-menu-lines > span:last-child { top: 8px; transform: rotate(-45deg); }
  header.header .header-bottom .right .mm-call:active,
  header.header .header-bottom .right button.menu:active { background-color: #eaeaea; transform: none; }
  header.header .header-bottom .right .mm-call:focus-visible,
  header.header .header-bottom .right button.menu:focus-visible { outline: 2px solid #777; outline-offset: 3px; }

  #mobileMenu { background: #fff; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  #mobileMenu > .container { padding-top: 14px; padding-bottom: 20px; }
  #mobileMenu nav + nav { margin-top: 27px; padding-top: 0; border: 0; }
  #mobileMenu nav .menu li { min-width: 0; }
  #mobileMenu .mm-submenu { transition: none !important; }
  #mobileMenu .mm-submenu[hidden] { display: none !important; }
  #mobileMenu .mm-submenu:not([hidden]) { display: block !important; height: auto !important; }

  /* Keep the familiar two-column shortcuts, with consistent labels. */
  #mobileMenu nav .menu.menu-pages.level-1 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #mobileMenu nav .menu.menu-pages.level-1 > li {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1px solid #e8e8e8;
    border-radius: 11px;
    background: #f7f7f7;
  }
  #mobileMenu nav .menu.menu-pages.level-1 > li > a,
  #mobileMenu nav .menu.menu-pages.level-1 > li > .mr-company-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: none;
    min-height: 54px;
    margin: 0;
    padding: 12px 15px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #353535;
    font-family: inherit;
    font-size: 16px;
    font-weight: 550 !important;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
  }
  #mobileMenu nav .menu.menu-pages.level-1 > li > .mr-company-trigger,
  #mobileMenu nav .menu.menu-pages.level-1 > li:has(> button.arrow) > a { padding-right: 46px; }
  #mobileMenu nav .menu.menu-pages.level-1 > li:has(> button.arrow.active),
  #mobileMenu nav .menu.menu-pages.level-1 > li:has(> button.arrow[aria-expanded="true"]) { grid-column: 1 / -1; background: #fff; }
  #mobileMenu nav .menu.menu-pages.level-1 > li:has(> button.arrow.active) + li { grid-column: 1 / -1; }

  /* The catalog remains an accordion; no coloured squares behind its arrows. */
  #mobileMenu nav .menu.menu-catalog.level-1 > li { margin: 0; padding: 0; border: 0; }
  #mobileMenu nav .menu.menu-catalog.level-1 > li:first-child > :is(a, .mm-catalog-heading) {
    display: flex;
    align-items: center;
    min-height: 36px;
    width: fit-content;
    max-width: none;
    margin: 0 0 12px;
    padding: 0;
    color: #292929;
    font-size: 23px;
    font-weight: 650 !important;
    line-height: 1.3;
  }
  #mobileMenu nav .menu.menu-catalog.level-1 > li:not(:first-child) {
    position: relative;
    margin: 0 0 9px;
    padding: 0;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #fff;
  }
  #mobileMenu nav .menu.menu-catalog.level-1 > li:not(:first-child) > a {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: none;
    min-height: 58px;
    margin: 0;
    padding: 12px 54px 12px 15px;
    color: #353535;
    font-size: 17px;
    font-weight: 550 !important;
    line-height: 1.4;
  }
  #mobileMenu nav .sf-nav-icon { flex: 0 0 24px; width: 24px; height: 24px; color: #777; }
  #mobileMenu nav .menu.level-1 > li > button.arrow,
  #mobileMenu nav .menu.level-1 > li > button.arrow.active {
    position: absolute;
    top: 7px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent !important;
    background-image: none !important;
    color: #686868;
    box-shadow: none;
    transform: none !important;
  }
  #mobileMenu nav .menu.menu-pages.level-1 > li > button.arrow { top: 5px; right: 3px; }
  #mobileMenu nav button.arrow::before,
  #mobileMenu nav button.arrow::after { content: none !important; }
  #mobileMenu nav button.arrow .mm-chevron {
    display: block;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(0);
    transition: transform .18s ease;
    pointer-events: none;
  }
  #mobileMenu nav button.arrow.active .mm-chevron,
  #mobileMenu nav button.arrow[aria-expanded="true"] .mm-chevron { transform: rotate(180deg); }

  /* Reset the inherited width + margin overflow and the first-link bold rule. */
  #mobileMenu nav .menu.level-1 .menu.level-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
    width: auto;
    margin: 0 10px 11px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  #mobileMenu nav .menu.level-1 .menu.level-2 > li,
  #mobileMenu nav .menu.level-1 .menu.level-2 > li:first-of-type,
  #mobileMenu nav .menu.level-1 .menu.level-2 > li:last-of-type { display: flex; align-items: stretch; min-width: 0; margin: 0; padding: 0; border: 0; }
  #mobileMenu nav .menu.level-1 .menu.level-2 > li > a {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 7px;
    background: #f5f5f5;
    color: #515151;
    font-family: inherit;
    font-size: 15px;
    font-weight: 450 !important;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
  }
  #mobileMenu nav .menu.level-1 .menu.level-2 > li:has(> a[href*="/nakladnye-treki-spoty/"]) { grid-column: 1 / -1; }
  #mobileMenu nav a:focus-visible,
  #mobileMenu nav button:focus-visible { outline: 2px solid #777; outline-offset: -3px; }
}

@media (max-width: 575px) {
  #mobileMenu nav .menu.menu-pages.level-1 > li > a,
  #mobileMenu nav .menu.menu-pages.level-1 > li > .mr-company-trigger { padding-left: 12px; font-size: 15px; }
  #mobileMenu nav .menu.menu-pages.level-1 > li > .mr-company-trigger { padding-right: 43px; }
  #mobileMenu nav .menu.level-1 .menu.level-2 > li > a { padding: 10px; }
}
@media (max-width: 374px) {
  header.header .header-bottom .right { gap: 6px; }
  #mobileMenu nav .menu.menu-catalog.level-1 > li:not(:first-child) > a { gap: 10px; padding-left: 13px; font-size: 16px; }
  #mobileMenu nav .menu.level-1 .menu.level-2 > li > a { font-size: 14px; }
}
@media (max-width: 1199px) and (hover: hover) {
  header.header .header-bottom .right .mm-call:hover,
  header.header .header-bottom .right button.menu:hover { background-color: #ededed; color: #292929; }
  #mobileMenu nav .menu.level-1 .menu.level-2 > li > a:hover { background: #eaeaea; color: #292929; }
  #mobileMenu nav .menu.level-1 > li > button.arrow:hover { background-color: #f0f0f0 !important; color: #292929; }
}
@media (max-width: 1199px) and (prefers-reduced-motion: reduce) {
  header.header .header-bottom .right button.menu .mm-menu-lines > span,
  #mobileMenu nav button.arrow .mm-chevron { transition: none; }
}
