/* ==========================================================================
   EUREKA 2026 - DIPLOMAS Y CERTIFICADOS OFICIALES
   Licenciatura en Ciencias Matemáticas • UNAMIS Sede Santa Rosa
   ========================================================================== */

.certificates-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.cert-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cert-card-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}

.cert-card-info {
  flex: 1;
}

.cert-card-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 4px;
}
.cert-card-badge.gold { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid #f59e0b; }
.cert-card-badge.silver { background: rgba(203, 213, 225, 0.2); color: #cbd5e1; border: 1px solid #cbd5e1; }
.cert-card-badge.bronze { background: rgba(217, 119, 6, 0.2); color: #f59e0b; border: 1px solid #d97706; }
.cert-card-badge.standard { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid #3b82f6; }

.cert-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.cert-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-cert-print {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-cert-print:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

/* ==========================================================================
   ESTRUCTURA DE DIPLOMA OFICIAL (IMPRESIÓN A4 APAISADA)
   ========================================================================== */
.certificate-page {
  width: 297mm;
  height: 210mm;
  padding: 12mm;
  background: #ffffff;
  color: #1e293b;
  font-family: 'Times New Roman', Georgia, serif;
  position: relative;
  box-sizing: border-box;
  margin: 20px auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cert-inner-frame {
  border: 4px double #78350f;
  height: 100%;
  padding: 16px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  background: radial-gradient(circle at center, #ffffff 60%, #fffbeb 100%);
}

.certificate-page.cert-gold .cert-inner-frame { border-color: #d97706; }
.certificate-page.cert-silver .cert-inner-frame { border-color: #64748b; }
.certificate-page.cert-bronze .cert-inner-frame { border-color: #b45309; }

.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 8rem;
  font-weight: 900;
  color: rgba(120, 53, 15, 0.03);
  letter-spacing: 12px;
  pointer-events: none;
  font-family: var(--font-main);
}

.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(120, 53, 15, 0.2);
  padding-bottom: 10px;
}

.cert-logo-left, .cert-logo-right {
  height: 75px;
  width: 75px;
  object-fit: contain;
}

.cert-institution-titles h3 {
  font-size: 1.15rem;
  font-weight: 900;
  color: #7b1113;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
}

.cert-institution-titles h4 {
  font-size: 1rem;
  font-weight: 800;
  color: #1e3a8a;
  margin: 2px 0;
  letter-spacing: 0.5px;
}

.cert-institution-titles h5 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.cert-project-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #d97706;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cert-badge-ribbon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px auto;
  padding: 6px 24px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 30px;
}

.ribbon-text {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #92400e;
  font-family: var(--font-main);
  text-transform: uppercase;
}

.cert-presents {
  font-size: 1.05rem;
  color: #475569;
  font-style: italic;
  margin-bottom: 8px;
}

.cert-student-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 10px 0;
}

.cert-student-photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #d97706;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.cert-student-name {
  font-size: 2.1rem;
  font-weight: 900;
  color: #0f172a;
  font-family: var(--font-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #cbd5e1;
  padding-bottom: 4px;
}

.cert-student-details {
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cert-reason {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #1e293b;
  max-width: 85%;
  margin: 0 auto;
}

.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 30px 0 30px;
}

.cert-signature-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 200px;
}

.sig-line {
  width: 180px;
  height: 1px;
  background: #334155;
  margin-bottom: 6px;
}

.sig-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  font-family: var(--font-main);
}

.sig-role {
  font-size: 0.75rem;
  color: #64748b;
  font-family: var(--font-main);
}

.seal-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px dashed #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.08);
}

.seal-inner {
  font-size: 0.75rem;
  font-weight: 900;
  color: #92400e;
  font-family: var(--font-main);
  text-align: center;
}

.cert-date-location {
  font-size: 0.8rem;
  color: #64748b;
  font-style: italic;
  margin-top: 6px;
}
