/* System Section Widget */
.dp-system-section-widget.system-section {
  --c1: #6655d4;
  --c2: #1a7fd4;
  --c3: #00a88a;
  --c4: #00afc0;
  --ink: #0f1b30;
  --muted: #64748b;
  --white: #ffffff;

  background: #071627;
  padding: 88px 60px 80px;
  font-family: 'Roboto', sans-serif;
  color: var(--ink);
  box-sizing: border-box;
}

.dp-system-section-widget.system-section *,
.dp-system-section-widget.system-section *::before,
.dp-system-section-widget.system-section *::after {
  box-sizing: border-box;
}

.dp-system-section-widget .system-inner {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.dp-system-section-widget .system-header {
  text-align: center;
  margin-bottom: 56px;
}

.dp-system-section-widget .system-header h2 {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin: 0 0 12px;
}

.dp-system-section-widget .system-header p {
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.6;
  margin: 0;
}

/* ===== Desktop: connected arrow strip + spaced cards ===== */
.dp-system-section-widget .stages-layout {
  display: grid;
  grid-template-columns: repeat(var(--pipeline-cols, 4), minmax(0, 1fr));
  column-gap: 0;
  row-gap: 28px;
  margin-bottom: 36px;
  align-items: stretch;
}

.dp-system-section-widget .stage-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  --stage-color: #6655d4;
}

.dp-system-section-widget .stage-header {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 0 30px;
  margin-bottom: 14px;
  background-color: var(--stage-color, #6655d4);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%);
  position: relative;
  z-index: 1;
}

/* Connect arrows side-by-side (no dark gap between them) */
.dp-system-section-widget .stage-block:not(.is-row-end) .stage-header {
  margin-right: -1px;
}

.dp-system-section-widget .stage-block.is-row-start .stage-header {
  padding-left: 22px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
}

.dp-system-section-widget .stage-block.is-row-end .stage-header {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 18px 50%);
}

.dp-system-section-widget .stage-block.is-row-start.is-row-end .stage-header {
  clip-path: none;
  border-radius: 10px;
}

.dp-system-section-widget .arrow-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-family: 'Roboto', sans-serif;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.dp-system-section-widget .arrow-label {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  font-family: 'Roboto', sans-serif;
}

.dp-system-section-widget .stage-card {
  background: #fff;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  box-shadow: 0 2px 8px rgba(15, 27, 48, 0.06);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  margin-right: 14px;
}

.dp-system-section-widget .stage-block.is-row-end .stage-card {
  margin-right: 0;
}

.dp-system-section-widget .stage-block:hover .stage-card {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.dp-system-section-widget .stage-card-inner {
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dp-system-section-widget .stage-card h3 {
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
  margin: 0 0 10px;
}

.dp-system-section-widget .stage-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.dp-system-section-widget .stage-rule {
  height: 1px;
  background: #eef1f6;
  margin-bottom: 14px;
}

.dp-system-section-widget .stage-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.dp-system-section-widget .stage-card ul li {
  font-size: 12.5px;
  color: var(--muted);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #f1f5f9;
  margin: 0;
}

.dp-system-section-widget .stage-card ul li:last-child {
  border-bottom: none;
}

.dp-system-section-widget .li-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: var(--stage-color, #6655d4);
}

.dp-system-section-widget .stage-footer {
  margin-top: auto;
  padding: 16px 24px;
  border-top: 1px solid #eef1f6;
}

.dp-system-section-widget .stage-link {
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--stage-color, #6655d4);
  transition: gap 0.2s;
}

.dp-system-section-widget .stage-link:hover {
  gap: 8px;
}

.dp-system-section-widget .stage-link-arrow {
  flex-shrink: 0;
}

/* Bottom CTA bar */
.dp-system-section-widget .system-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.dp-system-section-widget .system-bottom p {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.4;
  max-width: 560px;
  margin: 0;
}

.dp-system-section-widget .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 100px;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dp-system-section-widget .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  color: var(--ink);
}

.dp-system-section-widget .btn-cta svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Many stages (5+): keep arrows connected in each row, more vertical space */
.dp-system-section-widget.has-many-stages .stages-layout {
  column-gap: 0;
  row-gap: 40px;
}

.dp-system-section-widget.has-many-stages .stage-card {
  margin-right: 20px;
}

.dp-system-section-widget.has-many-stages .stage-block.is-row-end .stage-card {
  margin-right: 0;
}

/* ===== Tablet ===== */
@media (max-width: 1440px) {
  .dp-system-section-widget.system-section {
    padding: 80px 40px 72px;
  }
}

@media (max-width: 1200px) {
  .dp-system-section-widget.system-section {
    padding: 72px 32px 64px;
  }

  .dp-system-section-widget .arrow-label {
    font-size: 13px;
  }

  .dp-system-section-widget .stage-card-inner {
    padding: 24px 20px 16px;
  }
}

@media (max-width: 1100px) {
  .dp-system-section-widget.system-section {
    padding: 72px 28px 64px;
  }

  .dp-system-section-widget .stages-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 0;
  }

  .dp-system-section-widget .stage-header,
  .dp-system-section-widget .stage-block.is-row-start .stage-header,
  .dp-system-section-widget .stage-block.is-row-end .stage-header,
  .dp-system-section-widget .stage-block.is-row-start.is-row-end .stage-header {
    clip-path: none;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    margin-right: 0;
    padding: 0 18px;
  }

  .dp-system-section-widget .stage-card {
    border-radius: 0 0 12px 12px;
    margin-right: 16px;
  }

  .dp-system-section-widget .stage-block.is-row-end .stage-card {
    margin-right: 0;
  }

  /* On 2-col tablet, reconnect every pair side-by-side visually as separate cards */
  .dp-system-section-widget .stages-layout {
    column-gap: 16px;
  }

  .dp-system-section-widget .stage-card {
    margin-right: 0;
  }

  .dp-system-section-widget .stage-block:hover .stage-card {
    transform: none;
  }
}

