/* r4it-menu theme: flowing line fluctuation around segments */
#menu.r4it-menu-theme svg.menu-svg { overflow: visible; }
#menu.r4it-menu-theme svg.menu-svg path.menu-segment {
  stroke: rgba(255,255,255,0.55) !important;
  stroke-width: 1.6 !important;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: var(--seg-fill, transparent);
  mix-blend-mode: screen;
  stroke-dasharray: 11 19;
  /* base 14s scaled by speed factor */
  animation: r4itFlowLine calc(14s / var(--r4it-anim-speed-factor,1)) linear infinite;
  opacity: 0.9;
}
#menu.r4it-menu-theme svg.menu-svg path.menu-segment:nth-of-type(2n) {
  stroke-dasharray: 7 15;
  animation-duration: calc(17s / var(--r4it-anim-speed-factor,1));
  animation-delay: -4s;
  opacity: 0.55;
}
#menu.r4it-menu-theme svg.menu-svg path.menu-segment:nth-of-type(3n) {
  stroke-dasharray: 4 11;
  animation-duration: calc(11s / var(--r4it-anim-speed-factor,1));
  animation-delay: -2s;
  opacity: 0.7;
}
@keyframes r4itFlowLine { 0% { stroke-dashoffset:0; } 100% { stroke-dashoffset:-300; } }
/* Animation variants (applied via parent .anim-*) */
#menu.r4it-menu-theme.anim-subtle svg.menu-svg path.menu-segment { animation-duration:calc(22s / var(--r4it-anim-speed-factor,1)); opacity:0.65; stroke-dasharray:14 24; }
#menu.r4it-menu-theme.anim-subtle svg.menu-svg path.menu-segment:nth-of-type(2n){ animation-duration:calc(26s / var(--r4it-anim-speed-factor,1)); }
#menu.r4it-menu-theme.anim-subtle svg.menu-svg path.menu-segment:nth-of-type(3n){ animation-duration:calc(19s / var(--r4it-anim-speed-factor,1)); }

#menu.r4it-menu-theme.anim-fast svg.menu-svg path.menu-segment { animation-duration:calc(8s / var(--r4it-anim-speed-factor,1)); stroke-dasharray:8 14; }
#menu.r4it-menu-theme.anim-fast svg.menu-svg path.menu-segment:nth-of-type(2n){ animation-duration:calc(6s / var(--r4it-anim-speed-factor,1)); }
#menu.r4it-menu-theme.anim-fast svg.menu-svg path.menu-segment:nth-of-type(3n){ animation-duration:calc(5s / var(--r4it-anim-speed-factor,1)); }

#menu.r4it-menu-theme.anim-reverse svg.menu-svg path.menu-segment { animation-direction:reverse; }
#menu.r4it-menu-theme.anim-reverse svg.menu-svg path.menu-segment:nth-of-type(2n){ animation-direction:normal; }

#menu.r4it-menu-theme.anim-pulse svg.menu-svg path.menu-segment { animation:r4itFlowLine calc(14s / var(--r4it-anim-speed-factor,1)) linear infinite, r4itPulse calc(3.4s / var(--r4it-anim-speed-factor,1)) ease-in-out infinite; }
@keyframes r4itPulse { 0%,100% { stroke-width:1.4; opacity:0.85;} 50% { stroke-width:2.2; opacity:1; } }

#menu.r4it-menu-theme.anim-off svg.menu-svg path.menu-segment { animation:none; }
/* New styles: dotted (point-like), streams (multi-speed layered), flame (wandering fire) */
#menu.r4it-menu-theme.anim-dotted svg.menu-svg path.menu-segment {
  stroke-dasharray:2 10 !important;
  animation:r4itFlowLine calc(9s / var(--r4it-anim-speed-factor,1)) linear infinite;
  opacity:0.85;
}
#menu.r4it-menu-theme.anim-dotted svg.menu-svg path.menu-segment:nth-of-type(2n){ stroke-dasharray:1.2 8; animation-duration:calc(6s / var(--r4it-anim-speed-factor,1)); }
#menu.r4it-menu-theme.anim-dotted svg.menu-svg path.menu-segment:nth-of-type(3n){ stroke-dasharray:2.4 12; animation-duration:calc(11s / var(--r4it-anim-speed-factor,1)); }

#menu.r4it-menu-theme.anim-streams svg.menu-svg path.menu-segment {
  stroke-dasharray:14 22;
  animation:r4itFlowLine calc(18s / var(--r4it-anim-speed-factor,1)) linear infinite;
  opacity:0.75;
}
#menu.r4it-menu-theme.anim-streams svg.menu-svg path.menu-segment:nth-of-type(2n){ stroke-dasharray:9 18; animation-duration:calc(12s / var(--r4it-anim-speed-factor,1)); }
#menu.r4it-menu-theme.anim-streams svg.menu-svg path.menu-segment:nth-of-type(3n){ stroke-dasharray:4 14; animation-duration:calc(7s / var(--r4it-anim-speed-factor,1)); }

