/* ========================================
   BENEFÍCIOS - ENERGIA CERTA BRASIL
   CSS dedicado para a seção de diferenciais
   ======================================== */

/* ========================================
   SEÇÃO PRINCIPAL
   ======================================== */
.features-section {
  padding: var(--spacing-2xl) 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

/* Elemento decorativo de fundo */
.features-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: linear-gradient(135deg, rgba(46, 61, 106, 0.03) 0%, rgba(46, 61, 106, 0.01) 100%);
  border-radius: 50%;
  transform: rotate(-15deg);
  z-index: 1;
}

.features-section .container {
  position: relative;
  z-index: 2;
}

/* ========================================
   CABEÇALHO DA SEÇÃO
   ======================================== */
.features-section .section-header {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.features-section .section-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1f2937;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-lg);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.features-section h2 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.2;
}

.features-section h2 .highlight {
  background: linear-gradient(135deg, #2e3d6a, #3d4c7a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.features-section p {
  font-size: var(--font-size-lg);
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ========================================
   GRID DE CARDS
   ======================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 3rem;
  max-width: 100%;
  padding: 0;
  width: 100%;
}

/* ========================================
   CARDS INDIVIDUAIS
   ======================================== */
.feature-card {
  background: var(--background-white);
  border-radius: var(--border-radius-xl);
  padding: var(--spacing-xl);
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 1px solid rgba(46, 61, 106, 0.05);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2e3d6a, #3d4c7a, #2e3d6a);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px rgba(46, 61, 106, 0.15);
  border-color: rgba(46, 61, 106, 0.2);
}

/* ========================================
   ÍCONES COLORIDOS E CHAMATIVOS
   ======================================== */
.feature-icon {
  width: 90px;
  height: 90px;
  border-radius: var(--border-radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-lg);
  color: var(--text-white);
  font-size: var(--font-size-3xl);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Ícone 1 - Handshake (Azul) */
.feature-card:nth-child(1) .feature-icon {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.feature-card:nth-child(1):hover .feature-icon {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.6);
}

/* Ícone 2 - Percentage (Verde) */
.feature-card:nth-child(2) .feature-icon {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.feature-card:nth-child(2):hover .feature-icon {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 15px 35px rgba(5, 150, 105, 0.6);
}

/* Ícone 3 - Mobile (Roxo) */
.feature-card:nth-child(3) .feature-icon {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.feature-card:nth-child(3):hover .feature-icon {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.6);
}

/* Ícone 4 - Shield (Laranja) */
.feature-card:nth-child(4) .feature-icon {
  background: linear-gradient(135deg, #ea580c, #dc2626);
  box-shadow: 0 8px 25px rgba(234, 88, 12, 0.4);
}

.feature-card:nth-child(4):hover .feature-icon {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 15px 35px rgba(234, 88, 12, 0.6);
}

/* Ícone 5 - Clock (Azul Claro) */
.feature-card:nth-child(5) .feature-icon {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  box-shadow: 0 8px 25px rgba(8, 145, 178, 0.4);
}

.feature-card:nth-child(5):hover .feature-icon {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 15px 35px rgba(8, 145, 178, 0.6);
}

/* Ícone 6 - Users (Rosa) */
.feature-card:nth-child(6) .feature-icon {
  background: linear-gradient(135deg, #ec4899, #be185d);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.feature-card:nth-child(6):hover .feature-icon {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 15px 35px rgba(236, 72, 153, 0.6);
}

/* Efeito de brilho nos ícones */
.feature-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(45deg);
  transition: all 0.8s ease;
  opacity: 0;
}

.feature-card:hover .feature-icon::before {
  opacity: 1;
  animation: shine 2s ease;
}

@keyframes shine {
  0% { transform: rotate(45deg) translateX(-100%); }
  100% { transform: rotate(45deg) translateX(100%); }
}

/* ========================================
   TÍTULOS E DESCRIÇÕES
   ======================================== */
.feature-card h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
  text-align: center;
  line-height: 1.3;
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
  text-align: center;
  flex: 1;
  font-size: var(--font-size-base);
}

.feature-card strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* ========================================
   BADGES DOS CARDS
   ======================================== */
.feature-badge {
  display: inline-block;
  background: linear-gradient(135deg, #2e3d6a, #3d4c7a);
  color: var(--text-white);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: auto;
  box-shadow: 0 4px 15px rgba(46, 61, 106, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.feature-card:hover .feature-badge::before {
  left: 100%;
}

.feature-card:hover .feature-badge {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 61, 106, 0.4);
}

/* ========================================
   ANIMAÇÕES DE ENTRADA
   ======================================== */
.feature-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 1200px) {
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
  }
  
  .feature-card {
    padding: var(--spacing-lg);
    min-height: 300px;
  }
  
  .feature-icon {
    width: 80px;
    height: 80px;
    font-size: var(--font-size-2xl);
  }
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .features-section h2 {
    font-size: var(--font-size-3xl);
  }
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .feature-card {
    padding: var(--spacing-md);
    min-height: 280px;
  }
  
  .feature-icon {
    width: 70px;
    height: 70px;
    font-size: var(--font-size-xl);
  }
  
  .features-section h2 {
    font-size: var(--font-size-2xl);
  }
  
  .features-section p {
    font-size: var(--font-size-base);
  }
}

@media (max-width: 480px) {
  .feature-card {
    padding: var(--spacing-sm);
    min-height: 260px;
  }
  
  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: var(--font-size-lg);
  }
  
  .feature-card h3 {
    font-size: var(--font-size-lg);
  }
  
  .feature-card p {
    font-size: var(--font-size-sm);
  }
  
  .feature-badge {
    font-size: var(--font-size-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
  }
}
