/* ============================================================
   cert.css — formal certificate document
   (shared by verify.php public view + edit.php live preview)
   ============================================================ */

.cert-card {
    position: relative;
    text-align: center;
    padding: 40px 34px 30px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 2px;
    box-shadow: var(--shadow);
}
.cert-card::before {              /* inner fine frame */
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid #c9b27a;
    pointer-events: none;
}

.cert-eyebrow {
    margin: 0 0 4px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 400;
}
.cert-eyebrow::after {
    content: "";
    display: block;
    width: 64px;
    height: 1px;
    margin: 12px auto 22px;
    background: #c9b27a;
}

.cert-photo {
    width: 92px; height: 110px;
    margin: 0 auto 16px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    padding: 3px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 600; color: var(--primary);
}
.cert-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cert-photo span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); }
.cert-photo img[hidden], .cert-photo span[hidden] { display: none; }

.cert-small {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.86rem;
    color: var(--text-muted);
    font-style: italic;
}
.cert-name {
    margin: 6px 0 2px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.75rem;
    color: var(--text);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.cert-cnic { margin: 0 0 16px; font-size: 0.8rem; color: var(--text-muted); }
.cert-course {
    margin: 6px auto 24px;
    max-width: 90%;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    overflow-wrap: anywhere;
}
[data-bind].empty { color: var(--text-faint) !important; font-style: italic; font-weight: 400; }
[data-bind].bump { animation: cert-flash .6s ease; }
@keyframes cert-flash { from { background: var(--primary-soft); } to { background: transparent; } }

.cert-meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 16px;
    padding: 6px 4px 0;
}
.cert-meta > div:not(.seal) {
    border-top: 1px solid var(--line-strong);
    padding-top: 8px;
}
.cert-meta span, .cert-status span:first-child {
    display: block;
    font-size: 0.68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 3px;
}
.cert-meta strong { font-size: 0.88rem; color: var(--text); overflow-wrap: anywhere; }

.seal {
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary);
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px #c9b27a;
    margin-bottom: 4px;
}
.seal span {
    margin: 0 !important;
    font-size: 1.3rem !important;
    color: #fff !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.cert-status {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .cert-card { padding: 30px 18px 22px; }
    .cert-eyebrow { font-size: 0.95rem; letter-spacing: .12em; }
    .cert-name { font-size: 1.45rem; }
    .cert-meta { gap: 10px; }
    .seal { width: 46px; height: 46px; }
}

/* ---------- Logo watermark behind the certificate text ---------- */
.cert-card { overflow: hidden; }
.cert-card > * { position: relative; z-index: 1; }
.cert-card > .cert-watermark {
    position: absolute;
    z-index: 0;
    top: 50%; left: 50%;
    width: 82%;
    max-width: 520px;
    height: auto;
    transform: translate(-50%, -42%);
    opacity: 0.07;
    pointer-events: none;
    user-select: none;
}
@media print {
    .cert-card > .cert-watermark { opacity: 0.08; }
}
