.comparison-wrap {
  width: 100%;
  position: relative;
  --columns-in-view: 2;
}

.comparison-header {
  z-index: 10;
  background-color: #ffffff;
  border-bottom: 1px solid rgba(40, 89, 84, 0.15); /* Tom do primary */
  display: flex;
  position: sticky;
  top: 0;
}

.comparison-header__corner {
  min-width: 0;
  max-width: calc(100% / (var(--columns-in-view) + 1));
  flex: 1;
}

.comparison-header__list {
  display: flex;
}

.comparison-header__col {
  grid-column-gap: 0.3em;
  grid-row-gap: 0.3em;
  text-align: center;
  min-width: 0;
  max-width: calc(100% / var(--columns-in-view));
  flex-flow: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  padding-top: 1.5em;
  padding-bottom: 1.5em;
  display: flex;
}

.comparison-header__inner {
  flex: var(--columns-in-view);
  min-width: 0;
  max-width: calc(var(--columns-in-view) * 100% / (var(--columns-in-view) + 1));
}

.comparison-header__name {
  color: #285954; /* Primary */
  letter-spacing: -0.03em;
  margin-bottom: 0;
  font-size: 1.5em;
  line-height: 1;
}

.comparison-header__meta {
  color: rgba(40, 89, 84, 0.7); /* Primary suavizado */
  margin: 0;
  font-size: 0.875em;
  line-height: 1;
}

.comparison-row {
  border-bottom: 1px solid rgba(40, 89, 84, 0.12); /* Divisor no tom do primary */
  display: flex;
}

.comparison-row:nth-of-type(even) {
  background: rgba(
    40,
    89,
    84,
    0.03
  ); /* Fundo alternado no tom suave do primary */
}

.comparison-row__name {
  max-width: calc(100% / (var(--columns-in-view) + 1));
  flex: 1;
  justify-content: flex-start;
  align-items: center;
  padding-left: 1.25em;
  padding-right: 1.25em;
  display: flex;
}

.comparison-row__cells {
  flex: var(--columns-in-view);
  max-width: calc(var(--columns-in-view) * 100% / (var(--columns-in-view) + 1));
  display: flex;
}

.comparison-row__h {
  color: #285954; /* Primary */
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1em;
}

.comparison-row__pill {
  color: #285954; /* Primary */
  background-color: rgba(40, 89, 84, 0.1); /* Fundo da pill no primary suave */
  border-radius: 100em;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0.5em 0.75em;
  font-size: 0.75em;
  line-height: 1;
  position: relative;
}

.comparison-row__cell {
  text-align: center;
  min-width: 0;
  max-width: calc(100% / var(--columns-in-view));
  flex-flow: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  padding: 1.5em 1em;
  display: flex;
}

.comparison-row__label {
  color: #285954; /* Primary */
  opacity: 0.85;
  margin: 0;
  font-size: 0.9375em;
  line-height: 1.3;
}

.comparison-row__icon {
  aspect-ratio: 1;
  color: #285954; /* Primary */
  width: 1.125em;
}

.comparison-row__cell[aria-label="not included"] .comparison-row__icon {
  color: rgba(40, 89, 84, 0.35); /* Ícone desativado no primary apagado */
}

.demo-section__pill {
  color: #285954; /* Primary */
  text-transform: uppercase;
  background-color: rgba(40, 89, 84, 0.1); /* Fundo da pill no primary suave */
  border-radius: 100em;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0.5em 0.75em;
  font-size: 0.9375em;
  line-height: 1;
  position: relative;
}

.demo-section__p {
  color: rgba(40, 89, 84, 0.8); /* Primary suavizado */
  max-width: 24em;
  margin-bottom: 0;
  font-size: 1.25em;
  line-height: 1.2;
}

@media screen and (max-width: 767px) {
  .section-resource {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .demo-section__h1 {
    font-size: 2em;
  }

  /* --- CABEÇALHO FIXO NO MOBILE --- */
  .comparison-header {
    top: 0;
    box-shadow: 0 4px 12px rgba(40, 89, 84, 0.08);
    border-bottom: 2px solid rgba(40, 89, 84, 0.2);
    padding: 0.25em 0;
  }

  /* Oculta a quina vazia no mobile */
  .comparison-header__corner {
    display: none !important;
  }

  /* Cabeçalho ocupa 100% da largura */
  .comparison-header__inner {
    max-width: 100% !important;
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  .comparison-header__list {
    width: 100%;
  }

  .comparison-header__col {
    padding: 0.875em 0.5em;
    gap: 0.25em;
  }

  .comparison-header__name {
    font-size: 1em;
    font-weight: 700;
    line-height: 1.2 !important;
    margin-bottom: 0.15em !important;
  }

  .comparison-header__meta {
    font-size: 0.725em;
    opacity: 0.85;
  }

  /* --- LINHAS DA TABELA TRANSFORMADAS EM CARDS (MOBILE) --- */
  .comparison-row {
    flex-direction: column;
    background: #ffffff !important;
    border: 1px solid rgba(40, 89, 84, 0.15);
    border-radius: 12px;
    margin-top: 1em;
    margin-bottom: 1em;
    padding: 1em 0.75em;
    box-shadow: 0 2px 8px rgba(40, 89, 84, 0.04);
  }

  /* Título da característica (Cabeçalho do Card) */
  .comparison-row__name {
    max-width: 100% !important;
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0 0.5em 0.875em 0.5em;
    border-bottom: 1px dashed rgba(40, 89, 84, 0.15);
  }

  .comparison-row__h {
    font-size: 1.05em;
    font-weight: 700;
    color: #285954;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  /* Grid com as duas colunas comparativas lado a lado */
  .comparison-row__cells {
    max-width: 100% !important;
    width: 100%;
    margin-top: 0.75em;
    gap: 0.5em;
  }

  .comparison-row__cell {
    padding: 0.875em 0.5em;
    justify-content: center;
    border-radius: 8px;
    /* Destaque sutil para dividir visualmente cada opção no mobile */
    background-color: rgba(40, 89, 84, 0.03);
    border: 1px solid rgba(40, 89, 84, 0.06);
  }

  /* Efeito para item indisponível no mobile */
  .comparison-row__cell[aria-label="not included"] {
    background-color: rgba(0, 0, 0, 0.015);
    opacity: 0.6;
  }

  .comparison-row__label {
    font-size: 0.85em;
    line-height: 1.3;
  }

  .comparison-row__icon {
    width: 1.25em;
  }
}
