/* =========================
   COMO FUNCIONA (CSS COMPLETO ATUALIZADO)
   ✅ anti-delay: blur só depois de "page-ready"
   ✅ CTA no mesmo padrão (dourado + brilho)
   ✅ mini-tags com ícones (Lucide)
   ✅ botão menor
   ✅ botão sempre em 1 linha (desktop + mobile) SEM CORTAR TEXTO
   ✅ brilho CLIPADO dentro do botão (sem “luz fora”)
   ========================= */

.como-funciona-section {
  position: relative;
  padding: clamp(96px, 8vw, 140px) 0;
  background: var(--color-surface, transparent);
  overflow: hidden;
}

/* ✅ Linha dourada no FINAL da section */
.como-funciona-section::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 48px));
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 154, 5, 0.25),
    rgba(201, 154, 5, 0.85),
    rgba(201, 154, 5, 0.25),
    transparent
  );
  border-radius: 999px;
  opacity: 0.9;
  pointer-events: none;
}

.como-funciona-container {
  width: 100%;
  max-width: 1200px;
  padding: 0 24px;
  margin: 0 auto;
}

/* =========================
   HEADER
   ========================= */

.como-funciona-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px auto;
}

/* =========================
   GRID
   ========================= */

.como-funciona-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-top: 28px;
}

/* =========================
   CARD
   ========================= */

.como-funciona-card {
  grid-column: span 6;
  position: relative;
  border-radius: 18px;
  padding: 22px;

  /* ✅ base rápida */
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: hidden;

  transform: translateY(0);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

/* ✅ Blur só depois que tudo carregou */
body.page-ready .como-funciona-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.como-funciona-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* =========================
   BADGE / STEP
   ========================= */

.como-funciona-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 12px;
}

.como-funciona-step {
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-on-surface, #fff);
}

/* =========================
   MINI TAGS (COM ÍCONE)
   ========================= */

.como-funciona-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.como-funciona-mini-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 999px;

  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--color-on-surface-secondary, rgba(255, 255, 255, 0.85));
}

/* ✅ estilo do Lucide dentro da mini tag */
.como-funciona-mini-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke-width: 2;
  color: var(--color-secondary, #FFD700);
  opacity: 0.95;
}

/* =========================
   CTA
   ========================= */

.como-funciona-cta {
  margin-top: 28px;
}

.como-funciona-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  border-radius: 18px;
  padding: 18px;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);

  min-width: 0;
}

body.page-ready .como-funciona-cta-box {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.como-funciona-cta-text {
  max-width: 720px;
  min-width: 0;
  flex: 1 1 auto;
}

/* =========================
   BOTÃO CTA (MENOR) – SEMPRE 1 LINHA (SEM CORTAR)
   ✅ brilho CLIPADO dentro do botão
   ========================= */

.como-funciona-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 18px;
  border-radius: 999px;

  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.15;

  background: linear-gradient(
    135deg,
    var(--color-secondary, #FFD700),
    #FFC400
  );
  color: #0b0b0b;

  position: relative;

  overflow: hidden;      /* ✅ CLIPA o brilho dentro do pill */
  isolation: isolate;    /* ✅ evita “vazamento” por blend/antialias */

  cursor: pointer;

  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;

  white-space: nowrap;
  flex-wrap: nowrap;

  transition: transform 300ms ease, box-shadow 300ms ease;
}

/* brilho animado (clipe perfeito) */
.como-funciona-cta-btn::before {
  content: "";
  position: absolute;
  inset: 0;                 /* ✅ cobre o botão sem “sobrar” */
  left: -100%;
  width: 100%;
  height: 100%;

  border-radius: inherit;   /* ✅ acompanha o pill */
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.28),
    transparent
  );

  transition: left 0.7s ease;
  pointer-events: none;
  z-index: 0;
}

.como-funciona-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.30);
}

.como-funciona-cta-btn:hover::before {
  left: 100%;
}

.como-funciona-cta-btn span {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

/* foco acessível */
.como-funciona-cta-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(255, 215, 0, 0.28),
    0 10px 25px rgba(255, 215, 0, 0.30);
}

/* =========================
   RESPONSIVO
   ========================= */

@media (max-width: 900px) {
  .como-funciona-card {
    grid-column: span 12;
  }

  .como-funciona-cta-box {
    flex-direction: column;
    align-items: stretch;
  }

  .como-funciona-cta-btn {
    width: 100%;
    text-align: center;

    white-space: nowrap;
    flex-wrap: nowrap;

    padding: 12px 14px;
    font-size: 0.85rem;
    line-height: 1.15;
  }

  .como-funciona-cta-btn > span {
    display: inline-block;
  }
}

@media (max-width: 420px) {
  .como-funciona-cta-btn {
    font-size: 0.8rem;
    padding: 10px 12px;
    letter-spacing: 0.03em;
  }
}

@media (max-width: 360px) {
  .como-funciona-cta-btn {
    font-size: 0.75rem;
    padding: 10px 10px;
  }
}
