.investimento-section {
  padding: 120px 0;
  background: linear-gradient(135deg, var(--cinza-gelo) 0%, rgba(224, 225, 221, 0.5) 100%);
  position: relative;
  overflow: hidden;
}

.section-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.bg-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(65, 90, 119, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(27, 38, 59, 0.05) 0%, transparent 50%);
  opacity: 0.6;
}

.investimento-section .container {
  position: relative;
  z-index: 1;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  background: var(--azul-noite);
  color: var(--cinza-gelo);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 25px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(13, 27, 42, 0.15);
  text-transform: uppercase;
}

.header-badge svg {
  color: var(--dourado-claro);
}

.section-title-main {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--azul-noite);
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -1px;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--cinza-pedra);
  max-width: 700px;
  margin: 0 auto 30px;
  line-height: 1.7;
}

/* ==========================================================================
   CSS Marquee Horizontal de Estatísticas
   ========================================================================== */
.stats-container {
  margin-bottom: 90px;
}

.stats-marquee {
  position: relative;
  overflow: hidden;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 20px 0;
}

/* Máscara de fade nas bordas laterais do marquee */
.stats-marquee::before,
.stats-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 150px;
  z-index: 2;
  pointer-events: none;
}

.stats-marquee::before {
  left: 0;
  background: linear-gradient(90deg, #f1f3f5 0%, transparent 100%);
}

.stats-marquee::after {
  right: 0;
  background: linear-gradient(-90deg, #f1f3f5 0%, transparent 100%);
}

.stats-track {
  display: flex;
  gap: 30px;
  width: max-content;
  animation: stats-scroll 35s linear infinite;
  align-items: stretch;
  padding-left: 30px;
}

.stats-track:hover {
  animation-play-state: paused;
}

@keyframes stats-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* Rola exatamente metade dos elementos (duplicados) */
  }
}

.stat-card-large {
  flex: 0 0 350px; /* Largura fixa para cada card no marquee */
  background: linear-gradient(135deg, var(--azul-noite) 0%, var(--azul-muito-escuro) 100%);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  color: var(--cinza-gelo);
  box-shadow: 0 10px 30px rgba(13, 27, 42, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stat-card-large::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stat-card-large:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(13, 27, 42, 0.3);
}

.stat-card-large:hover::before {
  opacity: 1;
}

.stat-icon-wrapper {
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--dourado-claro);
  transition: all 0.3s ease;
}

.stat-card-large:hover .stat-icon-wrapper {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1) rotate(5deg);
}

.stat-number {
  font-size: 3.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 1.05rem;
  opacity: 0.95;
  margin-bottom: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.stat-trend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: auto;
}

.stat-trend svg {
  color: var(--dourado-claro);
}

/* ==========================================================================
   Por Que Investir em Niterói (Grid)
   ========================================================================== */
.benefits-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--azul-noite);
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: -0.5px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.benefit-card {
  background: white;
  padding: 45px 35px;
  border-radius: 20px;
  text-align: left;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid rgba(13, 27, 42, 0.05);
  cursor: pointer;
}

.benefit-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(13, 27, 42, 0.12);
  border-color: rgba(42, 83, 109, 0.3);
}

.benefit-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--azul-noite), var(--azul-aco));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  color: var(--dourado-claro);
  transition: all 0.3s ease;
  animation: floaty 4.5s ease-in-out infinite;
  box-shadow: 0 5px 15px rgba(13, 27, 42, 0.15);
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.08) rotate(-5deg);
  box-shadow: 0 8px 20px rgba(13, 27, 42, 0.25);
}

@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* Staggered delays para animações flutuantes */
.benefits-grid > :nth-child(1) .benefit-icon { animation-delay: 0s; }
.benefits-grid > :nth-child(2) .benefit-icon { animation-delay: 0.3s; }
.benefits-grid > :nth-child(3) .benefit-icon { animation-delay: 0.6s; }
.benefits-grid > :nth-child(4) .benefit-icon { animation-delay: 0.9s; }
.benefits-grid > :nth-child(5) .benefit-icon { animation-delay: 1.2s; }
.benefits-grid > :nth-child(6) .benefit-icon { animation-delay: 1.5s; }

.benefit-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--azul-noite);
  margin-bottom: 12px;
  line-height: 1.3;
}

.benefit-card p {
  color: var(--cinza-pedra);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.benefit-arrow {
  display: inline-flex;
  align-items: center;
  color: var(--azul-aco);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.benefit-card:hover .benefit-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Responsividade */
@media (max-width: 968px) {
  .section-title-main {
    font-size: 2.8rem;
  }
  
  .benefits-title {
    font-size: 2rem;
  }

  .stat-card-large {
    flex: 0 0 300px;
    padding: 35px 20px;
  }

  .stat-number {
    font-size: 3.2rem;
  }
}

@media (max-width: 768px) {
  .investimento-section {
    padding: 80px 0;
  }
  
  .section-title-main {
    font-size: 2.2rem;
  }

  .section-subtitle {
    font-size: 1.1rem;
  }

  .stat-card-large {
    flex: 0 0 280px;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