@media (max-width: 992px) {
  .dp-system-section-widget .system-header {
    margin-bottom: 40px;
  }

  .dp-system-section-widget .system-header h2 {
    font-size: clamp(30px, 5vw, 44px);
  }

  .dp-system-section-widget .arrow-num {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
}

/* ===== Mobile: Process-style unified cards (matches desired design) ===== */
@media (max-width: 768px) {
  .dp-system-section-widget.system-section {
    padding: 56px 16px 48px;
  }

  .dp-system-section-widget .stages-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .dp-system-section-widget .stage-block {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  }

  .dp-system-section-widget .stage-header,
  .dp-system-section-widget .stage-block.is-row-start .stage-header,
  .dp-system-section-widget .stage-block.is-row-end .stage-header,
  .dp-system-section-widget .stage-block.is-row-start.is-row-end .stage-header,
  .dp-system-section-widget .stage-block.is-first .stage-header,
  .dp-system-section-widget .stage-block.is-last .stage-header {
    clip-path: none;
    border-radius: 0;
    margin-bottom: 0;
    margin-right: 0;
    height: 64px;
    padding: 0 20px;
    width: 100%;
  }

  .dp-system-section-widget .arrow-label {
    font-size: 16px;
    font-weight: 700;
  }

  .dp-system-section-widget .arrow-num {
    width: 30px;
    height: 30px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.35);
  }

  .dp-system-section-widget .stage-card {
    border-radius: 0;
    box-shadow: none;
    background: #ecf1fc;
    margin-right: 0;
  }

  .dp-system-section-widget .stage-block:hover .stage-card {
    transform: none;
    box-shadow: none;
  }

  .dp-system-section-widget .stage-card-inner {
    padding: 22px 20px 18px;
  }

  .dp-system-section-widget .stage-card h3 {
    font-size: 18px;
    line-height: 1.35;
    color: #013248;
    margin-bottom: 12px;
  }

  .dp-system-section-widget .stage-body {
    font-size: 15px;
    color: #013248;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  .dp-system-section-widget .stage-rule {
    display: none;
  }

  /* Checklist bullets like Process widget */
  .dp-system-section-widget .stage-card ul li {
    position: relative;
    display: block;
    padding: 0 0 10px 28px;
    border-bottom: none;
    font-size: 14px;
    color: #013248;
    gap: 0;
  }

  .dp-system-section-widget .li-dot {
    display: none;
  }

  .dp-system-section-widget .stage-card ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 19px;
    height: 19px;
    background-color: var(--stage-color, #6655d4);
    -webkit-mask-image: url('https://www.digitalparc.com/wp-content/uploads/2026/04/bullet_list.svg');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url('https://www.digitalparc.com/wp-content/uploads/2026/04/bullet_list.svg');
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
  }

  .dp-system-section-widget .stage-footer {
    padding: 16px 20px;
    background: #dbe6f8;
    border-top: none;
  }

  .dp-system-section-widget .stage-link {
    color: #013248;
    font-size: 14px;
    font-weight: 700;
  }

  .dp-system-section-widget .stage-link-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  .dp-system-section-widget .stage-link-arrow {
    font-size: 16px;
    color: var(--stage-color, #6655d4);
  }

  .dp-system-section-widget .stage-block:hover .stage-footer {
    background: var(--stage-color, #6655d4);
  }

  .dp-system-section-widget .stage-block:hover .stage-link,
  .dp-system-section-widget .stage-block:hover .stage-link-arrow {
    color: #fff;
  }

  .dp-system-section-widget .system-bottom {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }

  .dp-system-section-widget .system-bottom p {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .dp-system-section-widget.system-section {
    padding: 48px 14px 40px;
  }

  .dp-system-section-widget .system-header p {
    font-size: 15px;
  }

  .dp-system-section-widget .btn-cta {
    width: 100%;
    justify-content: center;
  }
}
