.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.certificate-card {
  background: #fff;
  border-radius: 5px;
  padding: 25px; /* extra space for bottom buttons */
  padding-bottom: 0;
  text-align: center;
  overflow: hidden;
  position: relative;
  border: 2px solid #009bb6; /* prominent border */
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.certificate-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: #0291aa;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.certificate-card h4 {
  font-size: 18px;

    margin: 0;
  margin: 15px 0 8px;
  color: #222;
  font-weight: 600;
}

.certificate-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.cert-icon {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 28px;
  color: #f39c12;
}

/* Buttons fixed at bottom */
.cert-actions {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  bottom:0px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #eee;
    padding: 8px;
    background: #fafafa;
}

.cert-actions .btn {
  padding: 7px 14px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s;
}
.cert-actions .btn i {
  margin-left: 6px;
}

.cert-actions .btn.view {
  background: #0291aa;
  color: #fff;
}
.cert-actions .btn.view:hover {
  background: #027a8e;
}

.cert-actions .btn.download {
  background: #28a745;
  color: #fff;
}
.cert-actions .btn.download:hover {
  background: #1e7e34;
}

/* Empty placeholder */
.certificate-card.empty {
  border: 2px dashed #aaa;
  color: #777;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

.certificate-card.empty i {
  font-size: 36px;
  margin-bottom: 8px;
  color: #bbb;
}

.highlight {
  font-weight: 600;
  color: #0291aa;
  text-transform: uppercase;
    font-size: 13px;
    background-color: #e0f7fa;
    padding: 2px 6px;
    border-radius: 3px;
}