/* ==========================================================================
   SECTION 4 — BENEFÍCIOS
   Background: Escuro (plum), typography: clara
   Desktop: radial / Mobile: grade com imagem de fundo
   ========================================================================== */

.benefits-section {
  position: relative;
  background-color: var(--plum);
  background-image: radial-gradient(circle at 50% 50%, rgba(166, 69, 33, 0.08) 0%, transparent 60%);
  padding: 120px 24px;
  color: var(--sand);
  z-index: 2;
  overflow: hidden;
  border-radius: 48px;
  margin-top: -48px; /* Desliza sobre a seção do método, igual à seção 2 sobre a hero */
}

.benefits-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
  position: relative;
}

/* ── Header ── */
.benefits-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 2;
  position: relative;
}

.benefits-header .section-label { color: var(--taupe); }
.benefits-header .label-line    { background: var(--terracotta); }

.benefits-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  color: var(--cream);
  line-height: 1.25;
  margin: 0;
  max-width: 700px;
}

/* ── Radial wrapper (Desktop) ── */
.benefits-radial-wrapper {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  height: 640px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ── Imagem Central ── */
.benefits-center-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 560px;
  z-index: 2;
  pointer-events: none;
}

.benefits-center-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  /* Gradiente mais forte — começa a esconder antes */
  mask-image: linear-gradient(to bottom, black 52%, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, black 52%, transparent 88%);
}

/* ── Benefit Item (Card Radial) ── */
.benefit-item {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 22px;
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  width: max-content;
  max-width: 280px;
  z-index: 3;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s ease, border-color 0.3s ease;
}

.benefit-item.is-visible {
  animation: benefitIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes benefitIn {
  0%   { opacity: 0; transform: scale(0.9) translateY(16px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.benefit-item:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(166, 69, 33, 0.45);
  transform: translateY(-4px) !important;
}

.benefit-icon {
  width: 52px;
  height: 52px;
  background: transparent; /* Remove o fundo manual pois os ícones já tem círculo */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.benefit-item p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--cream);
  margin: 0;
  line-height: 1.4;
}

/* Posicionamento radial — Desktop */
.item-1 { top: 8%;  left: 2%;   }
.item-2 { top: 42%; left: -2%;  }
.item-3 { bottom: 8%; left: 4%; }
.item-4 { top: 8%;  right: 2%;  }
.item-5 { top: 42%; right: -2%; }
.item-6 { bottom: 8%; right: 4%;}

/* Desktop: o wrapper é transparente, os items ficam absolutos dentro do radial-wrapper */
.benefits-items-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none; /* O wrapper não captura eventos */
}

.benefits-items-wrap .benefit-item {
  pointer-events: all;
}

/* Atrasos escalonados */
.item-1.is-visible { animation-delay: 0.05s; }
.item-4.is-visible { animation-delay: 0.1s; }
.item-2.is-visible { animation-delay: 0.2s; }
.item-5.is-visible { animation-delay: 0.25s; }
.item-3.is-visible { animation-delay: 0.35s; }
.item-6.is-visible { animation-delay: 0.4s; }

/* ── Footer / CTA ── */
.benefits-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 2;
}

.benefits-footer::before {
  content: '';
  width: 60px;
  height: 2px;
  background: var(--terracotta);
  opacity: 0.5;
}

.benefits-footer p {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: var(--sand);
  max-width: 600px;
  line-height: 1.6;
  margin: 0;
}

/* Botão do CTA sempre centralizado */
.benefits-footer .cta-button {
  display: inline-block;
  margin: 0 auto;
}

/* ==========================================================================
   MOBILE — Grade com imagem de fundo fixada no topo + cards em grid
   ========================================================================== */
@media (max-width: 950px) {
  .benefits-section {
    padding: 80px 16px;
  }

  /* Wrapper vira coluna: foto em cima + grid de cards embaixo */
  .benefits-radial-wrapper {
    height: auto;
    min-height: unset;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  /* Foto no topo: tamanho original preservado */
  .benefits-center-image {
    position: relative;
    top: auto; left: auto; right: auto; bottom: auto;
    transform: none;
    width: 70%;
    max-width: 280px;
    height: 420px;
  }

  .benefits-center-image img {
    border-radius: 0;
    object-position: top center;
    object-fit: contain;
    mask-image: linear-gradient(to bottom, black 50%, transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 85%);
  }

  /* Wrapper sobe sobre a foto com margin negativo */
  .benefits-items-wrap {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    pointer-events: all;
    margin-top: -120px;   /* Sobe a lista sobre a área transparente da foto */
    z-index: 5;           /* Fica na frente da imagem */
  }

  /* Cards retangulares no mobile */
  .benefit-item {
    position: relative;
    top: auto; left: auto; right: auto; bottom: auto;
    max-width: 100%;
    width: 100%;
    border-radius: 16px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.07);
    z-index: 4;
  }

  .benefit-item p {
    font-size: 0.85rem;
    white-space: normal;
  }

  .benefit-item.is-visible {
    animation: benefitInMobile 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes benefitInMobile {
    0%   { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 480px) {
  .benefits-items-wrap {
    grid-template-columns: 1fr;
  }

  .benefits-center-image {
    height: 380px;
    width: 65%;
  }

  /* CTA centralizado no mobile — garante alinhamento */
  .benefits-footer {
    align-items: center;
    text-align: center;
  }

  .benefits-footer .cta-button {
    align-self: center;
    width: auto;
  }
}
