/* 07 — Benefícios (Figma 27128:2654) */
.ben {
  background: var(--color-secondary);
  border-radius: 120px;
  padding: 80px 0;
  color: var(--color-white);
  --ben-pink: #CA3E7A;
  --ben-violet: #A44BFA;
  --ben-rose: #E694AE;
  --ben-ring: linear-gradient(90deg, var(--ben-violet), var(--ben-rose));
  /* tema da trilha ativa (START padrao) */
  --ben-card-bg: rgba(202, 62, 122, 0.6);
  --ben-brand-bg: var(--ben-pink);
  --ben-tab-bg: var(--ben-pink);
  --ben-tab-color: var(--color-white);
  --ben-tab-border: transparent;
}
/* EXPERT (Figma 27335:63) */
.ben[data-ben-theme="expert"] {
  --ben-card-bg: rgba(50, 0, 83, 0.6);
  --ben-brand-bg: #320053;
  --ben-tab-bg: #320053;
  --ben-tab-border: var(--ben-violet);
}
/* SUMMER (Figma 27335:189) */
.ben[data-ben-theme="summer"] {
  --ben-card-bg: rgba(187, 212, 133, 0.6);
  --ben-brand-bg: #BBD485;
  --ben-tab-bg: #BBD485;
  --ben-tab-color: #380054;
}

/* Decorações */
.ben__deco { position: absolute; max-width: none; pointer-events: none; z-index: 0; }
.ben__deco--top { right: -134px; top: -166px; width: 478px; height: 572px; }
.ben__deco--left { left: -92px; top: 426px; width: 224px; height: 252px; transform: scaleX(-1); filter: blur(10px); }
.ben__deco--bottom { right: -26px; bottom: 13px; width: 158px; height: 295px; }

.ben__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.ben__block { display: flex; flex-direction: column; align-items: center; width: 100%; }

.ben__title {
  padding-inline: var(--gutter);
  font-size: var(--fs-h2);
  line-height: 1;
  font-weight: var(--fw-bold);
  text-align: center;
}
.ben__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 32px; }
.ben__tab {
  padding: 4px 16px;
  box-shadow: inset 0 0 0 1px transparent;
  border: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-bold);
  line-height: 28px;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}
.ben__tab:hover { background: rgba(255, 255, 255, 0.45); }
.ben__tab.is-active { background: var(--ben-tab-bg); color: var(--ben-tab-color); box-shadow: inset 0 0 0 1px var(--ben-tab-border); }
.ben__tab:focus-visible { outline: 2px solid var(--color-purple-01); outline-offset: 2px; }

/* Painel da trilha */
.ben__panel { display: flex; justify-content: center; width: 100%; margin-top: 64px; }
.ben__panel:focus { outline: none; }

/* Grade de benefícios */
.ben__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  width: 924px;
  max-width: 100%;
  list-style: none;
}
.ben__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 292px;
  height: 218px;
  padding: 24px;
  border: 4px solid transparent;
  border-radius: var(--radius-md);
  background: var(--ben-card-bg);
  backdrop-filter: blur(5px);
  transition: background-color var(--transition);
  /* clip-path (e nao overflow) para recortar o conteudo sem esconder o anel da borda */
  clip-path: inset(0 round var(--radius-md));
}
.ben__card::before {
  content: "";
  position: absolute;
  inset: -4px;
  padding: 4px;
  border-radius: inherit;
  background: var(--ben-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 1;
}
.ben__icon { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; flex-shrink: 0; }
.ben__icon img { display: block; }
.ben__card-text {
  width: 236px;
  max-width: 100%;
  margin-top: 24px;
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-bold);
  line-height: 28px;
  text-align: center;
}
.ben__card-text--left { margin-top: 0; text-align: left; }

.ben__card--wide { width: 603px; max-width: 100%; gap: 40px; }
.ben__wide-head { display: flex; align-items: flex-start; gap: 8px; }
.ben__values {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  width: 566px;
  max-width: 100%;
  gap: 8px;
}
.ben__value {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-body-lg);
  line-height: 28px;
  text-align: center;
  white-space: nowrap;
  transition: background-color var(--transition);
}
.ben__value.is-active { background: rgba(255, 255, 255, 0.16); }
.ben__value-name { font-weight: var(--fw-bold); }
.ben__value-amount { font-weight: var(--fw-regular); }
.ben__sep { position: relative; display: block; width: 1px; height: 64px; }
.ben__sep img { position: absolute; left: 50%; top: 50%; max-width: none; transform: translate(-50%, -50%) rotate(90deg); }

.ben__card--brand { padding: 0; background: var(--ben-brand-bg); backdrop-filter: none; }
.ben__brand-blob--expert { display: none; }
.ben[data-ben-theme="expert"] .ben__brand-blob--default { display: none; }
.ben[data-ben-theme="expert"] .ben__brand-blob--expert { display: block; }
.ben__brand-blob { position: absolute; left: 146.9px; top: -7.8px; max-width: none; transform: rotate(6.38deg); }
.ben__brand-text { position: absolute; left: 9.5px; top: 90.4px; max-width: none; }

