/* ================================================================
   Animierte Service-Dashboards
   Rein dekorativ, ohne Abhängigkeiten und mit Reduced-Motion-Fallback.
   ================================================================ */

body.has-service-visual .page-hero{
  min-height:660px;
  display:flex;
  align-items:center;
}

body.has-service-visual .page-hero .container{
  width:100%;
}

.service-visual{
  position:absolute;
  top:50%;
  right:28px;
  width:min(470px,39vw);
  min-height:356px;
  transform:translateY(-43%);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.13);
  border-radius:24px;
  background:
    radial-gradient(440px 240px at 96% 0%,rgba(255,87,34,.16),transparent 62%),
    linear-gradient(150deg,rgba(34,34,39,.94),rgba(22,22,25,.9));
  box-shadow:
    0 32px 80px -34px rgba(0,0,0,.9),
    0 0 54px -32px rgba(255,87,34,.7),
    inset 0 1px 0 rgba(255,255,255,.08);
  isolation:isolate;
}

.service-visual::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.026) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.026) 1px,transparent 1px);
  background-size:28px 28px;
  -webkit-mask-image:linear-gradient(to bottom,#000,transparent 88%);
  mask-image:linear-gradient(to bottom,#000,transparent 88%);
}

.service-visual__top,
.service-visual__foot{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  min-height:48px;
  padding:0 18px;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-family:var(--mono);
  font-size:.68rem;
  font-weight:600;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:#a6a6b0;
}

.service-visual__dots{
  display:flex;
  gap:6px;
  margin-right:12px;
}

.service-visual__dots i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#ff6b3d;
  box-shadow:0 0 9px rgba(255,87,34,.45);
}

