/* #spoluprace: "cesta prvého procesu" (modrá trať podľa scrollu, kroky 1–3, Jak to pak probíhá v praxi) + FAQ ako rozhovor.
   cesta.js nastaví html[data-cesta="new"] synchrónne v <head> (pred vykreslením, bez bliknutia).
   ?sekce=old alebo bez JS: zobrazí sa pôvodný obsah sekcie (.cesta-old), nový blok .cesta-new ostáva hidden.
   Nadpis a podnadpis sekcie sú spoločné (pôvodný markup), texty sú doslovne prevzaté. */
html[data-cesta="new"] .cesta-old > .grid,
html[data-cesta="new"] .cesta-old > .max-w-3xl{display:none}
html[data-cesta="new"] .cesta-old .cesta-new{display:block}

.cesta-new{--cs-blue:#2563eb;--cs-blue-soft:#8eaaf0;--cs-navy:#0f172a;--cs-slate:#475569;--cs-line:#e4e4dd;
  --cs-rail-x:36px;max-width:1040px;margin:0 auto;color:var(--cs-navy)}

/* ---------- trať ---------- */
.cs-path{position:relative}
.cs-rail{position:absolute;left:0;top:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.cs-rail path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.cs-rail-track{stroke:#d5def3;stroke-width:2}
.cs-rail-fill{stroke:var(--cs-blue);stroke-width:2.5}
.cs-head{position:absolute;left:0;top:0;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:var(--cs-blue);
  box-shadow:0 0 0 4px rgba(37,99,235,.16),0 0 16px 3px rgba(37,99,235,.45);opacity:0;pointer-events:none;
  transition:opacity .3s ease;will-change:transform}
.cs-path.is-moving .cs-head{opacity:1}

/* ---------- kroky ---------- */
.cs-steps{list-style:none;margin:0;padding:0;display:grid;gap:34px}
.cs-step{position:relative;display:grid;grid-template-columns:calc(var(--cs-rail-x) * 2) 104px minmax(0,1fr);align-items:center}
.cs-node{grid-column:1;justify-self:center;position:relative;z-index:1;width:18px;height:18px;border-radius:50%;
  background:#fff;border:2px solid var(--cs-blue-soft);transition:background-color .45s ease,border-color .45s ease,box-shadow .45s ease}
.cs-step.is-on .cs-node{background:var(--cs-blue);border-color:var(--cs-blue);box-shadow:0 0 0 6px rgba(37,99,235,.14),0 0 18px 2px rgba(37,99,235,.35)}

.cs-num{grid-column:2;width:84px;height:100px;justify-self:center;overflow:visible}
.cs-num text{font-family:Newsreader,Georgia,serif;font-style:italic;font-weight:500;font-size:112px;text-anchor:middle;
  fill:var(--cs-blue);fill-opacity:1;stroke:var(--cs-blue);stroke-width:1.4;stroke-dasharray:420;stroke-dashoffset:0}

.cs-card{grid-column:3;position:relative;background:#fff;border:1px solid var(--cs-line);border-radius:20px;padding:26px 30px;
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 18px 40px -24px rgba(15,23,42,.22);
  transition:border-color .5s ease,box-shadow .5s ease}
.cs-step.is-on .cs-card{border-color:#cfdbf6;box-shadow:0 1px 2px rgba(15,23,42,.04),0 22px 44px -24px rgba(37,99,235,.30)}
.cs-step-2 .cs-card,.cs-step-3 .cs-card{max-width:620px}
.cs-card-top{display:flex;align-items:center;gap:16px}
.cs-ico{flex:none;width:46px;height:46px;border-radius:14px;display:flex !important;align-items:center;justify-content:center;
  background:#eef3fe;color:var(--cs-blue);font-size:24px !important}
.cs-title{margin:0;font-family:Newsreader,Georgia,serif;font-weight:600;font-size:30px;line-height:1.15;letter-spacing:-.01em;color:var(--cs-navy)}

.cs-person{display:grid;grid-template-columns:136px minmax(0,1fr);gap:24px;align-items:center;margin-top:22px;padding-top:22px;border-top:1px solid #efefe9}
.cs-photo{width:136px;height:136px;border-radius:22px;object-fit:cover;border:1px solid var(--cs-line);
  box-shadow:0 14px 28px -16px rgba(15,23,42,.35)}
.cs-name{margin:0;font-size:20px;font-weight:700;line-height:1.2}
.cs-role{margin:4px 0 0;font-size:16px;font-weight:700;color:#1d4ed8}
.cs-say{margin:12px 0 0;font-size:17px;line-height:1.6;color:var(--cs-slate)}

/* ---------- Jak to pak probíhá v praxi ---------- */
.cs-practice{margin-top:64px;padding-left:calc(var(--cs-rail-x) * 2)}
.cs-pr-title{margin:0 0 44px;font-size:15px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--cs-slate)}
.cs-pr-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.cs-pr-card{position:relative;background:#fff;border:1px solid var(--cs-line);border-radius:18px;padding:0 24px 24px;
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 14px 30px -22px rgba(15,23,42,.22);transition:border-color .5s ease,box-shadow .5s ease}
.cs-disc{position:relative;z-index:1;display:flex !important;align-items:center;justify-content:center;width:52px;height:52px;margin:-26px 0 16px;
  border-radius:50%;background:#fff;border:2px solid var(--cs-blue-soft);color:#64748b;font-size:24px !important;
  transition:border-color .45s ease,color .45s ease,box-shadow .45s ease,background-color .45s ease}
.cs-pr-card p{margin:0;font-size:16px;line-height:1.6;color:var(--cs-slate)}
.cs-b{font-weight:700;color:var(--cs-navy)}
.cs-pr-card.is-on{border-color:#cfdbf6;box-shadow:0 1px 2px rgba(15,23,42,.04),0 18px 36px -22px rgba(37,99,235,.32)}
.cs-pr-card.is-on .cs-disc{border-color:var(--cs-blue);color:var(--cs-blue);background:#f5f8ff;box-shadow:0 0 0 6px rgba(37,99,235,.10),0 0 18px 1px rgba(37,99,235,.28)}

/* ---------- vstupné animácie (len s JS a bez reduced-motion: .cs-armed) ---------- */
.cs-armed .cs-card,.cs-armed .cs-pr-card{opacity:0;translate:0 26px}
.cs-armed .cs-num text{fill-opacity:0;stroke-dashoffset:420}
.cs-armed .cs-photo{scale:.94;opacity:0}
.cs-armed .is-seen .cs-card,.cs-armed .cs-pr-card.is-seen{opacity:1;translate:0 0;
  transition:opacity .8s cubic-bezier(.16,1,.3,1),translate .9s cubic-bezier(.16,1,.3,1),border-color .5s ease,box-shadow .5s ease}
.cs-armed .is-seen .cs-num text{fill-opacity:1;stroke-dashoffset:0;transition:stroke-dashoffset 1.2s cubic-bezier(.65,0,.35,1),fill-opacity .7s ease .75s}
.cs-armed .is-seen .cs-photo{scale:1;opacity:1;transition:scale .9s cubic-bezier(.16,1,.3,1) .25s,opacity .7s ease .25s}

/* ---------- FAQ ako rozhovor ---------- */
.cs-faq{max-width:780px;margin:88px auto 0}
.cs-faq-title{margin:0 0 32px;text-align:center;font-size:22px;font-weight:700;color:var(--cs-navy)}
.cs-chat{display:flex;flex-direction:column;gap:14px;padding:30px 30px 26px;background:#fff;border:1px solid var(--cs-line);border-radius:28px;
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 24px 48px -30px rgba(15,23,42,.25)}
.cs-item{display:flex;flex-direction:column}
.cs-q{align-self:flex-end;max-width:84%;display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer;
  padding:14px 16px 14px 20px;border-radius:22px 22px 6px 22px;border:1px solid #e3e8f2;background:#f6f8fc;color:var(--cs-navy);
  font:600 16px/1.45 Inter,system-ui,sans-serif;box-shadow:0 1px 2px rgba(15,23,42,.04),0 10px 22px -18px rgba(15,23,42,.30);
  transition:background-color .3s ease,border-color .3s ease,color .3s ease,box-shadow .3s ease}
.cs-q:hover{border-color:#bfd0f7;background:#fff}
.cs-q:focus-visible{outline:2px solid var(--cs-blue);outline-offset:3px}
.cs-q .material-symbols-outlined{flex:none;font-size:20px;color:#64748b;transition:transform .35s cubic-bezier(.16,1,.3,1),color .3s ease}
.cs-q[aria-expanded="true"]{background:var(--cs-blue);border-color:var(--cs-blue);color:#fff;box-shadow:0 12px 26px -16px rgba(37,99,235,.65)}
.cs-q[aria-expanded="true"] .material-symbols-outlined{color:#fff;transform:rotate(180deg)}

.cs-a{overflow:hidden}
.cs-a.is-anim{transition:height .45s cubic-bezier(.16,1,.3,1)}
.cs-a-row{display:flex;align-items:flex-start;gap:12px;padding:12px 0 6px}
.cs-avatar{flex:none;width:40px;height:40px;border-radius:50%;object-fit:cover;border:1px solid var(--cs-line)}
.cs-bubble{position:relative;max-width:84%;padding:14px 20px;border-radius:6px 22px 22px 22px;background:#edf1f8;
  clip-path:inset(0 0 0 0 round 6px 22px 22px 22px);transition:clip-path .5s cubic-bezier(.16,1,.3,1)}
.cs-bubble p{margin:0;font-size:16px;line-height:1.65;color:#1e293b;transition:opacity .45s ease .12s}
.cs-dots{position:absolute;left:20px;top:22px;display:flex;gap:5px;opacity:0;transition:opacity .2s ease}
.cs-dots i{width:7px;height:7px;border-radius:50%;background:#64748b;animation:csDot 1s ease-in-out infinite}
.cs-dots i:nth-child(2){animation-delay:.15s}
.cs-dots i:nth-child(3){animation-delay:.3s}
@keyframes csDot{0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-4px);opacity:1}}
.cs-a.is-typing .cs-bubble{clip-path:inset(0 calc(100% - 74px) calc(100% - 50px) 0 round 6px 22px 22px 22px)}
.cs-a.is-typing .cs-bubble p{opacity:0;transition:none}
.cs-a.is-typing .cs-dots{opacity:1}

/* otázky "prídu" postupne pri vstupe do viewportu */
.cs-faq-armed .cs-item{opacity:0;translate:0 14px}
.cs-faq-armed.is-seen .cs-item{opacity:1;translate:0 0;transition:opacity .6s ease var(--d,0ms),translate .7s cubic-bezier(.16,1,.3,1) var(--d,0ms)}

/* ---------- mobil ---------- */
@media (max-width:760px){
  .cesta-new{--cs-rail-x:20px}
  .cs-steps{gap:22px}
  .cs-step{grid-template-columns:40px minmax(0,1fr);align-items:start}
  .cs-node{margin-top:30px}
  .cs-num{grid-column:2;grid-row:1;position:absolute;right:12px;top:8px;width:50px;height:60px;z-index:1;pointer-events:none}
  .cs-card{grid-column:2;grid-row:1;padding:20px 18px}
  .cs-card-top{gap:12px;padding-right:44px}
  .cs-ico{width:40px;height:40px;border-radius:12px;font-size:22px !important}
  .cs-title{font-size:24px}
  .cs-person{grid-template-columns:84px minmax(0,1fr);column-gap:16px;row-gap:0;margin-top:18px;padding-top:18px}
  .cs-person-text{display:contents}
  .cs-photo{grid-column:1;grid-row:1 / span 2;width:84px;height:84px;border-radius:18px}
  .cs-name{grid-column:2;grid-row:1;align-self:end}
  .cs-role{grid-column:2;grid-row:2;align-self:start}
  .cs-say{grid-column:1 / -1;grid-row:3;margin-top:16px}
  .cs-practice{margin-top:44px;padding-left:40px}
  .cs-pr-title{margin-bottom:18px}
  .cs-pr-row{grid-template-columns:minmax(0,1fr);gap:16px}
  .cs-pr-card{padding:18px}
  .cs-disc{position:absolute;left:-40px;top:18px;width:40px;height:40px;margin:0 0 0 -1px;font-size:20px !important}
  .cs-faq{margin-top:64px}
  .cs-faq-title{font-size:20px;margin-bottom:24px}
  .cs-chat{padding:18px 14px 16px;border-radius:22px}
  .cs-q,.cs-bubble{max-width:92%}
  .cs-avatar{width:32px;height:32px}
}

/* ---------- reduced motion: hotový statický stav ---------- */
@media (prefers-reduced-motion:reduce){
  .cs-head{display:none}
  .cs-card,.cs-pr-card,.cs-node,.cs-disc,.cs-q,.cs-q .material-symbols-outlined,.cs-bubble,.cs-bubble p{transition:none !important}
  .cs-dots{display:none}
  .cs-a.is-anim{transition:none}
}
