/* Pagina „Automatizări și integrări”: secțiunile „Cum funcționează” (un exemplu urmărit pas cu pas)
   și „Ce putem lega” (programele legate de același flux). Animațiile rulează o dată; nimic nu se repetă la nesfârșit. */

/* ── Cum funcționează: exemplul care trece prin cei patru pași ── */
.fl-cutie{position:relative;max-width:1100px;margin:0 auto;padding:clamp(22px,3vw,40px);border-radius:28px;border:1px solid var(--au-bord2);
  background:radial-gradient(60% 70% at 50% 0%,rgba(30,111,255,.16),transparent 70%),linear-gradient(180deg,rgba(12,26,60,.7),rgba(6,14,34,.6))}
.fl-tab{display:flex;justify-content:center;gap:6px;width:fit-content;margin:0 auto clamp(26px,3vw,38px);padding:5px;border-radius:999px;background:rgba(5,11,26,.7);border:1px solid var(--au-bord)}
.fl-tab button{min-height:40px;padding:0 18px;border:0;border-radius:999px;cursor:pointer;font:inherit;font-size:14.5px;font-weight:700;color:#9FB2CF;background:transparent;
  transition:color .3s,background .3s,box-shadow .3s}
.fl-tab button:hover{color:#fff}
.fl-tab button[aria-selected="true"]{color:#fff;background:#1E6FFF;box-shadow:0 8px 22px -10px rgba(30,111,255,.9)}
.fl-tab button:focus-visible{outline:2px solid #7CC4FF;outline-offset:2px}
.fl-pista{position:relative;height:56px;margin:0 12.5%}
.fl-linie,.fl-umple{position:absolute;left:0;right:0;top:50%;height:2px;margin-top:-1px;border-radius:2px}
.fl-linie{background:rgba(124,196,255,.16)}
.fl-umple{background:linear-gradient(90deg,#1E6FFF,#7CC4FF);box-shadow:0 0 12px rgba(77,163,255,.7);transform:scaleX(0);transform-origin:left;transition:transform 1.1s cubic-bezier(.5,0,.3,1)}
.fl-pachet{position:absolute;left:0;top:50%;z-index:2;transform:translate(-50%,-50%);transition:transform 1.1s cubic-bezier(.5,0,.3,1)}
.fl-pachet b{display:block;white-space:nowrap;padding:8px 14px;border-radius:999px;font-size:13px;font-weight:700;color:#fff;
  background:linear-gradient(150deg,#1E6FFF,#1556C9);box-shadow:0 0 0 4px rgba(30,111,255,.16),0 10px 30px -8px rgba(30,111,255,.9);transition:opacity .25s}
.fl-pachet.schimba b{opacity:0}
.fl-pasi{list-style:none;margin:6px 0 0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(10px,1.4vw,18px)}
.fl-pasi li{display:flex;flex-direction:column;align-items:center;text-align:center;padding:18px 10px 4px;opacity:.45;transition:opacity .6s ease}
.fl-pasi li.on{opacity:1}
.fl-nod{display:grid;place-items:center;width:52px;height:52px;border-radius:15px;color:#7F94B6;background:#071433;border:1px solid rgba(124,196,255,.25);
  transition:color .6s,border-color .6s,background .6s,box-shadow .6s,transform .6s cubic-bezier(.3,1.4,.5,1)}
.fl-nod svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.fl-pasi li.on .fl-nod{color:#fff;border-color:#4DA3FF;background:linear-gradient(150deg,#1E6FFF,#0B2E73);box-shadow:0 0 0 6px rgba(30,111,255,.12),0 12px 30px -10px rgba(30,111,255,.9)}
.fl-pasi li.acum .fl-nod{transform:scale(1.1)}
.fl-pasi small{margin-top:14px;font-family:var(--m);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#7CC4FF}
.fl-pasi b{margin-top:6px;font-size:16.5px;font-weight:700;color:#fff;letter-spacing:-.01em}
.fl-pasi p{margin:8px 0 0;min-height:3em;font-size:14.5px;line-height:1.5;color:#C9D6EA;max-width:24ch;transition:opacity .4s ease}
.fl-pasi p.schimba{opacity:0}
.fl-reia{display:flex;align-items:center;gap:8px;margin:18px auto 0;padding:8px 14px;border-radius:999px;cursor:pointer;font:inherit;font-size:13px;font-weight:600;
  color:#CFE3FF;background:rgba(8,20,48,.7);border:1px solid rgba(124,196,255,.3);opacity:0;pointer-events:none;transition:opacity .5s,border-color .3s,color .3s}
.fl-reia svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fl.gata .fl-reia{opacity:1;pointer-events:auto}
.fl-reia:hover{color:#fff;border-color:#7CC4FF}
.fl-reia:focus-visible{outline:2px solid #7CC4FF;outline-offset:3px}
.fl-nota{margin-top:clamp(20px,2.4vw,28px)!important}

/* ── Ce putem lega: șase programe legate de același flux ── */
.hb-scena{position:relative;max-width:1100px;margin:0 auto;aspect-ratio:1000/560}
.hb-fire{position:absolute;inset:0;width:100%;height:100%}
.hb-fire path{fill:none;stroke:rgba(124,196,255,.5);stroke-width:1.5;vector-effect:non-scaling-stroke;stroke-dasharray:1;stroke-dashoffset:1}
.hb-scena.in .hb-fire path{stroke-dashoffset:0;transition:stroke-dashoffset 1.4s cubic-bezier(.5,0,.3,1)}
.hb-scena.in .hb-fire path:nth-child(2){transition-delay:.15s}.hb-scena.in .hb-fire path:nth-child(3){transition-delay:.3s}
.hb-scena.in .hb-fire path:nth-child(4){transition-delay:.1s}.hb-scena.in .hb-fire path:nth-child(5){transition-delay:.25s}.hb-scena.in .hb-fire path:nth-child(6){transition-delay:.4s}
.hb-centru{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;z-index:2}
.hb-k{display:grid;place-items:center;width:clamp(76px,8vw,104px);aspect-ratio:1;border-radius:26px;background:radial-gradient(circle at 50% 35%,#163A86,#071433);
  border:1px solid #4DA3FF;box-shadow:0 0 0 10px rgba(30,111,255,.08),0 0 60px rgba(30,111,255,.55)}
.hb-k img{width:66%;height:auto}
.hb-scena.in .hb-k{animation:hb-bate 1.4s ease 1.5s 1 both}
@keyframes hb-bate{0%,100%{box-shadow:0 0 0 10px rgba(30,111,255,.08),0 0 60px rgba(30,111,255,.55)}45%{box-shadow:0 0 0 22px rgba(30,111,255,.14),0 0 90px rgba(30,111,255,.85)}}
.hb-centru b{margin-top:8px;font-size:16px;color:#fff}
.hb-centru small{font-family:var(--m);font-size:11px;letter-spacing:.08em;color:#8FA6CC}
.hb-lista{list-style:none;margin:0;padding:0}
.hb-n{position:absolute;display:flex;align-items:center;gap:12px;width:30%;padding:12px 14px;border-radius:16px;
  border:1px solid var(--au-bord);background:linear-gradient(180deg,rgba(14,32,74,.75),rgba(7,16,40,.7));
  transform:translateY(-50%);opacity:0;transition:opacity .7s ease calc(var(--i) * .08s + .2s),border-color .4s,box-shadow .4s}
.hb-scena.in .hb-n{opacity:1}
.hb-n:hover{border-color:var(--au-bord2);box-shadow:0 18px 40px -22px rgba(30,111,255,.6)}
.hb-0{left:0;top:16%}.hb-1{left:0;top:50%}.hb-2{left:0;top:84%}
.hb-3{right:0;top:16%}.hb-4{right:0;top:50%}.hb-5{right:0;top:84%}
.hb-ic{flex:none;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;color:#9FD3FF;background:rgba(30,111,255,.12);border:1px solid var(--au-bord2)}
.hb-ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hb-tx{min-width:0}
.hb-tx b{display:block;font-size:15px;font-weight:700;color:#fff;line-height:1.25}
.hb-tx span{display:block;margin-top:3px;font-size:13.5px;line-height:1.45;color:#AEBBD2}

@media (max-width:900px){
  .fl-pista{display:none}
  .fl-pasi{grid-template-columns:1fr 1fr}
  .hb-scena{aspect-ratio:auto;display:flex;flex-direction:column;align-items:center;gap:22px}
  .hb-fire{display:none}
  .hb-centru{position:static;transform:none}
  .hb-lista{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
  .hb-n{position:static;width:auto;transform:none}
}
@media (max-width:560px){
  .fl-tab button{padding:0 13px;font-size:13.5px}
  .fl-pasi{grid-template-columns:1fr;gap:0}
  .fl-pasi li{flex-direction:row;flex-wrap:wrap;align-items:center;text-align:left;column-gap:14px;padding:12px 0}
  .fl-pasi small{margin:0}
  .fl-pasi b{width:100%;margin-top:4px}
  .fl-pasi p{min-height:0;max-width:none;margin-top:4px}
  .fl-nod{width:44px;height:44px}
  .hb-lista{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  .fl *,.hb *{transition:none!important;animation:none!important}
  .hb-fire path{stroke-dashoffset:0}.hb-n{opacity:1}
}
