/* A solution page's own body (Views/Solution/_SolutionBody.cshtml) and how it works beside the banner's text
   (_SolutionFlow.cshtml), 19/11, in the look of the line pages: the dotted board, steps with their icon on the brand's cyan,
   dashed wires a spark runs along (service-flow.css), cards with a cyan top edge (service-page.css). Cyan #00c2cb and the
   logo's navy #0e2a38; yellow stays for the contact call to action and the fact chips. */

/* ---------- Banner: the text on the left, how it works on the right ---------- */
.itm-facts {
  margin-top: 2rem;
}
@media (min-width: 1025px) {
  .itm-hero--split .grp-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 50rem);
    gap: 6.4rem;
    align-items: center;
  }
}
@media (max-width: 1024px) {
  .itm-hero__visual {
    margin-top: 4rem;
  }
}

/* ---------- How it works: the board ---------- */
.sfl {
  --sfl-gap-x: 5.2rem;
  --sfl-gap-y: 4rem;
  padding: 3.2rem 2.8rem;
  border: 1px solid #e3eef0;
  border-radius: 2.4rem;
  background-color: #f4fbfc;
  background-image: radial-gradient(rgba(0, 194, 203, 0.16) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
/* Two a row, snaking: left to right, down on the right, right to left, down on the left... */
.sfl__steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: var(--sfl-gap-y) var(--sfl-gap-x);
  margin: 0;
  padding: 0;
  list-style: none;
}
.sfl__step:nth-child(4n + 1),
.sfl__step:nth-child(4n + 4) {
  grid-column: 1;
}
.sfl__step:nth-child(4n + 2),
.sfl__step:nth-child(4n + 3) {
  grid-column: 2;
}
.sfl__step,
.sfl__system {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  min-height: 6.4rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid #cdeff1;
  border-radius: 1.6rem;
  background: #ffffff;
  box-shadow: 0 1.4rem 2.8rem -2.2rem rgba(14, 42, 56, 0.4);
}
.sfl__icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 1.1rem;
  background: #00c2cb;
  box-shadow: 0 1rem 2rem -1.2rem rgba(0, 194, 203, 0.8);
  color: #ffffff;
}
.sfl__icon--navy {
  background: #0e2a38;
  box-shadow: 0 1rem 2rem -1.2rem rgba(14, 42, 56, 0.7);
}
.sfl__label {
  flex: 1 1 auto;
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.35;
  color: #0e2a38;
}
.sfl__tag {
  margin-left: 4.8rem;
}

