/* ==========================================================================
   STACK — cartões empilháveis (projetos, quizzes, Notion, UI/UX, IA, certificado)
   ========================================================================== */

.stack {
  position: relative;
  padding: 50px 0 150px;
  background-color: var(--dark);
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.stack-card {
  /* Cores de cada variante (definidas nos modificadores abaixo) */
  --accent: var(--brand-purple);
  --glow-rgb: 130, 87, 229;
  --icon-color: var(--brand-purple);
  --icon-rgb: 130, 87, 229;
  --sticky-top: 100px;

  position: sticky;
  top: var(--sticky-top);
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 40px;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background-color: #121214;
  transition: transform 0.3s ease;
}

.stack-card:hover {
  transform: translateY(-3px);
}

.stack-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    circle at 10% -20%,
    rgba(var(--glow-rgb), 0.3),
    transparent 60%
  );
}

/* Cada cartão gruda um pouco mais abaixo para criar o efeito de pilha */
.stack-card:nth-child(1) {
  --sticky-top: calc(var(--header-height) + 20px);
}
.stack-card:nth-child(2) {
  --sticky-top: calc(var(--header-height) + 50px);
}
.stack-card:nth-child(3) {
  --sticky-top: calc(var(--header-height) + 80px);
}
.stack-card:nth-child(4) {
  --sticky-top: calc(var(--header-height) + 110px);
}
.stack-card:nth-child(5) {
  --sticky-top: calc(var(--header-height) + 140px);
}
.stack-card:nth-child(6) {
  --sticky-top: calc(var(--header-height) + 170px);
}

.stack-card--teal {
  --accent: rgb(0, 164, 172);
  --glow-rgb: 0, 164, 172;
  --icon-color: #57dce5;
  --icon-rgb: 87, 220, 229;
}

.stack-card--green {
  --accent: rgb(3, 118, 61);
  --glow-rgb: 3, 118, 61;
  --icon-color: #15ffa9;
  --icon-rgb: 21, 255, 169;
}

.stack-card--pink {
  --accent: rgb(136, 0, 134);
  --glow-rgb: 136, 0, 134;
  --icon-color: #d757e5;
  --icon-rgb: 215, 87, 229;
}

.stack-card--yellow {
  --accent: rgb(247, 223, 30);
  --glow-rgb: 143, 127, 4;
  --icon-color: #f7df1e;
  --icon-rgb: 247, 223, 30;
}

.stack-card--blue {
  --accent: rgb(37, 99, 235);
  --glow-rgb: 37, 99, 235;
  --icon-color: #6ea8ff;
  --icon-rgb: 110, 168, 255;
}

.stack-card-left {
  flex: 1;
}

.stack-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border: 2px solid rgba(var(--icon-rgb), 0.4);
  border-radius: 8px;
  background-color: #000;
  color: var(--icon-color);
  font-size: 24px;
}

.stack-card-left h3 {
  max-width: 450px;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
}

.stack-card-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 450px;
}

.stack-card-right p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
}

@media (max-width: 768px) {
  .stack-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
  }

  .stack-card-left h3 {
    font-size: 24px;
  }
}
