.diplomados-section {
  padding: 60px 8%;
  background: #f9f9f9;
}

.diplomados-section h1 {
  text-align: center;
  color: #2e8b57;
  margin-bottom: 50px;
}

.diplomados-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.diplomado-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform .2s;
}

.diplomado-card:hover {
  transform: translateY(-5px);
}

.diplomado-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;   /* Antes era cover */
  background: #f5f5f5;
  padding: 8px;
}



.diplomado-card h3 {
  color: #2e8b57;
  margin: 15px 10px 10px;
}

.diplomado-info {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, padding 0.3s ease;
  padding: 0 20px;
}


.diplomado-info p {
  white-space: pre-line;
  margin-bottom: 15px;
  line-height: 1.6;
}

.btn-more, .btn-less {
  background: #2e8b57;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  margin: 15px auto 20px;
  display: inline-block;
}

/* Centrar específicamente el botón VER MENOS */
.btn-less {
  background: #888;
  display: block;
  margin: 20px auto 10px;
  width: fit-content; /* hace que el botón se ajuste al texto y pueda centrarse */
}




.diplomado-card.active .diplomado-info {
  max-height: 2000px;
  padding: 15px 20px;
}

@media (max-width: 900px) {
  .diplomados-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .diplomados-grid { grid-template-columns: 1fr; }
}



.tabla-diplomado {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.tabla-diplomado td {
  padding: 8px 6px;
  vertical-align: top;
  border-bottom: 1px solid #e5e5e5;
}

.tabla-diplomado td:first-child {
  width: 110px;
  color: #2e8b57;
}

.tabla-diplomado tr:last-child td {
  border-bottom: none;
}

