/* ==========================================================================
   ACADEMIC CERTIFICATES & DIPLOMAS CSS + LIGHTBOX
   ========================================================================== */

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  max-width: 1100px;
  margin: 0 auto;
}

.diploma-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--slate-200);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.diploma-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15, 118, 110, 0.18);
  border-color: var(--primary);
}

/* Ornamental Diploma Frame */
.diploma-inner {
  border: 2px solid #c58f44;
  outline: 1px solid rgba(197, 143, 68, 0.3);
  outline-offset: 4px;
  padding: 30px 24px;
  background: #fdfcf7;
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.diploma-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #b45309;
}

.corner-tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.corner-tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.corner-br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

.diploma-header {
  text-align: center;
  margin-bottom: 20px;
}

.diploma-emblem {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px auto;
  color: #b45309;
}

.diploma-authority {
  font-family: var(--font-base);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #78350f;
  margin-bottom: 4px;
}

.diploma-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.25;
  margin-bottom: 8px;
}

.diploma-reg-num {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #92400e;
  background: rgba(197, 143, 68, 0.15);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
}

.diploma-body {
  text-align: center;
  margin: 20px 0;
  flex: 1;
}

.diploma-prose {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--slate-700);
  margin-bottom: 16px;
}

.diploma-param-box {
  background: rgba(15, 118, 110, 0.05);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 700;
  display: inline-block;
}

/* Footer with Seals and Signatures */
.diploma-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(197, 143, 68, 0.2);
}

.diploma-signature {
  text-align: left;
}

.diploma-signature-line {
  width: 120px;
  height: 1px;
  background: var(--slate-400);
  margin-top: 16px;
  margin-bottom: 4px;
}

.diploma-sign-name {
  font-family: 'Playfair Display', cursive, serif;
  font-size: 1.15rem;
  color: #1e3a8a;
  font-style: italic;
  display: block;
}

.diploma-sign-role {
  font-size: 0.7rem;
  color: var(--slate-500);
  text-transform: uppercase;
}

/* Gold Embossed Seal */
.diploma-seal {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, #fde047 0%, #ca8a04 100%);
  border: 2px dashed #854d0e;
  box-shadow: 0 4px 10px rgba(180, 83, 9, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #713f12;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  position: relative;
  flex-shrink: 0;
}

.diploma-seal::after {
  content: '★ OFFICIAL ★';
  font-size: 0.5rem;
  display: block;
  letter-spacing: 0.05em;
}

.diploma-click-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

@media (max-width: 900px) {
  .certificates-grid {
    grid-template-columns: 1fr;
    max-width: 540px;
  }
}

/* ---------------- LIGHTBOX MODAL ---------------- */
.cert-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cert-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.cert-modal-container {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: modalScale 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalScale {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.cert-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--slate-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--slate-700);
  z-index: 10;
  transition: background var(--transition-fast);
}

.cert-modal-close:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.cert-modal-content {
  padding: 40px 30px;
}

.cert-modal-details {
  margin-top: 30px;
  padding: 20px;
  background: var(--slate-50);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
}

.cert-modal-details-title {
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.cert-modal-details-meta {
  font-size: 0.8125rem;
  color: var(--slate-600);
  line-height: 1.6;
}