.service-visual__dots i:nth-child(2){background:#d8a13c}
.service-visual__dots i:nth-child(3){background:#50c993}

.service-visual__live{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
  color:#72dbad;
}

.service-visual__live i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#55d69d;
  box-shadow:0 0 0 0 rgba(85,214,157,.46);
  animation:sv-live 2.4s ease-out infinite;
}

.service-visual__stage{
  position:relative;
  z-index:1;
  height:252px;
  padding:12px 14px 4px;
}

.service-visual__stage svg{
  width:100%;
  height:100%;
  overflow:visible;
}

.service-visual__foot{
  justify-content:space-between;
  min-height:56px;
  border-top:1px solid rgba(255,255,255,.08);
  border-bottom:0;
  letter-spacing:.04em;
  text-transform:none;
}

.service-visual__metric{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.service-visual__metric small{
  color:#777782;
  font-size:.61rem;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.service-visual__metric strong{
  color:#f7f7fa;
  font-family:var(--display);
  font-size:.8rem;
  letter-spacing:0;
}

.service-visual__metric--right{text-align:right}

/* SVG-Grundsystem */
.sv-panel{
  fill:rgba(255,255,255,.035);
  stroke:rgba(255,255,255,.11);
  stroke-width:1.2;
}

.sv-panel--hot{
  fill:rgba(255,87,34,.08);
  stroke:rgba(255,138,101,.4);
}

.sv-node{
  fill:#202026;
  stroke:rgba(255,255,255,.14);
  stroke-width:1.4;
}

.sv-node--active{
  fill:rgba(255,87,34,.13);
  stroke:#ff7a4d;
}

.sv-line{
  fill:none;
  stroke:rgba(255,255,255,.18);
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.sv-line--flow{
  stroke:#ff7447;
  stroke-dasharray:5 9;
  animation:sv-dash 3.4s linear infinite;
  filter:drop-shadow(0 0 4px rgba(255,87,34,.45));
}

.sv-line--ok{stroke:#55d69d}
.sv-line--danger{stroke:#ff5a62}

.sv-label{
  fill:#9d9da8;
  font:600 10px/1 var(--mono);
  letter-spacing:.06em;
  text-transform:uppercase;
}

.sv-label--strong{
  fill:#f7f7fa;
  font:600 12px/1 var(--display);
  letter-spacing:0;
}

.sv-label--ok{fill:#65dbaa}
.sv-label--hot{fill:#ff8a65}

.sv-icon{
  fill:none;
  stroke:#d7d7df;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.sv-icon--hot{stroke:#ff8a65}
.sv-icon--ok{stroke:#65dbaa}

.sv-dot{fill:#ff6b3d;filter:drop-shadow(0 0 5px rgba(255,87,34,.7))}
.sv-dot--ok{fill:#55d69d;filter:drop-shadow(0 0 5px rgba(85,214,157,.65))}
.sv-dot--danger{fill:#ff5964;filter:drop-shadow(0 0 5px rgba(255,89,100,.6))}

.sv-pulse{
  transform-box:fill-box;
  transform-origin:center;
  animation:sv-pulse 2.8s ease-in-out infinite;
  animation-delay:var(--delay,0s);
  animation-fill-mode:both;
}

.sv-pulse--anchored{
  transform-box:view-box;
  transform-origin:var(--origin-x) var(--origin-y);
}

.sv-blink{
  animation:sv-blink 2.2s ease-in-out infinite;
  animation-delay:var(--delay,0s);
  animation-fill-mode:both;
}

.sv-rise{
  transform-box:fill-box;
  transform-origin:center;
  animation:sv-rise 3.2s ease-in-out infinite;
  animation-delay:var(--delay,0s);
  animation-fill-mode:both;
}

.sv-scan{
  animation:sv-scan 3.8s ease-in-out infinite;
  filter:drop-shadow(0 0 8px rgba(255,87,34,.65));
}

.sv-ring{
  fill:none;
  stroke:#ff7447;
  stroke-width:1.3;
  transform-box:fill-box;
  transform-origin:center;
  animation:sv-ring 3s ease-out infinite;
  animation-delay:var(--delay,0s);
  animation-fill-mode:both;
}

.sv-rotate{
  transform-box:view-box;
  transform-origin:222px 125px;
  animation:sv-rotate 7s linear infinite;
}

.sv-float{
  animation:sv-float 3.6s ease-in-out infinite;
  animation-delay:var(--delay,0s);
  animation-fill-mode:both;
}

.sv-slide{
  animation:sv-slide 4.2s ease-in-out infinite;
  animation-delay:var(--delay,0s);
}

.sv-grow{
  transform-box:fill-box;
  transform-origin:bottom;
  animation:sv-grow 3.4s ease-in-out infinite;
  animation-delay:var(--delay,0s);
  animation-fill-mode:both;
}

@keyframes sv-dash{to{stroke-dashoffset:-42}}
@keyframes sv-live{
  0%{box-shadow:0 0 0 0 rgba(85,214,157,.46)}
  70%,100%{box-shadow:0 0 0 8px rgba(85,214,157,0)}
}
@keyframes sv-pulse{0%,100%{opacity:.68;transform:scale(.96)}50%{opacity:1;transform:scale(1.025)}}
@keyframes sv-blink{0%,32%,100%{opacity:.28}45%,74%{opacity:1}}
@keyframes sv-rise{0%,100%{opacity:.68}50%{opacity:1}}
@keyframes sv-scan{
  0%{transform:translateY(-60px);opacity:0}
  12%{opacity:1}
  88%{transform:translateY(60px);opacity:1}
  100%{transform:translateY(60px);opacity:0}
}
@keyframes sv-ring{0%{opacity:.8;transform:scale(.45)}75%,100%{opacity:0;transform:scale(1.45)}}
@keyframes sv-rotate{to{transform:rotate(360deg)}}
@keyframes sv-float{0%,100%{opacity:.72}50%{opacity:1}}
@keyframes sv-slide{0%,15%,100%{transform:translateX(0);opacity:.35}45%,70%{transform:translateX(54px);opacity:1}}
@keyframes sv-grow{0%,100%{transform:scaleY(.55);opacity:.5}50%{transform:scaleY(1);opacity:1}}

/* Die Platzreserve rechts gilt NUR, wenn wirklich eine Grafik im Hero steht.
   Vorher haengte sie allein an der Body-Klasse has-service-visual, die
   mh-header.php an jede Leistungsseite vergibt - auch an die (derzeit alle),
   die gar kein .service-visual ausgeben. Ergebnis: 500 px wurden fuer nichts
   freigehalten, die Ueberschrift auf 684 px gequetscht, und
   "Videoueberwachung" (694 px bei 76,8 px Schrift) brach mitten im Wort um.
   Mit :has() greifen die Regeln automatisch wieder, sobald eine Grafik
   tatsaechlich ausgegeben wird - nichts muss dann zurueckgebaut werden. */
@media(min-width:981px){
  body.has-service-visual .page-hero .container:has(.service-visual) > :not(.service-visual){
    max-width:min(690px,calc(100% - 500px));
  }
  body.has-service-visual .page-hero .container:has(.service-visual) h1{font-size:clamp(3rem,5vw,4.8rem)}
}

@media(max-width:1120px) and (min-width:981px){
  .service-visual{right:24px;width:410px}
  body.has-service-visual .page-hero .container:has(.service-visual) > :not(.service-visual){
    max-width:calc(100% - 440px);
  }
}

@media(max-width:980px){
  body.has-service-visual .page-hero{
    min-height:0;
    display:block;
  }
  .service-visual{
    position:relative;
    top:auto;
    right:auto;
    width:100%;
    max-width:560px;
    min-height:0;
    margin:38px auto 0;
    transform:none;
  }
  .service-visual__stage{height:230px}
}

@media(max-width:520px){
  .service-visual{border-radius:18px}
  .service-visual__top{padding:0 13px;font-size:.61rem}
  .service-visual__stage{height:210px;padding:8px 8px 2px}
  .service-visual__foot{padding:0 13px;min-height:52px}
  .service-visual__metric strong{font-size:.72rem}
  .service-visual__metric small{font-size:.56rem}
}

@media(prefers-reduced-motion:reduce){
  .service-visual *,
  .service-visual *::before,
  .service-visual *::after{
    animation:none!important;
    transition:none!important;
  }
  .sv-pulse,.sv-blink,.sv-rise,.sv-scan,.sv-ring,.sv-rotate,
  .sv-float,.sv-slide,.sv-grow{opacity:1;transform:none}
}
