/* Estilos para el bloque de estadísticas moderno */
.statistics-section-modern {
  background: #f8f9fa;
  padding: 4rem 0;
  margin: 2rem 0;
}

.statistics-section-modern .section-title {
  text-align: center;
  color: #1e3a8a;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  font-family: 'Cabin', sans-serif;
}

.stats-grid-dynamic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* Para mantener el diseño 2x2 cuando hay exactamente 4 elementos */
.stats-grid-dynamic:has(.stat-item:nth-child(4):last-child) {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  max-width: 800px;
}

.stat-item {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Items con fondo blanco */
.stat-item-blanco {
  background: white;
}

.stat-item-blanco .stat-number {
  color: #1e3a8a;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: 'Cabin', sans-serif;
}

.stat-item-blanco .stat-description {
  color: #666;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  font-family: 'Cabin', sans-serif;
}

/* Items con fondo azul */
.stat-item-azul {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
}

.stat-item-azul .stat-number {
  color: white;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: 'Cabin', sans-serif;
}

.stat-item-azul .stat-description {
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  font-family: 'Cabin', sans-serif;
}

/* Efectos adicionales */
.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1e3a8a, #3b82f6);
}

.stat-item-azul::before {
  background: linear-gradient(90deg, #ffffff, #e5e7eb);
}

/* Responsive */
@media (max-width: 768px) {
  .stats-grid-dynamic {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .statistics-section-modern .section-title {
    font-size: 2rem;
  }
  
  .stat-item {
    padding: 1.5rem;
  }
  
  .stat-item .stat-number {
    font-size: 2.5rem;
  }
  
  .stat-item .stat-description {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .statistics-section-modern {
    padding: 2rem 0;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  .stat-item .stat-number {
    font-size: 2rem;
  }
}
