﻿/* PiovonoMandati — Capitolo 03 ecosistema */

.cr-chapter--ecosistema {
  background: linear-gradient(180deg, #fff 0%, #f8f8f8 100%);
}

.cr-chapter--ecosistema .cr-chapter__body > p:not(.cr-lead) {
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}

.cr-ecosystem {
  margin: 40px 0 44px;
  padding: 36px 28px 32px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(9, 30, 57, 0.06);
}

.cr-ecosystem__hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.cr-ecosystem__casarev {
  display: block;
  width: min(100%, 280px);
  height: auto;
}

.cr-ecosystem__hub-label {
  margin: 0;
  font-family: Poppins, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.cr-ecosystem__connector {
  width: 2px;
  height: 28px;
  margin: 20px auto 24px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(245, 158, 11, 0.25) 100%);
  border-radius: 2px;
}

.cr-ecosystem__brands {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cr-ecosystem__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 18px 16px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 12px;
}

.cr-ecosystem__brand img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  max-height: 64px;
  object-fit: contain;
  object-position: center;
}

.cr-ecosystem__brand--icon img {
  max-width: 52px;
  max-height: 52px;
}

.cr-ecosystem__name {
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: #091e39;
}

.cr-ecosystem__brand--highlight {
  position: relative;
  grid-column: 1 / -1;
  min-height: 96px;
  padding-top: 28px;
  background: rgba(245, 158, 11, 0.08);
  border: 2px solid var(--accent);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.14);
}

.cr-ecosystem__brand--highlight img {
  max-width: 240px;
  max-height: 52px;
}

.cr-ecosystem__badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  font-family: Poppins, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111;
  white-space: nowrap;
}

/* Mobile / tablet: StracciaDebito + REPO sulla stessa riga, PiovonoMandati in fondo */
@media (max-width: 992px) {
  .cr-ecosystem__brand:nth-child(6) {
    order: 7;
  }

  .cr-ecosystem__brand:nth-child(7) {
    order: 6;
  }
}

.cr-callout--workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 36px 0;
  padding: 28px 24px;
  background: #091e39;
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(9, 30, 57, 0.2);
}

.cr-callout__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cr-callout--workspace .cr-callout__title {
  color: #fff;
}

.cr-callout--workspace p {
  color: rgba(255, 255, 255, 0.9);
}

.cr-callout--workspace strong {
  color: var(--accent);
}

.cr-callout__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cr-callout__brand img {
  display: block;
  width: min(100%, 260px);
  height: auto;
}

.cr-callout__content {
  flex: 1;
}

.cr-callout__screenshot {
  margin: 0;
  padding-top: 0;
}

.cr-callout__screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .cr-ecosystem__brands {
    grid-template-columns: repeat(3, 1fr);
  }

  .cr-ecosystem__brand--highlight {
    grid-column: 1 / -1;
  }

  .cr-callout--workspace {
    padding: 32px 36px;
  }

  .cr-callout__main {
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
  }

  .cr-callout__brand {
    flex: 0 0 220px;
    padding-bottom: 0;
    padding-right: 8px;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    align-self: stretch;
    justify-content: center;
  }
}

@media (min-width: 993px) {
  .cr-ecosystem {
    padding: 44px 40px 36px;
  }

  .cr-ecosystem__casarev {
    width: min(100%, 320px);
  }

  .cr-ecosystem__brands {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .cr-ecosystem__brand--highlight {
    grid-column: 2 / span 2;
    grid-row: 2;
  }
}