/* Diferenciais */
.ben__subtitle { padding-inline: var(--gutter); font-size: 32px; line-height: 40px; font-weight: var(--fw-bold); text-align: center; }
.ben__carousel {
  width: 100%;
  /* folga vertical: o overflow hidden nao pode encostar nas bordas dos cards (borda fina / hover) */
  padding-block: 24px;
  margin-block: 8px -24px;
  overflow: hidden;
}
/* Faixa infinita: o JS duplica os cards; -50% da largura = exatamente um conjunto (loop sem emenda) */
.ben__feats {
  display: flex;
  width: max-content;
  list-style: none;
  animation: ben-marquee var(--ben-marquee-duration, 40s) linear infinite;
  will-change: transform;
}
.ben__carousel:hover .ben__feats,
.ben__carousel:focus-within .ben__feats { animation-play-state: paused; }
@keyframes ben-marquee { to { transform: translateX(-50%); } }
.ben__feat {
  display: flex;
  flex-direction: column;
  width: 320px;
  margin-right: 24px;
  border: 0.5px solid var(--color-purple-01);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  align-items: center;
  gap: 24px;
  padding: 28px;
  min-height: 239px;
  transition: background-color var(--transition), border-color var(--transition);
}
.ben__feat-icon { display: flex; align-items: center; justify-content: center; width: 47px; height: 47px; flex-shrink: 0; }
.ben__feat-icon img { display: block; }
.ben__feat-text { width: 264px; max-width: 100%; font-size: 18px; font-weight: var(--fw-bold); line-height: 28px; text-align: center; }
/* Todos os cards no mesmo estilo; o destaque so aparece no hover */
.ben__feat:hover {
  padding: 26.5px;
  border: 2px solid var(--ben-violet);
  background: linear-gradient(to bottom, #7D4499, rgba(125, 68, 153, 0.2));
}

/* CTA */
.ben__cta {
  display: inline-flex;
  padding: 10px;
  margin-top: 40px;
  border: 0.8px solid var(--color-purple-02);
  border-radius: 9999px;
}
.ben__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 24px;
  border: 4px solid var(--color-white);
  border-radius: 9999px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--fs-h6);
  font-weight: var(--fw-bold);
  line-height: 32px;
  transition: background-color var(--transition);
}
.ben__cta:hover .ben__cta-btn { background: var(--color-secondary); }

@media (max-width: 1024px) {
  .ben { border-radius: 64px; padding: 64px 0; }
  .ben__title { font-size: var(--fs-h2); line-height: var(--lh-h2); }
  .ben__grid { width: 100%; padding-inline: 40px; max-width: 720px; }
  .ben__card { width: calc(50% - 12px); max-width: 292px; flex-grow: 1; max-width: none; }
  .ben__card--wide { width: 100%; }
  .ben__card--brand { width: 292px; flex-grow: 0; }
  .ben__deco--left { display: none; }
}
@media (max-width: 640px) {
  .ben { border-radius: 40px; padding: 48px 0; }
  .ben__panel { margin-top: 40px; }
  /* grade de 2 colunas: 3 cards + "Vem pra Vivo" em 2x2; bolsa-auxilio ocupa as 2 colunas abaixo */
  .ben__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-inline: 16px; }
  .ben__card { width: 100%; max-width: none; height: auto; min-height: 180px; padding: 16px 10px; flex-grow: 0; justify-content: center; }
  .ben__icon { width: 44px; height: 44px; }
  .ben__icon img { width: 100%; height: 100%; object-fit: contain; }
  .ben__card-text { width: 100%; margin-top: 12px; font-size: 15px; line-height: 22px; }
  .ben__card--wide { order: 1; grid-column: 1 / -1; min-height: 0; gap: 16px; padding: 16px 12px; }
  .ben__card--wide .ben__card-text { margin-top: 0; }
  .ben__wide-head { width: 100%; align-items: center; justify-content: center; }
  .ben__values { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; width: 100%; gap: 6px; }
  .ben__sep { display: none; }
  .ben__value { white-space: normal; gap: 4px; padding: 6px 2px; font-size: 14px; line-height: 20px; }
  .ben__card--brand { max-width: none; margin-inline: 0; padding: 0; }
  .ben__brand-blob { left: 51.7%; top: -3.7%; width: 67%; height: auto; }
  .ben__brand-text { left: 3.3%; top: 43%; width: 54.2%; height: auto; }
  .ben__feat { width: 280px; }
  .ben__feat { margin-right: 16px; }
  .ben__deco--top { width: 260px; height: 312px; right: -100px; top: -90px; }
  .ben__deco--bottom { display: none; }
  .ben__cta-btn { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ben__tab, .ben__card, .ben__value, .ben__feat, .ben__cta-btn { transition: none; }
  /* sem animacao: faixa estatica, rolavel, sem os cards duplicados */
  .ben__carousel { overflow-x: auto; scrollbar-width: none; }
  .ben__carousel::-webkit-scrollbar { display: none; }
  .ben__feats { animation: none; }
  .ben__feat[aria-hidden="true"] { display: none; }
}
