/* Mobile menu (phones/tablets < 992px) — mmenu-light drawer, see js/mobile-menu.js.
   Loads after css/mmenu-light.css. */

/* Nothing shows until mmenu-light has moved the blocks into its drawer. */
.rt-mmenu:not(.mm-spn),
.rt-mmenu-head,
.rt-mmenu-info { display: none; }

:root {
  --mm-ocd-width: calc(100% - 60px); /* leaves room for the floating X */
  --mm-ocd-max-width: 380px;
  --mm-spn-item-height: 54px;
  --mm-spn-item-indent: 22px;
}
.mm-ocd { z-index: 10050; }

.rt-mmenu-panel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #fff;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .18);
  font-family: "Lexend", "Outfit", sans-serif;
}

/* Logo + close */
.rt-mmenu-panel .rt-mmenu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 14px 14px 14px 22px;
  border-bottom: 1px solid #f0f0f0;
}
.rt-mmenu-head img { display: block; height: 44px; width: auto; }
.rt-mmenu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fdf1f1;
  color: #B5232A;
  font-size: 18px;
  cursor: pointer;
}
.rt-mmenu-close:focus-visible { background: #B5232A; color: #fff; }
@media (hover: hover) {
.rt-mmenu-close:hover { background: #B5232A; color: #fff; } }

/* Sliding menu */
.rt-mmenu-panel .mm-spn {
  flex: 1 1 auto;
  min-height: 330px;
  height: auto;
  color: #24272C;
  background: #fff;
  font-size: 16px;
  font-weight: 500;
}
.rt-mmenu-panel .mm-spn.mm-spn--navbar:after {
  opacity: 1;
  color: #8a8f98;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.rt-mmenu-panel .mm-spn:not(.mm-spn--main).mm-spn--navbar:after { color: #B5232A; }
.rt-mmenu-panel .mm-spn.mm-spn--navbar:before { opacity: .8; color: #B5232A; }
.rt-mmenu-panel .mm-spn ul:after { height: 12px; }
/* main.css zeroes every ul's padding with !important; mmenu-light needs its
   right padding or each row runs past the drawer (and hides the chevrons). */
.rt-mmenu-panel .mm-spn ul {
  padding: 0 var(--mm-spn-panel-offset) 0 0 !important;
  margin: 0 !important;
  list-style: none !important;
}
/* Chevron only on items that open a submenu. */
.rt-mmenu-panel .mm-spn li:not(.menu-item-has-children):before { display: none; }
.rt-mmenu-panel .mm-spn li:before { opacity: .55; color: #B5232A; }
.rt-mmenu-panel .mm-spn li:after { opacity: .09; }
.rt-mmenu-panel .mm-spn a,
.rt-mmenu-panel .mm-spn span { transition: color .2s ease, background-color .2s ease; }
.rt-mmenu-panel .mm-spn a:focus-visible { color: #B5232A; background: #fdf8f1; }
@media (hover: hover) {
.rt-mmenu-panel .mm-spn a:hover,
.rt-mmenu-panel .mm-spn span:hover { color: #B5232A; background: #fdf8f1; } }
/* The page being viewed, and the parent it sits under. */
.rt-mmenu-panel .mm-spn li.current-menu-item > a,
.rt-mmenu-panel .mm-spn li.current-menu-ancestor > span {
  color: #B5232A;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #B5232A;
}

/* Contact box */
.rt-mmenu-panel .rt-mmenu-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid #f0f0f0;
  background: #fff;
}
.rt-mmenu-info a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none;
}
.rt-mmenu-info small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  line-height: 1.3;
}
.rt-mmenu-info strong { display: block; line-height: 1.3; }
.rt-mmenu-info__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
}
.rt-mmenu-info__hotline {
  background: linear-gradient(135deg, #B5232A 0%, #d32f2f 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(181, 35, 42, .28);
}
@media (hover: hover) {
.rt-mmenu-info__hotline:hover { color: #fff; } }
.rt-mmenu-info__hotline small { opacity: .85; }
.rt-mmenu-info__hotline strong { font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.rt-mmenu-info__hotline .rt-mmenu-info__icon { background: rgba(255, 255, 255, .2); color: #fff; }
.rt-mmenu-info__email { background: #fdf8f1; border: 1px solid #fceebc; color: #24272C; }
@media (hover: hover) {
.rt-mmenu-info__email:hover { color: #B5232A; } }
.rt-mmenu-info__email small { color: #B5232A; }
.rt-mmenu-info__email strong { font-size: 13px; font-weight: 700; overflow-wrap: normal; word-break: normal; }
.rt-mmenu-info__email .rt-mmenu-info__icon { background: #B5232A; color: #fff; }

/* Short landscape phones: the whole drawer scrolls, the menu keeps its room. */
@media (max-height: 520px) {
  .rt-mmenu-panel .rt-mmenu-head { padding-top: 8px; padding-bottom: 8px; }
  .rt-mmenu-head img { height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .mm-ocd, .mm-ocd__content, .mm-spn ul { transition-duration: 0s !important; }
}

/* Hamburger button in the header: three bars, 44px tap area. While the menu is
   open it hides and a floating copy (.rt-mmenu-burger, js/mobile-menu.js) sits
   above the dimmed page in the same spot, turning into the X that closes it. */
.header .toggle-mobile {
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  color: #24272C;
}
.header .toggle-mobile:focus-visible { color: #B5232A; }
@media (hover: hover) {
.header .toggle-mobile:hover { color: #B5232A; } }
.rt-burger {
  position: relative;
  display: block;
  width: 26px;
  height: 20px;
}
.rt-burger > span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: currentColor;
  transition: transform .5s cubic-bezier(.32, .72, 0, 1), opacity .25s ease;
  will-change: transform;
}
.rt-burger > span:nth-child(1) { top: 0; }
.rt-burger > span:nth-child(2) { top: 8.5px; }
.rt-burger > span:nth-child(3) { top: 17px; }
body.mm-ocd-opened .header .toggle-mobile .rt-burger { opacity: 0; }

.rt-mmenu-burger {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #24272C;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rt-mmenu-burger::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .35s ease, transform .5s cubic-bezier(.32, .72, 0, 1);
}
.rt-mmenu-burger .rt-burger { transform: scale(.85); }
.mm-ocd--open .rt-mmenu-burger::before { opacity: 1; transform: none; }
.rt-mmenu-burger:focus-visible { color: #B5232A; }
@media (hover: hover) {
.rt-mmenu-burger:hover { color: #B5232A; } }
.mm-ocd--open .rt-mmenu-burger .rt-burger > span:nth-child(1) { transform: translate3d(0, 8.5px, 0) rotate(45deg); }
.mm-ocd--open .rt-mmenu-burger .rt-burger > span:nth-child(2) { opacity: 0; transform: translate3d(-8px, 0, 0); }
.mm-ocd--open .rt-mmenu-burger .rt-burger > span:nth-child(3) { transform: translate3d(0, -8.5px, 0) rotate(-45deg); }

/* Smooth open/close. Everything that moves is a transform or an opacity, so
   phones hand it to the GPU instead of re-laying out / repainting each frame:
   - the drawer stays laid out while closed (mmenu-light collapses it to 0px
     high, which forced a full layout on the first frame of every open);
   - the page dims through an opacity layer, not a background-color change;
   - submenus slide with translateX instead of mmenu-light's "left". */
:root { --rt-mm-ease: cubic-bezier(.32, .72, 0, 1); --rt-mm-time: .5s; }
.mm-ocd {
  bottom: 0 !important;
  background: none !important;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear var(--rt-mm-time) !important;
}
.mm-ocd--open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s !important;
}
.mm-ocd::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(20, 20, 24, .5);
  opacity: 0;
  transition: opacity var(--rt-mm-time) var(--rt-mm-ease);
  will-change: opacity;
}
.mm-ocd--open::before { opacity: 1; }
.mm-ocd__content {
  transition: transform var(--rt-mm-time) var(--rt-mm-ease) !important;
  will-change: transform;
  backface-visibility: hidden;
  contain: layout paint;
}
.mm-ocd:not(.mm-ocd--open) .mm-ocd__content { box-shadow: none; }

/* Submenu panels: ul is 130% of the menu wide, so 100% / 1.3 = one menu width.
   Only a closed panel carries a transform (an open one has none), because a
   transformed ul would become the frame for the fixed-position submenus inside
   it and shift them; the submenu slides in over its parent. */
.rt-mmenu-panel .mm-spn ul {
  left: 0 !important;
  transform: translate3d(calc(100% / 1.3), 0, 0);
  transition: transform .45s var(--rt-mm-ease) !important;
}
.rt-mmenu-panel .mm-spn ul.mm-spn--open,
.rt-mmenu-panel .mm-spn ul.mm-spn--parent { transform: none; }
.rt-mmenu-panel .mm-spn ul:not(.mm-spn--parent) { box-shadow: -6px 0 18px rgba(0, 0, 0, .06); }
.rt-mmenu-panel .mm-spn > ul { box-shadow: none; }

/* Rows fade in just behind the drawer (opacity + a few px, cheap to draw). */
@keyframes rtMmRow {
  from { opacity: 0; transform: translate3d(-8px, 0, 0); }
  to   { opacity: 1; transform: none; }
}
.mm-ocd--open .rt-mmenu-panel .mm-spn ul.mm-spn--open:not(.mm-spn--parent) > li {
  animation: rtMmRow .4s var(--rt-mm-ease) both;
}
.mm-ocd--open .rt-mmenu-panel .mm-spn ul.mm-spn--open:not(.mm-spn--parent) > li:nth-child(1) { animation-delay: .06s; }
.mm-ocd--open .rt-mmenu-panel .mm-spn ul.mm-spn--open:not(.mm-spn--parent) > li:nth-child(2) { animation-delay: .09s; }
.mm-ocd--open .rt-mmenu-panel .mm-spn ul.mm-spn--open:not(.mm-spn--parent) > li:nth-child(3) { animation-delay: .12s; }
.mm-ocd--open .rt-mmenu-panel .mm-spn ul.mm-spn--open:not(.mm-spn--parent) > li:nth-child(4) { animation-delay: .15s; }
.mm-ocd--open .rt-mmenu-panel .mm-spn ul.mm-spn--open:not(.mm-spn--parent) > li:nth-child(5) { animation-delay: .18s; }
.mm-ocd--open .rt-mmenu-panel .mm-spn ul.mm-spn--open:not(.mm-spn--parent) > li:nth-child(n+6) { animation-delay: .21s; }
.mm-ocd--open .rt-mmenu-panel .rt-mmenu-info { animation: rtMmRow .4s var(--rt-mm-ease) .24s both; }

@media (prefers-reduced-motion: reduce) {
  .mm-ocd::before, .mm-ocd__content, .rt-mmenu-panel .mm-spn ul { transition-duration: 0s !important; }
  .mm-ocd--open .rt-mmenu-panel .mm-spn li,
  .mm-ocd--open .rt-mmenu-panel .rt-mmenu-info { animation: none !important; }
}

/* One close control: the floating hamburger turns into the X (.rt-mmenu-burger),
   so the drawer's own X only appears for keyboard users when focused. */
.rt-mmenu-close:not(:focus-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
