/* ============================================================
   ZERTIFIKATE-POPUP CSS – FachTap Gold/Schwarz Stil
   ============================================================ */

#zertPopup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
#zertPopup.zp-show { display: flex; }

.zp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.zp-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #0f0e0a 0%, #161410 60%, #1a1710 100%);
  border: 1px solid rgba(212,160,23,0.22);
  border-radius: 28px;
  padding: 28px 22px 24px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7),
              0 0 0 1px rgba(212,160,23,0.08),
              inset 0 1px 0 rgba(212,160,23,0.07);
  animation: zpEnter 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,160,23,0.2) transparent;
}
.zp-card::-webkit-scrollbar { width: 4px; }
.zp-card::-webkit-scrollbar-thumb { background: rgba(212,160,23,0.2); border-radius: 4px; }

.zp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, #D4A017, #ffe066, #D4A017, transparent);
}

@keyframes zpEnter {
  from { opacity:0; transform:scale(0.88) translateY(24px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

/* ── Close ── */
.zp-close {
  position: absolute; top:14px; right:14px;
  width:30px; height:30px;
  background: rgba(212,160,23,0.07);
  border: 1px solid rgba(212,160,23,0.18);
  border-radius: 50%;
  color: rgba(212,160,23,0.6);
  cursor: pointer;
  display: flex; align-items:center; justify-content:center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}
.zp-close:hover { background: rgba(212,160,23,0.18); color: goldenrod; }

/* ── Header ── */
.zp-header { text-align:center; margin-bottom:18px; }
.zp-header-icon {
  font-size:32px; margin-bottom:6px;
  filter: drop-shadow(0 0 14px rgba(212,160,23,0.45));
}
.zp-title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size:22px; font-weight:600; color:#f5e6b8;
  margin:0 0 4px; letter-spacing:0.3px;
}
.zp-subtitle {
  font-size:12px; color:rgba(255,255,255,0.32);
  margin:0; font-family:'DM Sans',sans-serif;
}

/* ── Zertifikate Liste ── */
.zp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(212,160,23,0.12);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.zp-item:hover {
  background: rgba(212,160,23,0.06);
  border-color: rgba(212,160,23,0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,160,23,0.08);
}
.zp-item:active {
  transform: translateY(0);
}

.zp-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.zp-item-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(212,160,23,0.12), rgba(212,160,23,0.04));
  border: 1px solid rgba(212,160,23,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.zp-item-info {
  min-width: 0;
  flex: 1;
}

.zp-item-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #f5e6b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.zp-item-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

.zp-item-arrow {
  flex-shrink: 0;
  color: rgba(212,160,23,0.35);
  font-size: 14px;
  transition: color 0.2s, transform 0.2s;
}
.zp-item:hover .zp-item-arrow {
  color: goldenrod;
  transform: translateX(2px);
}

/* ── Keine Zertifikate ── */
.zp-empty {
  text-align: center;
  padding: 24px 16px;
  color: rgba(255,255,255,0.3);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.6;
}
.zp-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════
   LIGHTBOX – Bild-Vorschau
   ═══════════════════════════════════════════════ */

#zertLightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
#zertLightbox.zl-show { display: flex; }

.zl-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.zl-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: zpEnter 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

.zl-img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 16px;
  border: 1px solid rgba(212,160,23,0.25);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6),
              0 0 0 1px rgba(212,160,23,0.08);
  object-fit: contain;
}

.zl-caption {
  text-align: center;
}
.zl-caption-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  color: #f5e6b8;
  margin-bottom: 3px;
}
.zl-caption-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

.zl-close {
  position: absolute;
  top: -12px;
  right: -8px;
  width: 36px;
  height: 36px;
  background: rgba(10,8,4,0.85);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 50%;
  color: rgba(212,160,23,0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 3;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.zl-close:hover { background: rgba(212,160,23,0.18); color: goldenrod; }

/* ── Responsive ── */
@media (min-width: 601px) {
  .zp-card { max-width: 460px; padding: 32px 28px 28px; }
  .zp-item { padding: 16px 20px; }
  .zp-item-icon { width: 42px; height: 42px; font-size: 20px; }
  .zp-item-name { font-size: 14px; }
  .zp-item-date { font-size: 12px; }
  .zl-img { max-height: 78vh; border-radius: 20px; }
  .zl-close { top: -14px; right: -14px; width: 40px; height: 40px; }
}

@media (max-width: 380px) {
  .zp-card { padding: 22px 16px 20px; border-radius: 22px; }
  .zp-item { padding: 12px 12px; gap: 10px; }
  .zp-item-icon { width: 34px; height: 34px; font-size: 16px; }
  .zp-item-name { font-size: 12px; }
}
