/* Al Resala — training certificate (A4 landscape). Sizes in mm so print matches the screen exactly. */
.cert { --navy: #0f3470; --navy-2: #0b2a5c; --gold: #c8962c; --gold-2: #d4a33b; --ink: #1b2740; --muted: #5e6b82;
  width: 297mm; height: 210mm; position: relative; box-sizing: border-box; padding: 7mm; background: var(--navy);
  font-family: "Cairo", "Inter", sans-serif; color: var(--ink); -webkit-print-color-adjust: exact; print-color-adjust: exact; overflow: hidden; }
.cert *, .cert *::before, .cert *::after { box-sizing: border-box; }
.c-paper { position: relative; width: 100%; height: 100%; padding: 13mm 19mm 10mm; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(212,163,59,.10), transparent 58%),
    repeating-radial-gradient(circle at 50% 46%, rgba(15,52,112,.035) 0 1px, transparent 1px 7px),
    linear-gradient(#fffdf8, #fbf6ea);
  outline: .5mm solid var(--gold); outline-offset: -3.2mm; }
.c-corner { position: absolute; width: 17mm; height: 17mm; }
.c-corner.tl { top: 5.5mm; right: 5.5mm; transform: scaleX(-1); } .c-corner.tr { top: 5.5mm; left: 5.5mm; }
.c-corner.bl { bottom: 5.5mm; right: 5.5mm; transform: scale(-1, -1); } .c-corner.br { bottom: 5.5mm; left: 5.5mm; transform: scaleY(-1); }

.c-head { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; }
.c-brand { display: flex; align-items: center; gap: 3mm; text-align: start; }
.c-brand svg { width: 14mm; height: 14mm; flex: none; }
.c-brand b { display: block; font-size: 4.6mm; font-weight: 800; color: var(--navy); line-height: 1.25; }
.c-brand span { display: block; font-family: "Inter", sans-serif; font-size: 2.7mm; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.c-no { text-align: end; }
.c-no span { display: block; font-size: 2.5mm; color: var(--muted); } .c-no i { font-style: normal; }
.c-no b { display: inline-block; margin-top: .8mm; font-family: "Inter", sans-serif; font-size: 3.4mm; font-weight: 700; color: var(--navy); border: .3mm solid var(--gold); border-radius: 1.5mm; padding: .6mm 2.4mm; letter-spacing: .04em; }

.c-title { margin-top: 4.5mm; }
.c-title h2 { font-family: "Amiri", "Cairo", serif; font-size: 11.5mm; font-weight: 700; color: var(--navy); margin: 0; line-height: 1.25; }
.c-title p { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 5.6mm; color: var(--gold); margin: .2mm 0 0; letter-spacing: .03em; }
.c-title::after { content: ""; display: block; width: 46mm; height: .5mm; margin: 2.6mm auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.c-line { font-size: 3.9mm; color: var(--muted); margin: 5mm 0 0; line-height: 1.5; }
.c-line span { display: block; font-family: "Inter", sans-serif; font-size: 2.8mm; font-style: italic; }
.c-name { margin-top: 2.4mm; }
.c-name strong { display: block; font-family: "Amiri", "Cairo", serif; font-size: 10.5mm; font-weight: 700; color: var(--navy-2); line-height: 1.3; }
.c-name span { display: block; font-family: "Playfair Display", Georgia, serif; font-size: 5.2mm; color: var(--ink); margin-top: -.6mm; }
.c-name::after { content: ""; display: block; width: 120mm; height: .3mm; margin: 2mm auto 0; background: linear-gradient(90deg, transparent, rgba(200,150,44,.8), transparent); }
.c-course { margin-top: 2.2mm; }
.c-course strong { display: block; font-size: 6.4mm; font-weight: 800; color: var(--navy); line-height: 1.35; }
.c-course span { display: block; font-family: "Inter", sans-serif; font-size: 3.5mm; font-weight: 600; color: var(--muted); }

.c-meta { display: flex; justify-content: center; gap: 0; margin-top: 7.5mm; }
.c-meta > div { padding: 0 7mm; min-width: 44mm; border-inline-start: .3mm solid rgba(200,150,44,.55); }
.c-meta > div:first-child { border-inline-start: 0; }
.c-ml { display: block; font-size: 2.5mm; color: var(--muted); } .c-ml i { font-style: normal; }
.c-meta b { display: block; font-size: 3.8mm; font-weight: 700; color: var(--ink); margin-top: .6mm; }
.c-meta small { display: block; font-family: "Inter", sans-serif; font-size: 2.7mm; color: var(--muted); }

.c-foot { margin-top: auto; width: 100%; display: grid; grid-template-columns: 1fr 34mm 1fr; align-items: end; gap: 6mm; }
.c-sign { text-align: center; justify-self: start; width: 62mm; }
.c-sigline { height: 12mm; border-bottom: .35mm solid var(--ink); margin-bottom: 1.6mm; }
.c-sign b { display: block; font-size: 3.4mm; color: var(--navy); } .c-sign span { display: block; font-family: "Inter", sans-serif; font-size: 2.6mm; color: var(--muted); }
.c-seal { width: 34mm; height: 34mm; filter: drop-shadow(0 .6mm .8mm rgba(0,0,0,.18)); }
.c-verify { justify-self: end; display: flex; align-items: center; gap: 3mm; text-align: start; }
.c-qr { width: 20mm; height: 20mm; background: #fff; padding: 1.2mm; border: .3mm solid rgba(15,52,112,.25); border-radius: 1.2mm; }
.c-qr svg { width: 100% !important; height: 100% !important; display: block; }
.c-verify b { display: block; font-size: 3.1mm; color: var(--navy); } .c-verify span { display: block; font-family: "Inter", sans-serif; font-size: 2.6mm; color: var(--muted); }
.c-verify small { display: block; font-family: "Inter", sans-serif; font-size: 2.4mm; color: var(--gold); font-weight: 600; margin-top: .4mm; }

/* sample watermark: clearly not a real certificate */
.c-wm { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.c-wm span { transform: rotate(-18deg); font-family: "Inter", "Cairo", sans-serif; font-size: 34mm; font-weight: 800; color: rgba(180,35,24,.085); white-space: nowrap; letter-spacing: .04em; }
.c-tag { position: absolute; top: 4mm; left: 50%; transform: translateX(-50%); background: #b42318; color: #fff; font-size: 2.8mm; font-weight: 700; padding: .8mm 4mm; border-radius: 0 0 2mm 2mm; }
.c-tag span { font-family: "Inter", sans-serif; }

/* fitting the certificate on screen (cert.js sets the zoom) */
.cert-fit { width: 100%; display: flex; justify-content: center; }
.cert-fit .cert { flex: none; box-shadow: 0 18px 50px rgba(15,52,112,.22); border-radius: 2px; }

@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  .cert-fit { display: block; }
  .cert-fit .cert { zoom: 1 !important; box-shadow: none; border-radius: 0; }
}
