/* Qualifikationsnachweise: Kacheln und Dokumentenansicht */
.certificate-grid .certificate-card {
  width: 100%;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.certificate-grid .certificate-card:hover {
  border-color: var(--green);
  background: var(--cream);
}
.certificate-info { flex: 1 1 auto; min-width: 0; }
.certificate-title {
  display: block;
  margin-bottom: .22rem;
  font-size: .95rem;
  font-weight: 720;
  line-height: 1.4;
}
.certificate-meta { display: block; color: var(--muted); font-size: .78rem; }
.certificate-available {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: .45rem .7rem;
  border-radius: 8px;
  background: var(--sage);
  color: var(--forest);
  font-size: .78rem;
  font-weight: 700;
}
.certificate-dialog {
  width: min(96vw, 950px);
  max-width: 96vw;
  max-height: 94dvh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 25px 90px rgba(0, 20, 28, .35);
}
.certificate-dialog::backdrop { background: rgba(10, 30, 39, .78); }
.certificate-dialog-frame { display: flex; flex-direction: column; max-height: 94dvh; }
.certificate-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 0 0 auto;
  padding: .7rem 1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.certificate-dialog-header h2 {
  margin: 0;
  font-size: clamp(.95rem, 2vw, 1.2rem);
  line-height: 1.4;
}
.certificate-dialog-close {
  flex: 0 0 auto;
  padding: .42rem .72rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--sage);
  color: var(--ink);
  font-size: .86rem;
  font-weight: 650;
}
.certificate-dialog-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  background: #e7ecec;
}
.certificate-dialog-image {
  display: block;
  width: 100%;
  max-width: 830px;
  height: auto;
  margin: 0 auto;
  background: white;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .14);
  user-select: none;
  -webkit-user-drag: none;
}
@media (max-width: 650px) {
  .certificate-dialog { width: 100vw; max-width: 100vw; max-height: 96dvh; }
  .certificate-dialog-frame { max-height: 96dvh; }
  .certificate-dialog-header { padding: .65rem .8rem; }
  .certificate-dialog-scroll { padding: .45rem; }
  .certificate-grid .certificate-card { align-items: stretch; }
  .certificate-available { align-self: flex-start; }
}
