.cards-section {
  background: #efefe9;
  padding: 4rem 1rem;
}
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: center;    /* Centra las columnas sobrantes */
}

/* ===== Estilo de cada Card ===== */
.module-card {
  background: #ffffff;
  border: 2px solid #0a2540;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  
  /* ===== Nuevo padding ===== */
  padding: 1.5rem;            /* Distancia entre borde y contenido */
  
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.module-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Tilt dinámico */
<script>
  document.querySelectorAll('.module-card').forEach(card => {
    card.addEventListener('mousemove', e => {
      const { width, height, left, top } = card.getBoundingClientRect();
      const x = e.clientX - left;
      const y = e.clientY - top;
      const rotY = ((x/width) - 0.5) * 10;
      const rotX = ((y/height) - 0.5) * -10;
      card.style.transform = `perspective(600px) rotateX(${rotX}deg) rotateY(${rotY}deg) scale3d(1,1,1)`;
    });
    card.addEventListener('mouseleave', () => {
      card.style.transform = 'perspective(600px) rotateX(0deg) rotateY(0deg) scale3d(1,1,1)';
    });
  });
</script>

/* Título del módulo */
.module-title {
  background: #0a2540;
  color: #eeeeee;
  padding: 1rem;
  font-size: 1.25rem;
  text-align: center;
}
.module-title span {
  display: block;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-weight: normal;
}

/* Contenido con scroll interno */
.module-content {
  padding: 1rem;
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 350px;
}
/* Scrollbar personalizado */
.module-content::-webkit-scrollbar {
  width: 6px;
}
.module-content::-webkit-scrollbar-track {
  background: #f0f0f0;
}
.module-content::-webkit-scrollbar-thumb {
  background: #0a2540;
  border-radius: 3px;
}

/* Tipografía interna */
.module-content h5 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #0a2540;
}
.module-content ul,
.module-content ol {
  padding-left: 1.2rem;
  margin-bottom: 0.75rem;
}
.module-content li {
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
  .cards-container {
    grid-template-columns: 1fr;
  }
  .module-content {
    max-height: 300px;
  }
}