/* Seção financeira com copy à esquerda e painel ilustrado à direita. */
.earnings-section {
  padding: 120px 0 112px;
}

/* Container alinhado à largura do bloco no desktop. */
.earnings-shell {
  width: min(1282px, calc(100% - 48px));
  margin: 0 auto;
}

/* Desktop com painel visual e conteúdo textual lado a lado. */
.earnings-layout {
  display: flex;
  align-items: center;
  gap: 88px;
}

/* Painel textual do desktop. */
.earnings-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  width: 559px;
}

/* Título em gradiente seguindo o bloco do Figma. */
.earnings-title {
  width: 559px;
  margin: 0;
  font-family: "Muring Display", system-ui, sans-serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.356;
  letter-spacing: 0.76px;
  background: linear-gradient(168.82deg, #57d4ff 0%, #845cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Texto explicativo em cinza padrão. */
.earnings-description {
  width: 559px;
  margin: 0;
  color: #64748b;
  font-family: "Muring Text", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.47;
}

/* Ajuste local do CTA desta seção. */
.earnings-cta__label {
  width: 198px;
}

/* Área visual que recebe imagem no desktop e composição em cards no mobile. */
.earnings-visual {
  position: relative;
  width: 635px;
  flex: 0 0 635px;
}

/* A imagem desktop é a principal referência visual desse bloco. */
.earnings-visual__image--desktop {
  width: 100%;
  display: block;
  height: auto;
}

/* Composição mobile escondida fora do breakpoint menor. */
.earnings-mobile-cards {
  display: none;
}

/* Tablet: empilha texto e visual mantendo o image-first do desktop. */
@media (max-width: 1024px) {
  .earnings-section {
    padding: 96px 0;
  }

  .earnings-shell {
    width: min(100%, calc(100% - 40px));
  }

  .earnings-layout {
    flex-direction: column;
    gap: 40px;
  }

  .earnings-copy {
    width: min(720px, 100%);
    align-items: center;
  }

  .earnings-title,
  .earnings-description {
    width: 100%;
    text-align: center;
  }

  .earnings-description {
    font-size: 18px;
  }

  .earnings-visual {
    width: min(635px, 100%);
    flex-basis: auto;
  }
}

/* Mobile: usa o cluster real de cards, título acima e texto+cta abaixo. */
@media (max-width: 480px) {
  .earnings-section {
    padding: 84px 0;
  }

  .earnings-shell {
    width: min(335px, calc(100% - 32px));
  }

  .earnings-layout {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 25px;
    justify-items: center;
  }

  .earnings-copy {
    display: contents;
  }

  .earnings-title {
    order: 1;
    width: 299px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.56px;
    text-align: center;
    margin: 0;
  }

  .earnings-description {
    order: 3;
    width: 335px;
    font-size: 16px;
    text-align: center;
    margin: 0;
  }

  .earnings-cta {
    order: 4;
    width: 272.308px;
    height: 66.294px;
    padding: 12.43px;
    gap: 7.136px;
  }

  .earnings-cta__label {
    width: 198.879px;
    font-size: 14.92px;
    letter-spacing: 0.2984px;
  }

  .earnings-cta__icon,
  .earnings-cta__icon img {
    width: 41.433px;
    height: 41.433px;
    flex-basis: 41.433px;
  }

  .earnings-visual {
    order: 2;
    width: 335px;
    flex: none;
    margin-bottom: 12px; /* Espaço para o texto que vem abaixo */
  }

  .earnings-visual__image--desktop {
    display: none;
  }

  .earnings-mobile-cards {
    position: relative;
    display: block;
    width: 335px;
    height: 218px;
  }

  .earnings-card {
    position: absolute;
    padding: 7.593px;
    border: 0.886px solid rgba(255, 255, 255, 0.18);
    border-radius: 7.593px;
    color: #fff;
    backdrop-filter: blur(2.468px);
    -webkit-backdrop-filter: blur(2.468px);
  }

  .earnings-card--green {
    top: 0;
    left: 0;
    width: 268.965px;
    background: #00ba38;
  }

  .earnings-card--blue {
    top: 12px;
    right: 2px;
    width: 182.587px;
    background: #2289d5;
  }

  .earnings-card--violet {
    top: 109px;
    left: 59px;
    width: 195.959px;
    background: #8f44ef;
  }

  .earnings-card__eyebrow {
    margin: 0;
    opacity: 0.75;
    font-family: "Muring Text", system-ui, sans-serif;
    font-size: 5.695px;
    font-weight: 700;
    line-height: 1.47;
    letter-spacing: 0.1139px;
  }

  .earnings-card__sub {
    margin: 0 0 6px;
    font-family: "Muring Text", system-ui, sans-serif;
    font-size: 7.593px;
    font-weight: 700;
    line-height: 1.47;
  }

  .earnings-card__value {
    margin: 0 0 6px;
    font-family: "Muring Display", system-ui, sans-serif;
    font-size: 18.027px;
    font-weight: 900;
    line-height: 1.47;
  }

  .earnings-card__meta {
    display: flex;
    gap: 18px;
    margin-top: 6px;
  }

  .earnings-card__meta span,
  .earnings-card__rows span {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-family: "Muring Text", system-ui, sans-serif;
    font-size: 7.593px;
    font-weight: 700;
    line-height: 1.47;
  }

  .earnings-card__meta span {
    flex-direction: column;
    width: auto;
  }

  .earnings-card__meta small,
  .earnings-card__small {
    opacity: 0.75;
    font-size: 5.695px;
    line-height: 1.47;
  }

  .earnings-card__rows {
    display: flex;
    flex-direction: column;
    gap: 0.949px;
  }

  .earnings-card__rows--compact {
    gap: 6px;
  }

  .earnings-card__line {
    display: block;
    width: 100%;
    height: 5px;
    border-radius: 41.736px;
    background: rgba(255, 255, 255, 0.8);
  }
}