#menu.r4it-menu-theme.anim-flame svg.menu-svg path.menu-segment {
  stroke:#ff9a2b;
  stroke-dasharray:13 21;
  animation: r4itFlowLine calc(13s / var(--r4it-anim-speed-factor,1)) linear infinite, r4itFlameWander calc(4.2s / var(--r4it-anim-speed-factor,1)) ease-in-out infinite;
  filter: drop-shadow(0 0 3px #ff7b00) drop-shadow(0 0 6px #ff4b00);
}
#menu.r4it-menu-theme.anim-flame svg.menu-svg path.menu-segment:nth-of-type(2n){ animation-duration:calc(16s / var(--r4it-anim-speed-factor,1)), calc(5.1s / var(--r4it-anim-speed-factor,1)); stroke-dasharray:9 17; }
#menu.r4it-menu-theme.anim-flame svg.menu-svg path.menu-segment:nth-of-type(3n){ animation-duration:calc(10s / var(--r4it-anim-speed-factor,1)), calc(3.6s / var(--r4it-anim-speed-factor,1)); stroke-dasharray:5 13; }
@keyframes r4itFlameWander { 0%,100% { stroke-width:1.4; filter: drop-shadow(0 0 2px #ffad33) drop-shadow(0 0 6px #ff5a00);} 40% { stroke-width:2.1; filter: drop-shadow(0 0 4px #ffc866) drop-shadow(0 0 10px #ff7a00);} 60% { stroke-width:1.6; } 80% { stroke-width:2.3; filter: drop-shadow(0 0 5px #ffd280) drop-shadow(0 0 12px #ff8d1a);} }
/* Single traveling flame: base lines mostly dim, one bright glowing packet moving per path */
#menu.r4it-menu-theme.anim-flamesingle svg.menu-svg path.menu-segment {
  stroke:#ff9a2b;
  stroke-dasharray:160 500; /* long gap so only one bright head */
  stroke-dashoffset:0;
  animation:r4itFlameSingleMove calc(9s / var(--r4it-anim-speed-factor,1)) linear infinite, r4itFlameSingleGlow calc(2.6s / var(--r4it-anim-speed-factor,1)) ease-in-out infinite;
  opacity:0.55;
  filter:drop-shadow(0 0 2px #ff7800);
}
#menu.r4it-menu-theme.anim-flamesingle svg.menu-svg path.menu-segment:nth-of-type(2n){ animation-duration:calc(11s / var(--r4it-anim-speed-factor,1)), calc(3.1s / var(--r4it-anim-speed-factor,1)); }
#menu.r4it-menu-theme.anim-flamesingle svg.menu-svg path.menu-segment:nth-of-type(3n){ animation-duration:calc(7s / var(--r4it-anim-speed-factor,1)), calc(2.2s / var(--r4it-anim-speed-factor,1)); }
@keyframes r4itFlameSingleMove { 0% { stroke-dashoffset:0; } 100% { stroke-dashoffset:-660; } }
@keyframes r4itFlameSingleGlow { 0%,100% { opacity:0.55; filter:drop-shadow(0 0 2px #ff7a00); } 35% { opacity:0.95; filter:drop-shadow(0 0 6px #ffa733) drop-shadow(0 0 14px #ff6a00);} 60% { opacity:0.70; } 80% { opacity:0.90; } }

/* Color variants */
#menu.r4it-menu-theme.anim-color-accent svg.menu-svg path.menu-segment { stroke: var(--r4it-accent,#3aa9ff) !important; }
#menu.r4it-menu-theme.anim-color-segment svg.menu-svg path.menu-segment { stroke: currentColor !important; }
#menu.r4it-menu-theme.anim-color-rainbow svg.menu-svg path.menu-segment { stroke: url(#r4itRainbowStroke); }
#menu.r4it-menu-theme.anim-color-neon svg.menu-svg path.menu-segment { stroke: #39f; filter: drop-shadow(0 0 4px #39f) drop-shadow(0 0 8px #39f); }
#menu.r4it-menu-theme.anim-color-fire svg.menu-svg path.menu-segment { stroke: #ffb347; animation-name: r4itFlowLine, r4itFire; }
#menu.r4it-menu-theme.anim-color-ocean svg.menu-svg path.menu-segment { stroke: #3fd1ff; animation-name: r4itFlowLine, r4itOcean; }

@keyframes r4itFire { 0%,100% { filter: drop-shadow(0 0 2px #ff7e00) drop-shadow(0 0 6px #ff3c00); } 50% { filter: drop-shadow(0 0 4px #ffae00) drop-shadow(0 0 10px #ff5a00); } }
@keyframes r4itOcean { 0%,100% { filter: drop-shadow(0 0 2px #0ff) drop-shadow(0 0 6px #00b7ff); } 50% { filter: drop-shadow(0 0 4px #42e8ff) drop-shadow(0 0 10px #0099ff); } }

#menu.r4it-menu-theme.anim-subtle svg.menu-svg path.menu-segment.seg-debug { stroke:#0ff; }
@media (prefers-reduced-motion: reduce){
  #menu.r4it-menu-theme svg.menu-svg path.menu-segment { animation:none !important; }
  #menu.r4it-menu-theme.anim-flamesingle svg.menu-svg path.menu-segment { filter:none !important; }
}
