/* Automatisoidut työnkulut (automatisoidut-tyonkulut.php): esimerkki: selitys, ennen ja jälkeen sekä työnkulkuketju. */

  /* ============================================================
     WHAT IS IT · split explainer
     ============================================================ */
  .explainer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 72px;
    align-items: center;
  }
  .explainer-text h2 {
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--navy-dark);
    margin-bottom: 20px;
  }
  .explainer-text h2 .gr {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .explainer-text p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-muted);
    margin-bottom: 18px;
  }
  .explainer-text p strong { color: var(--text); font-weight: 700; }

  .before-after-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .ba-card {
    border-radius: 18px;
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
  }
  .ba-card.before {
    background: #fef2f2;
    border: 1px solid #fecaca;
  }
  .ba-card.after {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
  }
  .ba-card-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .ba-card.before .ba-card-label { color: #dc2626; }
  .ba-card.after .ba-card-label { color: #16a34a; }
  .ba-card.before .ba-card-label::before { content: '✕'; font-size: 12px; }
  .ba-card.after .ba-card-label::before { content: '✓'; font-size: 12px; }
  .ba-card p {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text);
    font-weight: 500;
  }
  .ba-arrow {
    text-align: center;
    font-size: 22px;
    color: var(--border);
    line-height: 1;
    margin: -2px 0;
    position: relative;
    z-index: 2;
  }


  /* ============================================================
     CHAIN · työnkulkuketju widgettinä
     ============================================================ */
  .chain { margin-top: 64px; text-align: center; }
  .chain-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto 28px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--sh-sm, 0 2px 8px rgba(20, 24, 60, 0.06));
    font-size: 14px;
    font-weight: 800;
    color: var(--navy-dark);
    letter-spacing: -0.01em;
  }
  .chain-title svg { color: var(--navy); flex-shrink: 0; }
  .chain-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: chain;
  }
  .chain-step {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px 22px 24px;
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
  }
  .chain-step:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
  /* Nuoli korttien väliin */
  .chain-step + .chain-step::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    width: 20px;
    height: 1.5px;
    background: var(--navy-100);
    transform: translateY(-50%);
  }
  .chain-step + .chain-step::after {
    content: '';
    position: absolute;
    left: -9px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-top: 1.5px solid var(--navy-100);
    border-right: 1.5px solid var(--navy-100);
    transform: translateY(-50%) rotate(45deg);
  }
  .chain-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .chain-icon.blue   { background: var(--navy-50);   color: var(--navy); }
  .chain-icon.green  { background: #e8f7ee;          color: #1d8a4a; }
  .chain-icon.purple { background: var(--pink-50);   color: var(--pink); }
  .chain-icon.orange { background: var(--orange-50); color: var(--orange); }
  .chain-step h3 {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--navy-dark);
    letter-spacing: -0.015em;
    margin-bottom: 8px;
  }
  .chain-step p {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 16px;
  }
  .chain-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #e8f7ee;
    color: #1d8a4a;
    font-size: 11.5px;
    font-weight: 800;
  }
  .chain-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
  }

  /* Esimerkki kytketään pakettiin: sama työnkulku palaa pakettiosiossa. */
  .chain-note {
    max-width: 640px;
    margin: 28px auto 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
  }
  .chain-note strong { color: var(--navy-dark); }
  .chain-note a {
    color: var(--orange);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: var(--orange-soft);
    text-underline-offset: 4px;
  }
  .chain-note a:hover { text-decoration-color: var(--orange); }