/* The wires: across to the next step in the row, or down to the row below */
.sfl__wire {
  position: absolute;
  pointer-events: none;
}
.sfl__step:nth-child(4n + 1) .sfl__wire,
.sfl__step:nth-child(4n + 3) .sfl__wire {
  top: 50%;
  width: var(--sfl-gap-x);
  height: 2px;
  background-image: linear-gradient(90deg, rgba(0, 194, 203, 0.55) 50%, transparent 50%);
  background-size: 7px 100%;
}
.sfl__step:nth-child(4n + 1) .sfl__wire {
  left: 100%;
}
.sfl__step:nth-child(4n + 3) .sfl__wire {
  right: 100%;
}
.sfl__step:nth-child(4n + 2) .sfl__wire,
.sfl__step:nth-child(4n + 4) .sfl__wire,
.sfl__step:last-child .sfl__wire {
  top: 100%;
  right: auto;
  left: 50%;
  width: 2px;
  height: var(--sfl-gap-y);
  background-image: linear-gradient(180deg, rgba(0, 194, 203, 0.55) 50%, transparent 50%);
  background-size: 100% 7px;
}
/* The last step's wire goes down into the client's systems; with none under it, there is no wire */
.sfl__steps:last-child .sfl__step:last-child .sfl__wire {
  display: none;
}
.sfl__spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00c2cb;
  box-shadow: 0 0 8px 2px rgba(0, 194, 203, 0.6);
}
.sfl__step:nth-child(4n + 1) .sfl__spark,
.sfl__step:nth-child(4n + 3) .sfl__spark {
  top: -3px;
  animation: sfl-across 1.8s ease-in-out infinite;
}
.sfl__step:nth-child(4n + 3) .sfl__spark {
  animation-name: sfl-back;
}
.sfl__step:nth-child(4n + 2) .sfl__spark,
.sfl__step:nth-child(4n + 4) .sfl__spark,
.sfl__step:last-child .sfl__spark {
  left: -3px;
  animation: sfl-down 1.8s ease-in-out infinite;
}
.sfl__step:nth-child(even) .sfl__spark {
  background: #fedd59;
  box-shadow: 0 0 8px 2px rgba(254, 221, 89, 0.7);
  animation-delay: 0.6s;
}
@keyframes sfl-across {
  0% { left: -4px; opacity: 0; }
  20%, 80% { opacity: 1; }
  100% { left: calc(100% - 4px); opacity: 0; }
}
@keyframes sfl-back {
  0% { left: calc(100% - 4px); opacity: 0; }
  20%, 80% { opacity: 1; }
  100% { left: -4px; opacity: 0; }
}
@keyframes sfl-down {
  0% { top: -4px; opacity: 0; }
  20%, 80% { opacity: 1; }
  100% { top: calc(100% - 4px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sfl__spark {
    display: none;
  }
}

/* The client's own systems, at the foot of the board */
.sfl__system {
  margin-top: var(--sfl-gap-y);
  border-color: #0e2a38;
}
.sfl__io {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: 100%;
  padding-left: 4.8rem;
}

/* ---------- 1. What it covers: core parts on a white card, extensions on a dotted board ---------- */
.sol-sec .sec-head {
  margin-bottom: 4.8rem;
}
.sol-covers {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 2.4rem;
  align-items: stretch;
}
.sol-covers--single {
  grid-template-columns: minmax(0, 1fr);
}
.sol-panel {
  display: flex;
  flex-direction: column;
  padding: 3.2rem;
  border-radius: 1.8rem;
}
.sol-panel--core {
  border: 1.5px solid #cdeff1;
  border-top: 0.55rem solid #00c2cb;
  background: #ffffff;
  box-shadow: 0 2.4rem 4.8rem -3.6rem rgba(14, 42, 56, 0.45);
}
.sol-panel--extras {
  border: 1.5px dashed #9fdfe3;
  background-color: #f4fbfc;
  background-image: radial-gradient(rgba(0, 194, 203, 0.14) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
.sol-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 2.4rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid #e3eef0;
}
.sol-panel__title {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.25;
  color: #0e2a38;
}
.sol-panel__badge {
  flex: none;
  padding: 0.3rem 1rem;
  border-radius: 0.6rem;
  background: #e6f9fa;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #005c63;
}
.sol-panel__badge--optional {
  border: 1px dashed #9fdfe3;
  background: #ffffff;
}
.sol-list {
  display: grid;
  gap: 2.4rem 2.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sol-list--core {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sol-list--extras {
  gap: 1.8rem;
}
.sol-item {
  display: flex;
  gap: 1.4rem;
}
.sol-item__icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1.2rem;
  background: #00c2cb;
  box-shadow: 0 1rem 2rem -1.2rem rgba(0, 194, 203, 0.8);
  color: #ffffff;
}
.sol-item--extra .sol-item__icon {
  width: 3.2rem;
  height: 3.2rem;
  border: 1.5px dashed #00c2cb;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: none;
  color: #008a91;
}
.sol-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  padding-top: 0.2rem;
}
.sol-item__name {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.4;
  color: #0e2a38;
}
.sol-item__text {
  font-size: var(--fs-small);
  line-height: 1.6;
  color: #3e5662;
}
.sol-estimate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  margin-top: auto;
  padding-top: 2.4rem;
}
.sol-estimate__text {
  margin: 0;
  padding-top: 2rem;
  border-top: 1px dashed #9fdfe3;
  width: 100%;
  font-size: var(--fs-small);
  color: var(--c-muted);
}

/* Many extensions: the panels one above the other, the core parts three a row, the extensions in groups side by side */
.sol-covers--stacked {
  grid-template-columns: minmax(0, 1fr);
}
.sol-covers--stacked .sol-list--core {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sol-groups {
  display: grid;
  gap: 2.8rem;
}
.sol-covers--stacked .sol-groups {
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 3.2rem;
}
.sol-groups__name {
  margin: 0 0 1.6rem;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #005c63;
}
.sol-covers--stacked .sol-estimate {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2.4rem;
}
.sol-covers--stacked .sol-estimate__text {
  width: auto;
  flex: 1 1 100%;
}

/* ---------- Related solutions ---------- */
.sol-related {
  padding: 3.2rem 0;
  border-top: 1px solid #e3eef0;
  background: #ffffff;
}
.sol-related__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem 2.4rem;
}
.sol-related__label {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.sol-related__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sol-related__link {
  display: inline-flex;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border: 1px solid #cdeff1;
  border-radius: 1.2rem;
  background: #ffffff;
  font-size: var(--fs-small);
  font-weight: 700;
  color: #0e2a38;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.sol-related__link:hover {
  border-color: #00c2cb;
  color: #008a91;
  box-shadow: 0 1rem 2rem -1.6rem rgba(0, 194, 203, 0.8);
}

/* ---------- Tablets ---------- */
@media (max-width: 1024px) {
  .sol-covers {
    grid-template-columns: minmax(0, 1fr);
  }
  .sol-covers--stacked .sol-list--core {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sol-covers--stacked .sol-groups {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Phones: the steps down one wire, one column everywhere ---------- */
@media (max-width: 767px) {
  .sfl {
    --sfl-gap-y: 2.8rem;
    padding: 2rem 1.4rem;
  }
  .sfl__steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .sfl__step:nth-child(n) {
    grid-column: 1;
  }
  .sfl__step:nth-child(n) .sfl__wire {
    top: 100%;
    right: auto;
    left: 3.2rem;
    width: 2px;
    height: var(--sfl-gap-y);
    background-image: linear-gradient(180deg, rgba(0, 194, 203, 0.55) 50%, transparent 50%);
    background-size: 100% 7px;
  }
  .sfl__step:nth-child(n) .sfl__spark {
    top: auto;
    left: -3px;
    animation-name: sfl-down;
  }
  .sfl__tag {
    margin-left: 0;
  }
  .sfl__io {
    padding-left: 0;
  }
  .sol-panel {
    padding: 2.4rem 2rem;
  }
  .sol-list--core,
  .sol-covers--stacked .sol-list--core,
  .sol-covers--stacked .sol-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}
